public Set<OWLClass> getRoots() { if (root == null) { root = owlOntologyManager.getOWLDataFactory().getOWLThing(); } return Collections.singleton(root); }
/** * @param writer writer * @param df data factory */ public LatexObjectVisitor(LatexWriter writer, OWLDataFactory df) { this.writer = writer; this.df = df; shortFormProvider = new SimpleShortFormProvider(); subject = df.getOWLThing(); }
private Set<OWLEntity> getAllReferencedEntities() { Set<OWLEntity> entities = new HashSet<>(); for(OWLOntology ont : ontologies) { entities.addAll(ont.getSignature()); } entities.remove(mngr.getOWLDataFactory().getOWLThing()); return entities; }
@Override @Nullable public OWLClass getOWLClass(String name) { if ("Thing".equals(name) || "owl:Thing".equals(name)) { return df.getOWLThing(); } else if ("Nothing".equals(name) || "owl:Nothing".equals(name)) { return df.getOWLNothing(); } else if (classNames.contains(name)) { return df.getOWLClass(getIRI(name)); } return null; }
@Override public void visit(OWLDataAllValuesFrom ce) { if (signature.contains(ce.getProperty().asOWLDataProperty())) { newClassExpression = ce; } else { newClassExpression = df.getOWLThing(); } }
@Override public void visit(OWLDataMaxCardinality ce) { if (signature.contains(ce.getProperty().asOWLDataProperty())) { newClassExpression = ce; } else { newClassExpression = df.getOWLThing(); } }
@Override public void visit(OWLObjectMaxCardinality ce) { if (signature.contains(ce.getProperty().getNamedProperty())) { newClassExpression = ce; } else { newClassExpression = df.getOWLThing(); } }
public void visit(OWLObjectSomeValuesFrom restr) { if (restr.getProperty().equals(getObjectProperty())) { OWLClassExpression filler = restr.getFiller(); if (!filler.equals(owlDataFactory.getOWLThing())) { fillers.add(filler); } } }
@Override void startElement(String name) { super.startElement(name); builder.withRange(df.getOWLThing()); }
private void handleCardinality(OWLObjectCardinalityRestriction restr) { if (restr.getProperty().equals(getObjectProperty()) && restr.getCardinality() > 0) { OWLClassExpression filler = restr.getFiller(); if (!filler.equals(owlDataFactory.getOWLThing())) { fillers.add(filler); } } } }
public boolean canCreateNewSibling() { return isInAssertedMode() && !getSelectedEntities().isEmpty() && !getSelectedEntity().equals(getOWLModelManager().getOWLDataFactory().getOWLThing()); }
@Override public Node<OWLClass> getTopClassNode() { ensurePrepared(); return classHierarchyInfo.getEquivalents(getDataFactory().getOWLThing()); }
public ProtegeOrphanFinder(OWLOntologyManager manager, Set<OWLOntology> ontologies) { this.manager = manager; this.ontologies = ontologies; root = manager.getOWLDataFactory().getOWLThing(); parentClassExtractor = new ParentClassExtractor(); rootFinder = new TerminalElementFinder<>(cls -> { Collection<OWLClass> parents = getParents(cls); parents.remove(root); return parents; }); }
@Override public Collection<OWLAxiom> visit(OWLFunctionalDataPropertyAxiom axiom) { return doDefault(df.getOWLSubClassOfAxiom(df.getOWLThing(), df.getOWLDataMaxCardinality(1, axiom.getProperty()))); }
@Override public Collection<OWLAxiom> visit(OWLFunctionalObjectPropertyAxiom axiom) { return doDefault(df.getOWLSubClassOfAxiom(df.getOWLThing(), df.getOWLObjectMaxCardinality(1, axiom.getProperty()))); }
@Override public Collection<OWLAxiom> visit(OWLObjectPropertyDomainAxiom axiom) { return subClassOf(df.getOWLObjectSomeValuesFrom(axiom.getProperty(), df.getOWLThing()), axiom.getDomain()); }
public InferredOWLClassHierarchyProvider(OWLModelManager owlModelManager, OWLOntologyManager owlOntologyManager) { super(owlOntologyManager); this.owlModelManager = owlModelManager; owlThing = owlModelManager.getOWLDataFactory().getOWLThing(); owlNothing = owlModelManager.getOWLDataFactory().getOWLNothing(); owlModelManager.addListener(owlModelManagerListener); }
@Override public void visit(OWLObjectPropertyDomainAxiom axiom) { // prop some Thing subclassOf domain OWLClassExpression sub = dataFactory .getOWLObjectSomeValuesFrom(axiom.getProperty(), dataFactory.getOWLThing()); OWLSubClassOfAxiom ax = dataFactory.getOWLSubClassOfAxiom(sub, axiom.getDomain()); ax.accept(this); }
@Override public Collection<OWLAxiom> visit(OWLInverseFunctionalObjectPropertyAxiom axiom) { return doDefault(df.getOWLSubClassOfAxiom(df.getOWLThing(), df.getOWLObjectMaxCardinality(1, axiom.getProperty().getInverseProperty()))); }
/** * Invoked when an action occurs. */ public void actionPerformed(ActionEvent e) { OWLEntityCreationSet<OWLNamedIndividual> set = getOWLWorkspace().createOWLIndividual(); if (set == null) { return; } OWLClass thing = getOWLDataFactory().getOWLThing(); OWLAxiom ax = getOWLDataFactory().getOWLClassAssertionAxiom(thing, set.getOWLEntity()); getOWLModelManager().applyChange(new AddAxiom(getOWLModelManager().getActiveOntology(), ax)); }