public interface ValueFactory
IRIs
, blank nodes
, literals
and statements
based on the RDF-1.1 Concepts and Abstract Syntax, a W3C Recommendation.Modifier and Type | Method and Description |
---|---|
BNode |
createBNode()
Creates a new bNode.
|
BNode |
createBNode(String nodeID)
Creates a new blank node with the given node identifier.
|
IRI |
createIRI(String iri)
Creates a new IRI from the supplied string-representation.
|
IRI |
createIRI(String namespace,
String localName)
Creates a new IRI from the supplied namespace and local name.
|
Literal |
createLiteral(BigDecimal bigDecimal)
Creates a new literal representing the specified bigDecimal that is typed using the appropriate XML Schema
date/time datatype.
|
Literal |
createLiteral(BigInteger bigInteger)
Creates a new literal representing the specified bigInteger that is typed using the appropriate XML Schema
date/time datatype.
|
Literal |
createLiteral(boolean value)
Creates a new xsd:boolean-typed literal representing the specified value.
|
Literal |
createLiteral(byte value)
Creates a new xsd:byte-typed literal representing the specified value.
|
Literal |
createLiteral(Date date)
Creates a new literal representing the specified date that is typed using the appropriate XML Schema date/time
datatype.
|
Literal |
createLiteral(double value)
Creates a new xsd:double-typed literal representing the specified value.
|
Literal |
createLiteral(float value)
Creates a new xsd:float-typed literal representing the specified value.
|
Literal |
createLiteral(int value)
Creates a new xsd:int-typed literal representing the specified value.
|
Literal |
createLiteral(long value)
Creates a new xsd:long-typed literal representing the specified value.
|
Literal |
createLiteral(short value)
Creates a new xsd:short-typed literal representing the specified value.
|
Literal |
createLiteral(String label)
Creates a new literal with the supplied label.
|
Literal |
createLiteral(String label,
IRI datatype)
Creates a new literal with the supplied label and datatype.
|
Literal |
createLiteral(String label,
String language)
Creates a new literal with the supplied label and language attribute.
|
default Literal |
createLiteral(String label,
URI datatype)
Deprecated.
Use
createLiteral(String, IRI) instead. |
Literal |
createLiteral(XMLGregorianCalendar calendar)
Creates a new literal representing the specified calendar that is typed using the appropriate XML Schema
date/time datatype.
|
Statement |
createStatement(Resource subject,
IRI predicate,
Value object)
Creates a new statement with the supplied subject, predicate and object.
|
Statement |
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 |
createStatement(Resource subject,
URI predicate,
Value object)
Deprecated.
Use
createStatement(Resource, IRI, Value) instead. |
default Statement |
createStatement(Resource subject,
URI predicate,
Value object,
Resource context)
Deprecated.
Use
createStatement(Resource, IRI, Value, Resource) instead. |
default Triple |
createTriple(Resource subject,
IRI predicate,
Value object)
Creates a new RDF* triple with the supplied subject, predicate and object.
|
default URI |
createURI(String uri)
Deprecated.
Use {
createIRI(String) instead. |
default URI |
createURI(String namespace,
String localName)
Deprecated.
Use
createIRI(String, String) instead. |
IRI createIRI(String iri)
iri
- A string-representation of a IRI.IlllegalArgumentException
- If the supplied string does not resolve to a legal (absolute) IRI.@Deprecated default URI createURI(String uri)
createIRI(String)
instead.uri
- A string-representation of a URI.IlllegalArgumentException
- If the supplied string does not resolve to a legal (absolute) URI.IRI createIRI(String namespace, String localName)
createIRI(namespace+localName)
, but allows the ValueFactory to reuse supplied
namespace and local name strings whenever possible. Note that the values returned by IRI.getNamespace()
and IRI.getLocalName()
are not necessarily the same as the values that are supplied to this method.namespace
- The IRI's namespace.localName
- The IRI's local name.IllegalArgumentException
- If the supplied namespace and localname do not resolve to a legal (absolute)
IRI.@Deprecated default URI createURI(String namespace, String localName)
createIRI(String, String)
instead.namespace
- The IRI's namespace.localName
- The IRI's local name.IlllegalArgumentException
- If the supplied string does not resolve to a legal (absolute) URI.BNode createBNode()
BNode createBNode(String nodeID)
nodeID
- The blank node identifier.Literal createLiteral(String label)
Literal.getDatatype()
for the returned
object must be XSD.STRING
.label
- The literal's label, must not be null.Literal createLiteral(String label, String language)
Literal.getDatatype()
for the returned object must be RDF.LANGSTRING
.label
- The literal's label, must not be null.language
- The literal's language attribute, must not be null.Literal createLiteral(String label, IRI datatype)
label
- The literal's label, must not be null.datatype
- The literal's datatype. If it is null, the datatype XSD.STRING
will be assigned to this
literal.@Deprecated default Literal createLiteral(String label, URI datatype)
createLiteral(String, IRI)
instead.label
- The literal's label.datatype
- The literal's datatype. If it is null, the datatype XSD.STRING
will be assigned to this
literal.Literal createLiteral(boolean value)
value
- The value for the literal.Literal createLiteral(byte value)
value
- The value for the literal.Literal createLiteral(short value)
value
- The value for the literal.Literal createLiteral(int value)
value
- The value for the literal.Literal createLiteral(long value)
value
- The value for the literal.Literal createLiteral(float value)
value
- The value for the literal.Literal createLiteral(double value)
value
- The value for the literal.Literal createLiteral(BigDecimal bigDecimal)
Literal createLiteral(BigInteger bigInteger)
Literal createLiteral(XMLGregorianCalendar calendar)
calendar
- The value for the literal.Literal createLiteral(Date date)
Statement createStatement(Resource subject, IRI predicate, Value object)
subject
- The statement's subject.predicate
- The statement's predicate.object
- The statement's object.@Deprecated default Statement createStatement(Resource subject, URI predicate, Value object)
createStatement(Resource, IRI, Value)
instead.subject
- The statement's subject.predicate
- The statement's predicate.object
- The statement's object.Statement createStatement(Resource subject, IRI predicate, Value object, Resource context)
subject
- The statement's subject.predicate
- The statement's predicate.object
- The statement's object.context
- The statement's context.@Deprecated default Statement createStatement(Resource subject, URI predicate, Value object, Resource context)
createStatement(Resource, IRI, Value, Resource)
instead.subject
- The statement's subject.predicate
- The statement's predicate.object
- The statement's object.default Triple createTriple(Resource subject, IRI predicate, Value object)
subject
- The statement's subject.predicate
- The statement's predicate.object
- The statement's object.Copyright © 2015-2020 Eclipse Foundation. All Rights Reserved.