Package org.aksw.gerbil.io.nif
Class AnnotationParser
java.lang.Object
org.aksw.gerbil.io.nif.AnnotationParser
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final org.slf4j.Loggerprivate boolean -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddTypeInformation(org.apache.jena.rdf.model.Model nifModel, org.apache.jena.rdf.model.Resource meaning, MarkingBuilder builder) protected ProvenanceInfofindProvenance(org.apache.jena.rdf.model.Model nifModel, org.apache.jena.rdf.model.Resource resource, Map<String, ProvenanceInfo> provenanceInfos) protected static CalendargetCalendarValue(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 CalendargetDateTimeValue(org.apache.jena.rdf.model.Model model, org.apache.jena.rdf.model.Resource subject, org.apache.jena.rdf.model.Property predicate) Returns the object asCalendarof the first triple that has the given subject and predicate and that can be found in the given model.static CalendargetDateValue(org.apache.jena.rdf.model.Model model, org.apache.jena.rdf.model.Resource subject, org.apache.jena.rdf.model.Property predicate) Returns the object asCalendarof the first triple that has the given subject and predicate and that can be found in the given model.voidparseAnnotations(org.apache.jena.rdf.model.Model nifModel, Document document, org.apache.jena.rdf.model.Resource documentResource) protected voidparseNifAnnotations(org.apache.jena.rdf.model.Model nifModel, org.apache.jena.util.iterator.ExtendedIterator<? extends org.apache.jena.rdf.model.RDFNode> iterator, Map<String, ProvenanceInfo> provenanceInfos, List<Marking> markings) protected voidparseOAAnnotations(org.apache.jena.rdf.model.Model nifModel, org.apache.jena.rdf.model.Resource documentResource, Map<String, ProvenanceInfo> provenanceInfos, List<Marking> markings)
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
removeUsedProperties
private boolean removeUsedProperties
-
-
Constructor Details
-
AnnotationParser
public AnnotationParser() -
AnnotationParser
public AnnotationParser(boolean removeUsedProperties)
-
-
Method Details
-
parseAnnotations
public void parseAnnotations(org.apache.jena.rdf.model.Model nifModel, Document document, org.apache.jena.rdf.model.Resource documentResource) -
parseNifAnnotations
protected void parseNifAnnotations(org.apache.jena.rdf.model.Model nifModel, org.apache.jena.util.iterator.ExtendedIterator<? extends org.apache.jena.rdf.model.RDFNode> iterator, Map<String, ProvenanceInfo> provenanceInfos, List<Marking> markings) -
findProvenance
protected ProvenanceInfo findProvenance(org.apache.jena.rdf.model.Model nifModel, org.apache.jena.rdf.model.Resource resource, Map<String, ProvenanceInfo> provenanceInfos) -
parseOAAnnotations
protected void parseOAAnnotations(org.apache.jena.rdf.model.Model nifModel, org.apache.jena.rdf.model.Resource documentResource, Map<String, ProvenanceInfo> provenanceInfos, List<Marking> markings) -
addTypeInformation
protected void addTypeInformation(org.apache.jena.rdf.model.Model nifModel, org.apache.jena.rdf.model.Resource meaning, MarkingBuilder builder) -
getDateValue
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) Returns the object asCalendarof the first triple that has the given subject and predicate and that can be found in the given model.- Parameters:
model- the model that should contain the triplesubject- the subject of the triple.nullworks like a wildcard.predicate- the predicate of the triple.nullworks like a wildcard.- Returns:
- object of the triple as
Calendarornullif such a triple couldn't be found or the value can not be read as XSDDate
-
getDateTimeValue
public 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 asCalendarof the first triple that has the given subject and predicate and that can be found in the given model.- Parameters:
model- the model that should contain the triplesubject- the subject of the triple.nullworks like a wildcard.predicate- the predicate of the triple.nullworks like a wildcard.- Returns:
- object of the triple as
Calendarornullif such a triple couldn't be found or the value can not be read as XSDDateTime
-
getCalendarValue
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)
-