public class ModelBuilder extends Object
Utility class for creating a set of statements using ResourceBuilders.
| Constructor and Description |
|---|
ModelBuilder() |
ModelBuilder(org.openrdf.model.ValueFactory theValueFactory) |
| Modifier and Type | Method and Description |
|---|---|
org.openrdf.model.ValueFactory |
getValueFactory() |
ResourceBuilder |
instance()
Create an un-typed anonymous individual in the graph
|
ResourceBuilder |
instance(org.openrdf.model.IRI theType)
Create a new anonymous instance of the given type
|
ResourceBuilder |
instance(org.openrdf.model.IRI theType,
org.openrdf.model.Resource theRes)
Create a
builder for the given individual and add the type |
ResourceBuilder |
instance(org.openrdf.model.IRI theType,
String theURI)
Create a
builder for the given individual and add the type |
ResourceBuilder |
instance(org.openrdf.model.IRI theType,
URI theURI)
Create a
builder for the given individual and add the type |
ResourceBuilder |
iri(org.openrdf.model.IRI theURI)
Create a
builder for the individual |
ResourceBuilder |
iri(String theURI)
Create a
builder for the individual |
org.openrdf.model.Model |
model()
Return the Graph created via this builder
|
void |
reset()
Clear the contents of the builder
|
public ModelBuilder()
public ModelBuilder(org.openrdf.model.ValueFactory theValueFactory)
public org.openrdf.model.Model model()
public void reset()
public ResourceBuilder iri(org.openrdf.model.IRI theURI)
builder for the individualtheURI - the individualbuilderpublic ResourceBuilder iri(String theURI)
builder for the individualtheURI - the individualbuilderpublic ResourceBuilder instance(org.openrdf.model.IRI theType)
theType - the typebuilder for the new individualpublic ResourceBuilder instance()
public ResourceBuilder instance(org.openrdf.model.IRI theType, URI theURI)
builder for the given individual and add the typetheType - the typetheURI - the individualbuilder for the new individualpublic ResourceBuilder instance(org.openrdf.model.IRI theType, org.openrdf.model.Resource theRes)
builder for the given individual and add the typetheType - the typetheRes - the individualbuilder for the new individualpublic ResourceBuilder instance(org.openrdf.model.IRI theType, String theURI)
builder for the given individual and add the typetheType - the typetheURI - the individualbuilder for the new individualpublic org.openrdf.model.ValueFactory getValueFactory()
Copyright © 2010-2016 Stardog Union. All Rights Reserved.