solid / solid/data-interoperability-panel
Metadata ontologies for containers?
Nobody has claimed this yet.
- Dominant language
- Bikeshed
- Stars
- 58
- Forks
- 18
- PR merge metrics
- No merged PRs in 30d
Description
What ontologies should be used when returning a GET on a LDP Container?
Currently there are a number of ontologies used, but they are not very satisfactory.
Here is an example served by NSS
curl -H 'Accept: text/turtle' https://csarven.ca/archives/linked-research-decentralised-web/inbox/
@prefix : <#>.
@prefix inbox: <>.
@prefix ldp: <http://www.w3.org/ns/ldp#>.
@prefix terms: <http://purl.org/dc/terms/>.
@prefix XML: <http://www.w3.org/2001/XMLSchema#>.
@prefix st: <http://www.w3.org/ns/posix/stat#>.
@prefix tur: <http://www.w3.org/ns/iana/media-types/text/turtle#>.
inbox:
a ldp:BasicContainer, ldp:Container;
terms:modified "2020-11-09T13:36:42Z"^^XML:dateTime;
ldp:contains inbox:87bc9a28-9f94-4b1b-a4b9-503899795f6e;
st:mtime 1604929002.475;
st:size 4096.
inbox:87bc9a28-9f94-4b1b-a4b9-503899795f6e
a tur:Resource, ldp:Resource;
terms:modified "2019-07-29T14:09:06Z"^^XML:dateTime;
st:mtime 1564409346.323;
st:size 1353.
The stat ontology
Makes a lot of sense when serving files from the file system. But over half the attributes there are useless for the web: stat:dev, stat:gid, stat:ino, stat:mode, stat:nlink, stat:rdev are all too specific to an OS instance, and don't have much value outside of it. The only one that specifies the unit is the size in bytes, which is good to have. It is not clear what ctime is ("time of last status change"?). In java we have modified and created times we can access. Those would be useful to publish. But in what units? The mtime above has a decimal place. Why?
Can the ontology be made more explicit, in which case it would be easier to know what the standard should be?
Dublin Core
The terms:modified has an xsd:dateTime in the above curl result, but Dublin Core does not specify that the value of terms:modified should be in that format. It has a very flexible string format to allow a lot of variation. It has a section on date, but that does not mentione xsd. (And I could not find documentation on that). It has a created time and a modified time, which would be useful. It has a "sizeOrDuration" attribute, but again the format is not clear to me as an implementor.
IT would be useful to have small specs for things that address concerns like this, after concertation with developers and the community.
Note
Just to get my milestone done, I am producing this for the moment in Scala3
def containsAsTurtle(path: Path, att: BasicFileAttributes): String =
val filename = path.getFileName.toString + { if att.isDirectory then "/" else "" }
s"""<> ldp:contains <$filename> .
| <$filename> stat:size ${att.size};
| stat:mtime ${att.lastModifiedTime().toMillis};
| stat:ctime ${att.creationTime().toMillis} .
|""".stripMargin
But I don't know if the units are correct, or how much traction this has with other servers.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Begin with the LDP Container Turtle response and the Scala 3 containsAsTurtle snippet in the issue, then read the referenced stat and Dublin Core terms. Done requires documented agreement on the ontology choices, value formats, and interoperability criteria for container responses.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- scala
- Domain
- api, documentation
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100