Class AnnotationParser

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

public class AnnotationParser extends Object
  • 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)
    • addTypeInformationIfPossible

      private MeaningSpan addTypeInformationIfPossible(NamedEntity ne, org.apache.jena.rdf.model.Model nifModel)
    • addTypeInformationIfPossible

      private MeaningSpan addTypeInformationIfPossible(ScoredNamedEntity ne, org.apache.jena.rdf.model.Model nifModel)
    • addTypeInformation

      private TypedNamedEntity addTypeInformation(TypedNamedEntity typedNE, org.apache.jena.rdf.model.Model nifModel)
    • 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)