Nodetyping ModelsNodetyping models represent the type that RDF nodes have in a graph. RDF nodes can be typed either as a Literal, or as a URI Reference. Nodes without a type are Blank Nodes. Nodetyping models are used to constrain results to be literals or URI references. These types have the URIs of The standard set of aliases is defined by the alias <http://tucana.org/tucana#> as tucana; Like datatyping models, nodetyping models are generally read-only. You do not insert statements into them as you do with standard or full-text models. Conceptually, they contain statements about the datatypes of nodes, such as: [ <http://namespace/ns#value> <rdf:type> <tucana:uriReference> ] Nodetyping models also contain statements describing the type for all literals. While statements about literals are not strictly legal RDF, the statements do not exist in any RDF model, and are only used to constrain variables. An example of this kind of statement is: [ 'This is a string' <rdf:type> <rdfs:Literal> ] Creating Nodetyping ModelsUse the For example, to create the nodetyping model create <rmi://mysite.com/server1#type> <http://tucana.org/tucana#TypeModel>; The alias <http://tucana.org/tucana#> as tucana; Querying Nodetyping ModelsQuerying nodetyping models is much the same as for normal Kowari models. Nodetyping models contain type statements for all URI reference and literal nodes on the server (not just for a single model). To use a nodetyping model in a query, make sure you have a node type model available. See the Creating Nodetyping Models section for more information. Then compose a constraint with the The example queries shown assume that the standard aliases are in place, as follows: alias <http://tucana.org/tucana#> as tucana; The first example uses the nodetyping model select $subject from <rmi://mysite.com/server1#data> This returns: [ http://qqq.com/staff/corky ] The next example finds all predicates which are not used to refer to blank nodes. That is, the object node is either a literal or a URI reference. select $predicate from <rmi://mysite.com/server1#data> This returns: [ http://www.w3.org/1999/02/22-rdf-syntax-ns#value ] The next example does not return any data as it looks for all statements that have a literal as the subject. This is not valid RDF so no data matches the constraints. select $subject from <rmi://mysite.com/server1#data> The next example finds a list of all literals in the system. Note that the model in the select $l from <rmi://mysite.com/server1#data> The final example lists the literals found in a single model. It is only necessary to join the variable to the object position in the constraint, as literals can only appear in this position in RDF. select $object from <rmi://mysite.com/server1#data> The first 10 lines of this 48 line result are: [ Corky Crystal ] |
Latest NewsKowari 1.1.0 Pre-release 1 Released ![]() ![]() |
|||||
© 2001-2004 Tucana Technologies, Inc. Some rights reserved. |