Package com.stardog.stark.util
Class GraphBuilder
- java.lang.Object
-
- com.stardog.stark.util.GraphBuilder
-
public final class GraphBuilder extends java.lang.Object
Utility class for building a `Graph`
- Since:
- 1.0
- Version:
- 1.0
- Author:
- Michael Grove
-
-
Constructor Summary
Constructors Constructor Description GraphBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(Statement theStatement)
ResourceBuilder
bnode()
java.util.Set<Statement>
graph()
Return the Graph created via this builderResourceBuilder
instance(IRI theType)
Create a new anonymous instance of the given typeResourceBuilder
instance(Resource theRes, IRI theType)
Create abuilder
for the given individual and add the typeResourceBuilder
instance(java.lang.String theURI, IRI theType)
Create abuilder
for the given individual and add the typeResourceBuilder
iri(IRI theURI)
Create abuilder
for the individualResourceBuilder
iri(java.lang.String theURI)
Create abuilder
for the individualResource
list(java.util.List<? extends Value> theList)
void
reset()
Clear the contents of the builderResourceBuilder
resource(Resource theRes)
-
-
-
Method Detail
-
graph
public java.util.Set<Statement> graph()
Return the Graph created via this builder- Returns:
- the graph
-
reset
public void reset()
Clear the contents of the builder
-
iri
@Nonnull public ResourceBuilder iri(@Nonnull IRI theURI)
Create abuilder
for the individual- Parameters:
theURI
- the individual- Returns:
- the
builder
-
iri
@Nonnull public ResourceBuilder iri(@Nonnull java.lang.String theURI)
Create abuilder
for the individual- Parameters:
theURI
- the individual- Returns:
- the
builder
-
instance
@Nonnull public ResourceBuilder instance(@Nonnull IRI theType)
Create a new anonymous instance of the given type- Parameters:
theType
- the type- Returns:
- a
builder
for the new individual
-
instance
@Nonnull public ResourceBuilder instance(@Nonnull Resource theRes, @Nonnull IRI theType)
Create abuilder
for the given individual and add the type- Parameters:
theType
- the typetheRes
- the individual- Returns:
- a
builder
for the new individual
-
instance
@Nonnull public ResourceBuilder instance(@Nullable java.lang.String theURI, @Nullable IRI theType)
Create abuilder
for the given individual and add the type- Parameters:
theURI
- the individualtheType
- the type- Returns:
- a
builder
for the new individual
-
bnode
public ResourceBuilder bnode()
-
resource
@Nonnull public ResourceBuilder resource(@Nonnull Resource theRes)
-
add
public void add(Statement theStatement)
-
-