Class RelationMapBuilder
java.lang.Object
org.eclipse.rdf4j.spring.dao.support.RelationMapBuilder
- Since:
- 4.0.0
- Author:
- Florian Kleedorfer
-
Field Summary
-
Constructor Summary
ConstructorDescriptionRelationMapBuilder
(RDF4JTemplate rdf4JTemplate, IRI predicate) RelationMapBuilder
(RDF4JTemplate rdf4JTemplate, RdfPredicate predicate) -
Method Summary
Modifier and TypeMethodDescriptionBuilds a One-to-Many Map using the configuration of this builder.Builds a One-to-One Map using the configuration of this builder.constraints
(GraphPattern... constraints) Constrains the result iff theGraphPattern
contains the variables_relSubject
and/or_relObject
, which are the variables in the triple with theRdfPredicate
specified in the constructor.Indicates that the existence of the triple is not required, allowing to use the constraints to select certain subjects and to answer the mapping to an empty Set in thebuildOneToMany()
case andNOTHING
in thebuildOneToOne()
case.Indicates that the builder should use the triple's object for the key in the resultingMap
instead of the subject (the default).withBinding
(String key, Boolean value) withBinding
(String key, Double value) withBinding
(String key, Float value) withBinding
(String key, Integer value) withBinding
(String key, String value) withBinding
(String key, IRI value) withBinding
(String key, Value value) withBinding
(Variable key, Boolean value) withBinding
(Variable key, Double value) withBinding
(Variable key, Float value) withBinding
(Variable key, Integer value) withBinding
(Variable key, String value) withBinding
(Variable key, IRI value) withBinding
(Variable key, Value value) withBindingMaybe
(String key, Boolean value) withBindingMaybe
(String key, Double value) withBindingMaybe
(String key, Float value) withBindingMaybe
(String key, Integer value) withBindingMaybe
(String key, String value) withBindingMaybe
(String key, IRI value) withBindingMaybe
(String key, Value value) withBindingMaybe
(Variable key, Boolean value) withBindingMaybe
(Variable var, Double value) withBindingMaybe
(Variable key, Float value) withBindingMaybe
(Variable key, Integer value) withBindingMaybe
(Variable key, String value) withBindingMaybe
(Variable key, IRI value) withBindingMaybe
(Variable key, Value value)
-
Field Details
-
_relSubject
-
_relObject
-
-
Constructor Details
-
RelationMapBuilder
-
RelationMapBuilder
-
-
Method Details
-
constraints
Constrains the result iff theGraphPattern
contains the variables_relSubject
and/or_relObject
, which are the variables in the triple with theRdfPredicate
specified in the constructor. -
relationIsOptional
Indicates that the existence of the triple is not required, allowing to use the constraints to select certain subjects and to answer the mapping to an empty Set in thebuildOneToMany()
case andNOTHING
in thebuildOneToOne()
case.- Returns:
- the builder
-
useRelationObjectAsKey
Indicates that the builder should use the triple's object for the key in the resultingMap
instead of the subject (the default). -
buildOneToOne
Builds a One-to-One Map using the configuration of this builder. Throws an Exception if more than one values are found for a given key. IfisRelationOptional
istrue
and no triple is found for the key,NOTHING
is set as the value. -
buildOneToMany
Builds a One-to-Many Map using the configuration of this builder. -
withBinding
-
withBinding
-
withBindingMaybe
-
withBindingMaybe
-
withBinding
-
withBinding
-
withBindingMaybe
-
withBindingMaybe
-
withBindingMaybe
-
withBinding
-
withBinding
-
withBindingMaybe
-
withBinding
-
withBinding
-
withBindingMaybe
-
withBindingMaybe
-
withBinding
-
withBinding
-
withBindingMaybe
-
withBindingMaybe
-
withBinding
-
withBinding
-
withBindingMaybe
-
withBindingMaybe
-
withBinding
-
withBinding
-
withBindingMaybe
-
withBindingMaybe
-