Example usage for javax.xml.registry LifeCycleManager createClassification

List of usage examples for javax.xml.registry LifeCycleManager createClassification

Introduction

In this page you can find the example usage for javax.xml.registry LifeCycleManager createClassification.

Prototype

public Classification createClassification(Concept concept) throws JAXRException, InvalidRequestException;

Source Link

Document

Creates a Classification instance for an internal Classification using the specified Concept that identifies a taxonomy element within an internal ClassificationScheme.

Usage

From source file:it.cnr.icar.eric.client.ui.swing.BusinessQueryPanel.java

/**
 * Process a ConceptsTreeDialog.PROPERTY_SELECTED_CONCEPTS change event.
 *//*w w  w . j ava 2  s.  c  o  m*/
private void processSelectedConceptsChange(PropertyChangeEvent ev) {
    try {
        Connection connection = RegistryBrowser.client.getConnection();
        RegistryService service = connection.getRegistryService();
        LifeCycleManager lcm = service.getBusinessLifeCycleManager();

        ArrayList<?> selectedConcepts = (ArrayList<?>) ev.getNewValue();
        ArrayList<Classification> classifications = new ArrayList<Classification>();

        Iterator<?> iter = selectedConcepts.iterator();

        while (iter.hasNext()) {
            Concept concept = (Concept) iter.next();
            Classification classification = lcm.createClassification(concept);
            classifications.add(classification);
        }

        ((ClassificationsListModel) (classificationsList.getModel())).setModels(classifications);
    } catch (JAXRException e) {
        RegistryBrowser.displayError(e);
    }
}