Class AnnotationParser

java.lang.Object
org.aksw.gerbil.io.nif.AnnotationParser

public class AnnotationParser extends Object
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private static final org.slf4j.Logger
     
    private boolean
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
    AnnotationParser(boolean removeUsedProperties)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    addTypeInformation(org.apache.jena.rdf.model.Model nifModel, org.apache.jena.rdf.model.Resource meaning, MarkingBuilder builder)
     
    protected ProvenanceInfo
    findProvenance(org.apache.jena.rdf.model.Model nifModel, org.apache.jena.rdf.model.Resource resource, Map<String,ProvenanceInfo> provenanceInfos)
     
    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.
    void
    parseAnnotations(org.apache.jena.rdf.model.Model nifModel, Document document, org.apache.jena.rdf.model.Resource documentResource)
     
    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)
     
    protected void
    parseOAAnnotations(org.apache.jena.rdf.model.Model nifModel, org.apache.jena.rdf.model.Resource documentResource, Map<String,ProvenanceInfo> provenanceInfos, List<Marking> markings)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 as Calendar of 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 triple
      subject - the subject of the triple. null works like a wildcard.
      predicate - the predicate of the triple. null works like a wildcard.
      Returns:
      object of the triple as Calendar or null if 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 as Calendar of 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 triple
      subject - the subject of the triple. null works like a wildcard.
      predicate - the predicate of the triple. null works like a wildcard.
      Returns:
      object of the triple as Calendar or null if 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)