public class AnnotationParser extends Object
| Modifier and Type | Field and Description |
|---|---|
private static org.slf4j.Logger |
LOGGER |
private boolean |
removeUsedProperties |
| Constructor and Description |
|---|
AnnotationParser() |
AnnotationParser(boolean removeUsedProperties) |
| Modifier and Type | Method and Description |
|---|---|
private TypedNamedEntity |
addTypeInformation(TypedNamedEntity typedNE,
org.apache.jena.rdf.model.Model nifModel) |
private MeaningSpan |
addTypeInformationIfPossible(NamedEntity ne,
org.apache.jena.rdf.model.Model nifModel) |
private MeaningSpan |
addTypeInformationIfPossible(ScoredNamedEntity ne,
org.apache.jena.rdf.model.Model nifModel) |
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) |
private static final org.slf4j.Logger LOGGER
private boolean removeUsedProperties
public AnnotationParser()
public AnnotationParser(boolean removeUsedProperties)
public void parseAnnotations(org.apache.jena.rdf.model.Model nifModel,
Document document,
org.apache.jena.rdf.model.Resource documentResource)
private MeaningSpan addTypeInformationIfPossible(NamedEntity ne, org.apache.jena.rdf.model.Model nifModel)
private MeaningSpan addTypeInformationIfPossible(ScoredNamedEntity ne, org.apache.jena.rdf.model.Model nifModel)
private TypedNamedEntity addTypeInformation(TypedNamedEntity typedNE, org.apache.jena.rdf.model.Model nifModel)
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)
Copyright © 2017. All rights reserved.