-
Notifications
You must be signed in to change notification settings - Fork 0
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
Data types in the vocabulary #96
Comments
I think we discussed this during a tech call, but just to capture the reasoning here. The reason for the Datatype#list_uri is as you assumed, we need an XML Schema type for the RDF representations and "List of URI" is not a Schema datatype like "List of IDs" (xs:IDREFS) is. However, is is easy enough to define our own XS types and Datatype#list_uri (and Datatype#string_list) is defined at the bottom of the lapps.vocabulary file. The Vocabulary DSL processor uses those definitions to generate the XML Schemas for the types that can then be deployed to vocab.lappsgrid.org. I have modified the DSL processor to recognize "List of URI" as a synonym for Datatype#list_uri, but such synonyms required modifying, recompiling, and redeploying the DSL processor. Whereas new datatypes can be used right away simply by defining them in the lapps.vocabulary file without any changes to the DSL processor. |
I have tweaked the Vocabulary DSL so that human readable aliases can be defined for XML Schema types that are defined. This allows authors to use things like "List of URI" or "List of Strings" in the documentation/DSL that are translated into the correct XML Schema definitions in the RDF. The main changes to the vocabulary files are:
The Datatypes.schema file is just an XML Schema that uses Groovy MarkupBuilder syntax instead of XML. Refer to the XML Schema Datatype documentation (or any good XML Schema tutorial) for the elements and attributes that are allowed in XML Schema. |
The 1.3.0 snapshot has a new data type name
Datatype#list_uri
, see the Token type for an example. Until now, the type listed for the values of properties were things like String, Integer, String or URI, List of URI, List of IDs,Set of IDs, List of Strings, and maybe a few I missed. The newDatatype#list_uri
is a datatype defined in the vocabulary and is associated with a URI which is printed here since the link is broken (this is somewhat simplified):The reason appears to be that this is needed for generating RDF schema. Some general remarks and questions on this for discussion:
Datatype#list_uri
instead ofList of URI
(which may be should beList of URIs
so it is consistent withList of IDs
. I do not find it very user-friendly.List of URIs
but use the link as well. This way we have the explicit definition but it the vocabulary will still show a more friendly name.The text was updated successfully, but these errors were encountered: