private Set<OntologyAxiomPair> parseNaryEquivalentProperties() { String tok = consumeToken(); if (!EQUIVALENT_PROPERTIES.matches(tok)) { throw new ExceptionBuilder().withKeyword(EQUIVALENT_PROPERTIES).build(); } Set<OWLOntology> ontologies = getOntologies(); Set<OWLAnnotation> annotations = parseAnnotations(); Set<OWLPropertyExpression> properties = parsePropertyList(); OWLAxiom propertyAxiom; if (properties.iterator().next().isObjectPropertyExpression()) { Set<OWLObjectPropertyExpression> ope = new HashSet<>(); properties.forEach(pe -> ope.add(pe.asObjectPropertyExpression())); propertyAxiom = df.getOWLEquivalentObjectPropertiesAxiom(ope, annotations); } else { Set<OWLDataPropertyExpression> dpe = new HashSet<>(); properties.forEach(pe -> dpe.add(pe.asDataPropertyExpression())); propertyAxiom = df.getOWLEquivalentDataPropertiesAxiom(dpe, annotations); } Set<OntologyAxiomPair> pairs = new HashSet<>(); for (OWLOntology ont : ontologies) { pairs.add(new OntologyAxiomPair(ont, propertyAxiom)); } return pairs; }
private Set<OntologyAxiomPair> parseDisjointProperties() { String section = consumeToken(); if (!DISJOINT_PROPERTIES.matches(section)) { throw new ExceptionBuilder().withKeyword(DISJOINT_PROPERTIES).build(); } Set<OWLOntology> ontologies = getOntologies(); Set<OWLAnnotation> annotations = parseAnnotations(); Set<OWLPropertyExpression> props = parsePropertyList(); Set<OntologyAxiomPair> pairs = new HashSet<>(); OWLAxiom propertiesAxiom; if (props.iterator().next().isObjectPropertyExpression()) { Set<OWLObjectPropertyExpression> ope = new HashSet<>(); props.forEach(pe -> ope.add(pe.asObjectPropertyExpression())); propertiesAxiom = df.getOWLDisjointObjectPropertiesAxiom(ope, annotations); } else { Set<OWLDataPropertyExpression> dpe = new HashSet<>(); props.forEach(pe -> dpe.add(pe.asDataPropertyExpression())); propertiesAxiom = df.getOWLDisjointDataPropertiesAxiom(dpe, annotations); } for (OWLOntology ont : ontologies) { pairs.add(new OntologyAxiomPair(ont, propertiesAxiom)); } return pairs; }
private Set<OntologyAxiomPair> parseNaryEquivalentProperties() { String tok = consumeToken(); if (!EQUIVALENT_PROPERTIES.matches(tok)) { throw new ExceptionBuilder().withKeyword(EQUIVALENT_PROPERTIES).build(); } Set<OWLOntology> ontologies = getOntologies(); Set<OWLAnnotation> annotations = parseAnnotations(); Set<OWLPropertyExpression> properties = parsePropertyList(); OWLAxiom propertyAxiom; if (properties.iterator().next().isObjectPropertyExpression()) { Set<OWLObjectPropertyExpression> ope = new HashSet<>(); properties.forEach(pe -> ope.add(pe.asObjectPropertyExpression())); propertyAxiom = df.getOWLEquivalentObjectPropertiesAxiom(ope, annotations); } else { Set<OWLDataPropertyExpression> dpe = new HashSet<>(); properties.forEach(pe -> dpe.add(pe.asDataPropertyExpression())); propertyAxiom = df.getOWLEquivalentDataPropertiesAxiom(dpe, annotations); } Set<OntologyAxiomPair> pairs = new HashSet<>(); for (OWLOntology ont : ontologies) { pairs.add(new OntologyAxiomPair(ont, propertyAxiom)); } return pairs; }
private Set<OntologyAxiomPair> parseDisjointProperties() { String section = consumeToken(); if (!DISJOINT_PROPERTIES.matches(section)) { throw new ExceptionBuilder().withKeyword(DISJOINT_PROPERTIES).build(); } Set<OWLOntology> ontologies = getOntologies(); Set<OWLAnnotation> annotations = parseAnnotations(); Set<OWLPropertyExpression> props = parsePropertyList(); Set<OntologyAxiomPair> pairs = new HashSet<>(); OWLAxiom propertiesAxiom; if (props.iterator().next().isObjectPropertyExpression()) { Set<OWLObjectPropertyExpression> ope = new HashSet<>(); props.forEach(pe -> ope.add(pe.asObjectPropertyExpression())); propertiesAxiom = df.getOWLDisjointObjectPropertiesAxiom(ope, annotations); } else { Set<OWLDataPropertyExpression> dpe = new HashSet<>(); props.forEach(pe -> dpe.add(pe.asDataPropertyExpression())); propertiesAxiom = df.getOWLDisjointDataPropertiesAxiom(dpe, annotations); } for (OWLOntology ont : ontologies) { pairs.add(new OntologyAxiomPair(ont, propertiesAxiom)); } return pairs; }
private Set<OntologyAxiomPair> parseDisjointProperties() { String section = consumeToken(); if (!DISJOINT_PROPERTIES.matches(section)) { throw new ExceptionBuilder().withKeyword(DISJOINT_PROPERTIES).build(); } Set<OWLOntology> ontologies = getOntologies(); Set<OWLAnnotation> annotations = parseAnnotations(); Set<OWLPropertyExpression> props = parsePropertyList(); Set<OntologyAxiomPair> pairs = new HashSet<>(); OWLAxiom propertiesAxiom; if (props.iterator().next().isObjectPropertyExpression()) { Set<OWLObjectPropertyExpression> ope = new HashSet<>(); props.forEach(pe -> ope.add(pe.asObjectPropertyExpression())); propertiesAxiom = df.getOWLDisjointObjectPropertiesAxiom(ope, annotations); } else { Set<OWLDataPropertyExpression> dpe = new HashSet<>(); props.forEach(pe -> dpe.add(pe.asDataPropertyExpression())); propertiesAxiom = df.getOWLDisjointDataPropertiesAxiom(dpe, annotations); } for (OWLOntology ont : ontologies) { pairs.add(new OntologyAxiomPair(ont, propertiesAxiom)); } return pairs; }
private Set<OntologyAxiomPair> parseNaryEquivalentProperties() { String tok = consumeToken(); if (!EQUIVALENT_PROPERTIES.matches(tok)) { throw new ExceptionBuilder().withKeyword(EQUIVALENT_PROPERTIES).build(); } Set<OWLOntology> ontologies = getOntologies(); Set<OWLAnnotation> annotations = parseAnnotations(); Set<OWLPropertyExpression> properties = parsePropertyList(); OWLAxiom propertyAxiom; if (properties.iterator().next().isObjectPropertyExpression()) { Set<OWLObjectPropertyExpression> ope = new HashSet<>(); properties.forEach(pe -> ope.add(pe.asObjectPropertyExpression())); propertyAxiom = df.getOWLEquivalentObjectPropertiesAxiom(ope, annotations); } else { Set<OWLDataPropertyExpression> dpe = new HashSet<>(); properties.forEach(pe -> dpe.add(pe.asDataPropertyExpression())); propertyAxiom = df.getOWLEquivalentDataPropertiesAxiom(dpe, annotations); } Set<OntologyAxiomPair> pairs = new HashSet<>(); for (OWLOntology ont : ontologies) { pairs.add(new OntologyAxiomPair(ont, propertyAxiom)); } return pairs; }
private Set<OntologyAxiomPair> parseNaryEquivalentProperties() { String tok = consumeToken(); if (!EQUIVALENT_PROPERTIES.matches(tok)) { throw new ExceptionBuilder().withKeyword(EQUIVALENT_PROPERTIES).build(); } Set<OWLOntology> ontologies = getOntologies(); Set<OWLAnnotation> annotations = parseAnnotations(); Set<OWLPropertyExpression> properties = parsePropertyList(); OWLAxiom propertyAxiom; if (properties.iterator().next().isObjectPropertyExpression()) { Set<OWLObjectPropertyExpression> ope = new HashSet<>(); properties.forEach(pe -> ope.add(pe.asObjectPropertyExpression())); propertyAxiom = df.getOWLEquivalentObjectPropertiesAxiom(ope, annotations); } else { Set<OWLDataPropertyExpression> dpe = new HashSet<>(); properties.forEach(pe -> dpe.add(pe.asDataPropertyExpression())); propertyAxiom = df.getOWLEquivalentDataPropertiesAxiom(dpe, annotations); } Set<OntologyAxiomPair> pairs = new HashSet<>(); for (OWLOntology ont : ontologies) { pairs.add(new OntologyAxiomPair(ont, propertyAxiom)); } return pairs; }
private Set<OntologyAxiomPair> parseDisjointProperties() { String section = consumeToken(); if (!DISJOINT_PROPERTIES.matches(section)) { throw new ExceptionBuilder().withKeyword(DISJOINT_PROPERTIES).build(); } Set<OWLOntology> ontologies = getOntologies(); Set<OWLAnnotation> annotations = parseAnnotations(); Set<OWLPropertyExpression> props = parsePropertyList(); Set<OntologyAxiomPair> pairs = new HashSet<>(); OWLAxiom propertiesAxiom; if (props.iterator().next().isObjectPropertyExpression()) { Set<OWLObjectPropertyExpression> ope = new HashSet<>(); props.forEach(pe -> ope.add(pe.asObjectPropertyExpression())); propertiesAxiom = df.getOWLDisjointObjectPropertiesAxiom(ope, annotations); } else { Set<OWLDataPropertyExpression> dpe = new HashSet<>(); props.forEach(pe -> dpe.add(pe.asDataPropertyExpression())); propertiesAxiom = df.getOWLDisjointDataPropertiesAxiom(dpe, annotations); } for (OWLOntology ont : ontologies) { pairs.add(new OntologyAxiomPair(ont, propertiesAxiom)); } return pairs; }