/** * Extracts data from the parent of ontClass that is a {@link Restriction} and updates the{@link SolrInputDocument} * for ontClass. * * @param doc the Solr input document * @param parent the parent class that contains restriction data for the ontologyClass */ private void extractRestrictionData(@Nonnull final SolrInputDocument doc, @Nonnull final OntClass parent) { final Restriction restriction = parent.asRestriction(); // Restrictions can be someValuesFrom, hasValue, allValuesFrom, etc. ORDO appears to only use the first two. if (restriction.isSomeValuesFromRestriction()) { extractSomeValuesFromRestriction(doc, restriction); } else if (restriction.isHasValueRestriction()) { extractHasValueRestriction(doc, restriction); } else { this.logger .warn("Restriction {} in class {} is neither someValuesFrom nor hasValue type.", restriction.getId(), doc.getFieldValue(ID_FIELD_NAME)); } }
/** * Extracts data from the parent of ontClass that is a {@link Restriction} and updates the{@link SolrInputDocument} * for ontClass. * * @param doc the Solr input document * @param parent the parent class that contains restriction data for the ontologyClass */ private void extractRestrictionData(@Nonnull final SolrInputDocument doc, @Nonnull final OntClass parent) { final Restriction restriction = parent.asRestriction(); // Restrictions can be someValuesFrom, hasValue, allValuesFrom, etc. Orphanet appears to only use the first two. if (restriction.isSomeValuesFromRestriction()) { extractSomeValuesFromRestriction(doc, restriction); } else if (restriction.isHasValueRestriction()) { extractHasValueRestriction(doc, restriction); } else { this.logger .warn("Restriction {} in class {} is neither someValuesFrom nor hasValue type.", restriction.getId(), doc.getFieldValue(ID_FIELD_NAME)); } }