dojo.data.rdf
Version 1, changed by adamsz 07/08/2006.
Show version history
There are some challenges to building a RDF data provider for dojo data package. Below are some notes on aspects of the RDF model that may not exactly fit with the (SDO-like) dojo.data model and so require some thinking:
- In RDF all names are URIs, including property (attribute) names, class names, and resource URIs (object identifiers)
- unlike traditional data models (i.e. datalog semantics), RDF is not constraint-based -- declarations such as an object's class or what type the value of an attribute is expected to have do not constrain what can be asserted about an object, instead they describe what inferences can be made. For example, a declaration that says value of an attribute should be an Integer means that the system can infer the data type of the object that is assigned as the attribute's value (that it is an Integer). But what it does not mean is that it is error to assign an object that is declared to be of some other type. In that case, both assertions about the object would stand and it would be treated as both an Integer and the other type. Of course,this could lead to an inconsistency in the model, e.g. an object being both an integer and string -- but that is determined by the particular ontology (schema) and application.As the above example implies, resources can be of many classes.
- The value of an attribute is either RDF resource (which can be treated as an object reference) or a literal (which can be treated as an atomic data value). Literals are either plain (unicode) string or can have an optional datatype (which is usually an XML Schema simple datatype or a RDF-specific datatype to indicate the string is XML). Plain literals can also have an optional xml:lang value to specify the language of the string.
- RDF does not support multi-valued attributes, however an object can multiple attributes with the same name. Assuming its unfeasible to change the SDO implementation to allow multiple attributes of with the same name, one way around this would be to collect all the values of the attributes into an Array which is the value of a single attribute. However this approach requires some care, because RDF also provides some built-in resource types for representing lists and similar collections (rdf:List, rdf:Bag, rdf:Seq, rdf:Alt) and, depending how these RDF collection types are mapped to SDO, we'd need to avoid introducing ambiguity about how a multi-valued attribute should be mapped back to RDF.
Hide quick tip X
Quick Tip: Link to Other Wiki Pages
Use the Link function to link to an existing wiki page, a new wiki page, a document, or a URL.
| |
File |
By |
Size |
Attached |
Ver. |
|