List of usage examples for javax.xml.registry.infomodel ClassificationScheme 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;//from w w w. jav a 2 s . com childConcepts = concept.getChildrenConcepts(); } return childConcepts; }
From source file:it.cnr.icar.eric.client.ui.thin.components.components.QueryPanelComponent.java
@SuppressWarnings("unchecked") private Collection<RegistryObject> getConcepts(RegistryObject ro) throws JAXRException { Collection<RegistryObject> concepts = null; if (ro instanceof ClassificationScheme) { ClassificationScheme scheme = (ClassificationScheme) ro; concepts = scheme.getChildrenConcepts(); }//from w ww.jav a 2 s .c om if (ro instanceof Concept) { @SuppressWarnings("unused") Concept concept = (Concept) ro; concepts = new ArrayList<RegistryObject>(); concepts.add(ro); } return concepts; }
From source file:it.cnr.icar.eric.client.ui.thin.SearchPanelBean.java
public Collection<SelectItem> getObjectTypes() { ArrayList<SelectItem> types = new ArrayList<SelectItem>(); try {//from w w w . j ava 2s . c om String classSchemeId = CanonicalSchemes.CANONICAL_CLASSIFICATION_SCHEME_LID_ObjectType; ClassificationScheme scheme = (ClassificationScheme) RegistryBrowser.getBQM() .getRegistryObject(classSchemeId, LifeCycleManager.CLASSIFICATION_SCHEME); if (scheme == null) { log.warn("Could not get ClassificationScheme: " + classSchemeId); } else { @SuppressWarnings("unchecked") Collection<RegistryObject> concepts = scheme.getChildrenConcepts(); getQueryComponent().loadTypes(concepts, types, ""); objectTypes = types; } } catch (Throwable t) { log.error("Could not load ObjectType class scheme", t); } return types; }
From source file:it.cnr.icar.eric.client.ui.swing.RegistryObjectsTable.java
private Collection<?> getStatusTypeConcepts() throws JAXRException { Collection<?> statusTypeConcepts = new ArrayList<Object>(); JAXRClient client = RegistryBrowser.getInstance().getClient(); BusinessQueryManager bqm = client.getBusinessQueryManager(); ClassificationScheme statusTypeScheme = (ClassificationScheme) bqm.getRegistryObject( CanonicalConstants.CANONICAL_CLASSIFICATION_SCHEME_ID_StatusType, LifeCycleManager.CLASSIFICATION_SCHEME); statusTypeConcepts = statusTypeScheme.getChildrenConcepts(); return statusTypeConcepts; }
From source file:it.cnr.icar.eric.client.ui.swing.graph.JBGraph.java
/** * DOCUMENT ME!/*from w ww . j a v a 2s. c o m*/ * * @param cell DOCUMENT ME! * @param scheme DOCUMENT ME! * * @return DOCUMENT ME! */ private ArrayList<DefaultGraphCell> showRelatedObjects(JBGraphCell cell, ClassificationScheme scheme) { ArrayList<DefaultGraphCell> relatedCells = new ArrayList<DefaultGraphCell>(); if (scheme == null) { return relatedCells; } try { //bindings Collection<?> childConcepts = scheme.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; }
From source file:it.cnr.icar.eric.client.ui.thin.RegistryObjectCollectionBean.java
/** Initialize status types */ private List<SelectItem> loadStatusType_SelectItems() { // init items list with label item List<SelectItem> itemsList = new ArrayList<SelectItem>(); itemsList.add(0, new SelectItem("", WebUIResourceBundle.getInstance().getString("selectStatusType"))); try {//from w w w. j a va 2 s . c om ClassificationScheme statusTypeScheme = (ClassificationScheme) RegistryBrowser.getBQM() .getRegistryObject(CanonicalConstants.CANONICAL_CLASSIFICATION_SCHEME_ID_StatusType, LifeCycleManager.CLASSIFICATION_SCHEME); for (Iterator<?> it = statusTypeScheme.getChildrenConcepts().iterator(); it.hasNext();) { ConceptImpl concept = (ConceptImpl) it.next(); createStatusTypeSelectItems(itemsList, concept, 0); } } catch (Exception ex) { log.error(WebUIResourceBundle.getInstance().getString("message.FailedToRetrieveStatusTypeConcepts"), ex); RegistryBrowser.getInstance() .setErrorMessage(WebUIResourceBundle.getInstance().getString("errorRetrivalOfStausTypes")); } return itemsList; }