UCDavisLibrary / fin-ucd-lib-server

MIT License
0 stars 0 forks source link

Site fcrepo backed site config #60

Open jrmerz opened 3 years ago

jrmerz commented 3 years ago

This should be an editable config, stored in fedora, that is always sent on page loaded.

Things to include:

jrmerz commented 3 years ago

Proposal:

Create a new (public readable) root endpoint /applications. Similar to /collections/ the child paths will be broken out by application name. Example /applications/ucd-lib-client. Applications can define data as required.

For the current spec, we need admins to be able to define, Featured Images and Featured Collections. Featured images will have a pointer the feature image container, name, (description?) and link to collection item (CreativeWork). Featured Collections can be a direct links to a collection, where to collection title and image are reused or similar to Featured images, a custom featured container may be specified.

Structure /applications/ucd-lib-client

Featured Container /applications/ucd-lib-client/collections/[container]

Alternatively http://digital.ucdavis.edu/#schema/featured-images and http://digital.ucdavis.edu/#schema/featured-collections can point directly at \@types of http://schema.org/CreativeWork or http://schema.org/Collection in a collection.

jrmerz commented 3 years ago

Overall, I think the general idea is great. I'm a bit confused on the two important predicates. For featuredImages, why not just always point to CreativeWorks, which may just be in the application, and only have clientMedia,

And when would a collection not be an existing one?

@prefix rdf:   <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix fedora: <http://fedora.info/definitions/v4/repository#> .
@prefix ldp:   <http://www.w3.org/ns/ldp#> .
@prefix fin:   <http://digital.ucdavis.edu/#schema> .

<http://localhost:8666/fcrepo/rest/applications/ucd-lib-client>
        rdf:type               fin:ApplicationContainer ;
        rdf:type               fedora:Container; 
        ldp:contains <http://localhost:8666/fcrepo/rest/applications/ucd-lib-client/specialImages>;
        fin:featuredImages   <http://localhost:8666/fcrepo/rest/applications/ucd-lib-client/specialImages/foo.pgn>;
        fin:featuredCollections <http://localhost:8666/fcrepo/rest/applications/ucd-lib-client/exampleCollections>;
        fin:featuredCollections <http://localhost:8666/fcrepo/rest/collections/henry-dart-green>;

And then individual featuredImages

@prefix rdf:   <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix fedora: <http://fedora.info/definitions/v4/repository#> .
@prefix ldp:   <http://www.w3.org/ns/ldp#> .
@prefix fin:   <http://digital.ucdavis.edu/#schema> .

<http://localhost:8666/fcrepo/rest/applications/ucd-lib-client/specialImages>
        rdf:type               fin:FeaturedContainer ;
        rdf:type               fedora:Container; 
        schema.name    "Special Image";
        ldp:contains <http://localhost:8666/fcrepo/rest/applications/ucd-lib-client/specialImage/foo.png>
        ldp:contains <http://localhost:8666/fcrepo/rest/applications/ucd-lib-client/specialImage/bar.png>

http://localhost:8666/fcrepo/rest/applications/ucd-lib-client/specialImage/foo rdf:type fin:FeaturedContainer ; rdf:type schema:CreativeWork; schema.name "Foo"; ldp:contains http://localhost:8666/fcrepo/rest/applications/ucd-lib-client/specialImage/foo/foo.png schema:associatedMedia http://localhost:8666/fcrepo/rest/applications/ucd-lib-client/specialImage/foo/foo.png


Not sure about featuredCollections

``` ttl
@prefix rdf:   <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix fedora: <http://fedora.info/definitions/v4/repository#> .
@prefix ldp:   <http://www.w3.org/ns/ldp#> .
@prefix fin:   <http://digital.ucdavis.edu/#schema> .

<http://localhost:8666/fcrepo/rest/applications/ucd-lib-client/exampleCollection>
        rdf:type               fin:FeaturedContainer ;
        rdf:type               fedora:Container; 
        schema.name    "Special Image";
        fin:associatedMedia *I DON'T GET THIS ONE'