@Override public Set<InferenceType> getPrecomputableInferenceTypes() { return CollectionFactory .createSet(InferenceType.CLASS_HIERARCHY, InferenceType.OBJECT_PROPERTY_HIERARCHY, InferenceType.DATA_PROPERTY_HIERARCHY); }
/** * @param propertyA property A * @param propertyB property B * @param annotations A set of annotations. Cannot be null or contain nulls. * @return an equivalent properties axiom with specified properties and annotations */ default OWLEquivalentObjectPropertiesAxiom getOWLEquivalentObjectPropertiesAxiom( OWLObjectPropertyExpression propertyA, OWLObjectPropertyExpression propertyB, Collection<OWLAnnotation> annotations) { return getOWLEquivalentObjectPropertiesAxiom( CollectionFactory.createSet(propertyA, propertyB), annotations); }
/** * @param rule the rule * @return written axioms */ public Collection<OWLAxiom> write(SWRLRule rule) { List<OWLAxiom> axioms = new ArrayList<>(1); if (o.containsAxiom(rule)) { writeSection(RULE, CollectionFactory.createSet(rule).iterator(), "", true); axioms.add(rule); } return axioms; }
/** * @param individual individual * @return a same individuals axiom with specified individuals */ default OWLSameIndividualAxiom getOWLSameIndividualAxiom(OWLIndividual... individual) { checkIterableNotNull(individual, "individuals cannot be null", true); return getOWLSameIndividualAxiom(createSet(individual)); }
/** * @param properties Cannot be null or contain nulls. * @return an equivalent data properties axiom */ default OWLEquivalentDataPropertiesAxiom getOWLEquivalentDataPropertiesAxiom(OWLDataPropertyExpression... properties) { checkIterableNotNull(properties, "properties cannot be null", true); return getOWLEquivalentDataPropertiesAxiom(CollectionFactory.createSet(properties)); }
/** * @param dataRanges data ranges for intersection. Cannot be null or contain nulls. * @return an OWLDataIntersectionOf on the specified dataranges */ default OWLDataIntersectionOf getOWLDataIntersectionOf(OWLDataRange... dataRanges) { checkIterableNotNull(dataRanges, "dataRange cannot be nulls", true); return getOWLDataIntersectionOf(CollectionFactory.createSet(dataRanges)); }
@Override public Collection<OWLEquivalentObjectPropertiesAxiom> asPairwiseAxioms() { if (properties.size() == 2) { return CollectionFactory.createSet(this); } return walkPairwise((a, b) -> new OWLEquivalentObjectPropertiesAxiomImpl( sorted(OWLObjectPropertyExpression.class, a, b), NO_ANNOTATIONS)); }
@Override public Collection<OWLEquivalentObjectPropertiesAxiom> splitToAnnotatedPairs() { if (properties.size() == 2) { return CollectionFactory.createSet(this); } return walkPairwise((a, b) -> new OWLEquivalentObjectPropertiesAxiomImpl( sorted(OWLObjectPropertyExpression.class, a, b), annotations)); }
@Override public Collection<OWLDisjointDataPropertiesAxiom> splitToAnnotatedPairs() { if (properties.size() == 2) { return CollectionFactory.createSet(this); } return walkPairwise((a, b) -> new OWLDisjointDataPropertiesAxiomImpl( sorted(OWLDataPropertyExpression.class, a, b), annotations)); } }
@Override public Collection<OWLEquivalentDataPropertiesAxiom> asPairwiseAxioms() { if (properties.size() == 2) { return CollectionFactory.createSet(this); } return walkPairwise((a, b) -> new OWLEquivalentDataPropertiesAxiomImpl( sorted(OWLDataPropertyExpression.class, a, b), NO_ANNOTATIONS)); }
@Override public Collection<OWLEquivalentDataPropertiesAxiom> splitToAnnotatedPairs() { if (properties.size() == 2) { return CollectionFactory.createSet(this); } return walkPairwise((a, b) -> new OWLEquivalentDataPropertiesAxiomImpl( sorted(OWLDataPropertyExpression.class, a, b), annotations)); }
private Set<IRI> initSet() { Set<IRI> set = CollectionFactory.createSet(); ObjectProcedure<K> consumer = k -> consumer(set, k); map.keys().forEach(consumer); iris = new SoftReference<>(set); return set; }
@Override public Collection<OWLSameIndividualAxiom> splitToAnnotatedPairs() { if (individuals.size() == 2) { return CollectionFactory.createSet(this); } return walkPairwise((a, b) -> new OWLSameIndividualAxiomImpl(sorted(OWLIndividual.class, a, b), annotations)); }
@Override public Collection<OWLDisjointObjectPropertiesAxiom> asPairwiseAxioms() { if (properties.size() == 2) { return CollectionFactory.createSet(this); } return walkPairwise((a, b) -> new OWLDisjointObjectPropertiesAxiomImpl( sorted(OWLObjectPropertyExpression.class, a, b), NO_ANNOTATIONS)); }
public final void clearBottomNode() { removeNode(hierarchyInfo.bottomEntity); bottomNode = hierarchyInfo .createNode(CollectionFactory.createSet(hierarchyInfo.bottomEntity)); addNode(getBottomNode()); }
@Override public void visit(OWLSubClassOfAxiom axiom) { // A and not (B) OWLClassExpression complement = dataFactory.getOWLObjectComplementOf(axiom.getSuperClass()); desc = dataFactory.getOWLObjectIntersectionOf( CollectionFactory.createSet(axiom.getSubClass(), complement)); }
@Override public OWLDatatypeRestriction getOWLDatatypeRestriction(OWLDatatype dataType, OWLFacet facet, OWLLiteral typedLiteral) { checkNotNull(dataType, DATATYPE_CANNOT_BE_NULL); checkNotNull(facet, FACET_CANNOT_BE_NULL); checkNotNull(typedLiteral, TYPED_CONSTANT_CANNOT_BE_NULL); return new OWLDatatypeRestrictionImpl(dataType, CollectionFactory.createSet(getOWLFacetRestriction(facet, typedLiteral))); }
private void createEquivalentClass(OWLClassExpression classExpression) { OWLAxiom ax = getDataFactory() .getOWLEquivalentClassesAxiom(CollectionFactory.createSet(getCurrentClass(), classExpression)); getOWLOntologyManager().applyChange(new AddAxiom(ontology, ax)); }
@Override public void handle(String currentId, String value, String qualifierBlock, String comment) { OWLAxiom ax = getDataFactory() .getOWLDisjointClassesAxiom(CollectionFactory.createSet(getCurrentClass(), getOWLClass(value))); applyChange(new AddAxiom(getOntology(), ax)); } }