Package org.apache.juddi.datatype.response

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


    this.maker = maker;
  }

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

    // We could use the generic attribute value to
    // determine which version of UDDI was used to
    // format the request XML. - Steve

    // Attributes
    obj.setGeneric(element.getAttribute("generic"));
    obj.setOperator(element.getAttribute("operator"));

    // We can ignore the xmlns attribute since we
    // can always determine it's value using the
    // "generic" attribute. - Steve

    // Text Node Value
    // {none}

    // Child Elements
    nodeList = XMLUtils.getChildElementsByTagName(element,BusinessInfosHandler.TAG_NAME);
    if (nodeList.size() > 0)
    {
      handler = maker.lookup(BusinessInfosHandler.TAG_NAME);
      obj.setBusinessInfos((BusinessInfos)handler.unmarshal((Element)nodeList.elementAt(0)));
    }

    nodeList = XMLUtils.getChildElementsByTagName(element,TModelInfosHandler.TAG_NAME);
    if (nodeList.size() > 0)
    {
      handler = maker.lookup(TModelInfosHandler.TAG_NAME);
      obj.setTModelInfos((TModelInfos)handler.unmarshal((Element)nodeList.elementAt(0)));
    }

    return obj;
  }
View Full Code Here


    return obj;
  }

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

    element.setAttribute("generic",generic);

    String operator = info.getOperator();
    if (operator != null)
      element.setAttribute("operator",operator);
    else
      element.setAttribute("operator","");

    BusinessInfos bInfos = info.getBusinessInfos();
    if (bInfos!=null)
    {
      handler = maker.lookup(BusinessInfosHandler.TAG_NAME);
      handler.marshal(bInfos,element);
    }

    TModelInfos tInfos = info.getTModelInfos();
    if (tInfos!=null)
    {
      handler = maker.lookup(TModelInfosHandler.TAG_NAME);
      handler.marshal(tInfos,element);
    }
View Full Code Here

    TModelInfos tInfos = new TModelInfos();
    tInfos.addTModelInfo(tInfo);
    tInfos.addTModelInfo(tInfo);

    RegisteredInfo info = new RegisteredInfo();
    info.setGeneric("2.0");
    info.setOperator("jUDDI.org");
    info.setBusinessInfos(bInfos);
    info.setTModelInfos(tInfos);

    System.out.println();

    RegistryObject regObject = info;
    handler.marshal(regObject,parent);
View Full Code Here

    TModelInfos tInfos = new TModelInfos();
    tInfos.addTModelInfo(tInfo);
    tInfos.addTModelInfo(tInfo);

    RegisteredInfo object = new RegisteredInfo();
    object.setGeneric("2.0");
    object.setOperator("jUDDI.org");
    object.setBusinessInfos(bInfos);
    object.setTModelInfos(tInfos);


    return object;

  }
View Full Code Here

      dataStore.commit();

      // create a new BusinessInfos instance and stuff
      // the new Vector of BusinessInfos into it.
      RegisteredInfo info = new RegisteredInfo();
      info.setGeneric(generic);
      info.setOperator(Config.getOperator());
      info.setBusinessInfos(businessInfos);
      info.setTModelInfos(tModelInfos);
      return info;
    }
    catch(RegistryException regex)
    {
      try { dataStore.rollback(); } catch(Exception e) { }
View Full Code Here

    TModelInfos tInfos = new TModelInfos();
    tInfos.addTModelInfo(tInfo);
    tInfos.addTModelInfo(tInfo);

    RegisteredInfo info = new RegisteredInfo();
    info.setGeneric("2.0");
    info.setOperator("jUDDI.org");
    info.setBusinessInfos(bInfos);
    info.setTModelInfos(tInfos);

    System.out.println();

    RegistryObject regObject = info;
    handler.marshal(regObject,parent);
View Full Code Here

    this.maker = maker;
  }

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

    // We could use the generic attribute value to
    // determine which version of UDDI was used to
    // format the request XML. - Steve

    // Attributes
    obj.setGeneric(element.getAttribute("generic"));
    obj.setOperator(element.getAttribute("operator"));

    // We can ignore the xmlns attribute since we
    // can always determine it's value using the
    // "generic" attribute. - Steve

    // Text Node Value
    // {none}

    // Child Elements
    nodeList = XMLUtils.getChildElementsByTagName(element,BusinessInfosHandler.TAG_NAME);
    if (nodeList.size() > 0)
    {
      handler = maker.lookup(BusinessInfosHandler.TAG_NAME);
      obj.setBusinessInfos((BusinessInfos)handler.unmarshal((Element)nodeList.elementAt(0)));
    }

    nodeList = XMLUtils.getChildElementsByTagName(element,TModelInfosHandler.TAG_NAME);
    if (nodeList.size() > 0)
    {
      handler = maker.lookup(TModelInfosHandler.TAG_NAME);
      obj.setTModelInfos((TModelInfos)handler.unmarshal((Element)nodeList.elementAt(0)));
    }

    return obj;
  }
