| Package | Description |
|---|---|
| org.eclipse.rdf4j | |
| org.eclipse.rdf4j.model |
The RDF Model API
|
| org.eclipse.rdf4j.model.impl |
Default implementations of the RDF model interfaces
|
| org.eclipse.rdf4j.model.util |
Helper classes for working with RDF models.
|
| Modifier and Type | Method and Description |
|---|---|
static void |
OpenRDFUtil.verifyContextNotNull(Resource... contexts)
Verifies that the supplied contexts parameter is not null, throwing an
IllegalArgumentException
if it is. |
| Modifier and Type | Interface and Description |
|---|---|
interface |
BNode
An RDF-1.1 blank node (aka bnode, aka anonymous node).
|
interface |
IRI
An Internationalized Resource Identifier (IRI).
|
interface |
URI
Deprecated.
since 2.0. Use
IRI instead. |
| Modifier and Type | Method and Description |
|---|---|
Resource |
Statement.getContext()
Gets the context of this statement.
|
Resource |
Statement.getSubject()
Gets the subject of this statement.
|
| Modifier and Type | Method and Description |
|---|---|
default Set<Resource> |
Model.contexts()
Returns a
Set view of the contexts contained in this model. |
Set<Resource> |
Model.subjects()
Returns a
Set view of the subjects contained in this model. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
Model.add(Resource subj,
IRI pred,
Value obj,
Resource... contexts)
Adds one or more statements to the model.
|
boolean |
Model.add(Resource subj,
IRI pred,
Value obj,
Resource... contexts)
Adds one or more statements to the model.
|
default boolean |
Model.add(Resource subj,
URI pred,
Value obj,
Resource... contexts)
Deprecated.
since 2.0. Use
Model.add(Resource, IRI, Value, Resource...) instead. |
default boolean |
Model.add(Resource subj,
URI pred,
Value obj,
Resource... contexts)
Deprecated.
since 2.0. Use
Model.add(Resource, IRI, Value, Resource...) instead. |
boolean |
Model.clear(Resource... context)
Removes statements with the specified context exist in this model.
|
boolean |
Model.contains(Resource subj,
IRI pred,
Value obj,
Resource... contexts)
Determines if statements with the specified subject, predicate, object and (optionally) context exist in this
model.
|
boolean |
Model.contains(Resource subj,
IRI pred,
Value obj,
Resource... contexts)
Determines if statements with the specified subject, predicate, object and (optionally) context exist in this
model.
|
default boolean |
Model.contains(Resource subj,
URI pred,
Value obj,
Resource... contexts)
Deprecated.
since 2.0. Use
Model.contains(Resource, IRI, Value, Resource...) instead. |
default boolean |
Model.contains(Resource subj,
URI pred,
Value obj,
Resource... contexts)
Deprecated.
since 2.0. Use
Model.contains(Resource, IRI, Value, Resource...) instead. |
Statement |
ValueFactory.createStatement(Resource subject,
IRI predicate,
Value object)
Creates a new statement with the supplied subject, predicate and object.
|
Statement |
ValueFactory.createStatement(Resource subject,
IRI predicate,
Value object,
Resource context)
Creates a new statement with the supplied subject, predicate and object and associated context.
|
default Statement |
ValueFactory.createStatement(Resource subject,
URI predicate,
Value object)
Deprecated.
Use
ValueFactory.createStatement(Resource, IRI, Value) instead. |
default Statement |
ValueFactory.createStatement(Resource subject,
URI predicate,
Value object,
Resource context)
Deprecated.
|
Model |
Model.filter(Resource subj,
IRI pred,
Value obj,
Resource... contexts)
Returns a view of the statements with the specified subject, predicate, object and (optionally) context.
|
Model |
Model.filter(Resource subj,
IRI pred,
Value obj,
Resource... contexts)
Returns a view of the statements with the specified subject, predicate, object and (optionally) context.
|
default Model |
Model.filter(Resource subj,
URI pred,
Value obj,
Resource... contexts)
Deprecated.
|
default Model |
Model.filter(Resource subj,
URI pred,
Value obj,
Resource... contexts)
Deprecated.
|
boolean |
Model.remove(Resource subj,
IRI pred,
Value obj,
Resource... contexts)
Removes statements with the specified subject, predicate, object and (optionally) context exist in this model.
|
boolean |
Model.remove(Resource subj,
IRI pred,
Value obj,
Resource... contexts)
Removes statements with the specified subject, predicate, object and (optionally) context exist in this model.
|
default boolean |
Model.remove(Resource subj,
URI pred,
Value obj,
Resource... contexts)
Deprecated.
since 2.0. Use
Model.remove(Resource, IRI, Value, Resource...) instead. |
default boolean |
Model.remove(Resource subj,
URI pred,
Value obj,
Resource... contexts)
Deprecated.
since 2.0. Use
Model.remove(Resource, IRI, Value, Resource...) instead. |
| Modifier and Type | Class and Description |
|---|---|
class |
BNodeImpl
Deprecated.
since 2.0. Use
SimpleBNode instead for extending, and ValueFactory for instantiation. |
class |
SimpleBNode
An simple default implementation of the
BNode interface. |
class |
SimpleIRI
The default implementation of the
IRI interface. |
class |
URIImpl
Deprecated.
since 2.0. Use
SimpleIRI instead for extending, and ValueFactory for instantiation. |
| Modifier and Type | Field and Description |
|---|---|
protected Resource[] |
FilteredModel.contexts |
protected Resource |
FilteredModel.subj |
| Modifier and Type | Method and Description |
|---|---|
Resource |
SimpleStatement.getContext() |
Resource |
ContextStatement.getContext() |
Resource |
SimpleStatement.getSubject() |
| Modifier and Type | Method and Description |
|---|---|
Set<Resource> |
AbstractModel.contexts() |
Set<Resource> |
AbstractModel.subjects() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
FilteredModel.add(Resource s,
IRI p,
Value o,
Resource... c) |
boolean |
FilteredModel.add(Resource s,
IRI p,
Value o,
Resource... c) |
boolean |
EmptyModel.add(Resource subj,
IRI pred,
Value obj,
Resource... contexts) |
boolean |
EmptyModel.add(Resource subj,
IRI pred,
Value obj,
Resource... contexts) |
boolean |
LinkedHashModel.add(Resource subj,
IRI pred,
Value obj,
Resource... contexts) |
boolean |
LinkedHashModel.add(Resource subj,
IRI pred,
Value obj,
Resource... contexts) |
boolean |
TreeModel.add(Resource subj,
IRI pred,
Value obj,
Resource... contexts) |
boolean |
TreeModel.add(Resource subj,
IRI pred,
Value obj,
Resource... contexts) |
boolean |
AbstractModel.clear(Resource... contexts) |
boolean |
FilteredModel.contains(Resource s,
IRI p,
Value o,
Resource... c) |
boolean |
FilteredModel.contains(Resource s,
IRI p,
Value o,
Resource... c) |
boolean |
EmptyModel.contains(Resource subj,
IRI pred,
Value obj,
Resource... contexts) |
boolean |
EmptyModel.contains(Resource subj,
IRI pred,
Value obj,
Resource... contexts) |
boolean |
LinkedHashModel.contains(Resource subj,
IRI pred,
Value obj,
Resource... contexts) |
boolean |
LinkedHashModel.contains(Resource subj,
IRI pred,
Value obj,
Resource... contexts) |
boolean |
TreeModel.contains(Resource subj,
IRI pred,
Value obj,
Resource... contexts) |
boolean |
TreeModel.contains(Resource subj,
IRI pred,
Value obj,
Resource... contexts) |
Statement |
ValidatingValueFactory.createStatement(Resource subject,
IRI predicate,
Value object) |
Statement |
AbstractValueFactory.createStatement(Resource subject,
IRI predicate,
Value object) |
Statement |
ValidatingValueFactory.createStatement(Resource subject,
IRI predicate,
Value object,
Resource context) |
Statement |
AbstractValueFactory.createStatement(Resource subject,
IRI predicate,
Value object,
Resource context) |
Statement |
ValidatingValueFactory.createStatement(Resource subject,
URI predicate,
Value object) |
Statement |
ValidatingValueFactory.createStatement(Resource subject,
URI predicate,
Value object,
Resource context) |
Model |
FilteredModel.filter(Resource s,
IRI p,
Value o,
Resource... c) |
Model |
FilteredModel.filter(Resource s,
IRI p,
Value o,
Resource... c) |
Model |
EmptyModel.filter(Resource subj,
IRI pred,
Value obj,
Resource... contexts) |
Model |
EmptyModel.filter(Resource subj,
IRI pred,
Value obj,
Resource... contexts) |
Model |
LinkedHashModel.filter(Resource subj,
IRI pred,
Value obj,
Resource... contexts) |
Model |
LinkedHashModel.filter(Resource subj,
IRI pred,
Value obj,
Resource... contexts) |
Model |
TreeModel.filter(Resource subj,
IRI pred,
Value obj,
Resource... contexts) |
Model |
TreeModel.filter(Resource subj,
IRI pred,
Value obj,
Resource... contexts) |
boolean |
FilteredModel.remove(Resource s,
IRI p,
Value o,
Resource... c) |
boolean |
FilteredModel.remove(Resource s,
IRI p,
Value o,
Resource... c) |
boolean |
EmptyModel.remove(Resource subj,
IRI pred,
Value obj,
Resource... contexts) |
boolean |
EmptyModel.remove(Resource subj,
IRI pred,
Value obj,
Resource... contexts) |
boolean |
LinkedHashModel.remove(Resource subj,
IRI pred,
Value obj,
Resource... contexts) |
boolean |
LinkedHashModel.remove(Resource subj,
IRI pred,
Value obj,
Resource... contexts) |
boolean |
TreeModel.remove(Resource subj,
IRI pred,
Value obj,
Resource... contexts) |
boolean |
TreeModel.remove(Resource subj,
IRI pred,
Value obj,
Resource... contexts) |
protected abstract void |
FilteredModel.removeFilteredTermIteration(Iterator<Statement> iter,
Resource subj,
IRI pred,
Value obj,
Resource... contexts)
Called by aggregate sets when a term has been removed from a term iterator.
|
protected abstract void |
FilteredModel.removeFilteredTermIteration(Iterator<Statement> iter,
Resource subj,
IRI pred,
Value obj,
Resource... contexts)
Called by aggregate sets when a term has been removed from a term iterator.
|
void |
FilteredModel.removeTermIteration(Iterator<Statement> iter,
Resource s,
IRI p,
Value o,
Resource... c) |
void |
FilteredModel.removeTermIteration(Iterator<Statement> iter,
Resource s,
IRI p,
Value o,
Resource... c) |
void |
EmptyModel.removeTermIteration(Iterator<Statement> iter,
Resource subj,
IRI pred,
Value obj,
Resource... contexts) |
void |
EmptyModel.removeTermIteration(Iterator<Statement> iter,
Resource subj,
IRI pred,
Value obj,
Resource... contexts) |
abstract void |
AbstractModel.removeTermIteration(Iterator<Statement> iter,
Resource subj,
IRI pred,
Value obj,
Resource... contexts)
Called by aggregate sets when a term has been removed from a term iterator.
|
abstract void |
AbstractModel.removeTermIteration(Iterator<Statement> iter,
Resource subj,
IRI pred,
Value obj,
Resource... contexts)
Called by aggregate sets when a term has been removed from a term iterator.
|
void |
TreeModel.removeTermIteration(Iterator<Statement> iterator,
Resource subj,
IRI pred,
Value obj,
Resource... contexts) |
void |
TreeModel.removeTermIteration(Iterator<Statement> iterator,
Resource subj,
IRI pred,
Value obj,
Resource... contexts) |
void |
LinkedHashModel.removeTermIteration(Iterator iterator,
Resource subj,
IRI pred,
Value obj,
Resource... contexts) |
void |
LinkedHashModel.removeTermIteration(Iterator iterator,
Resource subj,
IRI pred,
Value obj,
Resource... contexts) |
| Constructor and Description |
|---|
ContextStatement(Resource subject,
IRI predicate,
Value object,
Resource context)
Creates a new Statement with the supplied subject, predicate and object for the specified associated context.
|
ContextStatementImpl(Resource subject,
URI predicate,
Value object,
Resource context)
Deprecated.
since 2.0. Use
ValueFactory.createStatement(Resource, IRI, Value, Resource) instead. |
FilteredModel(AbstractModel model,
Resource subj,
IRI pred,
Value obj,
Resource... contexts) |
FilteredModel(AbstractModel model,
Resource subj,
IRI pred,
Value obj,
Resource... contexts) |
SimpleStatement(Resource subject,
IRI predicate,
Value object)
Creates a new Statement with the supplied subject, predicate and object.
|
StatementImpl(Resource subject,
URI predicate,
Value object)
Deprecated.
since 2.0. Use
ValueFactory.createStatement(Resource, IRI, Value) instead. |
| Modifier and Type | Method and Description |
|---|---|
static Optional<Resource> |
Models.getPropertyResource(Model m,
Resource subject,
IRI property,
Resource... contexts)
Retrieve a property value as an IRI for the supplied subject from the given model.
|
static Set<Resource> |
Models.getPropertyResources(Model m,
Resource subject,
IRI property,
Resource... contexts)
Retrieve all property Resource values for the supplied subject and property from the given model.
|
static Optional<Resource> |
Models.objectResource(Model m)
Retrieves an object
Resource value from the statements in the given model. |
static Set<Resource> |
Models.objectResources(Model m)
Retrieves all object
Resource values from the statements in the given model. |
static Optional<Resource> |
Models.subject(Model m)
Retrieves a subject
Resource from the statements in the given model. |
| Modifier and Type | Method and Description |
|---|---|
ModelBuilder |
ModelBuilder.add(Resource subject,
IRI predicate,
Object object)
Add an RDF statement with the given subject, predicate and object to the model, using the current graph (either
named or default).
|
static <C extends Collection<Statement>> |
RDFCollections.asRDF(Iterable<?> values,
Resource head,
C sink,
Resource... contexts)
Converts the supplied
Iterable to an RDF
Collection, using the supplied head resource as the starting resource of the RDF Collection. |
static <C extends Collection<Statement>> |
RDFCollections.asRDF(Iterable<?> values,
Resource head,
C sink,
Resource... contexts)
Converts the supplied
Iterable to an RDF
Collection, using the supplied head resource as the starting resource of the RDF Collection. |
static <C extends Collection<Statement>> |
RDFCollections.asRDF(Iterable<?> values,
Resource head,
C sink,
ValueFactory valueFactory,
Resource... contexts)
Converts the supplied
Iterable to an RDF
Collection, using the supplied head resource as the starting resource of the RDF Collection. |
static <C extends Collection<Statement>> |
RDFCollections.asRDF(Iterable<?> values,
Resource head,
C sink,
ValueFactory valueFactory,
Resource... contexts)
Converts the supplied
Iterable to an RDF
Collection, using the supplied head resource as the starting resource of the RDF Collection. |
static <C extends Collection<Value>> |
RDFCollections.asValues(Model m,
Resource head,
C collection,
Resource... contexts)
Converts an RDF Collection to a Java
Collection of Value objects. |
static <C extends Collection<Value>> |
RDFCollections.asValues(Model m,
Resource head,
C collection,
Resource... contexts)
Converts an RDF Collection to a Java
Collection of Value objects. |
static void |
Statements.consume(ValueFactory vf,
Resource subject,
IRI predicate,
Value object,
java.util.function.Consumer<Statement> consumer,
Resource... contexts)
|
static void |
Statements.consume(ValueFactory vf,
Resource subject,
IRI predicate,
Value object,
java.util.function.Consumer<Statement> consumer,
Resource... contexts)
|
static void |
RDFCollections.consumeCollection(Iterable<?> values,
Resource head,
java.util.function.Consumer<Statement> consumer,
Resource... contexts)
Converts the supplied
Iterable to an RDF
Collection, using the supplied head resource as the starting resource of the RDF Collection. |
static void |
RDFCollections.consumeCollection(Iterable<?> values,
Resource head,
java.util.function.Consumer<Statement> consumer,
Resource... contexts)
Converts the supplied
Iterable to an RDF
Collection, using the supplied head resource as the starting resource of the RDF Collection. |
static void |
RDFCollections.consumeCollection(Iterable<?> values,
Resource head,
java.util.function.Consumer<Statement> consumer,
ValueFactory vf,
Resource... contexts)
Converts the supplied
Iterable to an RDF
Collection, using the supplied head resource as the starting resource of the RDF Collection. |
static void |
RDFCollections.consumeCollection(Iterable<?> values,
Resource head,
java.util.function.Consumer<Statement> consumer,
ValueFactory vf,
Resource... contexts)
Converts the supplied
Iterable to an RDF
Collection, using the supplied head resource as the starting resource of the RDF Collection. |
static void |
RDFCollections.consumeValues(Model m,
Resource head,
java.util.function.Consumer<Value> consumer,
Resource... contexts)
|
static void |
RDFCollections.consumeValues(Model m,
Resource head,
java.util.function.Consumer<Value> consumer,
Resource... contexts)
|
static <C extends Collection<Statement>> |
Statements.create(ValueFactory vf,
Resource subject,
IRI predicate,
Value object,
C collection,
Resource... contexts)
Creates one or more
Statement objects with the given subject, predicate and object, one for each given
context. |
static <C extends Collection<Statement>> |
Statements.create(ValueFactory vf,
Resource subject,
IRI predicate,
Value object,
C collection,
Resource... contexts)
Creates one or more
Statement objects with the given subject, predicate and object, one for each given
context. |
static <E extends RDF4JException> |
RDFCollections.extract(GetStatementOptional statementSupplier,
Resource head,
java.util.function.Consumer<Statement> collectionConsumer,
java.util.function.Function<String,java.util.function.Supplier<E>> exceptionSupplier,
Resource... contexts)
Extracts an RDF Collection starting with the supplied list head from the statement supplier and sends all
statements that make up the collection to the supplied
Consumer function. |
static <E extends RDF4JException> |
RDFCollections.extract(GetStatementOptional statementSupplier,
Resource head,
java.util.function.Consumer<Statement> collectionConsumer,
java.util.function.Function<String,java.util.function.Supplier<E>> exceptionSupplier,
Resource... contexts)
Extracts an RDF Collection starting with the supplied list head from the statement supplier and sends all
statements that make up the collection to the supplied
Consumer function. |
static void |
RDFCollections.extract(Model sourceModel,
Resource head,
java.util.function.Consumer<Statement> consumer,
Resource... contexts)
Extracts the RDF Collection starting with
supplied
head resource from the supplied source Model and sends the statements that make up the
collection to the supplied Consumer. |
static void |
RDFCollections.extract(Model sourceModel,
Resource head,
java.util.function.Consumer<Statement> consumer,
Resource... contexts)
Extracts the RDF Collection starting with
supplied
head resource from the supplied source Model and sends the statements that make up the
collection to the supplied Consumer. |
Optional<Statement> |
GetStatementOptional.get(Resource subject,
IRI predicate,
Value object,
Resource... contexts)
Either supplies a statement matching the given pattern, or
Optional.empty() otherwise. |
Optional<Statement> |
GetStatementOptional.get(Resource subject,
IRI predicate,
Value object,
Resource... contexts)
Either supplies a statement matching the given pattern, or
Optional.empty() otherwise. |
static <C extends Collection<Statement>> |
RDFCollections.getCollection(Model sourceModel,
Resource head,
C sink,
Resource... contexts)
Extracts the RDF Collection starting with the
supplied
head resource from the supplied source Model. |
static <C extends Collection<Statement>> |
RDFCollections.getCollection(Model sourceModel,
Resource head,
C sink,
Resource... contexts)
Extracts the RDF Collection starting with the
supplied
head resource from the supplied source Model. |
static Set<Value> |
Models.getProperties(Model m,
Resource subject,
IRI property,
Resource... contexts)
Retrieve all property values for the supplied subject and property from the given model.
|
static Set<Value> |
Models.getProperties(Model m,
Resource subject,
IRI property,
Resource... contexts)
Retrieve all property values for the supplied subject and property from the given model.
|
static Optional<Value> |
Models.getProperty(Model m,
Resource subject,
IRI property,
Resource... contexts)
Retrieve a property value for the supplied subject from the given model.
|
static Optional<Value> |
Models.getProperty(Model m,
Resource subject,
IRI property,
Resource... contexts)
Retrieve a property value for the supplied subject from the given model.
|
static Optional<IRI> |
Models.getPropertyIRI(Model m,
Resource subject,
IRI property,
Resource... contexts)
Retrieve a property value as an IRI for the supplied subject from the given model.
|
static Optional<IRI> |
Models.getPropertyIRI(Model m,
Resource subject,
IRI property,
Resource... contexts)
Retrieve a property value as an IRI for the supplied subject from the given model.
|
static Set<IRI> |
Models.getPropertyIRIs(Model m,
Resource subject,
IRI property,
Resource... contexts)
Retrieve all property IRI values for the supplied subject and property from the given model.
|
static Set<IRI> |
Models.getPropertyIRIs(Model m,
Resource subject,
IRI property,
Resource... contexts)
Retrieve all property IRI values for the supplied subject and property from the given model.
|
static Optional<Literal> |
Models.getPropertyLiteral(Model m,
Resource subject,
IRI property,
Resource... contexts)
Retrieve a property value as a
Literal for the supplied subject from the given model. |
static Optional<Literal> |
Models.getPropertyLiteral(Model m,
Resource subject,
IRI property,
Resource... contexts)
Retrieve a property value as a
Literal for the supplied subject from the given model. |
static Set<Literal> |
Models.getPropertyLiterals(Model m,
Resource subject,
IRI property,
Resource... contexts)
Retrieve all property Literal values for the supplied subject and property from the given model.
|
static Set<Literal> |
Models.getPropertyLiterals(Model m,
Resource subject,
IRI property,
Resource... contexts)
Retrieve all property Literal values for the supplied subject and property from the given model.
|
static Optional<Resource> |
Models.getPropertyResource(Model m,
Resource subject,
IRI property,
Resource... contexts)
Retrieve a property value as an IRI for the supplied subject from the given model.
|
static Optional<Resource> |
Models.getPropertyResource(Model m,
Resource subject,
IRI property,
Resource... contexts)
Retrieve a property value as an IRI for the supplied subject from the given model.
|
static Set<Resource> |
Models.getPropertyResources(Model m,
Resource subject,
IRI property,
Resource... contexts)
Retrieve all property Resource values for the supplied subject and property from the given model.
|
static Set<Resource> |
Models.getPropertyResources(Model m,
Resource subject,
IRI property,
Resource... contexts)
Retrieve all property Resource values for the supplied subject and property from the given model.
|
static Optional<String> |
Models.getPropertyString(Model m,
Resource subject,
IRI property,
Resource... contexts)
Retrieve a property value as a String for the supplied subject from the given model.
|
static Optional<String> |
Models.getPropertyString(Model m,
Resource subject,
IRI property,
Resource... contexts)
Retrieve a property value as a String for the supplied subject from the given model.
|
static Set<String> |
Models.getPropertyStrings(Model m,
Resource subject,
IRI property,
Resource... contexts)
Retrieve all property values as Strings for the supplied subject and property from the given model.
|
static Set<String> |
Models.getPropertyStrings(Model m,
Resource subject,
IRI property,
Resource... contexts)
Retrieve all property values as Strings for the supplied subject and property from the given model.
|
ModelBuilder |
ModelBuilder.namedGraph(Resource namedGraph)
Set the current graph in which to add new statements to the supplied named graph.
|
static Model |
Models.setProperty(Model m,
Resource subject,
IRI property,
Value value,
Resource... contexts)
Sets the property value for the given subject to the given object value, replacing any existing value(s) for the
subject's property.
|
static Model |
Models.setProperty(Model m,
Resource subject,
IRI property,
Value value,
Resource... contexts)
Sets the property value for the given subject to the given object value, replacing any existing value(s) for the
subject's property.
|
ModelBuilder |
ModelBuilder.subject(Resource subject)
Set the subject resource about which statements are to be added to the model.
|
Copyright © 2015-2019 Eclipse Foundation. All Rights Reserved.