Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Referencing the JSON context file (and other schema files) #234

Closed
stuartasutton opened this issue Nov 23, 2016 · 4 comments
Closed

Referencing the JSON context file (and other schema files) #234

stuartasutton opened this issue Nov 23, 2016 · 4 comments
Assignees

Comments

@stuartasutton
Copy link
Contributor

Email from Eric Korb to me:

"Two main questions: 1. Is this the endpoint for the vocabs? http://purl.org/ctdl/terms/; and 2. What is the endpoint for the context?"

NOTE: Eric's email throws light on the potential confusion between purls that resolve to human-readable HTML pages about the CTDL /terms/ and /vocabs/ and purls that resolve to serializations of /terms/ and /vocabs/. In a separate issue #233, I'll propose a solution...

Eric's very legitimate questions regard the direct endpoint of serializations--(1) for the /terms/ (properties/classes/concept scheme classes) and /vocabs/ (concept classes); and, (2) for the JSON context file.

Context file access

(http://credreg.net/ctdl/Schema?type=json&direct=true)

Schema.org has two ways to two access mechanisms to its context file: (1) browser 'content negotiation'; and (2) direct link (see, schema.org issue 990. This is what Eric is asking for in terms of context file access. It might well be worth creating a purl that resolves to the context file; perhaps:

http://purl.org/ctdl/jsonldcontext/ (302) that resolves to the jsonldcontext.json file directly or via http://credreg.net/ctdl/Schema?type=json&direct=true.

CTDL /terms/ schema file and vocabs files (.ttl, json-ld)

(http://credreg.net/ctdl/Schema?type=turtle&direct=true, http://credreg.net/ctdl/Schema?type=schema&direct=true)

We are incomplete here in terms of having complete turtle and json-ld serialization files for both the schema in /terms/ and the schemes in /vocabs/. When they are complete, we should be able to directly access indepentent file pairs (.ttl & .jsonld) for the /terms/ and each set of the vocabulary concepts in /vocabs/.

@stuartasutton stuartasutton added this to the Release/Update - 2016-12-05 milestone Nov 23, 2016
@siuc-nate
Copy link
Contributor

The updates to the serializations page include the following structure:
For the JSON-LD Context:
http://credreg.net/ctdl/Schema/20161117/context/json

For the Turtle Serialization:
http://credreg.net/ctdl/Schema/20161117/context/ttl

For the Validation Schema:
http://credreg.net/ctdl/Schema/20161117/validation/json

I may need to restructure these to position the release at the end of the URL. This will enable PURL-izing these URLs in such a way that a consumer could append the release name to the end of the PURL. I intend to make updates to break out the turtle serialization into separate serializations for each vocabulary, so I'll make this a part of that update.

@siuc-nate
Copy link
Contributor

siuc-nate commented Nov 30, 2016

While working on this yesterday, I came up with a couple of potential setups for the URL structure - I would like to keep a consistent structure and ordering of parts of the URL that is as PURL-friendly as possible. To that end, I settled on the following possibilities:
image

The first set, highlighted in green, is what I am strongly leaning towards between the two. Most notably, it enables PURL-izing the schema serializations - it also means that targeting a specific release (which will likely be a rare task) is consistently the last (and consistently optional) parameter.

Something else to consider would be not using a URL structure to handle the format or the release - these can be handled via URL parameters (e.g., /ctdl/terms/directCostType?format=json&release=20161117 ). Parameters like this function independent of each other and/or the order they're included in - the only downside is that their URLs are not as "clean" looking. If this is acceptable, I would prefer it over the above examples, as it also opens the door to other parameters in the future without affecting the URL structure and is much easier to work with, programmatically. It also avoids potential collisions if we ever needed a term called "pending" or "current", though this is unlikely:
image

I should also note that in the examples above, the defaults are to the current release and to the human-readable version. The system also enables the keywords "current" (which is the assumed default) and "pending" in place of a specific release (e.g., "20161117") anywhere you see "{release}".

@siuc-nate
Copy link
Contributor

Leaving this one open until I have released the serialization update, so I can check it against the items in this thread.

@siuc-nate
Copy link
Contributor

siuc-nate commented Dec 5, 2016

You can now access terms via:
http://purl.org/ctdl/terms/{term}
And vocabulary terms via:
http://purl.org/ctdl/vocabs/{vocabulary}/{term}
You can additionally add /json or /turtle to the ends of those URLs to retrieve the respective file formats, e.g.:
http://credreg.net/ctdl/terms/Certificate/turtle
http://purl.org/ctdl/vocabs/CostType/Tuition/json

The JSON-LD context can be accessed via (release is optional and defaults to the current release):
http://purl.org/ctdl/schema/context/?release={release}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants