You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xindice-dev@xml.apache.org by dv...@apache.org on 2002/11/26 02:50:16 UTC

cvs commit: xml-xindice/java/src/org/apache/xindice/client/xmldb ResourceSetImpl.java

dviner      2002/11/25 17:50:16

  Modified:    java/src/org/apache/xindice/xml/dom NodeImpl.java
               java/src/org/apache/xindice/core/indexer IndexPattern.java
               java/src/org/apache/xindice/core/filer Paged.java
               java/src/org/apache/xindice/client/xmldb
                        ResourceSetImpl.java
  Log:
  fixing javadoc comments for javadoc 1.4.  Now the second sentance must begin with a capital
  letter or a warning is issued.
  
  --dviner
  
  Revision  Changes    Path
  1.6       +13 -11    xml-xindice/java/src/org/apache/xindice/xml/dom/NodeImpl.java
  
  Index: NodeImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xindice/java/src/org/apache/xindice/xml/dom/NodeImpl.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- NodeImpl.java	22 Nov 2002 10:15:35 -0000	1.5
  +++ NodeImpl.java	26 Nov 2002 01:50:15 -0000	1.6
  @@ -134,7 +134,7 @@
   
      public NodeImpl() {
      }
  -   
  +
      public NodeImpl(byte[] data, int pos, int len) {
         this.data = data;
         this.pos = pos;
  @@ -254,7 +254,7 @@
         else
            return source;
      }
  -   
  +
      public void expandSource() {
      }
   
  @@ -534,7 +534,7 @@
                  }
                  newNode = df;
                  break;
  -               
  +
               case Node.ELEMENT_NODE:
                  newNode = new ElementImpl(this, data, pos, len);
                  break;
  @@ -575,7 +575,7 @@
   
            case Node.DOCUMENT_FRAGMENT_NODE:
               return doc.createDocumentFragment();
  -            
  +
            case Node.ELEMENT_NODE:
               Element elem = doc.createElement(nodeName);
               NamedNodeMap attrs = getAttributes();
  @@ -820,8 +820,9 @@
      }
   
       /**
  -     * Look up the namespace URI associated to the given prefix, starting from
  -     * this node.Name? May need to change depending on ending of the
  +     * Look up the namespace URI associated to the given prefix.
  +     *
  +	 * Starts from this node.Name. May need to change depending on ending of the
        * relative namespace URI reference nightmare.
        * @param prefix The prefix to look for.
        * @return Returns the associated namespace URI or <code>null</code> if
  @@ -893,10 +894,11 @@
       }
   
       /**
  -     * This attribute returns a unique key identifying this node.What type
  -     * should this really be?In what space is this key unique (Document,
  -     * DOMImplementation)?What is the lifetime of the uniqueness of this key
  -     * (Node, Document, ...)?
  +     * This attribute returns a unique key identifying this node.
  +	 *
  +	 * What type should this really be?  In what space is this key
  +	 * unique (Document, DOMImplementation)?  What is the lifetime of
  +	 * the uniqueness of this key (Node, Document, ...)?
        */
      public final synchronized Object getKey() {
         if ( key == null )
  
  
  
  1.4       +4 -2      xml-xindice/java/src/org/apache/xindice/core/indexer/IndexPattern.java
  
  Index: IndexPattern.java
  ===================================================================
  RCS file: /home/cvs/xml-xindice/java/src/org/apache/xindice/core/indexer/IndexPattern.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- IndexPattern.java	31 Oct 2002 06:59:57 -0000	1.3
  +++ IndexPattern.java	26 Nov 2002 01:50:16 -0000	1.4
  @@ -126,7 +126,9 @@
      }
   
      /**
  -    * getMatchLevel compares this IndexPattern to p and returns the strength of
  +    * getMatchLevel compares this IndexPattern to p.
  +	*
  +	* It returns the strength of
       * the match betwen the two patterns from 0 to 15.  (0 being no match at
       * all, 15 being perfect).  This method should be called by XPath and
       * SAX patterns to be matched against Indexer patterns.
  
  
  
  1.12      +25 -9     xml-xindice/java/src/org/apache/xindice/core/filer/Paged.java
  
  Index: Paged.java
  ===================================================================
  RCS file: /home/cvs/xml-xindice/java/src/org/apache/xindice/core/filer/Paged.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- Paged.java	22 Nov 2002 10:15:34 -0000	1.11
  +++ Paged.java	26 Nov 2002 01:50:16 -0000	1.12
  @@ -246,7 +246,7 @@
         if (value == null) {
            throw new IOException("Can't write a null value");
         }
  -      
  +
         InputStream is = value.getInputStream();
   
         PageHeader hdr = page.getPageHeader();
  @@ -472,7 +472,7 @@
         boolean error = false;
         synchronized (this) {
            Iterator i = dirty.values().iterator();
  -         
  +
            while ( i.hasNext() ) {
               Page p = (Page)i.next();
               try {
  @@ -491,9 +491,9 @@
               catch ( Exception e ) {
                  error = true;
               }
  -         }         
  +         }
         }
  -      
  +
         if ( error )
            throw new FilerException(FaultCodes.GEN_CRITICAL_ERROR, "Error performing flush!");
      }
  @@ -791,25 +791,41 @@
            return lastFreePage;
         }
   
  -      /** The size of a page header. 64 is sufficient */
  +      /**
  +	   * Set the size of a page header.
  +	   *
  +	   * Normally, 64 is sufficient.
  +	   */
         public synchronized final void setPageHeaderSize(byte pageHeaderSize) {
            this.pageHeaderSize = pageHeaderSize;
            calculateWorkSize();
            dirty = true;
         }
   
  -      /** The size of a page header. 64 is sufficient */
  +      /**
  +	   * Get the size of a page header.
  +	   *
  +	   * Normally, 64 is sufficient
  +	   */
         public synchronized final byte getPageHeaderSize() {
            return pageHeaderSize;
         }
   
  -      /** The maximum number of bytes a key can be.  256 is good */
  +      /**
  +	   * Set the maximum number of bytes a key can be.
  +	   *
  +	   * Normally, 256 is good
  +	   */
         public synchronized final void setMaxKeySize(short maxKeySize) {
            this.maxKeySize = maxKeySize;
            dirty = true;
         }
   
  -      /** The maximum number of bytes a key can be.  256 is good */
  +      /**
  +	   * Get the maximum number of bytes.
  +	   *
  +	   * Normally, 256 is good.
  +	   */
         public synchronized final short getMaxKeySize() {
            return maxKeySize;
         }
  
  
  
  1.7       +21 -21    xml-xindice/java/src/org/apache/xindice/client/xmldb/ResourceSetImpl.java
  
  Index: ResourceSetImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xindice/java/src/org/apache/xindice/client/xmldb/ResourceSetImpl.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- ResourceSetImpl.java	19 Nov 2002 05:22:19 -0000	1.6
  +++ ResourceSetImpl.java	26 Nov 2002 01:50:16 -0000	1.7
  @@ -87,14 +87,14 @@
         "http://www.xmldb.org/xapi/ResourceSet";
      protected List resources = null;
      protected org.xmldb.api.base.Collection collection = null;
  -   
  +
      private SymbolTable symbols = null;
      private byte[] bytes = null;
  -   
  +
      public ResourceSetImpl(org.xmldb.api.base.Collection collection,
            Document doc) throws XMLDBException {
         this.collection = collection;
  -      
  +
         if ( doc != null ) {
            initResources(doc);
         }
  @@ -108,10 +108,10 @@
         this.collection = collection;
         this.symbols = symbols;
         this.bytes = bytes;
  - 
  +
         initResources(new DocumentImpl(bytes, symbols, null));
      }
  -   
  +
      protected void initResources(Document document) throws XMLDBException {
         NodeList nodes = document.getDocumentElement().getChildNodes();
         this.resources =
  @@ -124,7 +124,7 @@
               Node n = nodes.item(i);
               String documentId = ((Element) n).getAttributeNS(
                  NodeSource.SOURCE_NS, "key");
  -            
  +
               if ( bytes != null ) {
                  DocumentImpl doc = new DocumentImpl();
                  doc.setSymbols(symbols);
  @@ -138,7 +138,7 @@
                  resource = new XMLResourceImpl(null, documentId, collection,
                     TextWriter.toString(n));
               }
  -         
  +
               i++;
               resources.add(resource);
            }
  @@ -147,7 +147,7 @@
            }
         }
      }
  -   
  +
      /**
       * Returns an iterator over all <code>Resource</code> instances stored in
       * the set.
  @@ -159,10 +159,10 @@
      public ResourceIterator getIterator() throws XMLDBException {
         return new ResourceIteratorImpl(resources);
      }
  -   
  +
      /**
       * Returns the <code>Resource</code> instance stored at the index specified
  -    * by <code>index</code>.<p />
  +    * by <code>index</code>.
       *
       * @param index the index of the resource to retrieve.
       * @return the <code>Resource</code> instance.
  @@ -173,7 +173,7 @@
      }
   
      /**
  -    * Returns the number of resources contained in the set.<p />
  +    * Returns the number of resources contained in the set.
       *
       * @return the number of <code>Resource</code> instances in the set.
       * @exception XMLDBException
  @@ -190,7 +190,7 @@
      public void addResource(Resource res) throws XMLDBException {
         resources.add(res);
      }
  -   
  +
      /**
       * Removes all <code>Resource</code> instances from the set.
       *
  @@ -199,7 +199,7 @@
      public void clear() throws XMLDBException {
         resources.clear();
      }
  -   
  +
      /**
       * Removes the <code>Resource</code> located at <code>index</code> from the
       * set.
  @@ -210,7 +210,7 @@
      public void removeResource(long index) throws XMLDBException {
         resources.remove((int) index);
      }
  -   
  +
      /**
       * Returns a <code>Resource</code> containing an XML representation of all
       * resources stored in the set.
  @@ -224,13 +224,13 @@
         // the server in this format instead of having to build it. Right now it's
         // pretty innefficient
         Document doc = new DocumentImpl();
  -      
  +
         Element set = doc.createElementNS(RESOURCE_SET_NS, "xapi:resourceSet");
         set.setAttributeNS(RESOURCE_SET_NS, "xapi:collectionURI",
            "xmldb:xindice://" + ((XindiceCollection) collection).getCanonicalName());
         set.setAttribute("xmlns:xapi", RESOURCE_SET_NS);
         doc.appendChild(set);
  -      
  +
         int i = 0;
         while ( i < resources.size() ) {
            XMLResource res = (XMLResource) resources.get(i);
  @@ -238,18 +238,18 @@
               "xapi:resource");
            resource.setAttributeNS(RESOURCE_SET_NS, "xapi:documentID",
               res.getDocumentId());
  -                  
  +
            resource.appendChild(doc.importNode(
               ((Document) res.getContentAsDOM()).getDocumentElement(), true));
  -         
  +
            set.appendChild(resource);
  -         
  +
            i++;
         }
   
         XMLResource result = new XMLResourceImpl(null, null,
            collection, TextWriter.toString(doc));
  -      
  +
         return result;
      }
   }