/** * Returns the individuals in the range of the predicate defined in the * ontology. * * @return the individuals in the range of the predicate defined in the * ontology */ public List<Individual> getIndividuals() { OntModel ontology = getOntology(); OntProperty prop = getPredicate(); if (ontology == null || prop == null) return new ArrayList<Individual>(); OntResource range = prop.getRange(); if (range == null) return new ArrayList<Individual>(); return ontology.listIndividuals(range).toList(); }
/** * Returns the individuals in the range of the predicate defined in the * ontology. * * @return the individuals in the range of the predicate defined in the * ontology */ public List<Individual> getIndividuals() { OntModel ontology = getOntology(); OntProperty prop = getPredicate(); if (ontology == null || prop == null) { return new ArrayList<Individual>(); } OntResource range = prop.getRange(); if (range == null) { return new ArrayList<Individual>(); } return ontology.listIndividuals(range).toList(); }
public OntClass getRangeClass() { String clazz = this.getClassString(); if (clazz != null) return componentProfile.getClass(clazz); OntProperty prop = getPredicate(); if (prop == null) return null; OntResource range = prop.getRange(); if (range != null && range.isClass()) return range.asClass(); return null; } }
public OntClass getRangeClass() { String clazz = this.getClassString(); if (clazz != null) return componentProfile.getClass(clazz); OntProperty prop = getPredicate(); if (prop == null) { return null; } OntResource range = prop.getRange(); if (range != null && range.isClass()) { return range.asClass(); } return null; } }