Search in sources :

Example 1 with MdAttributeMultiTerm

use of com.runwaysdk.system.metadata.MdAttributeMultiTerm in project geoprism-registry by terraframe.

the class RegistryService method findRootClassifier.

private List<MdAttributeConcrete> findRootClassifier(Classifier classifier, List<MdAttributeConcrete> mdAttributeList) {
    // Is this a root term for an {@link MdAttributeTerm}
    OIterator<? extends MdAttributeTerm> attrTerm = classifier.getAllClassifierTermAttributeRoots();
    for (MdAttributeTerm mdAttributeTerm : attrTerm) {
        mdAttributeList.add(mdAttributeTerm);
    }
    OIterator<? extends MdAttributeMultiTerm> attrMultiTerm = classifier.getAllClassifierMultiTermAttributeRoots();
    for (MdAttributeMultiTerm mdAttributeMultiTerm : attrMultiTerm) {
        mdAttributeList.add(mdAttributeMultiTerm);
    }
    // Traverse up the tree
    OIterator<? extends Classifier> parentTerms = classifier.getAllIsAParent();
    for (Classifier parent : parentTerms) {
        return this.findRootClassifier(parent, mdAttributeList);
    }
    return mdAttributeList;
}
Also used : MdAttributeTerm(com.runwaysdk.system.metadata.MdAttributeTerm) MdAttributeMultiTerm(com.runwaysdk.system.metadata.MdAttributeMultiTerm) Classifier(net.geoprism.ontology.Classifier)

Aggregations

MdAttributeMultiTerm (com.runwaysdk.system.metadata.MdAttributeMultiTerm)1 MdAttributeTerm (com.runwaysdk.system.metadata.MdAttributeTerm)1 Classifier (net.geoprism.ontology.Classifier)1