Based on the same setup in the worship decisions app: https://github.com/lblod/app-worship-decisions-database/pull/29
17 lines
760 B
Common Lisp
17 lines
760 B
Common Lisp
(define-resource file ()
|
|
:class (s-prefix "nfo:FileDataObject")
|
|
:properties `((:filename :string ,(s-prefix "nfo:fileName"))
|
|
(:format :string ,(s-prefix "dct:format"))
|
|
(:size :number ,(s-prefix "nfo:fileSize"))
|
|
(:extension :string ,(s-prefix "dbpedia:fileExtension"))
|
|
(:created :datetime ,(s-prefix "nfo:fileCreated")))
|
|
:has-one `((file :via ,(s-prefix "nie:dataSource")
|
|
:inverse t
|
|
:as "download")
|
|
(data-container :via ,(s-prefix "task:hasFile")
|
|
:inverse t
|
|
:as "data-container"))
|
|
:resource-base (s-url "http://data.lblod.info/files/")
|
|
:features `(no-pagination-defaults include-uri)
|
|
:on-path "files")
|