mercredi 4 mars 2015

How to model directories and files using schema.org types with JSON-LD syntax?


Vote count:

0




I'm trying to model the concept of folders (or directories) and files. Folders can contain files, or other folders (arbitrary nested recursive structure, like on your typical filesystem). I would ideally like to start with a schema.org context and base type, and extend that to represent these entities. For various reasons, I am also interested in using JSON-LD as the format.


After some research and looking into examples, it seems like using a base of http://ift.tt/V1OmC2, along with additionalType in conjunction with productontology.org is a relatively straightforward way to express this. But is this a good way to express these concepts? I am open to using just about anything else, in place of an entry from productontology.org, as the additionalType, particularly if it allows me to express more meaningful properties than simply using those from CreativeWork.


Proposed folder example (playground link):



{
"@context": "http://schema.org/",
"@type": "CreativeWork",
"@id": "http://ift.tt/1B4LpH9",
"additionalType": "http://ift.tt/1B4LpXn",
"name": "My Folder",
"url": "http://ift.tt/1B4LpH9"
}


Proposed file example (playground link):



{
"@context": "http://schema.org/",
"@type": "CreativeWork",
"@id": "http://ift.tt/1B4LpXp",
"additionalType": "http://ift.tt/1M7ATjS",
"name": "My File",
"isPartOf": {
"@context": "http://schema.org/",
"@type": "CreativeWork",
"@id": "http://ift.tt/1B4LpH9",
"additionalType": "http://ift.tt/1B4LpXn",
"name": "My Folder",
"url": "http://ift.tt/1B4LpH9"
},
"url": "http://ift.tt/1B4LpXp"
}


asked 1 min ago







How to model directories and files using schema.org types with JSON-LD syntax?

Aucun commentaire:

Enregistrer un commentaire