public PartialOrderTaxonomyBuilder(final KnowledgeBase kb, final PartialOrderComparator<ATermAppl> comparator) { _kb = kb; _tax = new TaxonomyImpl<>(null, ATermUtils.TOP, ATermUtils.BOTTOM); _builder = new PartialOrderBuilder<>(_tax, comparator); }
public PartialOrderTaxonomyBuilder(final KnowledgeBase kb, final PartialOrderComparator<ATermAppl> comparator) { _kb = kb; _tax = new TaxonomyImpl<>(null, ATermUtils.TOP, ATermUtils.BOTTOM); _builder = new PartialOrderBuilder<>(_tax, comparator); }
public static <T> Taxonomy<T> build(final Collection<? extends T> elements, final PartialOrderComparator<T> comparator, final T top, final T bottom) { final Taxonomy<T> hierarchy = new TaxonomyImpl<>(null, top, bottom); final PartialOrderBuilder<T> builder = new PartialOrderBuilder<>(hierarchy, comparator); builder.addAll(elements); return hierarchy; }
public static <T> Taxonomy<T> build(final Collection<? extends T> elements, final PartialOrderComparator<T> comparator, final T top, final T bottom) { final Taxonomy<T> hierarchy = new TaxonomyImpl<>(null, top, bottom); final PartialOrderBuilder<T> builder = new PartialOrderBuilder<>(hierarchy, comparator); builder.addAll(elements); return hierarchy; }
/** * {@inheritDoc} */ @Override public NodeSet<OWLClass> getDisjointClasses(final OWLClassExpression ce) { final DisjointClassComparator disjointClassComparator = new DisjointClassComparator(_taxonomyImpl, ce); if (!_taxonomyImpl.contains(disjointClassComparator.getComplementRepresentation())) { _reasoner.flush(); final PartialOrderBuilder<OWLClass> orderBuilder = new PartialOrderBuilder<>(_taxonomyImpl, disjointClassComparator); orderBuilder.add(disjointClassComparator.getComplementRepresentation(), true); } final OWLClassNodeSet result = new OWLClassNodeSet(); for (final Set<OWLClass> equivSet : _taxonomyImpl.getSubs(disjointClassComparator.getComplementRepresentation(), false)) result.addSameEntities(equivSet); return result; }
/** * {@inheritDoc} */ @Override public NodeSet<OWLClass> getDisjointClasses(final OWLClassExpression ce) { final DisjointClassComparator disjointClassComparator = new DisjointClassComparator(_taxonomyImpl, ce); if (!_taxonomyImpl.contains(disjointClassComparator.getComplementRepresentation())) { _reasoner.flush(); final PartialOrderBuilder<OWLClass> orderBuilder = new PartialOrderBuilder<>(_taxonomyImpl, disjointClassComparator); orderBuilder.add(disjointClassComparator.getComplementRepresentation(), true); } final OWLClassNodeSet result = new OWLClassNodeSet(); for (final Set<OWLClass> equivSet : _taxonomyImpl.getSubs(disjointClassComparator.getComplementRepresentation(), false)) result.addSameEntities(equivSet); return result; }