public abstract class ValueFactoryBase extends Object implements ValueFactory
ValueFactory
implementations that implements
the utility methods for creating literals for basic types by calling the
generic ValueFactory.createLiteral(String, URI)
with the appropriate
value and datatype.Constructor and Description |
---|
ValueFactoryBase() |
Modifier and Type | Method and Description |
---|---|
BNode |
createBNode()
Creates a new bNode.
|
protected Literal |
createFPLiteral(Number value,
URI datatype)
Calls
createNumericLiteral(Number, URI) with the supplied value
and datatype as parameters. |
protected Literal |
createIntegerLiteral(Number value,
URI datatype)
Calls
createNumericLiteral(Number, URI) with the supplied value
and datatype as parameters. |
Literal |
createLiteral(boolean b)
Calls
ValueFactory.createLiteral(String, URI) with the
String-value of the supplied value and XMLSchema.BOOLEAN as
parameters. |
Literal |
createLiteral(byte value)
Calls
createIntegerLiteral(Number, URI) with the supplied value
and XMLSchema.BYTE as parameters. |
Literal |
createLiteral(Date date)
Converts the supplied
Date to a XMLGregorianCalendar , then
calls ValueFactory.createLiteral(XMLGregorianCalendar) . |
Literal |
createLiteral(double value)
Calls
createFPLiteral(Number, URI) with the supplied value and
XMLSchema.DOUBLE as parameters. |
Literal |
createLiteral(float value)
Calls
createFPLiteral(Number, URI) with the supplied value and
XMLSchema.FLOAT as parameters. |
Literal |
createLiteral(int value)
Calls
createIntegerLiteral(Number, URI) with the supplied value
and XMLSchema.INT as parameters. |
Literal |
createLiteral(long value)
Calls
createIntegerLiteral(Number, URI) with the supplied value
and XMLSchema.LONG as parameters. |
Literal |
createLiteral(short value)
Calls
createIntegerLiteral(Number, URI) with the supplied value
and XMLSchema.SHORT as parameters. |
Literal |
createLiteral(XMLGregorianCalendar calendar)
Calls
ValueFactory.createLiteral(String, URI) with the
String-value of the supplied calendar and the appropriate datatype as
parameters. |
protected Literal |
createNumericLiteral(Number number,
URI datatype)
Calls
ValueFactory.createLiteral(String, URI) with the
String-value of the supplied number and the supplied datatype as
parameters. |
protected void |
initBNodeParams()
Generates a new bnode prefix and resets nextBNodeID to 1
.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
createBNode, createLiteral, createLiteral, createLiteral, createStatement, createStatement, createURI, createURI
protected void initBNodeParams()
public BNode createBNode()
ValueFactory
createBNode
in interface ValueFactory
public Literal createLiteral(boolean b)
ValueFactory.createLiteral(String, URI)
with the
String-value of the supplied value and XMLSchema.BOOLEAN
as
parameters.createLiteral
in interface ValueFactory
b
- The value for the literal.public Literal createLiteral(byte value)
createIntegerLiteral(Number, URI)
with the supplied value
and XMLSchema.BYTE
as parameters.createLiteral
in interface ValueFactory
value
- The value for the literal.public Literal createLiteral(short value)
createIntegerLiteral(Number, URI)
with the supplied value
and XMLSchema.SHORT
as parameters.createLiteral
in interface ValueFactory
value
- The value for the literal.public Literal createLiteral(int value)
createIntegerLiteral(Number, URI)
with the supplied value
and XMLSchema.INT
as parameters.createLiteral
in interface ValueFactory
value
- The value for the literal.public Literal createLiteral(long value)
createIntegerLiteral(Number, URI)
with the supplied value
and XMLSchema.LONG
as parameters.createLiteral
in interface ValueFactory
value
- The value for the literal.protected Literal createIntegerLiteral(Number value, URI datatype)
createNumericLiteral(Number, URI)
with the supplied value
and datatype as parameters.public Literal createLiteral(float value)
createFPLiteral(Number, URI)
with the supplied value and
XMLSchema.FLOAT
as parameters.createLiteral
in interface ValueFactory
value
- The value for the literal.public Literal createLiteral(double value)
createFPLiteral(Number, URI)
with the supplied value and
XMLSchema.DOUBLE
as parameters.createLiteral
in interface ValueFactory
value
- The value for the literal.protected Literal createFPLiteral(Number value, URI datatype)
createNumericLiteral(Number, URI)
with the supplied value
and datatype as parameters.protected Literal createNumericLiteral(Number number, URI datatype)
ValueFactory.createLiteral(String, URI)
with the
String-value of the supplied number and the supplied datatype as
parameters.public Literal createLiteral(XMLGregorianCalendar calendar)
ValueFactory.createLiteral(String, URI)
with the
String-value of the supplied calendar and the appropriate datatype as
parameters.createLiteral
in interface ValueFactory
calendar
- The value for the literal.XMLGregorianCalendar.toXMLFormat()
,
XMLGregorianCalendar.getXMLSchemaType()
,
XMLDatatypeUtil.qnameToURI(javax.xml.namespace.QName)
public Literal createLiteral(Date date)
Date
to a XMLGregorianCalendar
, then
calls ValueFactory.createLiteral(XMLGregorianCalendar)
.createLiteral
in interface ValueFactory
Copyright © 2001-2016 Aduna. All Rights Reserved.