public class NodeFactory extends Object
Constructor and Description |
---|
NodeFactory() |
Modifier and Type | Method and Description |
---|---|
static Node |
createAnon()
Deprecated.
|
static Node |
createAnon(BlankNodeId id)
Deprecated.
|
static Node |
createAnon(String string)
Deprecated.
|
static Node |
createBlankNode()
Make a fresh blank node
|
static Node |
createBlankNode(BlankNodeId id)
make a blank node with the specified label
|
static Node |
createBlankNode(String string)
make a blank node with the specified label
|
static Node |
createLiteral(LiteralLabel lit)
make a literal node with the specified literal value
|
static Node |
createLiteral(String value) |
static Node |
createLiteral(String lex,
RDFDatatype dtype)
Build a typed literal node from its lexical form.
|
static Node |
createLiteral(String lex,
String lang)
Make a literal with specified language.
|
static Node |
createLiteral(String lex,
String lang,
boolean isXml)
make a literal with specified language and XMLishness.
|
static Node |
createLiteral(String lex,
String lang,
RDFDatatype dtype)
Build a literal node from its lexical form.
|
static Node |
createLiteralByValue(Object value,
RDFDatatype dtype)
Create a Node based on the value
If the value is a string we
assume this is intended to be a lexical form after all.
|
static Node |
createLiteralByValue(Object value,
String lang,
RDFDatatype dtype)
Create a Node based on the value
If the value is a string we
assume this is intended to be a lexical form after all.
|
static Node |
createUncachedLiteral(Object value,
RDFDatatype dtype)
Deprecated.
To be removed: Use
createLiteralByValue(Object, RDFDatatype) |
static Node |
createUncachedLiteral(Object value,
String lang,
RDFDatatype dtype)
Deprecated.
To be removed: Use
createLiteralByValue(Object, String, RDFDatatype) |
static Node |
createURI(String uri)
make a URI node with the specified URIref string
|
static Node |
createVariable(String name)
make a variable node with a given name
|
static RDFDatatype |
getType(String s) |
public static RDFDatatype getType(String s)
public static Node createBlankNode()
public static Node createBlankNode(BlankNodeId id)
public static Node createBlankNode(String string)
@Deprecated public static Node createAnon()
createBlankNode()
@Deprecated public static Node createAnon(BlankNodeId id)
createBlankNode(BlankNodeId)
@Deprecated public static Node createAnon(String string)
createBlankNode(String)
public static Node createLiteral(LiteralLabel lit)
public static Node createVariable(String name)
public static Node createLiteral(String lex, String lang, boolean isXml)
lex
- lang
- isXml
- If true then lit is exclusive canonical XML of type
rdf:XMLLiteral, and no checking will be invoked.public static Node createLiteral(String lex, String lang)
lex
- the lexical form of the literallang
- the optional language tagpublic static Node createLiteral(String lex, String lang, RDFDatatype dtype) throws DatatypeFormatException
lex
- the lexical form of the literallang
- the optional language tagdtype
- the type of the literalDatatypeFormatException
- if lex is not a legal form of dtypepublic static Node createLiteral(String lex, RDFDatatype dtype) throws DatatypeFormatException
lex
- the lexical form of the literaldtype
- the type of the literalDatatypeFormatException
- if lex is not a legal form of dtypepublic static Node createLiteralByValue(Object value, RDFDatatype dtype) throws DatatypeFormatException
value
- The value, mapped according to registered types.dtype
- RDF Datatype.DatatypeFormatException
public static Node createLiteralByValue(Object value, String lang, RDFDatatype dtype) throws DatatypeFormatException
value
- The value, mapped according to registered types.lang
- (optional) Language tag, if a string.dtype
- RDF Datatype.DatatypeFormatException
@Deprecated public static Node createUncachedLiteral(Object value, RDFDatatype dtype) throws DatatypeFormatException
createLiteralByValue(Object, RDFDatatype)
DatatypeFormatException
@Deprecated public static Node createUncachedLiteral(Object value, String lang, RDFDatatype dtype) throws DatatypeFormatException
createLiteralByValue(Object, String, RDFDatatype)
DatatypeFormatException
Licenced under the Apache License, Version 2.0