Package javax.xml.registry.infomodel

Examples of javax.xml.registry.infomodel.ClassificationScheme


      // Define find qualifiers and name patterns
      Collection<String> findQualifiers = new ArrayList<String>();
      findQualifiers.add(FindQualifier.AND_ALL_KEYS);
      findQualifiers.add(FindQualifier.EXACT_NAME_MATCH);
      findQualifiers.add(FindQualifier.SORT_BY_NAME_DESC);
      ClassificationScheme cScheme = bqm.findClassificationSchemeByName(findQualifiers, JBOSS_ESB_CATEGORY);
      // If the scheme returned null, then we have to create a org.jboss.soa.esb.:category scheme to use
      if (cScheme == null) {
        BulkResponse br = null;
        try {
          ClassificationScheme scheme = blm.createClassificationScheme(JBOSS_ESB_CATEGORY, JBOSS_ESB_CATEGORY);
          ArrayList<ClassificationScheme> cSchemes = new ArrayList<ClassificationScheme>();
          cSchemes.add(scheme);
          br = blm.saveClassificationSchemes(cSchemes);
         
          if (br!=null && br.getStatus() != JAXRResponse.STATUS_SUCCESS) {
View Full Code Here


        if (classification != null ) {
          KeyedReference keyr = cbag.addNewKeyedReference();
 
          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

        if (extid != null ) {
          KeyedReference keyr = ibag.addNewKeyedReference();
 
          InternationalStringImpl iname = (InternationalStringImpl) ((RegistryObject) extid).getName();
          String value = extid.getValue();
          ClassificationScheme scheme = extid.getIdentificationScheme();
 
          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

            user.setPostalAddresses(postalAddresses);
            user.setEmailAddresses(emailAddresses);
            user.setTelephoneNumbers(numbers);

            //Concepts for NAICS and computer          
            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);
View Full Code Here

        return blm.createInternationalString(str);
    }

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

    {
        if (!TYPES_LIST.contains(firstToken)) throw new IllegalArgumentException("Expected the path to " +
                "start with one of " + TYPES);
       
        //get the predefined classificationscheme
        ClassificationScheme cs = new ClassificationSchemeImpl(null);
        cs.setName(new InternationalStringImpl(firstToken));
        cs.setKey(new KeyImpl(firstToken));

        ArrayList<String> conceptStrings = typesMap.get(firstToken);
        if (!conceptStrings.contains(secondToken)) throw new IllegalArgumentException("Expected the path to " +
                "end with one of " + conceptStrings.toArray());
               
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

    {
      name = (String)iter.next();
      break;
    }
   
        ClassificationScheme classificationScheme = findClassificationSchemeByName(findQualifiers,name);
        if (classificationScheme!=null) {
            col.add(classificationScheme);
        }
    return new BulkResponseImpl(col);
  }
View Full Code Here

                /*
                 * now turn into a concrete ClassificationScheme
                 */

                ClassificationScheme scheme = new ClassificationSchemeImpl(lcm);

                scheme.setName(c.getName());
                scheme.setDescription(c.getDescription());
                scheme.setKey(c.getKey());

                return scheme;
            }
            catch (RegistryV3Exception e) {
                throw new JAXRException(e.getLocalizedMessage());
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.