public class RDFUtils extends Object
Modifier and Type | Field and Description |
---|---|
static com.hp.hpl.jena.shared.PrefixMapping |
noPrefixes
An immutable empty prefix mapping.
|
Constructor and Description |
---|
RDFUtils() |
Modifier and Type | Method and Description |
---|---|
static List<String> |
allMatches(Pattern regex,
String target)
Find all matches for the given regex within a string.
|
static boolean |
getBooleanValue(com.hp.hpl.jena.rdf.model.Resource r,
com.hp.hpl.jena.rdf.model.Property p,
boolean ifAbsent)
Return the boolean value of property
p on resource
r . |
static int |
getIntValue(com.hp.hpl.jena.rdf.model.Resource x,
com.hp.hpl.jena.rdf.model.Property p,
int ifAbsent)
Answer the integer value of property p on resource x, or
ifAbsent if there isn't one.
|
static String |
getLexicalForm(com.hp.hpl.jena.rdf.model.RDFNode value)
Return the lexical form of a node.
|
static String |
getNameFor(com.hp.hpl.jena.rdf.model.Resource r)
Find a name to give a resource
|
static Boolean |
getOptionalBooleanValue(com.hp.hpl.jena.rdf.model.Resource x,
com.hp.hpl.jena.rdf.model.Property p,
Boolean ifAbsent)
Return an optional boolean value of a property.
|
static com.hp.hpl.jena.rdf.model.Resource |
getResourceValue(com.hp.hpl.jena.rdf.model.Resource subject,
com.hp.hpl.jena.rdf.model.Property prop)
Return the value of a resource on a property as a resource, or
null if there isn't a resource value.
|
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.
|
public static final com.hp.hpl.jena.shared.PrefixMapping noPrefixes
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 com.hp.hpl.jena.rdf.model.Resource getResourceValue(com.hp.hpl.jena.rdf.model.Resource subject, com.hp.hpl.jena.rdf.model.Property prop)
public static String getNameFor(com.hp.hpl.jena.rdf.model.Resource r)
public static List<String> allMatches(Pattern regex, String target)
public static int getIntValue(com.hp.hpl.jena.rdf.model.Resource x, com.hp.hpl.jena.rdf.model.Property p, int ifAbsent)
public static boolean getBooleanValue(com.hp.hpl.jena.rdf.model.Resource r, com.hp.hpl.jena.rdf.model.Property p, boolean ifAbsent)
p
on resource
r
. If there is no p-value, or the p-value is not a
literal, return ifAbsent
. Otherwise return true if
the literal has spelling "true" or "yes", false if it has the
spelling "false" or "no", and an unspecified value otherwise.public static Boolean getOptionalBooleanValue(com.hp.hpl.jena.rdf.model.Resource x, com.hp.hpl.jena.rdf.model.Property p, Boolean ifAbsent)
Copyright © 2014. All Rights Reserved.