View Full Code Here

    return obj;
  }

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

    String generic = info.getGeneric();
    if ((generic != null) && (generic.trim().length() > 0))
    {
      element.setAttribute("generic",generic);

      if (generic.equals(IRegistry.UDDI_V1_GENERIC))
        element.setAttribute("xmlns",IRegistry.UDDI_V1_NAMESPACE);
      else if (generic.equals(IRegistry.UDDI_V2_GENERIC))
        element.setAttribute("xmlns",IRegistry.UDDI_V2_NAMESPACE);
      else if (generic.equals(IRegistry.UDDI_V3_GENERIC))
        element.setAttribute("xmlns",IRegistry.UDDI_V3_NAMESPACE);
    }
    else // Default to UDDI v2 values
    {
      element.setAttribute("generic",IRegistry.UDDI_V2_GENERIC);
      element.setAttribute("xmlns",IRegistry.UDDI_V2_NAMESPACE);
    }

    String operator = info.getOperator();
    if (operator != null)
      element.setAttribute("operator",operator);
    else
      element.setAttribute("operator","");

    BusinessInfos bInfos = info.getBusinessInfos();
    if (bInfos!=null)
    {
      handler = maker.lookup(BusinessInfosHandler.TAG_NAME);
      handler.marshal(bInfos,element);
    }

    TModelInfos tInfos = info.getTModelInfos();
    if (tInfos!=null)
    {
      handler = maker.lookup(TModelInfosHandler.TAG_NAME);
      handler.marshal(tInfos,element);
    }
View Full Code Here

      dataStore.commit();

      // create a new BusinessInfos instance and stuff
      // the new Vector of BusinessInfos into it.
      RegisteredInfo info = new RegisteredInfo();
      info.setGeneric(generic);
      info.setOperator(Config.getOperator());
      info.setBusinessInfos(businessInfos);
      info.setTModelInfos(tModelInfos);
      return info;
    }
    catch(RegistryException regex)
    {
      try { dataStore.rollback(); } catch(Exception e) { }
View Full Code Here

    this.maker = maker;
  }

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

    // We could use the generic attribute value to
    // determine which version of UDDI was used to
    // format the request XML. - Steve

    // Attributes
    obj.setGeneric(element.getAttribute("generic"));
    obj.setOperator(element.getAttribute("operator"));

    // We can ignore the xmlns attribute since we
    // can always determine it's value using the
    // "generic" attribute. - Steve

    // Text Node Value
    // {none}

    // Child Elements
    nodeList = XMLUtils.getChildElementsByTagName(element,BusinessInfosHandler.TAG_NAME);
    if (nodeList.size() > 0)
    {
      handler = maker.lookup(BusinessInfosHandler.TAG_NAME);
      obj.setBusinessInfos((BusinessInfos)handler.unmarshal((Element)nodeList.elementAt(0)));
    }

    nodeList = XMLUtils.getChildElementsByTagName(element,TModelInfosHandler.TAG_NAME);
    if (nodeList.size() > 0)
    {
      handler = maker.lookup(TModelInfosHandler.TAG_NAME);
      obj.setTModelInfos((TModelInfos)handler.unmarshal((Element)nodeList.elementAt(0)));
    }

    return obj;
  }
View Full Code Here

TOP

Related Classes of org.apache.juddi.datatype.response.RegisteredInfo

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.