/** * Gets the declaration. * * @param e the e * @return the declaration */ private OWLDeclarationAxiom getDeclaration(OWLEntity e) { return getOntologyManager().getOWLDataFactory().getOWLDeclarationAxiom(e); } }
/** * Gets the declaration. * * @param e the e * @return the declaration */ private OWLDeclarationAxiom getDeclaration(OWLEntity e) { return getOntologyManager().getOWLDataFactory().getOWLDeclarationAxiom(e); } }
@Override public List<OWLOntologyChange> repair() { return list(new AddAxiom(ontology, df.getOWLDeclarationAxiom(getExpression()))); } }
private Set<OntologyAxiomPair> parseObjectPropertyFrame(boolean eof) { Set<OntologyAxiomPair> axioms = new HashSet<>(); consumeToken(OBJECT_PROPERTY); String token = consumeToken(); OWLObjectProperty prop = getOWLObjectProperty(token); if (!prop.isAnonymous()) { axioms.add(new OntologyAxiomPair(defaultOntology, df.getOWLDeclarationAxiom(prop.asOWLObjectProperty()))); } parseFrameSections(eof, axioms, prop, objectPropertyFrameSections); return axioms; }
private Set<OntologyAxiomPair> parseObjectPropertyFrame(boolean eof) { Set<OntologyAxiomPair> axioms = new HashSet<>(); consumeToken(OBJECT_PROPERTY); String token = consumeToken(); OWLObjectProperty prop = getOWLObjectProperty(token); if (!prop.isAnonymous()) { axioms.add(new OntologyAxiomPair(defaultOntology, df.getOWLDeclarationAxiom(prop.asOWLObjectProperty()))); } parseFrameSections(eof, axioms, prop, objectPropertyFrameSections); return axioms; }
@Override public void handleTriple(IRI s, IRI p, IRI o) { if (!isAnon(s)) { OWLDataProperty owlDataProperty = df.getOWLDataProperty(s); add(df.getOWLDeclarationAxiom(owlDataProperty, anns())); } addDp(s, true); } }
@Override public void handleTriple(IRI s, IRI p, IRI o) { if (!isAnon(s)) { OWLNamedIndividual individual = df.getOWLNamedIndividual(s); add(df.getOWLDeclarationAxiom(individual, anns())); } consumer.addOWLNamedIndividual(s, true); } }
@Override public void handleTriple(IRI s, IRI p, IRI o) { if (!isAnon(s)) { OWLDatatype dt = df.getOWLDatatype(s); add(df.getOWLDeclarationAxiom(dt, anns())); } addDR(s, true); } }
@Override public void handleTriple(IRI s, IRI p, IRI o) { if (!isAnon(s)) { OWLObjectProperty op = df.getOWLObjectProperty(s); add(df.getOWLDeclarationAxiom(op, anns())); } addOp(s, true); } }
private Set<OntologyAxiomPair> parseClassFrame(boolean eof) { String tok = consumeToken(); if (!CLASS.matches(tok)) { throw new ExceptionBuilder().withKeyword(CLASS).build(); } String subj = consumeToken(); OWLClass cls = getOWLClass(subj); Set<OntologyAxiomPair> axioms = new HashSet<>(); axioms.add(new OntologyAxiomPair(defaultOntology, df.getOWLDeclarationAxiom(cls))); parseFrameSections(eof, axioms, cls, classFrameSections); return axioms; }
@Override public void handleTriple(IRI s, IRI p, IRI o) { if (!isAnon(s)) { OWLDatatype dt = df.getOWLDatatype(s); add(df.getOWLDeclarationAxiom(dt, anns())); } addDR(s, true); } }
@Override public void handleTriple(IRI s, IRI p, IRI o) { if (!isAnon(s)) { OWLDataProperty owlDataProperty = df.getOWLDataProperty(s); add(df.getOWLDeclarationAxiom(owlDataProperty, anns())); } addDp(s, true); } }
@Override public Object visit(OWLDeclarationAxiom axiom) { return visitAxiom(axiom, () -> df.getOWLDeclarationAxiom(t(axiom.getEntity()), t(axiom.annotations()))); }
@Override public void handleTriple(IRI s, IRI p, IRI o) { if (!isAnon(s)) { OWLObjectProperty op = df.getOWLObjectProperty(s); add(df.getOWLDeclarationAxiom(op, anns())); } addOp(s, true); } }
final public OWLAxiom Declaration() throws ParseException {OWLEntity entity = null; IRI iri = null; OWLLiteral con = null; Set<OWLAnnotation> axiomAnnos; jj_consume_token(DECLARATION); jj_consume_token(OPENPAR); axiomAnnos = AxiomAnnotationSet(); entity = Entity(); jj_consume_token(CLOSEPAR); return ignoreAnnotationsAndDeclarations? null: df.getOWLDeclarationAxiom(entity, axiomAnnos); }
@Override public void handleTriple(IRI s, IRI p, IRI o) { if (!isAnon(s)) { OWLAnnotationProperty property = df.getOWLAnnotationProperty(s); add(df.getOWLDeclarationAxiom(property, anns())); consume(s, p, o); } addAp(s, true); } }
public void handleTriple(IRI subject, IRI predicate, IRI object) throws UnloadableImportException { addAxiom(getDataFactory().getOWLDeclarationAxiom(getDataFactory().getOWLDataProperty(subject))); getConsumer().addOWLDataProperty(subject); } }
@Override public void handle(String currentId, String value, String qualifierBlock, String comment) { getConsumer().setCurrentId(value); final OWLEntity entity = getConsumer().getCurrentEntity(); if (entity != null){ applyChange(new AddAxiom(getOntology(), getDataFactory().getOWLDeclarationAxiom(entity))); } } }
public void handleTriple(IRI subject, IRI predicate, IRI object) throws UnloadableImportException { if (!isAnonymous(subject)) { addAxiom(getDataFactory().getOWLDeclarationAxiom(getDataFactory().getOWLObjectProperty(subject), getPendingAnnotations())); } getConsumer().addOWLObjectProperty(subject); } }
@Override public void handleTriple(IRI subject, IRI predicate, IRI object) throws UnloadableImportException { if (!isAnonymous(subject)) { Set<OWLAnnotation> annos = getConsumer().getPendingAnnotations(); OWLClass owlClass = getDataFactory().getOWLClass(subject); addAxiom(getDataFactory().getOWLDeclarationAxiom(owlClass, annos)); } getConsumer().addClassExpression(subject, true); } }