Package org.apache.juddi.datatype

Examples of org.apache.juddi.datatype.SharedRelationships


    this.maker = maker;
  }

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

    // Attributes
    String direction = element.getAttribute("direction");
    if ((direction != null && (direction.trim().length() > 0)))
      obj.setDirection(direction);

    // Text Node Value
    // {none}

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

    return obj;
  }
View Full Code Here


    return obj;
  }

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

    String direction = relationships.getDirection();
    if ((direction != null && (direction.length() > 0)))
      element.setAttribute("direction",direction);

    Vector keyedRefVector = relationships.getKeyedReferenceVector();
    if ((keyedRefVector!=null) && (keyedRefVector.size() > 0))
    {
      AbstractHandler handler = maker.lookup(KeyedReferenceHandler.TAG_NAME);
      for (int i=0; i < keyedRefVector.size(); i++)
        handler.marshal((KeyedReference)keyedRefVector.elementAt(i),element);
View Full Code Here

    AbstractHandler handler = maker.lookup(SharedRelationshipsHandler.TAG_NAME);

    Element parent = XMLUtils.newRootElement();
    Element child = null;

    SharedRelationships relationships = new SharedRelationships();
    relationships.setDirection("toKey");
    relationships.addKeyedReference(new KeyedReference("sharedRefKeyName","sharedRefKeyValue"));
    relationships.addKeyedReference(new KeyedReference("uuid:8ff45356-acde-4a4c-86bf-f953611d20c6","sharedRefKeyName2","sharedRefKeyValue2"));

    System.out.println();

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

      handler = maker.lookup(DescriptionHandler.TAG_NAME);
      for (int i=0; i < descVector.size(); i++)
        handler.marshal((Description)descVector.elementAt(i),element);
    }

    SharedRelationships relationships = info.getSharedRelationships();
    if (relationships != null)
    {
      handler = maker.lookup(SharedRelationshipsHandler.TAG_NAME);
      handler.marshal(relationships,element);
    }
View Full Code Here

          relatedBizInfo.setBusinessKey(bizInfo.getBusinessKey());
          relatedBizInfo.setNameVector( bizInfo.getNameVector() );
          relatedBizInfo.setDescriptionVector( bizInfo.getDescriptionVector() );

          Vector keyedReferences = PublisherAssertionTable.selectRelatedBusinesses(businessKey,relatedKey,connection);
          relatedBizInfo.setSharedRelationships(new SharedRelationships(keyedReferences));

          infoVector.addElement(relatedBizInfo);
        }
      }
    }
View Full Code Here

          relatedBizInfo.setBusinessKey(bizInfo.getBusinessKey());
          relatedBizInfo.setNameVector( bizInfo.getNameVector() );
          relatedBizInfo.setDescriptionVector( bizInfo.getDescriptionVector() );

          Vector keyedReferences = PublisherAssertionTable.selectRelatedBusinesses(businessKey,relatedKey,connection);
          relatedBizInfo.setSharedRelationships(new SharedRelationships(keyedReferences));

          infoVector.addElement(relatedBizInfo);
        }
      }
    }
View Full Code Here

    this.maker = maker;
  }

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

    // Attributes
    String direction = element.getAttribute("direction");
    if ((direction != null && (direction.trim().length() > 0)))
      obj.setDirection(direction);

    // Text Node Value
    // {none}

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

    return obj;
  }
View Full Code Here

    return obj;
  }

  public void marshal(RegistryObject object,Element parent)
  {
    SharedRelationships relationships = (SharedRelationships)object;
    Element element = parent.getOwnerDocument().createElementNS(null,TAG_NAME);

    String direction = relationships.getDirection();
    if ((direction != null && (direction.length() > 0)))
      element.setAttribute("direction",direction);

    Vector keyedRefVector = relationships.getKeyedReferenceVector();
    if ((keyedRefVector!=null) && (keyedRefVector.size() > 0))
    {
      AbstractHandler handler = maker.lookup(KeyedReferenceHandler.TAG_NAME);
      for (int i=0; i < keyedRefVector.size(); i++)
        handler.marshal((KeyedReference)keyedRefVector.elementAt(i),element);
View Full Code Here

    AbstractHandler handler = maker.lookup(SharedRelationshipsHandler.TAG_NAME);

    Element parent = XMLUtils.newRootElement();
    Element child = null;

    SharedRelationships relationships = new SharedRelationships();
    relationships.setDirection("toKey");
    relationships.addKeyedReference(new KeyedReference("sharedRefKeyName","sharedRefKeyValue"));
    relationships.addKeyedReference(new KeyedReference("uuid:8ff45356-acde-4a4c-86bf-f953611d20c6","sharedRefKeyName2","sharedRefKeyValue2"));

    System.out.println();

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

      handler = maker.lookup(DescriptionHandler.TAG_NAME);
      for (int i=0; i < descVector.size(); i++)
        handler.marshal((Description)descVector.elementAt(i),element);
    }

    SharedRelationships relationships = info.getSharedRelationships();
    if (relationships != null)
    {
      handler = maker.lookup(SharedRelationshipsHandler.TAG_NAME);
      handler.marshal(relationships,element);
    }
View Full Code Here

TOP

Related Classes of org.apache.juddi.datatype.SharedRelationships

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.