Examples of TModel


Examples of org.apache.juddi.datatype.tmodel.TModel

    if ((tModelKey != null) && (connection != null))
    {
      try
      {
        TModel tModel = TModelTable.select(tModelKey,connection);
        info = new TModelInfo();
        info.setTModelKey(tModelKey);
        info.setName(tModel.getName());
      }
      catch(java.sql.SQLException sqlex)
      {
        throw new RegistryException(sqlex);
      }
View Full Code Here

Examples of org.apache.juddi.datatype.tmodel.TModel

   *
   */
  public TModel fetchTModel(String tModelKey)
    throws org.apache.juddi.error.RegistryException
  {
    TModel tModel = null;

    try
    {
      if ((tModelKey != null) && (connection != null))
      {
        tModel = TModelTable.select(tModelKey,connection);
        if (tModel != null)
        {
          tModel.setDescriptionVector(TModelDescTable.select(tModelKey,connection));

          // fetch the TModel CategoryBag
          Vector catVector = TModelCategoryTable.select(tModelKey,connection);
          if (catVector != null)
          {
            CategoryBag catBag = new CategoryBag();
            catBag.setKeyedReferenceVector(catVector);
            tModel.setCategoryBag(catBag);
          }

          // fetch the TModel IdentifierBag
          Vector idVector = TModelIdentifierTable.select(tModelKey,connection);
          if (idVector != null)
          {
            IdentifierBag idBag = new IdentifierBag();
            idBag.setKeyedReferenceVector(idVector);
            tModel.setIdentifierBag(idBag);
          }

          // fetch the TModel OverviewDoc & OverviewDoc Descrptions
          OverviewDoc overDoc = tModel.getOverviewDoc();
          if (overDoc != null)
          {
            overDoc.setDescriptionVector(TModelDocDescTable.select(tModelKey,connection));
            tModel.setOverviewDoc(overDoc);
          }
        }
      }
    }
    catch(java.sql.SQLException sqlex)
View Full Code Here

Examples of org.apache.juddi.datatype.tmodel.TModel

    if ((tModelKey != null) && (connection != null))
    {
      try
      {
        TModel tModel = TModelTable.select(tModelKey,connection);
        info = new TModelInfo();
        info.setTModelKey(tModelKey);
        info.setNameValue(tModel.getName());
      }
      catch(java.sql.SQLException sqlex)
      {
        throw new RegistryException(sqlex);
      }
View Full Code Here

Examples of org.apache.juddi.datatype.tmodel.TModel

      // Validate request parameters
      for (int i=0; i<tModelVector.size(); i++)
      {
        // move the TModel into a form we can work with easily
        TModel tModel = (TModel)tModelVector.elementAt(i);
        String tModelKey = tModel.getTModelKey();

        // If a TModelKey was specified then make sure it's a valid one.
        if (((tModelKey != null) && (tModelKey.length() > 0)) && (!dataStore.isValidTModelKey(tModelKey)))
          throw new InvalidKeyPassedException("save_tModel: "+
              "tModelKey="+tModelKey);

        // If a TModelKey was specified then make sure 'publisherID' controls it.
        if (((tModelKey != null) && (tModelKey.length() > 0)) && !dataStore.isTModelPublisher(tModelKey,publisherID))
          throw new UserMismatchException("save_tModel: "+
              "userID="+publisherID+", "+
              "tModelKey="+tModelKey);

        // Normally, a valid tModelKey MUST be specified for the keyedReference
        // to be valid. However, in the case of a keyedReference that is used in
        // a categoryBag, the tModelKey may be omitted or specified as a
        // zero-length string to indicate that the taxonomy being used is
        // uddi-org:general_keywords. When it is omitted in this manner, the UDDI
        // registry will insert the proper key during the save_xx operation.
        // - UDDI Programmers API v2.04 Section 4.3.5.1 Specifying keyedReferences
        //
        CategoryBag categoryBag = tModel.getCategoryBag();
        if (categoryBag != null)
        {
          Vector keyedRefVector = categoryBag.getKeyedReferenceVector();
          if (keyedRefVector != null)
          {
            int vectorSize = keyedRefVector.size();
            if (vectorSize > 0)
            {
              for (int j=0; j<vectorSize; j++)
              {
                KeyedReference keyedRef = (KeyedReference)keyedRefVector.elementAt(j);
                String key = keyedRef.getTModelKey();
               
                // A null or zero-length tModelKey is treated as
                // though the tModelKey for uddiorg:general_keywords
                // had been specified.
                //
                if ((key == null) || (key.trim().length() == 0))
                  keyedRef.setTModelKey(TModel.GENERAL_KEYWORDS_TMODEL_KEY);
              }
            }
          }
        }
      }

      for (int i=0; i<tModelVector.size(); i++)
      {
        // move the TModel into a form we can work with easily
        TModel tModel = (TModel)tModelVector.elementAt(i);
        String tModelKey = tModel.getTModelKey();

        // If the new TModel has a TModelKey then it must already exists
        // so delete the old one. It a TModelKey isn't specified then
        // this is a new TModel so create a new TModelKey for it.
        if ((tModelKey != null) && (tModelKey.length() > 0))
          dataStore.deleteTModel(tModelKey);
        else
          tModel.setTModelKey("uuid:"+uuidgen.uuidgen());

        // Everything checks out so let's save it. First store
        // 'authorizedName' and 'operator' values in each TModel.
        tModel.setAuthorizedName(authorizedName);
        tModel.setOperator(Config.getOperator());
        dataStore.saveTModel(tModel,publisherID);
      }

      dataStore.commit();
View Full Code Here

Examples of org.apache.juddi.datatype.tmodel.TModel

    IdentifierBag idBag = new IdentifierBag();
    idBag.addKeyedReference(new KeyedReference("idBagKeyName","idBagkeyValue"));
    idBag.addKeyedReference(new KeyedReference("uuid:f78a135a-4769-4e79-8604-54d440314bc0","idBagKeyName2","idBagkeyValue2"));

    TModel tModel = new TModel();
    tModel.setTModelKey("uuid:269855db-62eb-4862-8e5a-1b06f2753038");
    tModel.setOperator("jUDDI");
    tModel.setAuthorizedName("Steve Viens");
    tModel.setName("jUDDI TModel");
    tModel.addDescription(new Description("tModel whatever"));
    tModel.addDescription(new Description("tModel whatever too","fr"));
    tModel.setCategoryBag(catBag);
    tModel.setIdentifierBag(idBag);
    tModel.setOverviewDoc(overDoc);

    SaveTModel request = new SaveTModel();
    request.setAuthInfo(authInfo);
    request.addTModel(tModel);
    request.addTModel(tModel);
View Full Code Here

Examples of org.apache.juddi.datatype.tmodel.TModel

    IdentifierBag idBag = new IdentifierBag();
    idBag.addKeyedReference(new KeyedReference("idBagKeyName","idBagkeyValue"));
    idBag.addKeyedReference(new KeyedReference("uuid:f78a135a-4769-4e79-8604-54d440314bc0","idBagKeyName2","idBagkeyValue2"));

    TModel tModel = new TModel();
    tModel.setTModelKey("uuid:269855db-62eb-4862-8e5a-1b06f2753038");
    tModel.setOperator("jUDDI");
    tModel.setAuthorizedName("Steve Viens");
    tModel.setName("jUDDI TModel");
    tModel.addDescription(new Description("tModel whatever"));
    tModel.addDescription(new Description("tModel whatever too","fr"));
    tModel.setCategoryBag(catBag);
    tModel.setIdentifierBag(idBag);
    tModel.setOverviewDoc(overDoc);

    TModelDetail detail = new TModelDetail();
    detail.setGeneric("2.0");
    detail.setOperator("jUDDI.org");
    detail.setTruncated(true);
View Full Code Here

Examples of org.apache.juddi.datatype.tmodel.TModel

    if (tModelVector == null)
      return null;
   
    for (int i=0; i<tModelVector.size(); i++)
    {
      TModel tModel = (TModel)tModelVector.elementAt(i);
     
      CategoryBag catBag = tModel.getCategoryBag();
      if (catBag != null)
      {
        Vector refs = catBag.getKeyedReferenceVector();
        if ((refs != null) && (refs.size() > 0))
          validate(refs);
      }
     
      IdentifierBag idBag = tModel.getIdentifierBag();
      if (idBag != null)
      {
        Vector refs = idBag.getKeyedReferenceVector();
        if ((refs != null) && (refs.size() > 0))
          validate(refs);
View Full Code Here

Examples of org.apache.juddi.datatype.tmodel.TModel

        OverviewDoc overviewDoc = new OverviewDoc();
        overviewDoc.setOverviewURL(
          "http://www.steveviens.com/overviewdoc.html");

        String tModelKey = uuidgen.uuidgen();
        TModel tModel = new TModel();
        tModel.setTModelKey(tModelKey);
        tModel.setAuthorizedName("sviens");
        tModel.setOperator("WebServiceRegistry.com");
        tModel.setName("Tuscany Web Service Company");
        tModel.setOverviewDoc(overviewDoc);

        Vector descList = new Vector();
        descList.add(new Description("blah, blah, blah", "en"));
        descList.add(new Description("Yadda, Yadda, Yadda", "it"));
        descList.add(new Description("WhoobWhoobWhoobWhoob", "cy"));
View Full Code Here

Examples of org.apache.juddi.datatype.tmodel.TModel

      {
        OverviewDoc overviewDoc = new OverviewDoc();
        overviewDoc.setOverviewURL("http://www.sviens.com/jtruss.html");

        String tModelKey = uuidgen.uuidgen();
        TModel tModel = new TModel();
        tModel.setTModelKey(tModelKey);
        tModel.setAuthorizedName("Steve Viens");
        tModel.setOperator("WebServiceRegistry.com");
        tModel.setName("Tuscany Web Service Company");
        tModel.setOverviewDoc(overviewDoc);

        String publisherID = "sviens";

        // begin a new transaction
        txn.begin(connection);
View Full Code Here

Examples of org.apache.juddi.datatype.tmodel.TModel

  private RegistryObject getRegistryObject()
  {
    BusinessEntity business = new BusinessEntity();
    BusinessService service = new BusinessService();
    TModel tModel = new TModel();

    ValidateValues object = new ValidateValues();
    object.addBusinessEntity(business);
    object.addBusinessService(service);
    object.addTModel(tModel);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.