Package com.stardog.stark.util
Class GraphBuilder
- java.lang.Object
-
- com.stardog.stark.util.GraphBuilder
-
public final class GraphBuilder extends java.lang.ObjectUtility 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 voidadd(Statement theStatement)ResourceBuilderbnode()java.util.Set<Statement>graph()Return the Graph created via this builderResourceBuilderinstance(IRI theType)Create a new anonymous instance of the given typeResourceBuilderinstance(Resource theRes, IRI theType)Create abuilderfor the given individual and add the typeResourceBuilderinstance(java.lang.String theURI, IRI theType)Create abuilderfor the given individual and add the typeResourceBuilderiri(IRI theURI)Create abuilderfor the individualResourceBuilderiri(java.lang.String theURI)Create abuilderfor the individualResourcelist(java.util.List<? extends Value> theList)voidreset()Clear the contents of the builderResourceBuilderresource(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 abuilderfor the individual- Parameters:
theURI- the individual- Returns:
- the
builder
-
iri
@Nonnull public ResourceBuilder iri(@Nonnull java.lang.String theURI)
Create abuilderfor 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
builderfor the new individual
-
instance
@Nonnull public ResourceBuilder instance(@Nonnull Resource theRes, @Nonnull IRI theType)
Create abuilderfor the given individual and add the type- Parameters:
theType- the typetheRes- the individual- Returns:
- a
builderfor the new individual
-
instance
@Nonnull public ResourceBuilder instance(@Nullable java.lang.String theURI, @Nullable IRI theType)
Create abuilderfor the given individual and add the type- Parameters:
theURI- the individualtheType- the type- Returns:
- a
builderfor the new individual
-
bnode
public ResourceBuilder bnode()
-
resource
@Nonnull public ResourceBuilder resource(@Nonnull Resource theRes)
-
add
public void add(Statement theStatement)
-
-