Class PropertyPathBuilder
- java.lang.Object
-
- org.eclipse.rdf4j.sparqlbuilder.constraint.propertypath.builder.PropertyPathBuilder
-
public class PropertyPathBuilder extends java.lang.Object
- Since:
- 4.0.0
-
-
Field Summary
Fields Modifier and Type Field Description private PropertyPath
head
-
Constructor Summary
Constructors Modifier Constructor Description private
PropertyPathBuilder()
(package private)
PropertyPathBuilder(IRI predicate)
(package private)
PropertyPathBuilder(Iri predicate)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description PropertyPath
build()
Build the path.PropertyPathBuilder
group()
Enclose the path with`(` and `)`
.private PropertyPath
groupIfNotGrouped(PropertyPath path)
PropertyPathBuilder
inv()
Invert whatever comes next (i.e.static PropertyPathBuilder
of(IRI predicate)
static PropertyPathBuilder
of(Iri predicate)
PropertyPathBuilder
oneOrMore()
Append`+`
to the path.PropertyPathBuilder
or(java.util.function.Consumer<EmptyPropertyPathBuilder> subtreeBuilder)
Append`|`
and the product of thesubtreeBuilder
to the path.PropertyPathBuilder
or(IRI predicate)
Append`|` path
to the path.PropertyPathBuilder
or(PropertyPath path)
Append`|` path
to the path.PropertyPathBuilder
or(Iri predicate)
Append`|` predicate
to the path.PropertyPathBuilder
then(java.util.function.Consumer<EmptyPropertyPathBuilder> subtreeBuilder)
Append`/`
and the product of thesubtreeBuilder
to the path.PropertyPathBuilder
then(IRI predicate)
Append`/` path
to the path.PropertyPathBuilder
then(PropertyPath path)
Append`/` path
to the path.PropertyPathBuilder
then(Iri predicate)
Append`/` predicate
to the path.private PropertyPathBuilder
withSubtree(java.util.function.Consumer<EmptyPropertyPathBuilder> subtreeBuilder, java.util.function.BiFunction<PropertyPath,PropertyPath,PropertyPath> assembler)
PropertyPathBuilder
zeroOrMore()
Append`*`
to the path.PropertyPathBuilder
zeroOrOne()
Append`?`
to the path.
-
-
-
Field Detail
-
head
private PropertyPath head
-
-
Method Detail
-
of
public static PropertyPathBuilder of(Iri predicate)
-
of
public static PropertyPathBuilder of(IRI predicate)
-
build
public PropertyPath build()
Build the path.- Returns:
-
inv
public PropertyPathBuilder inv()
Invert whatever comes next (i.e. append^
.
-
groupIfNotGrouped
private PropertyPath groupIfNotGrouped(PropertyPath path)
-
then
public PropertyPathBuilder then(Iri predicate)
Append`/` predicate
to the path.
-
then
public PropertyPathBuilder then(IRI predicate)
Append`/` path
to the path.
-
then
public PropertyPathBuilder then(PropertyPath path)
Append`/` path
to the path.
-
then
public PropertyPathBuilder then(java.util.function.Consumer<EmptyPropertyPathBuilder> subtreeBuilder)
Append`/`
and the product of thesubtreeBuilder
to the path.
-
withSubtree
private PropertyPathBuilder withSubtree(java.util.function.Consumer<EmptyPropertyPathBuilder> subtreeBuilder, java.util.function.BiFunction<PropertyPath,PropertyPath,PropertyPath> assembler)
-
or
public PropertyPathBuilder or(Iri predicate)
Append`|` predicate
to the path.
-
or
public PropertyPathBuilder or(IRI predicate)
Append`|` path
to the path.
-
or
public PropertyPathBuilder or(PropertyPath path)
Append`|` path
to the path.
-
or
public PropertyPathBuilder or(java.util.function.Consumer<EmptyPropertyPathBuilder> subtreeBuilder)
Append`|`
and the product of thesubtreeBuilder
to the path.
-
zeroOrMore
public PropertyPathBuilder zeroOrMore()
Append`*`
to the path.
-
oneOrMore
public PropertyPathBuilder oneOrMore()
Append`+`
to the path.
-
zeroOrOne
public PropertyPathBuilder zeroOrOne()
Append`?`
to the path.
-
group
public PropertyPathBuilder group()
Enclose the path with`(` and `)`
.
-
-