Package javax.xml.registry.infomodel

Examples of javax.xml.registry.infomodel.ClassificationScheme


            throws JAXRException
    {
        /**
         * This is a hack!!!  Need to figure out how to do this!
         */
        ClassificationScheme cs = new ClassificationSchemeImpl(null);
        cs.setName(new InternationalStringImpl(firstToken));

        Concept concept = new ConceptImpl(null);
        concept.setName(new InternationalStringImpl(secondToken.toLowerCase()));
        concept.setValue(secondToken);
        ((ConceptImpl)concept).setScheme(((ClassificationSchemeImpl)cs));
View Full Code Here


      user.setPersonName(personName);
      user.setPostalAddresses(postalAddresses);
      user.setEmailAddresses(emailAddresses);
      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");
      org.addExternalIdentifier(ei);
      org.addService(service);
      return org;
   }
View Full Code Here

      assertNull("Deleting Org with Key=" + orgkey, exceptions);
   }

   private ClassificationScheme getClassificationScheme(String str1, String str2) throws JAXRException
   {
      ClassificationScheme cs = blm.createClassificationScheme(getIString(str1), getIString(str2));
      return cs;
   }
View Full Code Here

        assertEquals(ClassificationImpl.class, classification.getClass());
        assertSame(manager, classification.getLifeCycleManager());
    }

    public void testCreateObjectClassificationScheme() throws JAXRException {
        ClassificationScheme classificationScheme = (ClassificationScheme) manager.createObject(LifeCycleManager.CLASSIFICATION_SCHEME);
        assertEquals(ClassificationSchemeImpl.class, classificationScheme.getClass());
        assertSame(manager, classificationScheme.getLifeCycleManager());
    }
View Full Code Here

    public void testFindClassificationSchemeByName() throws JAXRException {

        BusinessQueryManager blm = new BusinessQueryManagerImpl(new RegistryServiceImpl(null, null, -1));

        ClassificationScheme scheme = blm.findClassificationSchemeByName(null, "AssociationType");
        assertNotNull(scheme);
        assertTrue(scheme.getChildConceptCount() == 15);

        scheme = blm.findClassificationSchemeByName(null, "ObjectType");
        assertNotNull(scheme);
        assertTrue(scheme.getChildConceptCount() == 16);

        scheme = blm.findClassificationSchemeByName(null, "ObjectType");
        assertNotNull(scheme);
        assertTrue(scheme.getChildConceptCount() == 16);

        scheme = blm.findClassificationSchemeByName(null, "PhoneType");
        assertNotNull(scheme);
        assertTrue(scheme.getChildConceptCount() == 5);

        scheme = blm.findClassificationSchemeByName(null, "URLType");
        assertNotNull(scheme);
        assertTrue(scheme.getChildConceptCount() == 6);

        scheme = blm.findClassificationSchemeByName(null, "PostalAddressAttributes");
        assertNotNull(scheme);
        assertTrue(scheme.getChildConceptCount() == 6);

    }
View Full Code Here

      user.setPersonName(personName);
      user.setPostalAddresses(postalAddresses);
      user.setEmailAddresses(emailAddresses);
      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");
      org.addExternalIdentifier(ei);
      org.addService(service);
      return org;
   }
View Full Code Here

      assertNull("Deleting Org with Key=" + orgkey, exceptions);
   }

   private ClassificationScheme getClassificationScheme(String str1, String str2) throws JAXRException
   {
      ClassificationScheme cs = blm.createClassificationScheme(getIString(str1), getIString(str2));
      return cs;
   }
View Full Code Here

        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);
      }
    }
View Full Code Here

        extId.setValue(keyedReference.getKeyValue());
        extId.setName(new InternationalStringImpl(keyedReference.getKeyName()));

        String tmodelKey = keyedReference.getTModelKey();
        if (tmodelKey != null) {
          ClassificationScheme scheme = new ClassificationSchemeImpl(lifeCycleManager);
          scheme.setKey(new KeyImpl(tmodelKey));
          extId.setIdentificationScheme(scheme);
        }
        extidentifiers.add(extId);
      }
    }
View Full Code Here

          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();
                }
              }
     
              String name = iname.getValue();
              if (name != null)
                keyr.setKeyName(name);
     
              if (value != null)
                keyr.setKeyValue(value);
             
              if (scheme != null) {
                Key key = scheme.getKey();
                if (key != null && key.getId() != null)
                  keyr.setTModelKey(key.getId());
              }
            }
                }
View Full Code Here

TOP

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

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.