public class RdfHelper extends Object
| Modifier and Type | Field and Description |
|---|---|
private static org.slf4j.Logger |
LOGGER |
| Constructor and Description |
|---|
RdfHelper() |
| Modifier and Type | Method and Description |
|---|---|
protected static Calendar |
getCalendarValue(org.apache.jena.rdf.model.Model model,
org.apache.jena.rdf.model.Resource subject,
org.apache.jena.rdf.model.Property predicate,
org.apache.jena.datatypes.xsd.XSDDatatype dateType) |
static Calendar |
getDateTimeValue(org.apache.jena.rdf.model.Model model,
org.apache.jena.rdf.model.Resource subject,
org.apache.jena.rdf.model.Property predicate)
Returns the object as
Calendar of the first triple that has the given
subject and predicate and that can be found in the given model. |
static Calendar |
getDateValue(org.apache.jena.rdf.model.Model model,
org.apache.jena.rdf.model.Resource subject,
org.apache.jena.rdf.model.Property predicate)
Returns the object as
Calendar of the first triple that has the given
subject and predicate and that can be found in the given model. |
static String |
getDescription(org.apache.jena.rdf.model.Model model,
org.apache.jena.rdf.model.Resource resource)
Returns the description, i.e., the value of rdfs:comment, of the given
Resource if it is present in the given Model. |
static Duration |
getDurationValue(org.apache.jena.rdf.model.Model model,
org.apache.jena.rdf.model.Resource subject,
org.apache.jena.rdf.model.Property predicate)
Returns the object as
Duration of the first triple that has the given
subject and predicate and that can be found in the given model. |
static String |
getLabel(org.apache.jena.rdf.model.Model model,
org.apache.jena.rdf.model.Resource resource)
Returns the label of the given
Resource if it is present in the given
Model. |
static org.apache.jena.rdf.model.Literal |
getLiteral(org.apache.jena.rdf.model.Model model,
org.apache.jena.rdf.model.Resource subject,
org.apache.jena.rdf.model.Property predicate)
Returns the first triple literal that has the given subject and predicate and
that can be found in the given model.
|
static org.apache.jena.rdf.model.Resource |
getObjectResource(org.apache.jena.rdf.model.Model model,
org.apache.jena.rdf.model.Resource subject,
org.apache.jena.rdf.model.Property predicate)
Returns the object as
Resource of the first triple that has the given
subject and predicate and that can be found in the given model. |
static List<org.apache.jena.rdf.model.Resource> |
getObjectResources(org.apache.jena.rdf.model.Model model,
org.apache.jena.rdf.model.Resource subject,
org.apache.jena.rdf.model.Property predicate)
Returns the objects as
Resources of all triples that have the given
subject and predicate and that can be found in the given model. |
static String |
getStringValue(org.apache.jena.rdf.model.Model model,
org.apache.jena.rdf.model.Resource subject,
org.apache.jena.rdf.model.Property predicate)
Returns the object as String of the first triple that has the given subject
and predicate and that can be found in the given model.
|
static List<String> |
getStringValues(org.apache.jena.rdf.model.Model model,
org.apache.jena.rdf.model.Resource subject,
org.apache.jena.rdf.model.Property predicate)
Returns the objects as Strings of all triples that have the given subject and
predicate and that can be found in the given model.
|
static List<org.apache.jena.rdf.model.Resource> |
getSubjectResources(org.apache.jena.rdf.model.Model model,
org.apache.jena.rdf.model.Property predicate,
org.apache.jena.rdf.model.Resource object)
Returns a list of subjects of triples that have the given object and
predicate and that can be found in the given model.
|
public static String getLabel(org.apache.jena.rdf.model.Model model, org.apache.jena.rdf.model.Resource resource)
Resource if it is present in the given
Model.model - the model that should contain the labelresource - the resource for which the label is requestednull if such a label does
not existpublic static String getDescription(org.apache.jena.rdf.model.Model model, org.apache.jena.rdf.model.Resource resource)
Resource if it is present in the given Model.model - the model that should contain the labelresource - the resource for which the label is requestednull if such a label
does not existpublic static String getStringValue(org.apache.jena.rdf.model.Model model, org.apache.jena.rdf.model.Resource subject, org.apache.jena.rdf.model.Property predicate)
model - the model that should contain the triplesubject - the subject of the triple null works like a wildcard.predicate - the predicate of the triple null works like a
wildcard.null if such a triple
couldn't be foundpublic static List<String> getStringValues(org.apache.jena.rdf.model.Model model, org.apache.jena.rdf.model.Resource subject, org.apache.jena.rdf.model.Property predicate)
model - the model that should contain the triplessubject - the subject of the triples. null works like a
wildcard.predicate - the predicate of the triples. null works like a
wildcard.public static Calendar getDateValue(org.apache.jena.rdf.model.Model model, org.apache.jena.rdf.model.Resource subject, org.apache.jena.rdf.model.Property predicate)
Calendar of the first triple that has the given
subject and predicate and that can be found in the given model.model - the model that should contain the triplesubject - the subject of the triple. null works like a
wildcard.predicate - the predicate of the triple. null works like a
wildcard.Calendar or null if such
a triple couldn't be found or the value can not be read as XSDDatepublic static Calendar getDateTimeValue(org.apache.jena.rdf.model.Model model, org.apache.jena.rdf.model.Resource subject, org.apache.jena.rdf.model.Property predicate)
Calendar of the first triple that has the given
subject and predicate and that can be found in the given model.model - the model that should contain the triplesubject - the subject of the triple. null works like a
wildcard.predicate - the predicate of the triple. null works like a
wildcard.Calendar or null if such
a triple couldn't be found or the value can not be read as
XSDDateTimeprotected static Calendar getCalendarValue(org.apache.jena.rdf.model.Model model, org.apache.jena.rdf.model.Resource subject, org.apache.jena.rdf.model.Property predicate, org.apache.jena.datatypes.xsd.XSDDatatype dateType)
public static Duration getDurationValue(org.apache.jena.rdf.model.Model model, org.apache.jena.rdf.model.Resource subject, org.apache.jena.rdf.model.Property predicate)
Duration of the first triple that has the given
subject and predicate and that can be found in the given model.model - the model that should contain the triplesubject - the subject of the triple. null works like a
wildcard.predicate - the predicate of the triple. null works like a
wildcard.Duration or null if such
a triple couldn't be found or the value can not be read as
XSDDurationpublic static org.apache.jena.rdf.model.Literal getLiteral(org.apache.jena.rdf.model.Model model,
org.apache.jena.rdf.model.Resource subject,
org.apache.jena.rdf.model.Property predicate)
model - the model that should contain the triplesubject - the subject of the triple. null works like a
wildcard.predicate - the predicate of the triple. null works like a
wildcard.null if such a literal couldn't
be foundpublic static org.apache.jena.rdf.model.Resource getObjectResource(org.apache.jena.rdf.model.Model model,
org.apache.jena.rdf.model.Resource subject,
org.apache.jena.rdf.model.Property predicate)
Resource of the first triple that has the given
subject and predicate and that can be found in the given model.model - the model that should contain the triplesubject - the subject of the triplepredicate - the predicate of the tripleResource or null if such
a triple couldn't be foundpublic static List<org.apache.jena.rdf.model.Resource> getObjectResources(org.apache.jena.rdf.model.Model model, org.apache.jena.rdf.model.Resource subject, org.apache.jena.rdf.model.Property predicate)
Resources of all triples that have the given
subject and predicate and that can be found in the given model.model - the model that should contain the triplesubject - the subject of the triplepredicate - the predicate of the tripleResourcepublic static List<org.apache.jena.rdf.model.Resource> getSubjectResources(org.apache.jena.rdf.model.Model model, org.apache.jena.rdf.model.Property predicate, org.apache.jena.rdf.model.Resource object)
model - the model that should contain the triplepredicate - the predicate of the tripleobject - the object of the tripleResourceCopyright © 2017–2018. All rights reserved.