Package org.iirds.rdf
Class RDFUtils
java.lang.Object
org.iirds.rdf.RDFUtils
RDF utilities
- Author:
- Martin Kreutzer, Empolis Information Management GmbH
-
Method Summary
Modifier and TypeMethodDescriptionstatic org.apache.jena.rdf.model.PropertygetProperty(org.apache.jena.rdf.model.Model model, String propertyURI) Get the property for a property URIgetTypeMap(org.apache.jena.rdf.model.Model model) Get a map of resources to a the type URIs (excluding Literals)getTypes(org.apache.jena.rdf.model.Model model, org.apache.jena.rdf.model.RDFNode resource) Get RDF type URIs of a resorucestatic booleanhasAttribute(org.apache.jena.rdf.model.Resource resource, String propertyURI) static booleanisLabelStatement(org.apache.jena.rdf.model.Statement stmt) static booleanisTypeStatement(org.apache.jena.rdf.model.Statement stmt) static StringtoString(org.apache.jena.rdf.model.Model model)
-
Method Details
-
isLabelStatement
public static boolean isLabelStatement(org.apache.jena.rdf.model.Statement stmt) -
isTypeStatement
public static boolean isTypeStatement(org.apache.jena.rdf.model.Statement stmt) -
getTypes
public static Set<String> getTypes(org.apache.jena.rdf.model.Model model, org.apache.jena.rdf.model.RDFNode resource) Get RDF type URIs of a resoruce- Parameters:
model- the RDF modelresource- the resource- Returns:
- set of type URIs, excluding those starting with
http://www.w3.org/2000/01/rdfandhttp://www.w3.org/1999/02/22-rdf
-
getTypeMap
public static Map<org.apache.jena.rdf.model.Resource,Set<String>> getTypeMap(org.apache.jena.rdf.model.Model model) Get a map of resources to a the type URIs (excluding Literals)- Parameters:
model- the model to analyze- Returns:
- the map of Resource to set fo type URIs
-
toString
-
getProperty
public static org.apache.jena.rdf.model.Property getProperty(org.apache.jena.rdf.model.Model model, String propertyURI) Get the property for a property URI- Parameters:
model- the RDF modelpropertyURI- the IRI of the property- Returns:
- the property
-
hasAttribute
-