You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xang-cvs@xml.apache.org by md...@locus.apache.org on 2000/04/19 01:05:43 UTC

cvs commit: xml-xang/java/src/org/apache/xang/xap/xml DynamicDocument.java DynamicDocumentParser.java IXMLLinker.java NodeListImpl.java

mdierken    00/04/18 16:05:43

  Modified:    java/src/org/apache/xang/net/http/object IHTTPObject.java
               java/src/org/apache/xang/net/http/object/impl
                        HTTPObject.java HTTPObjectServer.java
               java/src/org/apache/xang/xap XapSystem.java
               java/src/org/apache/xang/xap/xml DynamicDocument.java
                        DynamicDocumentParser.java IXMLLinker.java
                        NodeListImpl.java
  Log:
  no message
  
  Revision  Changes    Path
  1.3       +7 -1      xml-xang/java/src/org/apache/xang/net/http/object/IHTTPObject.java
  
  Index: IHTTPObject.java
  ===================================================================
  RCS file: /home/cvs/xml-xang/java/src/org/apache/xang/net/http/object/IHTTPObject.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- IHTTPObject.java	2000/03/14 00:49:32	1.2
  +++ IHTTPObject.java	2000/04/18 23:05:25	1.3
  @@ -77,6 +77,12 @@
       **/
       public IHTTPObject getChild(Vector idPath,int startingOffset);
   
  +    /** Release the object acquired via the getChild() method.
  +    **      @param child IHTTPObject acquired earlier
  +    *       @see getChild()
  +    **/
  +    public void releaseChild(IHTTPObject child);
  +
       // method invocation
       /** Performs operation specified by 'method'.
       **      @param context information about this transaction
  @@ -87,5 +93,5 @@
       **/
       public boolean dispatch(IHTTPContext context,Vector returnTypes,String method,Hashtable parameters);
   
  -    public final static String RCS_STRING = "$Workfile: IHTTPObject.java $ " + "$Revision: 1.2 $";
  +    public final static String RCS_STRING = "$Workfile: IHTTPObject.java $ " + "$Revision: 1.3 $";
   }
  
  
  
  1.3       +12 -1     xml-xang/java/src/org/apache/xang/net/http/object/impl/HTTPObject.java
  
  Index: HTTPObject.java
  ===================================================================
  RCS file: /home/cvs/xml-xang/java/src/org/apache/xang/net/http/object/impl/HTTPObject.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- HTTPObject.java	2000/03/14 00:49:33	1.2
  +++ HTTPObject.java	2000/04/18 23:05:31	1.3
  @@ -273,7 +273,18 @@
           return this;
       }
   
  +    /**
  +    **      @see datachannel.net.http.object.IHTTPObject
  +    **/
  +    public void releaseChild(IHTTPObject child)
  +    {
  +        // do nothing
  +    }
  +    
       // HTTP Methods
  +    /**
  +     * Utility to help output a simple XML description of the available methods.
  +     */
       public static void printModifierStrings(StringBuffer sb,int modifiers)
       {
           if (Modifier.isAbstract(modifiers))
  @@ -494,6 +505,6 @@
       ////////////////
       // Data
       
  -    public final static String RCS_STRING = "$Workfile: HTTPObject.java $ " + "$Revision: 1.2 $";
  +    public final static String RCS_STRING = "$Workfile: HTTPObject.java $ " + "$Revision: 1.3 $";
   }
   
  
  
  
  1.3       +19 -3     xml-xang/java/src/org/apache/xang/net/http/object/impl/HTTPObjectServer.java
  
  Index: HTTPObjectServer.java
  ===================================================================
  RCS file: /home/cvs/xml-xang/java/src/org/apache/xang/net/http/object/impl/HTTPObjectServer.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- HTTPObjectServer.java	2000/03/14 00:49:34	1.2
  +++ HTTPObjectServer.java	2000/04/18 23:05:31	1.3
  @@ -330,13 +330,24 @@
       {
           return ((sPath.indexOf("/.") >= 0) || (sPath.indexOf("/..") >= 0));
       }
  +    
  +    protected static Hashtable thePaths = new Hashtable();
  +    
       public static Vector getPathParts(String sPath)
       {
  -        Vector ids=new Vector();
  +        Vector ids=null;
   
           if (sPath == null)
  -            return(ids);
  +            return(new Vector());
   
  +        // check the cache
  +        ids = (Vector)thePaths.get(sPath);
  +        if (ids != null)
  +            return ids;
  +        
  +        // create & populate a new one.
  +        ids = new Vector();
  +        
           String id;
           StringTokenizer toker=new StringTokenizer(sPath,"/");
           
  @@ -359,6 +370,11 @@
                   }
               }
           }
  +        
  +        // put into cache
  +        thePaths.put(sPath,ids);
  +        
  +        
           return(ids);
       }
   
  @@ -463,5 +479,5 @@
       protected IHTTPRequestHandler defaultHandler;
       public static boolean debug=false;
   
  -    public final static String RCS_STRING = "$Workfile: HTTPObjectServer.java $ " + "$Revision: 1.2 $";
  +    public final static String RCS_STRING = "$Workfile: HTTPObjectServer.java $ " + "$Revision: 1.3 $";
   }
  
  
  
  1.4       +3 -2      xml-xang/java/src/org/apache/xang/xap/XapSystem.java
  
  Index: XapSystem.java
  ===================================================================
  RCS file: /home/cvs/xml-xang/java/src/org/apache/xang/xap/XapSystem.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- XapSystem.java	2000/03/14 00:55:33	1.3
  +++ XapSystem.java	2000/04/18 23:05:33	1.4
  @@ -109,9 +109,10 @@
           {
               // preserves whitespace
               xmlDoc = new DynamicDocument(false,false);
  +
               xmlDoc.load(rootFile);
   		}
  -		
  +        
   		return xmlDoc;
       }
       
  @@ -238,6 +239,6 @@
           }
       }
       
  -    public final static String RCS_STRING = "$Workfile: XapSystem.java $ " + "$Revision: 1.3 $";
  +    public final static String RCS_STRING = "$Workfile: XapSystem.java $ " + "$Revision: 1.4 $";
   }
   
  
  
  
  1.4       +13 -4     xml-xang/java/src/org/apache/xang/xap/xml/DynamicDocument.java
  
  Index: DynamicDocument.java
  ===================================================================
  RCS file: /home/cvs/xml-xang/java/src/org/apache/xang/xap/xml/DynamicDocument.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- DynamicDocument.java	2000/03/14 00:55:34	1.3
  +++ DynamicDocument.java	2000/04/18 23:05:37	1.4
  @@ -49,9 +49,8 @@
    *
    * This software consists of voluntary contributions made by many
    * individuals on behalf of the Apache Software Foundation and was
  - * originally based on software copyright (c) 1999, International
  - * Business Machines, Inc., http://www.apache.org.  For more
  - * information on the Apache Software Foundation, please see
  + * originally based on software copyright (c) 1999, DataChannel, Inc., http://www.datachannel.com
  + * For more information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
    */
   
  @@ -90,10 +89,18 @@
   	public static final String NODEFROMID_SELECT_TAG_TWO = "']";
   		
   	
  +    public DynamicDocument()
  +    {
  +        this.preserveWhitespace = true;
  +    }
  +    
       public DynamicDocument(boolean validate,boolean preserveWhitespace)
       {
           this.preserveWhitespace = preserveWhitespace;
  -		ownerDocument = this;
  +
  +        
  +        
  +        ownerDocument = this;
       }
   
       /**
  @@ -359,6 +366,8 @@
           {
               DocumentImpl doc;
               doc = (DocumentImpl)target.getOwnerDocument();
  +            String name;
  +            name = target.getLocalName();
               newNode = doc.importNode(source,true);
               parent.replaceChild(newNode,target);
           }
  
  
  
  1.4       +24 -16    xml-xang/java/src/org/apache/xang/xap/xml/DynamicDocumentParser.java
  
  Index: DynamicDocumentParser.java
  ===================================================================
  RCS file: /home/cvs/xml-xang/java/src/org/apache/xang/xap/xml/DynamicDocumentParser.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- DynamicDocumentParser.java	2000/03/14 00:55:34	1.3
  +++ DynamicDocumentParser.java	2000/04/18 23:05:38	1.4
  @@ -49,9 +49,8 @@
    *
    * This software consists of voluntary contributions made by many
    * individuals on behalf of the Apache Software Foundation and was
  - * originally based on software copyright (c) 1999, International
  - * Business Machines, Inc., http://www.apache.org.  For more
  - * information on the Apache Software Foundation, please see
  + * originally based on software copyright (c) 1999, DataChannel, Inc., http://www.datachannel.com
  + * For more information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
    */
   package org.apache.xang.xap.xml;
  @@ -136,23 +135,13 @@
           return null;
       }
       
  +    
       /**
        * This is a copy of DOMParser.startDocument().
        * It would be nice to extract the 'acquireDocImpl' portion into a method.
        */
  -    public void startDocument(int versionIndex, int encodingIndex,
  -                              int standAloneIndex) {
   
  -        // clean up unused strings
  -        if (versionIndex != -1) {
  -            fStringPool.orphanString(versionIndex);
  -        }
  -        if (encodingIndex != -1) {
  -            fStringPool.orphanString(encodingIndex);
  -        }
  -        if (standAloneIndex != -1) {
  -            fStringPool.orphanString(standAloneIndex);
  -        }
  +    public void startDocument() {
   
           // deferred expansion
           String documentClassName = null;
  @@ -185,7 +174,26 @@
           }
   
       } // startDocument()
  -    
  +
  +    /**
  +     * This is from the older version of DOMParser
  +     */
  +    public void startDocument(int versionIndex, int encodingIndex,
  +                              int standAloneIndex) {
  +
  +        // clean up unused strings
  +        if (versionIndex != -1) {
  +            fStringPool.orphanString(versionIndex);
  +        }
  +        if (encodingIndex != -1) {
  +            fStringPool.orphanString(encodingIndex);
  +        }
  +        if (standAloneIndex != -1) {
  +            fStringPool.orphanString(standAloneIndex);
  +        }
  +
  +        startDocument();
  +    }    
   
       private DocumentImpl doc;
   }
  
  
  
  1.3       +2 -3      xml-xang/java/src/org/apache/xang/xap/xml/IXMLLinker.java
  
  Index: IXMLLinker.java
  ===================================================================
  RCS file: /home/cvs/xml-xang/java/src/org/apache/xang/xap/xml/IXMLLinker.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- IXMLLinker.java	2000/03/14 00:49:41	1.2
  +++ IXMLLinker.java	2000/04/18 23:05:38	1.3
  @@ -49,9 +49,8 @@
    *
    * This software consists of voluntary contributions made by many
    * individuals on behalf of the Apache Software Foundation and was
  - * originally based on software copyright (c) 1999, International
  - * Business Machines, Inc., http://www.apache.org.  For more
  - * information on the Apache Software Foundation, please see
  + * originally based on software copyright (c) 1999, DataChannel, Inc., http://www.datachannel.com
  + * For more information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
    */
   package org.apache.xang.xap.xml;
  
  
  
  1.4       +2 -3      xml-xang/java/src/org/apache/xang/xap/xml/NodeListImpl.java
  
  Index: NodeListImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xang/java/src/org/apache/xang/xap/xml/NodeListImpl.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- NodeListImpl.java	2000/03/14 00:55:34	1.3
  +++ NodeListImpl.java	2000/04/18 23:05:38	1.4
  @@ -49,9 +49,8 @@
    *
    * This software consists of voluntary contributions made by many
    * individuals on behalf of the Apache Software Foundation and was
  - * originally based on software copyright (c) 1999, International
  - * Business Machines, Inc., http://www.apache.org.  For more
  - * information on the Apache Software Foundation, please see
  + * originally based on software copyright (c) 1999, DataChannel, Inc., http://www.datachannel.com
  + * For more information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
    */