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; }
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; }
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; }
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; }
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 Set<OntologyAxiomPair> parseDataPropertyFrame() { String tok = consumeToken(); if (!DATA_PROPERTY.matches(tok)) { throw new ExceptionBuilder().withKeyword(DATA_PROPERTY).build(); } String subj = consumeToken(); OWLDataProperty prop = getOWLDataProperty(subj); Set<OntologyAxiomPair> axioms = new HashSet<>(); axioms.add(new OntologyAxiomPair(defaultOntology, df.getOWLDeclarationAxiom(prop))); parseFrameSections(false, axioms, prop, dataPropertyFrameSections); return axioms; }
@Override public Set<OntologyAxiomPair> parseDataPropertyFrame() { String tok = consumeToken(); if (!DATA_PROPERTY.matches(tok)) { throw new ExceptionBuilder().withKeyword(DATA_PROPERTY).build(); } String subj = consumeToken(); OWLDataProperty prop = getOWLDataProperty(subj); Set<OntologyAxiomPair> axioms = new HashSet<>(); axioms.add(new OntologyAxiomPair(defaultOntology, df.getOWLDeclarationAxiom(prop))); parseFrameSections(false, axioms, prop, dataPropertyFrameSections); return axioms; }
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 Set<OntologyAxiomPair> parseDataPropertyFrame() { String tok = consumeToken(); if (!DATA_PROPERTY.matches(tok)) { throw new ExceptionBuilder().withKeyword(DATA_PROPERTY).build(); } String subj = consumeToken(); OWLDataProperty prop = getOWLDataProperty(subj); Set<OntologyAxiomPair> axioms = new HashSet<>(); axioms.add(new OntologyAxiomPair(defaultOntology, df.getOWLDeclarationAxiom(prop))); parseFrameSections(false, axioms, prop, dataPropertyFrameSections); return axioms; }
private Set<OntologyAxiomPair> parseDisjointClasses() { String section = consumeToken(); if (!DISJOINT_CLASSES.matches(section)) { throw new ExceptionBuilder().withKeyword(DISJOINT_CLASSES).build(); } Set<OWLOntology> ontologies = getOntologies(); Set<OWLAnnotation> annotations = parseAnnotations(); Set<OWLClassExpression> classExpressions = parseClassExpressionList(); Set<OntologyAxiomPair> pairs = new HashSet<>(); for (OWLOntology ont : ontologies) { pairs.add(new OntologyAxiomPair(ont, df.getOWLDisjointClassesAxiom(classExpressions, annotations))); } return pairs; }
@Override public Set<OntologyAxiomPair> parseDataPropertyFrame() { String tok = consumeToken(); if (!DATA_PROPERTY.matches(tok)) { throw new ExceptionBuilder().withKeyword(DATA_PROPERTY).build(); } String subj = consumeToken(); OWLDataProperty prop = getOWLDataProperty(subj); Set<OntologyAxiomPair> axioms = new HashSet<>(); axioms.add(new OntologyAxiomPair(defaultOntology, df.getOWLDeclarationAxiom(prop))); parseFrameSections(false, axioms, prop, dataPropertyFrameSections); return axioms; }
private Set<OntologyAxiomPair> parseDisjointClasses() { String section = consumeToken(); if (!DISJOINT_CLASSES.matches(section)) { throw new ExceptionBuilder().withKeyword(DISJOINT_CLASSES).build(); } Set<OWLOntology> ontologies = getOntologies(); Set<OWLAnnotation> annotations = parseAnnotations(); Set<OWLClassExpression> classExpressions = parseClassExpressionList(); Set<OntologyAxiomPair> pairs = new HashSet<>(); for (OWLOntology ont : ontologies) { pairs.add(new OntologyAxiomPair(ont, df.getOWLDisjointClassesAxiom(classExpressions, annotations))); } return pairs; }
private Set<OntologyAxiomPair> parseDifferentIndividuals() { String section = consumeToken(); if (!DIFFERENT_INDIVIDUALS.matches(section)) { throw new ExceptionBuilder().withKeyword(DIFFERENT_INDIVIDUALS).build(); } Set<OWLOntology> ontologies = getOntologies(); Set<OWLAnnotation> annotations = parseAnnotations(); Set<OWLIndividual> individuals = parseIndividualList(); Set<OntologyAxiomPair> pairs = new HashSet<>(); for (OWLOntology ontology : ontologies) { pairs.add(new OntologyAxiomPair(ontology, df.getOWLDifferentIndividualsAxiom(individuals, annotations))); } return pairs; }
private Set<OntologyAxiomPair> parseDifferentIndividuals() { String section = consumeToken(); if (!DIFFERENT_INDIVIDUALS.matches(section)) { throw new ExceptionBuilder().withKeyword(DIFFERENT_INDIVIDUALS).build(); } Set<OWLOntology> ontologies = getOntologies(); Set<OWLAnnotation> annotations = parseAnnotations(); Set<OWLIndividual> individuals = parseIndividualList(); Set<OntologyAxiomPair> pairs = new HashSet<>(); for (OWLOntology ontology : ontologies) { pairs.add(new OntologyAxiomPair(ontology, df.getOWLDifferentIndividualsAxiom(individuals, annotations))); } return pairs; }
private Set<OntologyAxiomPair> parseNaryEquivalentClasses() { String tok = consumeToken(); if (!EQUIVALENT_CLASSES.matches(tok)) { throw new ExceptionBuilder().withKeyword(EQUIVALENT_CLASSES).build(); } Set<OWLOntology> ontologies = getOntologies(); Set<OWLAnnotation> annotations = parseAnnotations(); Set<OWLClassExpression> classExpressions = parseClassExpressionList(); Set<OntologyAxiomPair> pairs = new HashSet<>(); for (OWLOntology ont : ontologies) { pairs.add(new OntologyAxiomPair(ont, df.getOWLEquivalentClassesAxiom(classExpressions, annotations))); } return pairs; }
private Set<OntologyAxiomPair> parseDifferentIndividuals() { String section = consumeToken(); if (!DIFFERENT_INDIVIDUALS.matches(section)) { throw new ExceptionBuilder().withKeyword(DIFFERENT_INDIVIDUALS).build(); } Set<OWLOntology> ontologies = getOntologies(); Set<OWLAnnotation> annotations = parseAnnotations(); Set<OWLIndividual> individuals = parseIndividualList(); Set<OntologyAxiomPair> pairs = new HashSet<>(); for (OWLOntology ontology : ontologies) { pairs.add(new OntologyAxiomPair(ontology, df.getOWLDifferentIndividualsAxiom(individuals, annotations))); } return pairs; }
@Override public Set<OntologyAxiomPair> parseAnnotationPropertyFrame() { String tok = consumeToken(); if (!ANNOTATION_PROPERTY.matches(tok)) { throw new ExceptionBuilder().withKeyword(ANNOTATION_PROPERTY).build(); } String subj = consumeToken(); OWLAnnotationProperty prop = getOWLAnnotationProperty(subj); Set<OntologyAxiomPair> axioms = new HashSet<>(); for (OWLOntology ont : getOntologies()) { axioms.add(new OntologyAxiomPair(ont, df.getOWLDeclarationAxiom(prop))); } parseFrameSections(false, axioms, prop, annotationPropertyFrameSections); return axioms; }
@Override public Set<OntologyAxiomPair> parseIndividualFrame() { String tok = consumeToken(); if (!INDIVIDUAL.matches(tok)) { throw new ExceptionBuilder().withKeyword(INDIVIDUAL).build(); } String subj = consumeToken(); OWLIndividual ind = getOWLIndividual(subj); Set<OntologyAxiomPair> axioms = new HashSet<>(); if (!ind.isAnonymous()) { axioms.add(new OntologyAxiomPair(getOntology(null), df.getOWLDeclarationAxiom(ind.asOWLNamedIndividual()))); } parseFrameSections(false, axioms, ind, individualFrameSections); return axioms; }