/** * To get all the instances of Scope in this configuration * * @param config * @return */ public static String[] getScopes(OWLOntology config) { Set<OWLIndividual> scopes = cScope.getIndividuals(config); List<String> result = new ArrayList<String>(); for (OWLIndividual iScope : scopes) { for (OWLClassExpression sce : iScope.getTypes(config)) { if (sce.containsConjunct(cScope)) { if (iScope.isNamed()) { result.add(((OWLNamedIndividual) iScope).getIRI() .toString()); } } } } return result.toArray(EMPTY_IRI_ARRAY); }
/** * To get all the instances of Scope in this configuration * * @param config * @return */ public static String[] getScopes(OWLOntology config) { Set<OWLIndividual> scopes = cScope.getIndividuals(config); List<String> result = new ArrayList<String>(); for (OWLIndividual iScope : scopes) { for (OWLClassExpression sce : iScope.getTypes(config)) { if (sce.containsConjunct(cScope)) { if (iScope.isNamed()) { result.add(((OWLNamedIndividual) iScope).getIRI().toString()); } } } } return result.toArray(EMPTY_IRI_ARRAY); }
/** * To get all the instances of Scope in this configuration * * @param config * @return */ public static String[] getScopes(OWLOntology config) { Set<OWLIndividual> scopes = cScope.getIndividuals(config); List<String> result = new ArrayList<String>(); for (OWLIndividual iScope : scopes) { for (OWLClassExpression sce : iScope.getTypes(config)) { if (sce.containsConjunct(cScope)) { if (iScope.isNamed()) { result.add(((OWLNamedIndividual) iScope).getIRI().toString()); } } } } return result.toArray(EMPTY_IRI_ARRAY); }
private void mainSelectionChanged() { OWLEntity e = mainSelectionModel.getSelectedEntity(); if (e instanceof OWLClass) { owlClass = (OWLClass) e; inferredOwlClass = (OWLClass) e; individual = null; fireSelectionChanged(); } else if (e instanceof OWLIndividual) { individual = (OWLIndividual) individual; inferredOwlClassNeedsRecalculation = true; OWLModelManager modelManager = editorKit.getOWLModelManager(); Set<OWLClassExpression> types = individual.getTypes(modelManager.getActiveOntologies()); if (types != null && !types.contains(owlClass)) { owlClass = null; for (OWLClassExpression type : types) { if (!type.isAnonymous()) { owlClass = type.asOWLClass(); } } } fireSelectionChanged(); } }
private void mainSelectionChanged() { OWLEntity e = mainSelectionModel.getSelectedEntity(); if (e instanceof OWLClass) { owlClass = (OWLClass) e; inferredOwlClass = (OWLClass) e; individual = null; fireSelectionChanged(); } else if (e instanceof OWLIndividual) { individual = (OWLIndividual) individual; inferredOwlClassNeedsRecalculation = true; OWLModelManager modelManager = editorKit.getOWLModelManager(); Set<OWLClassExpression> types = individual.getTypes(modelManager.getActiveOntologies()); if (types != null && !types.contains(owlClass)) { owlClass = null; for (OWLClassExpression type : types) { if (!type.isAnonymous()) { owlClass = type.asOWLClass(); } } } fireSelectionChanged(); } }