public final class GraphBuilder extends Object
Utility class for building a `Graph`
| Constructor and Description |
|---|
GraphBuilder() |
| Modifier and Type | Method and Description |
|---|---|
void |
add(Statement theStatement) |
ResourceBuilder |
bnode() |
Set<Statement> |
graph()
Return the Graph created via this builder
|
ResourceBuilder |
instance(IRI theType)
Create a new anonymous instance of the given type
|
ResourceBuilder |
instance(Resource theRes,
IRI theType)
Create a
builder for the given individual and add the type |
ResourceBuilder |
instance(String theURI,
IRI theType)
Create a
builder for the given individual and add the type |
ResourceBuilder |
iri(IRI theURI)
Create a
builder for the individual |
ResourceBuilder |
iri(String theURI)
Create a
builder for the individual |
Resource |
list(List<? extends Value> theList) |
void |
reset()
Clear the contents of the builder
|
ResourceBuilder |
resource(Resource theRes) |
public void reset()
@Nonnull public ResourceBuilder iri(@Nonnull IRI theURI)
builder for the individualtheURI - the individualbuilder@Nonnull public ResourceBuilder iri(@Nonnull String theURI)
builder for the individualtheURI - the individualbuilder@Nonnull public ResourceBuilder instance(@Nonnull IRI theType)
theType - the typebuilder for the new individual@Nonnull public ResourceBuilder instance(@Nonnull Resource theRes, @Nonnull IRI theType)
builder for the given individual and add the typetheType - the typetheRes - the individualbuilder for the new individual@Nonnull public ResourceBuilder instance(@Nullable String theURI, @Nullable IRI theType)
builder for the given individual and add the typetheURI - the individualtheType - the typebuilder for the new individualpublic ResourceBuilder bnode()
@Nonnull public ResourceBuilder resource(@Nonnull Resource theRes)
public void add(Statement theStatement)
Copyright © 2010-2016 Stardog Union. All Rights Reserved.