use of org.semanticweb.owlapi.model.OWLLiteral in project stanbol by apache.
the class OntologyNetworkConfigurationUtils method getScopesToActivate.
/**
* Get the list of scopes to activate on startup
*
* @param config
* @return
*/
public static String[] getScopesToActivate(OWLOntology config) {
Set<OWLIndividual> scopes = cScope.getIndividuals(config);
List<String> result = new ArrayList<String>();
boolean doActivate = false;
for (OWLIndividual iScope : scopes) {
Set<OWLLiteral> activate = iScope.getDataPropertyValues(activateOnStart, config);
Iterator<OWLLiteral> it = activate.iterator();
while (it.hasNext() && !doActivate) {
OWLLiteral l = it.next();
doActivate |= Boolean.parseBoolean(l.getLiteral());
}
if (iScope.isNamed() && doActivate)
result.add(((OWLNamedIndividual) iScope).getIRI().toString());
}
return result.toArray(EMPTY_IRI_ARRAY);
}
Aggregations