public class NodeFactoryExtra extends Object
Constructor and Description |
---|
NodeFactoryExtra() |
Modifier and Type | Method and Description |
---|---|
static Node |
createLiteralNode(String lex,
String lang,
String datatypeURI)
Create a literal Node, when the datatype, if given, is a string
|
static Node |
dateTimeToNode(Calendar c)
Calendar to xsd:dateTime Node
|
static Node |
dateToNode(Calendar c)
Calendar to xsd:date Node
|
static Node |
doubleToNode(double value)
double to Node
|
static Node |
floatToNode(float value)
float to Node
|
static Node |
intToNode(int integer)
int to Node
|
static Node |
intToNode(long integer)
long to Node
|
static double |
nodeToDouble(Node node)
Node to double
|
static float |
nodeToFloat(Node node)
Node to float
|
static int |
nodeToInt(Node node)
Node to int
|
static long |
nodeToLong(Node node)
Node to long
|
static Node |
nowAsDateTime()
Now, as xsd:dateTime Node
|
static Node |
parseNode(String nodeString)
Parse a node - with convenience prefix mapping
|
static Node |
parseNode(String nodeString,
PrefixMap pmap)
Parse a string into a node.
|
static Node |
timeToNode(Calendar c)
Calendar to xsd:time Node
|
static Node |
todayAsDate()
Today, as xsd:date Node
|
public static Node parseNode(String nodeString)
Allows surrounding white space
nodeString
- Node string to parsepublic static Node parseNode(String nodeString, PrefixMap pmap)
Allows surrounding white space.
nodeString
- Node string to parsepmap
- Prefix Map, null to use no prefix mappingsRiotException
- Thrown if a valid node cannot be parsedpublic static Node createLiteralNode(String lex, String lang, String datatypeURI)
public static int nodeToInt(Node node)
node
- public static long nodeToLong(Node node)
node
- public static float nodeToFloat(Node node)
node
- public static double nodeToDouble(Node node)
node
- public static Node intToNode(int integer)
integer
- public static Node intToNode(long integer)
integer
- public static Node floatToNode(float value)
value
- public static Node doubleToNode(double value)
value
- public static Node nowAsDateTime()
public static Node todayAsDate()
Licenced under the Apache License, Version 2.0