Examples of PublisherInfos


Examples of org.apache.juddi.datatype.response.PublisherInfos

    boolean truncated = list.isTruncated();
    if (truncated)
      element.setAttribute("truncated","true");

    PublisherInfos infos = list.getPublisherInfos();
    if (infos != null)
    {
      handler = maker.lookup(PublisherInfosHandler.TAG_NAME);
      handler.marshal(infos,element);
    }
View Full Code Here

Examples of org.apache.juddi.datatype.response.PublisherInfos

    this.maker = maker;
  }

  public RegistryObject unmarshal(Element element)
  {
    PublisherInfos obj = new PublisherInfos();
    Vector nodeList = null;
    AbstractHandler handler = null;

    // Attributes
    // {none}

    // Text Node Value
    // {none}

    // Child Elements
    nodeList = XMLUtils.getChildElementsByTagName(element,PublisherInfoHandler.TAG_NAME);
    for (int i=0; i<nodeList.size(); i++)
    {
      handler = maker.lookup(PublisherInfoHandler.TAG_NAME);
      obj.addPublisherInfo((PublisherInfo)handler.unmarshal((Element)nodeList.elementAt(i)));
    }

    return obj;
  }
View Full Code Here

Examples of org.apache.juddi.datatype.response.PublisherInfos

    return obj;
  }

  public void marshal(RegistryObject object,Element parent)
  {
    PublisherInfos infos = (PublisherInfos)object;
    String generic = getGeneric(null);
    String namespace = getUDDINamespace(generic);
    Element element = parent.getOwnerDocument().createElementNS(namespace,TAG_NAME);
    AbstractHandler handler = null;

    Vector vector = infos.getPublisherInfoVector();
    if ((vector!=null) && (vector.size() > 0))
    {
      handler = maker.lookup(PublisherInfoHandler.TAG_NAME);
      for (int i=0; i < vector.size(); i++)
        handler.marshal((PublisherInfo)vector.elementAt(i),element);
View Full Code Here

Examples of org.apache.juddi.datatype.response.PublisherInfos

    boolean truncated = list.isTruncated();
    if (truncated)
      element.setAttribute("truncated","true");

    PublisherInfos infos = list.getPublisherInfos();
    if (infos != null)
    {
      handler = maker.lookup(PublisherInfosHandler.TAG_NAME);
      handler.marshal(infos,element);
    }
View Full Code Here

Examples of org.apache.juddi.datatype.response.PublisherInfos

    // an empty PublisherList (aka "a zero match result set").
    if ((name == null) || (name.length() == 0))
    {
      PublisherList list = new PublisherList();
      list.setGeneric(generic);
      list.setPublisherInfos(new PublisherInfos());
      list.setOperator(Config.getOperator());
      list.setTruncated(false);
      return list;
    }

    // aquire a jUDDI datastore instance
    DataStore dataStore = DataStoreFactory.getDataStore();

    try
    {
      dataStore.beginTrans();

      // validate the 'name' parameters as much as possible up-front before
      // calling into the data layer for relational validation.
      if (name != null)
      {
        // names can not exceed the maximum character length specified by the
        // UDDI specification (v2.0 specifies a max character length of 255). This
        // value is configurable in jUDDI.
        int maxNameLength = Config.getMaxNameLengthAllowed();
        if (name.length() > maxNameLength)
          throw new NameTooLongException("find_publisher: "+
              "name="+name+", "+
              "length="+name.length()+", "+
              "maxNameLength="+maxNameLength);
      }

      // validate the 'qualifiers' parameter as much as possible up-front before
      // calling into the data layer for relational validation.
      if (qualifiers != null)
      {
        Vector qVector = qualifiers.getFindQualifierVector();
        if ((qVector!=null) && (qVector.size() > 0))
        {
          for (int i=0; i<qVector.size(); i++)
          {
            FindQualifier qualifier = (FindQualifier)qVector.elementAt(i);
            String qValue = qualifier.getValue();

            if ((!qValue.equals(FindQualifier.EXACT_NAME_MATCH)) &&
                (!qValue.equals(FindQualifier.CASE_SENSITIVE_MATCH)) &&
                (!qValue.equals(FindQualifier.OR_ALL_KEYS)) &&
                (!qValue.equals(FindQualifier.OR_LIKE_KEYS)) &&
                (!qValue.equals(FindQualifier.AND_ALL_KEYS)) &&
                (!qValue.equals(FindQualifier.SORT_BY_NAME_ASC)) &&
                (!qValue.equals(FindQualifier.SORT_BY_NAME_DESC)) &&
                (!qValue.equals(FindQualifier.SORT_BY_DATE_ASC)) &&
                (!qValue.equals(FindQualifier.SORT_BY_DATE_DESC)) &&
                (!qValue.equals(FindQualifier.SERVICE_SUBSET)) &&
                (!qValue.equals(FindQualifier.COMBINE_CATEGORY_BAGS)))
              throw new UnsupportedException("find_publisher: "+
                  "findQualifier="+qValue);
          }
        }
      }

      Vector infoVector = null;
      boolean truncatedResults = false;

      // perform the search for matching technical models (return only keys in requested order)
      Vector idVector = dataStore.findPublisher(name,qualifiers);
      if ((idVector != null) && (idVector.size() > 0))
      {
        // if a maxRows value has been specified and it's less than
        // the number of rows we are about to return then only return
        // maxRows specified.
        int rowCount = idVector.size();
        if ((maxRows > 0) && (maxRows < rowCount))
        {
          rowCount = maxRows;
          truncatedResults = true;
        }

        // iterate through the publisher IDs fetching
        // each associated PublisherInfo in sequence.
        infoVector = new Vector(rowCount);
        for (int i=0; i<rowCount; i++)
          infoVector.addElement(dataStore.fetchPublisherInfo((String)idVector.elementAt(i)));
      }

      dataStore.commit();

      // create a new PublisherInfos instance and stuff
      // the new Vector of PublisherInfos into it.
      PublisherInfos infos = new PublisherInfos();
      infos.setPublisherInfoVector(infoVector);

      // create a new PublisherList instance and
      // stuff the new PublisherInfoVector into it.
      PublisherList list = new PublisherList();
      list.setGeneric(generic);
View Full Code Here

Examples of org.apache.juddi.datatype.response.PublisherInfos

    this.maker = maker;
  }

  public RegistryObject unmarshal(Element element)
  {
    PublisherInfos obj = new PublisherInfos();
    Vector nodeList = null;
    AbstractHandler handler = null;

    // Attributes
    // {none}

    // Text Node Value
    // {none}

    // Child Elements
    nodeList = XMLUtils.getChildElementsByTagName(element,PublisherInfoHandler.TAG_NAME);
    for (int i=0; i<nodeList.size(); i++)
    {
      handler = maker.lookup(PublisherInfoHandler.TAG_NAME);
      obj.addPublisherInfo((PublisherInfo)handler.unmarshal((Element)nodeList.elementAt(i)));
    }

    return obj;
  }
View Full Code Here

Examples of org.apache.juddi.datatype.response.PublisherInfos

    return obj;
  }

  public void marshal(RegistryObject object,Element parent)
  {
    PublisherInfos infos = (PublisherInfos)object;
    Element element = parent.getOwnerDocument().createElementNS(null,TAG_NAME);
    AbstractHandler handler = null;

    Vector vector = infos.getPublisherInfoVector();
    if ((vector!=null) && (vector.size() > 0))
    {
      handler = maker.lookup(PublisherInfoHandler.TAG_NAME);
      for (int i=0; i < vector.size(); i++)
        handler.marshal((PublisherInfo)vector.elementAt(i),element);
View Full Code Here

Examples of org.apache.juddi.datatype.response.PublisherInfos

    boolean truncated = list.isTruncated();
    if (truncated)
      element.setAttribute("truncated","true");

    PublisherInfos infos = list.getPublisherInfos();
    if (infos != null)
    {
      handler = maker.lookup(PublisherInfosHandler.TAG_NAME);
      handler.marshal(infos,element);
    }
View Full Code Here

Examples of org.apache.juddi.datatype.response.PublisherInfos

    // an empty PublisherList (aka "a zero match result set").
    if ((name == null) || (name.length() == 0))
    {
      PublisherList list = new PublisherList();
      list.setGeneric(generic);
      list.setPublisherInfos(new PublisherInfos());
      list.setOperator(Config.getOperator());
      list.setTruncated(false);
      return list;
    }

    // aquire a jUDDI datastore instance
    DataStore dataStore = DataStoreFactory.getDataStore();

    try
    {
      dataStore.beginTrans();

      // validate the 'name' parameters as much as possible up-front before
      // calling into the data layer for relational validation.
      if (name != null)
      {
        // names can not exceed the maximum character length specified by the
        // UDDI specification (v2.0 specifies a max character length of 255). This
        // value is configurable in jUDDI.
        int maxNameLength = Config.getMaxNameLengthAllowed();
        if (name.length() > maxNameLength)
          throw new NameTooLongException("Name: '"+name+"' (max="+maxNameLength+")");
      }

      // validate the 'qualifiers' parameter as much as possible up-front before
      // calling into the data layer for relational validation.
      if (qualifiers != null)
      {
        Vector qVector = qualifiers.getFindQualifierVector();
        if ((qVector!=null) && (qVector.size() > 0))
        {
          for (int i=0; i<qVector.size(); i++)
          {
            FindQualifier qualifier = (FindQualifier)qVector.elementAt(i);
            String qValue = qualifier.getValue();

            if ((!qValue.equals(FindQualifier.EXACT_NAME_MATCH)) &&
                (!qValue.equals(FindQualifier.CASE_SENSITIVE_MATCH)) &&
                (!qValue.equals(FindQualifier.OR_ALL_KEYS)) &&
                (!qValue.equals(FindQualifier.OR_LIKE_KEYS)) &&
                (!qValue.equals(FindQualifier.AND_ALL_KEYS)) &&
                (!qValue.equals(FindQualifier.SORT_BY_NAME_ASC)) &&
                (!qValue.equals(FindQualifier.SORT_BY_NAME_DESC)) &&
                (!qValue.equals(FindQualifier.SORT_BY_DATE_ASC)) &&
                (!qValue.equals(FindQualifier.SORT_BY_DATE_DESC)) &&
                (!qValue.equals(FindQualifier.SERVICE_SUBSET)) &&
                (!qValue.equals(FindQualifier.COMBINE_CATEGORY_BAGS)))
              throw new UnsupportedException("FindQualifier: "+qValue);
          }
        }
      }

      Vector infoVector = null;
      boolean truncatedResults = false;

      // perform the search for matching technical models (return only keys in requested order)
      Vector idVector = dataStore.findPublisher(name,qualifiers);
      if ((idVector != null) && (idVector.size() > 0))
      {
        // if a maxRows value has been specified and it's less than
        // the number of rows we are about to return then only return
        // maxRows specified.
        int rowCount = idVector.size();
        if ((maxRows > 0) && (maxRows < rowCount))
        {
          rowCount = maxRows;
          truncatedResults = true;
        }

        // iterate through the publisher IDs fetching
        // each associated PublisherInfo in sequence.
        infoVector = new Vector(rowCount);
        for (int i=0; i<rowCount; i++)
          infoVector.addElement(dataStore.fetchPublisherInfo((String)idVector.elementAt(i)));
      }

      dataStore.commit();

      // create a new PublisherInfos instance and stuff
      // the new Vector of PublisherInfos into it.
      PublisherInfos infos = new PublisherInfos();
      infos.setPublisherInfoVector(infoVector);

      // create a new PublisherList instance and
      // stuff the new PublisherInfoVector into it.
      PublisherList list = new PublisherList();
      list.setGeneric(generic);
View Full Code Here

Examples of org.apache.juddi.datatype.response.PublisherInfos

    this.maker = maker;
  }

  public RegistryObject unmarshal(Element element)
  {
    PublisherInfos obj = new PublisherInfos();
    Vector nodeList = null;
    AbstractHandler handler = null;

    // Attributes
    // {none}

    // Text Node Value
    // {none}

    // Child Elements
    nodeList = XMLUtils.getChildElementsByTagName(element,PublisherInfoHandler.TAG_NAME);
    for (int i=0; i<nodeList.size(); i++)
    {
      handler = maker.lookup(PublisherInfoHandler.TAG_NAME);
      obj.addPublisherInfo((PublisherInfo)handler.unmarshal((Element)nodeList.elementAt(i)));
    }

    return obj;
  }
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.