Example usage for javax.xml.registry.infomodel Concept getDescendantConcepts

List of usage examples for javax.xml.registry.infomodel Concept getDescendantConcepts

Introduction

In this page you can find the example usage for javax.xml.registry.infomodel Concept getDescendantConcepts.

Prototype

Collection getDescendantConcepts() throws JAXRException;

Source Link

Document

Gets all descendant Concepts.

Usage

From source file:it.cnr.icar.eric.client.xml.registry.infomodel.ClassificationSchemeImpl.java

@SuppressWarnings("unchecked")
public Collection<Concept> getDescendantConcepts() throws JAXRException {
    getChildrenConcepts();/*from   w  ww . j  a v a 2s  .  c om*/
    ArrayList<Concept> descendants = new ArrayList<Concept>(children);
    Iterator<Concept> iter = children.iterator();

    while (iter.hasNext()) {
        Concept child = iter.next();

        if (child.getChildConceptCount() > 0) {
            descendants.addAll(child.getDescendantConcepts());
        }
    }

    return descendants;
}