@Override public void visit(OWLDisjointDataPropertiesAxiom axiom) { List<OWLDataPropertyExpression> propertyExpressions = new LinkedList<>(axiom.getProperties()); for(int i = 0; i < propertyExpressions.size(); i++){ sparql += "{"; OWLDataPropertyExpression pe = propertyExpressions.remove(i); sparql += subjectVar + "<" + pe.asOWLDataProperty().toStringID() + "> " + objectVar + " ."; for (OWLDataPropertyExpression pe2 : propertyExpressions) { String pattern = subjectVar + "<" + pe2.asOWLDataProperty().toStringID() + "> " + objectVar + " ."; sparql += notExists(pattern); } propertyExpressions.add(i, pe); sparql += "}"; if(i < propertyExpressions.size()-1){ sparql += " UNION "; } } }
public NodeSet<OWLDataProperty> getDisjointDataProperties(OWLDataPropertyExpression pe) throws InconsistentOntologyException, FreshEntitiesException, ReasonerInterruptedException, TimeOutException { ensurePrepared(); DefaultNodeSet<OWLDataProperty> result = new OWLDataPropertyNodeSet(); for (OWLOntology ontology : getRootOntology().getImportsClosure()) { for (OWLDisjointDataPropertiesAxiom axiom : ontology.getDisjointDataPropertiesAxioms(pe.asOWLDataProperty())) { for (OWLDataPropertyExpression dpe : axiom.getPropertiesMinus(pe)) { if (!dpe.isAnonymous()) { result.addNode(dataPropertyHierarchyInfo.getEquivalents(dpe.asOWLDataProperty())); result.addAllNodes(getSubDataProperties(dpe.asOWLDataProperty(), false).getNodes()); } } } } return result; }
public void visit(OWLDisjointDataPropertiesAxiom axiom) { OWLDataPropertyExpression[] dataProperties=new OWLDataPropertyExpression[axiom.getProperties().size()]; axiom.getProperties().toArray(dataProperties); for (OWLDataPropertyExpression dataProperty : dataProperties) checkTopDataPropertyUse(dataProperty,axiom); m_axioms.m_disjointDataProperties.add(dataProperties); }
public Boolean visit(OWLDisjointDataPropertiesAxiom axiom) { int n=axiom.getProperties().size(); OWLDataPropertyExpression[] props=axiom.getProperties().toArray(new OWLDataPropertyExpression[n]); for (int i=0;i<n-1;i++) { for (int j=i+1;j<n;j++) { OWLDataSomeValuesFrom some_i=factory.getOWLDataSomeValuesFrom(props[i],factory.getOWLDatatype(IRI.create(InternalDatatype.RDFS_LITERAL.getIRI()))); OWLDataSomeValuesFrom some_j=factory.getOWLDataSomeValuesFrom(props[j],factory.getOWLDatatype(IRI.create(InternalDatatype.RDFS_LITERAL.getIRI()))); OWLDataMaxCardinality max1=factory.getOWLDataMaxCardinality(1,factory.getOWLDataProperty(IRI.create(AtomicRole.TOP_DATA_ROLE.getIRI()))); OWLClassExpression desc=factory.getOWLObjectIntersectionOf(some_i,some_j,max1); if (reasoner.isSatisfiable(desc)) return Boolean.FALSE; } } return Boolean.TRUE; }
@Override public OWLDisjointDataPropertiesAxiom visit( ElkDisjointDataPropertiesAxiom axiom) { return owlFactory_ .getOWLDisjointDataPropertiesAxiom(toDataPropertyExpressionSet( axiom.getDataPropertyExpressions())); }
@Override public T visit(OWLDisjointDataPropertiesAxiom axiom) { throw new IllegalArgumentException( OWLDisjointDataPropertiesAxiom.class.getSimpleName() + " cannot be converted to " + getTargetClass().getSimpleName()); }
@Override public OWLDisjointDataPropertiesAxiom getAxiomWithoutAnnotations() { if (!isAnnotated()) { return this; } return new OWLDisjointDataPropertiesAxiomImpl(getProperties(), NO_ANNOTATIONS); }
@Override public Set<OWLDisjointDataPropertiesAxiom> asPairwiseAxioms() { Set<OWLDisjointDataPropertiesAxiom> result = new HashSet<>(); List<OWLDataPropertyExpression> list = new ArrayList<>(getProperties()); for (int i = 0; i < list.size() - 1; i++) { for (int j = i + 1; j < list.size(); j++) { result.add(new OWLDisjointDataPropertiesAxiomImpl( new HashSet<>(Arrays.asList(list.get(i), list.get(j))), NO_ANNOTATIONS)); } } return result; }
@Override public Set<OWLDisjointDataPropertiesAxiom> splitToAnnotatedPairs() { List<OWLDataPropertyExpression> ops = new ArrayList<>(getProperties()); if (ops.size() == 2) { return Collections.<OWLDisjointDataPropertiesAxiom> singleton(this); } Set<OWLDisjointDataPropertiesAxiom> result = new HashSet<>(); for (int i = 0; i < ops.size() - 1; i++) { OWLDataPropertyExpression indI = ops.get(i); OWLDataPropertyExpression indJ = ops.get(i + 1); result.add(new OWLDisjointDataPropertiesAxiomImpl(new HashSet<>( Arrays.asList(indI, indJ)), getAnnotations())); } return result; }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!super.equals(obj)) { return false; } return obj instanceof OWLDisjointDataPropertiesAxiom; }
@Override public void visit(@Nonnull OWLDisjointDataPropertiesAxiom axiom) { for (OWLDataPropertyExpression prop : axiom.getProperties()) { prop.accept(this); } processAxiomAnnotations(axiom); }
public void visit(OWLDisjointDataPropertiesAxiom axiom) { notSupported(axiom); }
public void visit(OWLDisjointDataPropertiesAxiom axiom) { }
@Override public ElkDataPropertyAxiom visit( OWLDisjointDataPropertiesAxiom owlDisjointDataPropertiesAxiom) { return CONVERTER.convert(owlDisjointDataPropertiesAxiom); }
@SuppressWarnings("static-method") public ElkDisjointDataPropertiesAxiom convert( OWLDisjointDataPropertiesAxiom owlDisjointDataPropertiesAxiom) { return new ElkDisjointDataPropertiesAxiomWrap<OWLDisjointDataPropertiesAxiom>( owlDisjointDataPropertiesAxiom); }
@Override public ElkAxiom visit( OWLDisjointDataPropertiesAxiom owlDisjointDataPropertiesAxiom) { return CONVERTER.convert(owlDisjointDataPropertiesAxiom); }
@Override public void visit(OWLDisjointDataPropertiesAxiom axiom) { defaultVisit(axiom); }
@Override public OWLAxiom visit(OWLDisjointDataPropertiesAxiom axiom) { return factory.getOWLDisjointDataPropertiesAxiom(axiom.getProperties(), annotations); }
@Override public void visit(OWLDisjointDataPropertiesAxiom axiom) { }
public void visit(OWLDisjointDataPropertiesAxiom arg0) { // TODO Auto-generated method stub }
@Override public Boolean visit(OWLDisjointDataPropertiesAxiom axiom) { return true; }
@Override public Boolean visit(OWLDisjointDataPropertiesAxiom axiom) { return false; }
@Override public Boolean visit(OWLDisjointDataPropertiesAxiom axiom) { Objects.requireNonNull(axiom); return add(this.df.getOWLDisjointDataPropertiesAxiom(axiom.getProperties(), reg(axiom.getAnnotations()))); }
@Override public Boolean visit(OWLDisjointDataPropertiesAxiom axiom) { Objects.requireNonNull(axiom); return add(this.df.getOWLDisjointDataPropertiesAxiom(axiom.getProperties(), empty())); }
@Override public Set<ComplexIntegerAxiom> visit(OWLDisjointDataPropertiesAxiom axiom) { Objects.requireNonNull(axiom); throw TranslationException.newUnsupportedAxiomException(axiom); }
@Override public void visit(OWLDisjointDataPropertiesAxiom axiom) { ignoreOwlAxiom("DisjointDataProperty", axiom); }
@Override public O visit(OWLDisjointDataPropertiesAxiom axiom) { return doDefault(axiom); }
@Override public void visit(OWLDisjointDataPropertiesAxiom axiom) { type = AXIOM_TYPE_INDEX_BASE + axiom.getAxiomType().getIndex(); }
@Override public OWLAxiom visit(OWLDisjointDataPropertiesAxiom axiom) { return axiom; }
@Override public void visit(OWLDisjointDataPropertiesAxiom axiom) { hashCode = primes[9]; hashCode = hashCode * MULT + axiom.getProperties().hashCode(); hashCode = hashCode * MULT + axiom.getAnnotations().hashCode(); }
@Override public void visit(OWLDisjointDataPropertiesAxiom axiom) { handleDefault(axiom); }
@Override public OWLDisjointDataPropertiesAxiom getAnnotatedAxiom( Set<OWLAnnotation> annotations) { return new OWLDisjointDataPropertiesAxiomImpl(getProperties(), mergeAnnos(annotations)); }
public Object visit(OWLDisjointDataPropertiesAxiom axiom) { profileViolations.add(new UseOfIllegalAxiom(getCurrentOntology(), axiom)); return null; }
public void visit(OWLDisjointDataPropertiesAxiom arg0) { unusedAxiom(arg0); }
@Override protected void writeAxiom(OWLDisjointDataPropertiesAxiom axiom, BinaryOWLOutputStream outputStream) throws IOException { outputStream.writeOWLObjects(axiom.getProperties()); }
@Override protected OWLDisjointDataPropertiesAxiom readAxiom(BinaryOWLInputStream inputStream, Set<OWLAnnotation> annotations) throws IOException, BinaryOWLParseException { Set<OWLDataPropertyExpression> propertyExpressions = inputStream.readOWLObjects(); return inputStream.getDataFactory().getOWLDisjointDataPropertiesAxiom(propertyExpressions, annotations); }