Package javax.xml.registry.infomodel

Examples of javax.xml.registry.infomodel.Classification


        classifications = new ArrayList<Classification>();
      KeyedReference[] keyrarr = cbag.getKeyedReferenceArray();
      for (int i = 0; keyrarr != null && i < keyrarr.length; i++)
      {
        KeyedReference keyr = (KeyedReference)keyrarr[i];
        Classification classification = new ClassificationImpl(lcm);
        classification.setValue(keyr.getKeyValue());
        classification.setName(new InternationalStringImpl(keyr.getKeyName()));
        
        String tmodelKey = keyr.getTModelKey();
        if (tmodelKey != null) {
          ClassificationScheme scheme = new ClassificationSchemeImpl(lcm);
          scheme.setKey(new KeyImpl(tmodelKey));
          classification.setClassificationScheme(scheme);
        }
        classifications.add(classification);
      }
    }
      return classifications;
View Full Code Here


    public void addClassifications(Collection collection)
    {
        for (Iterator i = collection.iterator(); i.hasNext();)
        {
            Classification classification = (Classification) i.next();
            classifications.add(classification);
        }
    }
View Full Code Here

    public void setClassifications(Collection collection)
    {
        Set newClassifications = new HashSet(collection.size());
        for (Iterator i = collection.iterator(); i.hasNext();)
        {
            Classification classification = (Classification) i.next();
            newClassifications.add(classification);
        }
        classifications = newClassifications;
    }
View Full Code Here

    public Classification createClassification(Concept concept) throws JAXRException, InvalidRequestException {
        if (concept.getClassificationScheme() == null) {
            throw new InvalidRequestException("Concept is not under classification scheme");
        }
        Classification classify = (Classification) this.createObject(LifeCycleManager.CLASSIFICATION);
        classify.setConcept(concept);
        return classify;
    }
View Full Code Here

    }

    public Classification createClassification(ClassificationScheme scheme,
                                               InternationalString name,
                                               String value) throws JAXRException {
        Classification cl = (Classification) this.createObject(LifeCycleManager.CLASSIFICATION);
        cl.setClassificationScheme(scheme);
        cl.setName(name);
        cl.setValue(value);

        ((ClassificationImpl) cl).setExternal(true);

        return cl;
    }
View Full Code Here

      user.setTelephoneNumbers(numbers);

      ClassificationScheme cScheme = getClassificationScheme("ntis-gov:naics", "");
      Key cKey = blm.createKey("uuid:C0B9FE13-324F-413D-5A5B-2004DB8E5CC2");
      cScheme.setKey(cKey);
      Classification classification = blm.createClassification(cScheme, "Computer Systems Design and Related Services", "5415");
      org.addClassification(classification);
      ClassificationScheme cScheme1 = getClassificationScheme("D-U-N-S", "");
      Key cKey1 = blm.createKey("uuid:3367C81E-FF1F-4D5A-B202-3EB13AD02423");
      cScheme1.setKey(cKey1);
      ExternalIdentifier ei = blm.createExternalIdentifier(cScheme1, "D-U-N-S number", "08-146-6849");
View Full Code Here

            // OK
        }
    }

    public void testCreateObjectClassification() throws JAXRException {
        Classification classification = (Classification) manager.createObject(LifeCycleManager.CLASSIFICATION);
        assertEquals(ClassificationImpl.class, classification.getClass());
        assertSame(manager, classification.getLifeCycleManager());
    }
View Full Code Here

      user.setTelephoneNumbers(numbers);

      ClassificationScheme cScheme = getClassificationScheme("ntis-gov:naics", "");
      Key cKey = blm.createKey("uuid:C0B9FE13-324F-413D-5A5B-2004DB8E5CC2");
      cScheme.setKey(cKey);
      Classification classification = blm.createClassification(cScheme, "Computer Systems Design and Related Services", "5415");
      org.addClassification(classification);
      ClassificationScheme cScheme1 = getClassificationScheme("D-U-N-S", "");
      Key cKey1 = blm.createKey("uuid:3367C81E-FF1F-4D5A-B202-3EB13AD02423");
      cScheme1.setKey(cKey1);
      ExternalIdentifier ei = blm.createExternalIdentifier(cScheme1, "D-U-N-S number", "08-146-6849");
View Full Code Here

    Collection<Classification> classifications = null;
    if (categoryBag != null) {
      classifications = new ArrayList<Classification>();
      List<KeyedReference> keyedReferenceList = categoryBag.getKeyedReference();
      for (KeyedReference keyedReference : keyedReferenceList) {
        Classification classification = new ClassificationImpl(lifeCycleManager);
        classification.setValue(keyedReference.getKeyValue());
        classification.setName(new InternationalStringImpl(keyedReference.getKeyName()));
        String tmodelKey = keyedReference.getTModelKey();
        if (tmodelKey != null) {
          ClassificationScheme scheme = new ClassificationSchemeImpl(lifeCycleManager);
          scheme.setKey(new KeyImpl(tmodelKey));
          classification.setClassificationScheme(scheme);
        }
        classifications.add(classification);
      }
    }
    return classifications;
View Full Code Here

       
        // Classifications
      CategoryBag cbag = objectFactory.createCategoryBag();
      Iterator classiter = classifications.iterator();
      while (classiter.hasNext()) {
        Classification classification = (Classification) classiter.next();
        if (classification != null ) {
          KeyedReference keyr = objectFactory.createKeyedReference();
          cbag.getKeyedReference().add(keyr);
 
          InternationalStringImpl iname = null;
          String value = null;
          ClassificationScheme scheme = classification.getClassificationScheme();
                    if (scheme==null || (classification.isExternal() && classification.getConcept()==null)) {
                        /*
                        * JAXR 1.0 Specification: Section D6.4.4
                        * Specification related tModels mapped from Concept may be automatically
                        * categorized by the well-known uddi-org:types taxonomy in UDDI (with
                        * tModelKey uuid:C1ACF26D-9672-4404-9D70-39B756E62AB4) as follows:
                        * The keyed reference is assigned a taxonomy value of specification.
                        */
                        keyr.setTModelKey(UDDI_ORG_TYPES);
                        keyr.setKeyValue("specification");
                    } else {
              if (classification.isExternal()) {
                            iname = (InternationalStringImpl) ((RegistryObject) classification).getName();
                            value = classification.getValue();
              } else {
                Concept concept = classification.getConcept();
                if (concept != null) {
                  iname = (InternationalStringImpl) ((RegistryObject) concept).getName();
                  value = concept.getValue();
                  scheme = concept.getClassificationScheme();
                }
View Full Code Here

TOP

Related Classes of javax.xml.registry.infomodel.Classification

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.