public class RDFUtil extends Object
Modifier and Type | Class and Description |
---|---|
static class |
RDFUtil.Vocab |
Modifier and Type | Field and Description |
---|---|
static Pattern |
matchTimeZone |
static String |
RDFPlainLiteral |
Constructor and Description |
---|
RDFUtil() |
Modifier and Type | Method and Description |
---|---|
static List<com.hp.hpl.jena.rdf.model.RDFNode> |
asJavaList(com.hp.hpl.jena.rdf.model.Resource l)
Answer the Java list rooted at
l , but if the list is
incomplete, just deliver the existing elements. |
protected static SimpleDateFormat |
dateFormat()
xsdDateFormat returns a SimpleDateFormat in "EEE, d MMM yyyy HH:mm:ss 'GMT'Z"
form, with the timezone set to GMT.
|
static SimpleDateFormat |
dateFormat(boolean keepZone,
boolean dropTime) |
static String |
formatDateTime(com.hp.hpl.jena.rdf.model.Literal l)
Convert an xsd:datetype or xsd:date to a javascript compatible string.
|
static String |
getLexicalForm(com.hp.hpl.jena.rdf.model.RDFNode value)
Return the lexical form of a node.
|
static String |
getStringValue(com.hp.hpl.jena.rdf.model.Resource r,
com.hp.hpl.jena.rdf.model.Property p)
Return one of the values of the property on the resource in string form.
|
static String |
getStringValue(com.hp.hpl.jena.rdf.model.Resource r,
com.hp.hpl.jena.rdf.model.Property p,
String defaultValue)
Return one of the values of the property on the resource in string form.
|
static boolean |
isList(com.hp.hpl.jena.rdf.model.RDFNode l)
Answer true if
v is a list, which here is defined to
be "a resource which is nil or has an rdf:first or is of type rdf:List". |
static boolean |
looksLikeURI(String s) |
static com.hp.hpl.jena.rdf.model.Literal |
parseDateTime(String lex,
String type)
Convert an javascript date string to an xsd:datetime or xsd:date.
|
protected static SimpleDateFormat |
xsdDateFormat()
xsdDateFormat returns a SimpleDateFormat in yyyy-MM-dd form.
|
public static final String RDFPlainLiteral
public static final Pattern matchTimeZone
public static String getStringValue(com.hp.hpl.jena.rdf.model.Resource r, com.hp.hpl.jena.rdf.model.Property p, String defaultValue)
public static String getStringValue(com.hp.hpl.jena.rdf.model.Resource r, com.hp.hpl.jena.rdf.model.Property p)
public static String getLexicalForm(com.hp.hpl.jena.rdf.model.RDFNode value)
public static List<com.hp.hpl.jena.rdf.model.RDFNode> asJavaList(com.hp.hpl.jena.rdf.model.Resource l)
l
, but if the list is
incomplete, just deliver the existing elements.public static boolean isList(com.hp.hpl.jena.rdf.model.RDFNode l)
v
is a list, which here is defined to
be "a resource which is nil or has an rdf:first or is of type rdf:List".protected static SimpleDateFormat xsdDateFormat()
protected static SimpleDateFormat dateFormat()
public static SimpleDateFormat dateFormat(boolean keepZone, boolean dropTime)
public static String formatDateTime(com.hp.hpl.jena.rdf.model.Literal l)
public static com.hp.hpl.jena.rdf.model.Literal parseDateTime(String lex, String type) throws ParseException
ParseException
public static boolean looksLikeURI(String s)
Copyright © 2014. All Rights Reserved.