@Override public OWLDisjointClassesAxiom getOWLDisjointClassesAxiom(Set<? extends OWLClassExpression> classExpressions) { return getOWLDisjointClassesAxiom(classExpressions, EMPTY_ANNOTATIONS_SET); }
public OWLDisjointClassesAxiom getOWLDisjointClassesAxiom(Set<? extends OWLClassExpression> classExpressions) { return getOWLDisjointClassesAxiom(classExpressions, EMPTY_ANNOTATIONS_SET); }
@Nonnull @Override public OWLDisjointClassesAxiom getOWLDisjointClassesAxiom( @Nonnull Set<? extends OWLClassExpression> classExpressions) { return getOWLDisjointClassesAxiom(classExpressions, EMPTY_ANNOTATIONS_SET); }
public OWLDisjointClassesAxiom getOWLDisjointClassesAxiom(OWLClassExpression... classExpressions) { Set<OWLClassExpression> clses = new HashSet<OWLClassExpression>(); clses.addAll(Arrays.asList(classExpressions)); return getOWLDisjointClassesAxiom(clses); }
@Override public OWLDisjointClassesAxiom getOWLDisjointClassesAxiom(OWLClassExpression... classExpressions) { checkNull(classExpressions, "classExpressions"); Set<OWLClassExpression> clses = new HashSet<OWLClassExpression>(); clses.addAll(Arrays.asList(classExpressions)); return getOWLDisjointClassesAxiom(clses); }
@Nonnull @Override public OWLDisjointClassesAxiom getOWLDisjointClassesAxiom( OWLClassExpression... classExpressions) { checkNull(classExpressions, "classExpressions", true); Set<OWLClassExpression> clses = new HashSet<>(); clses.addAll(Arrays.asList(classExpressions)); return getOWLDisjointClassesAxiom(clses); }
@Override public OWLDisjointClassesAxiom getOWLDisjointClassesAxiom( Collection<? extends OWLClassExpression> classExpressions, Collection<OWLAnnotation> annotations) { checkIterableNotNull(classExpressions, "classExpressions cannot be null or contain null", true); checkIterableNotNull(annotations, "annotations cannot be null", true); // Hack to handle the case where classExpressions has only a single // member which will usually be the result of :x owl:disjointWith :x . if (classExpressions.size() == 1) { OWLClassExpression classExpression = classExpressions.iterator().next(); if (classExpression.isOWLThing()) { throw new OWLRuntimeException( "DisjointClasses(owl:Thing) cannot be created. It is not a syntactically valid OWL 2 axiom. If the intent is to declare owl:Thing as disjoint with itself and therefore empty, it cannot be created as a DisjointClasses axiom. Please rewrite it as SubClassOf(owl:Thing, owl:Nothing)."); } if (classExpression.isOWLNothing()) { throw new OWLRuntimeException( "DisjointClasses(owl:Nothing) cannot be created. It is not a syntactically valid OWL 2 axiom. If the intent is to declare owl:Nothing as disjoint with itself and therefore empty, it cannot be created as a DisjointClasses axiom, and it is also redundant as owl:Nothing is always empty. Please rewrite it as SubClassOf(owl:Nothing, owl:Nothing) or remove the axiom."); } Set<OWLClassExpression> modifiedClassExpressions = new HashSet<>(2); modifiedClassExpressions.add(OWL_THING); modifiedClassExpressions.add(classExpression); return getOWLDisjointClassesAxiom(modifiedClassExpressions, makeSingletonDisjoinClassWarningAnnotation(annotations, classExpression, OWL_THING)); } return new OWLDisjointClassesAxiomImpl(classExpressions, annotations); }
@Override public OWLDisjointClassesAxiom getOWLDisjointClassesAxiom( Collection<? extends OWLClassExpression> classExpressions, Collection<OWLAnnotation> annotations) { checkIterableNotNull(classExpressions, "classExpressions cannot be null or contain null", true); checkIterableNotNull(annotations, "annotations cannot be null", true); // Hack to handle the case where classExpressions has only a single // member which will usually be the result of :x owl:disjointWith :x . if (classExpressions.size() == 1) { OWLClassExpression classExpression = classExpressions.iterator().next(); if (classExpression.isOWLThing()) { throw new OWLRuntimeException( "DisjointClasses(owl:Thing) cannot be created. It is not a syntactically valid OWL 2 axiom. If the intent is to declare owl:Thing as disjoint with itself and therefore empty, it cannot be created as a DisjointClasses axiom. Please rewrite it as SubClassOf(owl:Thing, owl:Nothing)."); } if (classExpression.isOWLNothing()) { throw new OWLRuntimeException( "DisjointClasses(owl:Nothing) cannot be created. It is not a syntactically valid OWL 2 axiom. If the intent is to declare owl:Nothing as disjoint with itself and therefore empty, it cannot be created as a DisjointClasses axiom, and it is also redundant as owl:Nothing is always empty. Please rewrite it as SubClassOf(owl:Nothing, owl:Nothing) or remove the axiom."); } Set<OWLClassExpression> modifiedClassExpressions = new HashSet<>(2); modifiedClassExpressions.add(OWL_THING); modifiedClassExpressions.add(classExpression); return getOWLDisjointClassesAxiom(modifiedClassExpressions, makeSingletonDisjoinClassWarningAnnotation(annotations, classExpression, OWL_THING)); } return new OWLDisjointClassesAxiomImpl(classExpressions, annotations); }
@Override public OWLDisjointClassesAxiom getOWLDisjointClassesAxiom( Collection<? extends OWLClassExpression> classExpressions, Collection<OWLAnnotation> annotations) { checkIterableNotNull(classExpressions, "classExpressions cannot be null or contain null", true); checkIterableNotNull(annotations, "annotations cannot be null", true); // Hack to handle the case where classExpressions has only a single // member which will usually be the result of :x owl:disjointWith :x . if (classExpressions.size() == 1) { OWLClassExpression classExpression = classExpressions.iterator().next(); if (classExpression.isOWLThing()) { throw new OWLRuntimeException( "DisjointClasses(owl:Thing) cannot be created. It is not a syntactically valid OWL 2 axiom. If the intent is to declare owl:Thing as disjoint with itself and therefore empty, it cannot be created as a DisjointClasses axiom. Please rewrite it as SubClassOf(owl:Thing, owl:Nothing)."); } if (classExpression.isOWLNothing()) { throw new OWLRuntimeException( "DisjointClasses(owl:Nothing) cannot be created. It is not a syntactically valid OWL 2 axiom. If the intent is to declare owl:Nothing as disjoint with itself and therefore empty, it cannot be created as a DisjointClasses axiom, and it is also redundant as owl:Nothing is always empty. Please rewrite it as SubClassOf(owl:Nothing, owl:Nothing) or remove the axiom."); } Set<OWLClassExpression> modifiedClassExpressions = new HashSet<>(2); modifiedClassExpressions.add(OWL_THING); modifiedClassExpressions.add(classExpression); return getOWLDisjointClassesAxiom(modifiedClassExpressions, makeSingletonDisjoinClassWarningAnnotation(annotations, classExpression, OWL_THING)); } return new OWLDisjointClassesAxiomImpl(classExpressions, annotations); }
@Override public OWLDisjointClassesAxiom getOWLDisjointClassesAxiom( Collection<? extends OWLClassExpression> classExpressions, Collection<OWLAnnotation> annotations) { checkIterableNotNull(classExpressions, "classExpressions cannot be null or contain null", true); checkIterableNotNull(annotations, "annotations cannot be null", true); // Hack to handle the case where classExpressions has only a single // member which will usually be the result of :x owl:disjointWith :x . if (classExpressions.size() == 1) { OWLClassExpression classExpression = classExpressions.iterator().next(); if (classExpression.isOWLThing()) { throw new OWLRuntimeException( "DisjointClasses(owl:Thing) cannot be created. It is not a syntactically valid OWL 2 axiom. If the intent is to declare owl:Thing as disjoint with itself and therefore empty, it cannot be created as a DisjointClasses axiom. Please rewrite it as SubClassOf(owl:Thing, owl:Nothing)."); } if (classExpression.isOWLNothing()) { throw new OWLRuntimeException( "DisjointClasses(owl:Nothing) cannot be created. It is not a syntactically valid OWL 2 axiom. If the intent is to declare owl:Nothing as disjoint with itself and therefore empty, it cannot be created as a DisjointClasses axiom, and it is also redundant as owl:Nothing is always empty. Please rewrite it as SubClassOf(owl:Nothing, owl:Nothing) or remove the axiom."); } Set<OWLClassExpression> modifiedClassExpressions = new HashSet<>(2); modifiedClassExpressions.add(OWL_THING); modifiedClassExpressions.add(classExpression); return getOWLDisjointClassesAxiom(modifiedClassExpressions, makeSingletonDisjoinClassWarningAnnotation(annotations, classExpression, OWL_THING)); } return new OWLDisjointClassesAxiomImpl(classExpressions, annotations); }