public class ValidatingValueFactory extends Object implements ValueFactory
ValueFactory
. Use this class in situations where a caller may be prone to errors.Constructor and Description |
---|
ValidatingValueFactory() |
ValidatingValueFactory(ValueFactory delegate) |
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.
|
Literal |
createLiteral(String label,
URI datatype)
Creates a new literal with the supplied label and datatype.
|
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.
|
Statement |
createStatement(Resource subject,
URI predicate,
Value object)
Creates a new statement with the supplied subject, predicate and object.
|
Statement |
createStatement(Resource subject,
URI predicate,
Value object,
Resource context)
Creates a new statement with the supplied subject, predicate and object and associated context.
|
Triple |
createTriple(Resource subject,
IRI predicate,
Value object)
Creates a new RDF* triple with the supplied subject, predicate and object.
|
URI |
createURI(String uri)
Creates a new URI from the supplied string-representation.
|
URI |
createURI(String namespace,
String localName)
Creates a new URI from the supplied namespace and local name.
|
public ValidatingValueFactory()
public ValidatingValueFactory(ValueFactory delegate)
public IRI createIRI(String iri)
ValueFactory
createIRI
in interface ValueFactory
iri
- A string-representation of a IRI.public IRI createIRI(String namespace, String localName)
ValueFactory
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.createIRI
in interface ValueFactory
namespace
- The IRI's namespace.localName
- The IRI's local name.public BNode createBNode(String nodeID)
ValueFactory
createBNode
in interface ValueFactory
nodeID
- The blank node identifier.public Literal createLiteral(String label, IRI datatype)
ValueFactory
createLiteral
in interface ValueFactory
label
- The literal's label, must not be null.datatype
- The literal's datatype. If it is null, the datatype XMLSchema.STRING
will be assigned to
this literal.public Literal createLiteral(String label, String language)
ValueFactory
Literal.getDatatype()
for the returned object must be RDF.LANGSTRING
.createLiteral
in interface ValueFactory
label
- The literal's label, must not be null.language
- The literal's language attribute, must not be null.public URI createURI(String uri)
ValueFactory
createURI
in interface ValueFactory
uri
- A string-representation of a URI.public URI createURI(String namespace, String localName)
ValueFactory
createURI
in interface ValueFactory
namespace
- The IRI's namespace.localName
- The IRI's local name.public Literal createLiteral(String label, URI datatype)
ValueFactory
createLiteral
in interface ValueFactory
label
- The literal's label.datatype
- The literal's datatype. If it is null, the datatype XMLSchema.STRING
will be assigned to
this literal.public BNode createBNode()
ValueFactory
createBNode
in interface ValueFactory
public Literal createLiteral(String label)
ValueFactory
Literal.getDatatype()
for the returned
object must be XMLSchema.STRING
.createLiteral
in interface ValueFactory
label
- The literal's label, must not be null.public Literal createLiteral(boolean value)
ValueFactory
createLiteral
in interface ValueFactory
value
- The value for the literal.public Literal createLiteral(byte value)
ValueFactory
createLiteral
in interface ValueFactory
value
- The value for the literal.public Literal createLiteral(short value)
ValueFactory
createLiteral
in interface ValueFactory
value
- The value for the literal.public Literal createLiteral(int value)
ValueFactory
createLiteral
in interface ValueFactory
value
- The value for the literal.public Literal createLiteral(long value)
ValueFactory
createLiteral
in interface ValueFactory
value
- The value for the literal.public Literal createLiteral(float value)
ValueFactory
createLiteral
in interface ValueFactory
value
- The value for the literal.public Literal createLiteral(double value)
ValueFactory
createLiteral
in interface ValueFactory
value
- The value for the literal.public Literal createLiteral(BigDecimal bigDecimal)
ValueFactory
createLiteral
in interface ValueFactory
public Literal createLiteral(BigInteger bigInteger)
ValueFactory
createLiteral
in interface ValueFactory
public Literal createLiteral(XMLGregorianCalendar calendar)
ValueFactory
createLiteral
in interface ValueFactory
calendar
- The value for the literal.public Literal createLiteral(Date date)
ValueFactory
createLiteral
in interface ValueFactory
public Statement createStatement(Resource subject, IRI predicate, Value object)
ValueFactory
createStatement
in interface ValueFactory
subject
- The statement's subject.predicate
- The statement's predicate.object
- The statement's object.public Statement createStatement(Resource subject, IRI predicate, Value object, Resource context)
ValueFactory
createStatement
in interface ValueFactory
subject
- The statement's subject.predicate
- The statement's predicate.object
- The statement's object.context
- The statement's context.public Statement createStatement(Resource subject, URI predicate, Value object)
ValueFactory
createStatement
in interface ValueFactory
subject
- The statement's subject.predicate
- The statement's predicate.object
- The statement's object.public Statement createStatement(Resource subject, URI predicate, Value object, Resource context)
ValueFactory
createStatement
in interface ValueFactory
subject
- The statement's subject.predicate
- The statement's predicate.object
- The statement's object.public Triple createTriple(Resource subject, IRI predicate, Value object)
ValueFactory
createTriple
in interface ValueFactory
subject
- The statement's subject.predicate
- The statement's predicate.object
- The statement's object.Copyright © 2015-2020 Eclipse Foundation. All Rights Reserved.