juddi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From svi...@apache.org
Subject cvs commit: ws-juddi/src/java/org/apache/juddi/datatype SharedRelationships.java
Date Mon, 21 Mar 2005 04:07:17 GMT
sviens      2005/03/20 20:07:17

  Modified:    src/java/org/apache/juddi/handler
                        SharedRelationshipsHandler.java
               src/java/org/apache/juddi/datatype SharedRelationships.java
  Log:
  Fix for bug# JUDDI-69 - Added the missing 'direction' attribute. (see: http://issues.apache.org/jira/browse/JUDDI-69)
  
  Revision  Changes    Path
  1.5       +8 -1      ws-juddi/src/java/org/apache/juddi/handler/SharedRelationshipsHandler.java
  
  Index: SharedRelationshipsHandler.java
  ===================================================================
  RCS file: /home/cvs/ws-juddi/src/java/org/apache/juddi/handler/SharedRelationshipsHandler.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- SharedRelationshipsHandler.java	8 Mar 2005 03:17:02 -0000	1.4
  +++ SharedRelationshipsHandler.java	21 Mar 2005 04:07:17 -0000	1.5
  @@ -47,7 +47,9 @@
       AbstractHandler handler = null;
   
       // Attributes
  -    // {none}
  +    String direction = element.getAttribute("direction");
  +    if ((direction != null && (direction.trim().length() > 0)))
  +      obj.setDirection(direction);
   
       // Text Node Value
       // {none}
  @@ -68,6 +70,10 @@
       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))
       {
  @@ -96,6 +102,7 @@
       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"));
   
  
  
  
  1.3       +18 -3     ws-juddi/src/java/org/apache/juddi/datatype/SharedRelationships.java
  
  Index: SharedRelationships.java
  ===================================================================
  RCS file: /home/cvs/ws-juddi/src/java/org/apache/juddi/datatype/SharedRelationships.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- SharedRelationships.java	11 Mar 2004 18:06:10 -0000	1.2
  +++ SharedRelationships.java	21 Mar 2005 04:07:17 -0000	1.3
  @@ -19,13 +19,12 @@
   
   /**
    * @author Anou Manavalan
  + * @author Steve Viens (sviens@apache.org)
    */
   public class SharedRelationships implements RegistryObject
   {
     Vector keyedReferenceVector;
  -
  -  // TODO (anou) need to add direction
  -  // <xsd:attribute name="direction" type="uddi:direction" use="required" />
  +  String direction;
   
     /**
      *
  @@ -43,6 +42,22 @@
     }
   
     /**
  +   * @return Returns the direction.
  +   */
  +  public String getDirection() 
  +  {
  +    return direction;
  +  }
  +  
  +  /**
  +   * @param direction The direction to set.
  +   */
  +  public void setDirection(String direction) 
  +  {
  +    this.direction = direction;
  +  }
  +  
  +  /**
      *
      */
     public void addKeyedReference(KeyedReference ref)
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: juddi-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: juddi-cvs-help@ws.apache.org


Mime
View raw message