List of usage examples for javax.xml.registry.infomodel Concept getChildrenConcepts
Collection getChildrenConcepts() throws JAXRException;
From source file:it.cnr.icar.eric.client.ui.swing.ConceptsTreeModel.java
private Collection<?> getChildConcepts(RegistryObject ro) throws JAXRException { Collection<?> childConcepts = null; if (ro instanceof ClassificationScheme) { ClassificationScheme scheme = (ClassificationScheme) ro; childConcepts = scheme.getChildrenConcepts(); } else if (ro instanceof Concept) { Concept concept = (Concept) ro; childConcepts = concept.getChildrenConcepts(); }// w ww . j a v a2s .c om return childConcepts; }
From source file:it.cnr.icar.eric.client.ui.thin.jsf.ExplorerGraphBean.java
private void loadRegistryObjectChildNodes(RegistryObjectNode parentNode) throws JAXRException { Concept concept = parentNode.getRegistryObjectType(); Iterator<?> itr = concept.getChildrenConcepts().iterator(); RegistryObjectNode roNode = null;//www.j a v a 2 s . c o m if (itr.hasNext()) { parentNode.clearChildren(); RegistryPackage rOCPkg = null; while (itr.hasNext()) { Concept childConcept = (Concept) itr.next(); try { rOCPkg = RegistryBrowser.getBLCM().createRegistryPackage(childConcept.getValue()); } catch (Exception ex) { throw new JAXRException(ex); } roNode = new RegistryObjectNode(rOCPkg, childConcept); parentNode.addChild(roNode); roNode.setHasChild(childConcept.getChildConceptCount() > 0); } if (roNode != null) { roNode.setLast(true); } } }
From source file:it.cnr.icar.eric.client.ui.thin.components.components.QueryPanelComponent.java
public void loadTypes(Collection<RegistryObject> concepts, List<SelectItem> types, String indent) { Iterator<RegistryObject> itr = concepts.iterator(); while (itr.hasNext()) { Concept concept = (Concept) itr.next(); SelectItem item = loadConceptItem(concept, indent); if (item != null) { types.add(item);/*from w w w . ja v a2 s . c o m*/ } try { if (concept.getChildConceptCount() > 0) { Collection<RegistryObject> childConcepts = sortChildConceptsByName( concept.getChildrenConcepts()); loadTypes(childConcepts, types, indent + "..."); } } catch (JAXRException ex) { log.error(WebUIResourceBundle.getInstance().getString("message.ErrorLoadingObjectTypeChildConcept"), ex); } } }
From source file:it.cnr.icar.eric.client.ui.swing.graph.JBGraph.java
/** * DOCUMENT ME!/*from www .j a v a 2 s .c o m*/ * * @param cell DOCUMENT ME! * @param concept DOCUMENT ME! * * @return DOCUMENT ME! */ private ArrayList<DefaultGraphCell> showRelatedObjects(JBGraphCell cell, Concept concept) { ArrayList<DefaultGraphCell> relatedCells = new ArrayList<DefaultGraphCell>(); if (concept == null) { return relatedCells; } try { //parent Organization Concept parentConcept = concept.getParentConcept(); if (parentConcept != null) { JBGraphCell newCell = addRelatedObject(cell, parentConcept, new Rectangle(0, 0, 50, 50), "parent", false); relatedCells.add(newCell); } else { ClassificationScheme scheme = concept.getClassificationScheme(); if (scheme != null) { JBGraphCell newCell = addRelatedObject(cell, scheme, new Rectangle(0, 0, 50, 50), "classification scheme", false); relatedCells.add(newCell); } } //child Concepts Collection<?> childConcepts = concept.getChildrenConcepts(); DefaultGraphCell groupCell = createGroupFromObjectCollection(childConcepts); if (groupCell != null) { connectCells(cell, groupCell, "child Concepts", false); relatedCells.add(groupCell); } } catch (JAXRException e) { RegistryBrowser.displayError(e); } return relatedCells; }