]> RDF Graph Patterns and Templates This vocabulary defines terms used to describe RDF Graph patterns and templates as used in RDF Query languages (e.g. SPARQL) and elsewhere. The goal of the design is to model common parts of these languages in RDF in a way that allows for the generation of the actual queries in their native format. Note that only patterns and templates are modeled, not complete queries. A basic pattern/template is a set of reified RDF statements (reification is similar to the one built-in into RDF). Leaves of a reified triple are URIs, literals (stand for themselves) or blank nodes (variables). Variables have no names; blank nodes can be assigned nodeIDs and shared in a normal RDF way. More complex patterns are built by joining and filtering simpler patterns. Joining (cf. SPARQL UNION, regexp |) allows specification of alternative patterns; filtering (cf. SPARQL FILTER) constrains the allowable binding of variables. &vocabid; Sergei Egorov <esl@ariadnegenomics.com> Copyright © 2006 Sergei Egorov OWL metadata & format Copyright © 2005 Richard Newman and Ian Davis &gpt; gpt text/html HTML application/rdf+xml OWL 2006-02-21 RDF Statement Pattern/Template A pattern or template for a single RDF Statement (triple). A member of this class describes a pattern that can be matched against any RDF statement or a template that can be used to build such a statement from its three components. A pattern matches if its subject, predicate, and object match the corresponding components of the statement. 1 1 1 2006-02-21 pattern for subject The pattern/template for the statement's subject. 2006-02-21 pattern for predicate The pattern/template for the statement's predicate. 2006-02-21 pattern for object The pattern/template for the statement's object. 2006-02-21 RDF Graph Pattern/Template A pattern/template for an RDF Graph. A member of this class describes a pattern/template for an RDF graph. A graph pattern is represented as a set of patterns/templates (one per RDF statement). A graph pattern matches if all its statement patterns match some statements in the target graph (shared blank nodes should match the same RDF resource). The result of a match is a set of solutions, each solution being a substitution providing replacement values for all blank nodes in the pattern graph. Replacement values can be literals, URIs, or other blank nodes. The set is modeled as an RDF list to make it closed with the assumption that the elements of the list are members of the set being modeled (cf. owl:oneOf). The graph pattern node and the list are connected with the gpt:allOf predicate. 1 1 2006-02-21 members of a set The set enumerated in a list form. 2006-02-21 Union of Patterns A set of alternative patterns. A member of this class describes pattern alternatives. A union pattern matches if any of the alternative patterns match. Alternative patterns can be instances of gpt:Graph, gpt:Filter, or another gpt:Union. The set of alternatives is modeled as an RDF list to make it closed with assumption that the elements of the list are members of the set being modeled (cf. owl:oneOf). The union pattern node and the list are connected with the gpt:allOf predicate. 1 1 2006-02-21 Filter Pattern A pattern with constraints on its variables. A member of this class describes a pattern with a boolean expression imposing constraints on possible values of its variables. A filter pattern matches if its base pattern matches and the filter expression evaluates to true for the given solution (a set of values corresponding to the blank nodes in the graph patterns). 1 1 1 1 2006-02-21 base pattern for filtering The pattern which variables are restricted. 2006-02-21 value constraint expression The expression restricting values of variables. 2006-02-21 Value Constraint Expression Any constraint expression. This is the base class for all constraint expressions. Constraint expressions are distinguished by their class; they have zero or more arguments as defined by the corresponding class. The vocabulary of constraint expressions now covers a very small subset of SPARQL FILTER expressions; more expressions will be added later (possibly in a separate namespace). 1 1 1 1 2006-02-21 first argument The first argument of a constraint expression. 2006-02-21 second argument The second argument of a constraint expression. 2006-02-21 The third argument of a constraint expression. 2006-02-21 isURI(A) True if A is an IRI/URI. 1 1 2006-02-21 isBlank(A) True if A is a blank node. 1 1 2006-02-21 isLiteral(A) True if A is a literal. 1 1 2006-02-21 RDFterm-equal(A, B) True if A and B are the same RDF terms. 1 1 1 1 2006-02-21 A || B True if A or B are true. 1 1 1 1 2006-02-21