Annotation Interface SparqlResultSetMapping
Specifies the mapping of the result of a native SPARQL query.
Example:
Query q = em.createNativeQuery("SELECT ?uri ?label ?comment WHERE {" +
"?uri a <http://onto.fel.cvut.cz/ontologies/jopa/Example> ;" +
"rdfs:label ?label ;" +
"rdfs:comment ?comment ." +
"}", "ExampleResults");
@SparqlResultSetMapping(name="ExampleResults",
classes={
@ConstructorResult(targetClass=cz.cvut.kbss.jopa.Example, variables={
@VariableResult(name="uri"),
@VariableResult(name="label"),
@VariableResult(name="comment")
}
}
)
- See Also:
-
Required Element Summary
Required Elements -
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionSpecifies the result set mapping to constructors.Specifies the result set mapping to entities.Specifies the result set mapping to scalar values.
-
Element Details
-
-
classes
ConstructorResult[] classesSpecifies the result set mapping to constructors.- Default:
- {}
-
entities
EntityResult[] entitiesSpecifies the result set mapping to entities.- Default:
- {}
-
variables
VariableResult[] variablesSpecifies the result set mapping to scalar values.- Default:
- {}
-