public class NodeFactory extends Object
Constructor and Description |
---|
NodeFactory() |
Modifier and Type | Method and Description |
---|---|
static Node |
createAnon()
make a blank node with a fresh anon id
|
static Node |
createAnon(AnonId id)
make a blank node with the specified label
|
static Node |
createLiteral(com.hp.hpl.jena.graph.impl.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 lit,
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 |
createUncachedLiteral(Object value,
RDFDatatype dtype) |
static Node |
createUncachedLiteral(Object value,
String lang,
RDFDatatype dtype) |
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 createAnon()
public static Node createLiteral(com.hp.hpl.jena.graph.impl.LiteralLabel lit)
public static Node createVariable(String name)
public static Node createLiteral(String lit, String lang, boolean isXml)
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, RDFDatatype dtype) throws DatatypeFormatException
lex
- the lexical form of the literallang
- the optional language tagdtype
- the type of the literal, null for old style "plain" literalsDatatypeFormatException
- 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 literal, null for old style "plain" literalsDatatypeFormatException
- if lex is not a legal form of dtypepublic static Node createUncachedLiteral(Object value, String lang, RDFDatatype dtype) throws DatatypeFormatException
DatatypeFormatException
public static Node createUncachedLiteral(Object value, RDFDatatype dtype) throws DatatypeFormatException
DatatypeFormatException
Licenced under the Apache License, Version 2.0