public class RDFUtils extends Object
Modifier and Type | Method and Description |
---|---|
static org.apache.jena.rdf.model.Property |
getProperty(org.apache.jena.rdf.model.Model model,
String propertyURI)
Get the property for a property URI
|
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)
|
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
|
static boolean |
hasAttribute(org.apache.jena.rdf.model.Resource resource,
String propertyURI) |
static boolean |
isLabelStatement(org.apache.jena.rdf.model.Statement stmt) |
static boolean |
isTypeStatement(org.apache.jena.rdf.model.Statement stmt) |
static String |
toString(org.apache.jena.rdf.model.Model model) |
public static boolean isLabelStatement(org.apache.jena.rdf.model.Statement stmt)
public static boolean isTypeStatement(org.apache.jena.rdf.model.Statement stmt)
public static Set<String> getTypes(org.apache.jena.rdf.model.Model model, org.apache.jena.rdf.model.RDFNode resource)
model
- the RDF modelresource
- the resourcehttp://www.w3.org/2000/01/rdf
and
http://www.w3.org/1999/02/22-rdf
public static Map<org.apache.jena.rdf.model.Resource,Set<String>> getTypeMap(org.apache.jena.rdf.model.Model model)
model
- the model to analyzepublic static String toString(org.apache.jena.rdf.model.Model model)
public static org.apache.jena.rdf.model.Property getProperty(org.apache.jena.rdf.model.Model model, String propertyURI)
model
- the RDF modelpropertyURI
- the IRI of the propertypublic static boolean hasAttribute(org.apache.jena.rdf.model.Resource resource, String propertyURI)
Copyright © 2024. All rights reserved.