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

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

Introduction

In this page you can find the example usage for javax.xml.registry.infomodel Concept 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:it.cnr.icar.eric.client.xml.registry.infomodel.ClassificationSchemeImpl.java

/**
 * This constructor is to do a type-safe cast from a Concept with no parent to a scheme.
 * This has history in UDDI and we are not sure what value it has in ebXML.
 * We are implementing it as it is required by the JAXR API.
 * Needs evaluation for relevance in JAXR 2.0??
 **///w  ww . j  ava 2 s . c om
public ClassificationSchemeImpl(LifeCycleManagerImpl lcm, Concept concept) throws JAXRException {
    super(lcm);

    if (concept.getParent() != null) {
        throw new InvalidRequestException(JAXRResourceBundle.getInstance()
                .getString("message.error.cannot.create.concept.parent.classScheme"));
    }

    setName(concept.getName());
    setDescription(concept.getDescription());
    addClassifications(concept.getClassifications());
    addExternalIdentifiers(concept.getExternalIdentifiers());

    //??incomplete
}

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

public static TModel getTModelFromJAXRConcept(Concept concept) throws JAXRException {
    TModel tm = objectFactory.createTModel();
    if (concept == null)
        return null;
    try {/*from w w w . j av  a 2s. c  o m*/
        Key key = concept.getKey();
        if (key != null && key.getId() != null)
            tm.setTModelKey(key.getId());
        Slot sl1 = concept.getSlot("authorizedName");
        if (sl1 != null && sl1.getName() != null)
            tm.setAuthorizedName(sl1.getName());

        Slot sl2 = concept.getSlot("operator");
        if (sl2 != null && sl2.getName() != null)
            tm.setOperator(sl2.getName());

        InternationalString iname = concept.getName();

        tm.setName(getFirstName(iname));

        InternationalString idesc = concept.getDescription();

        addDescriptions(tm.getDescription(), idesc);

        //          External Links
        Collection<ExternalLink> externalLinks = concept.getExternalLinks();
        if (externalLinks != null && externalLinks.size() > 0) {
            tm.setOverviewDoc(getOverviewDocFromExternalLink((ExternalLink) externalLinks.iterator().next()));
        }

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

    } 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 getTModelFromJAXRConcept(Concept concept) throws JAXRException {
    TModel tm = objectFactory.createTModel();
    if (concept == null)
        return null;
    try {//  w  w w.  j a  va  2s.  c  o  m
        Key key = concept.getKey();
        if (key != null && key.getId() != null)
            tm.setTModelKey(key.getId());
        Slot sl1 = concept.getSlot("authorizedName");
        /*
        if (sl1 != null && sl1.getName() != null)
        tm.setAuthorizedName(sl1.getName());
                
        Slot sl2 = concept.getSlot("operator");
        if (sl2 != null && sl2.getName() != null)
        tm.setOperator(sl2.getName());
        */
        InternationalString iname = concept.getName();

        tm.setName(getFirstName(iname));

        InternationalString idesc = concept.getDescription();

        addDescriptions(tm.getDescription(), idesc);

        //          External Links
        Collection<ExternalLink> externalLinks = concept.getExternalLinks();
        if (externalLinks != null && externalLinks.size() > 0) {
            tm.getOverviewDoc()
                    .add(getOverviewDocFromExternalLink((ExternalLink) externalLinks.iterator().next()));
        }

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

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