Example usage for javax.xml.registry.infomodel ClassificationScheme getExternalIdentifiers

List of usage examples for javax.xml.registry.infomodel ClassificationScheme getExternalIdentifiers

Introduction

In this page you can find the example usage for javax.xml.registry.infomodel ClassificationScheme getExternalIdentifiers.

Prototype

Collection getExternalIdentifiers() throws JAXRException;

Source Link

Document

Returns the ExternalIdentifiers associated with this object that are external identifiers for this object.

Usage

From source file:org.apache.ws.scout.util.ScoutJaxrUddiHelper.java

public static TModel getTModelFromJAXRClassificationScheme(ClassificationScheme classificationScheme)
        throws JAXRException {
    TModel tm = objectFactory.createTModel();
    try {/*from w w  w  . java  2s .c  o  m*/
        /*
         * a fresh scheme might not have a key
         */

        Key k = classificationScheme.getKey();

        if (k != null && k.getId() != null) {
            tm.setTModelKey(k.getId());
        } else {
            tm.setTModelKey("");
        }

        /*
         * There's no reason to believe these are here either
         */

        Slot s = classificationScheme.getSlot("authorizedName");

        if (s != null && s.getName() != null) {
            tm.setAuthorizedName(s.getName());
        }

        s = classificationScheme.getSlot("operator");

        if (s != null && s.getName() != null) {
            tm.setOperator(s.getName());
        }

        InternationalString iname = classificationScheme.getName();

        tm.setName(getFirstName(iname));

        InternationalString idesc = classificationScheme.getDescription();

        addDescriptions(tm.getDescription(), idesc);

        IdentifierBag idBag = getIdentifierBagFromExternalIdentifiers(
                classificationScheme.getExternalIdentifiers());
        if (idBag != null) {
            tm.setIdentifierBag(idBag);
        }
        CategoryBag catBag = getCategoryBagFromClassifications(classificationScheme.getClassifications());
        if (catBag != null) {
            tm.setCategoryBag(catBag);
        }

        // ToDO: overviewDoc
    } catch (Exception ud) {
        throw new JAXRException("Apache JAXR Impl:", ud);
    }
    return tm;
}

From source file:org.apache.ws.scout.util.ScoutJaxrUddiV3Helper.java

public static TModel getTModelFromJAXRClassificationScheme(ClassificationScheme classificationScheme)
        throws JAXRException {
    TModel tm = objectFactory.createTModel();
    try {//from w ww. j  ava  2  s .c  o  m
        /*
         * a fresh scheme might not have a key
         */

        Key k = classificationScheme.getKey();

        if (k != null && k.getId() != null) {
            tm.setTModelKey(k.getId());
        } else {
            tm.setTModelKey("");
        }

        /*
         * There's no reason to believe these are here either
         */

        Slot s = classificationScheme.getSlot("authorizedName");
        /*
                 if (s != null && s.getName() != null) {
        tm.setAuthorizedName(s.getName());
                    }
        */
        s = classificationScheme.getSlot("operator");
        /*
                 if (s != null && s.getName() != null) {
        tm.setOperator(s.getName());
                    }
        */
        InternationalString iname = classificationScheme.getName();

        tm.setName(getFirstName(iname));

        InternationalString idesc = classificationScheme.getDescription();

        addDescriptions(tm.getDescription(), idesc);

        IdentifierBag idBag = getIdentifierBagFromExternalIdentifiers(
                classificationScheme.getExternalIdentifiers());
        if (idBag != null) {
            tm.setIdentifierBag(idBag);
        }
        CategoryBag catBag = getCategoryBagFromClassifications(classificationScheme.getClassifications());
        if (catBag != null) {
            tm.setCategoryBag(catBag);
        }

        // ToDO: overviewDoc
    } catch (Exception ud) {
        throw new JAXRException("Apache JAXR Impl:", ud);
    }
    return tm;
}