[jboss-cvs] JBossCache/src/org/jboss/cache/xml ...

Manik Surtani manik at jboss.org
Tue Jul 17 07:07:39 EDT 2007


  User: msurtani
  Date: 07/07/17 07:07:39

  Modified:    src/org/jboss/cache/xml  XmlHelper.java
  Log:
  better javadocs
  
  Revision  Changes    Path
  1.17      +29 -11    JBossCache/src/org/jboss/cache/xml/XmlHelper.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: XmlHelper.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/xml/XmlHelper.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -b -r1.16 -r1.17
  --- XmlHelper.java	17 Jul 2007 03:14:50 -0000	1.16
  +++ XmlHelper.java	17 Jul 2007 11:07:39 -0000	1.17
  @@ -32,9 +32,26 @@
   public class XmlHelper
   {
      private static Log log = LogFactory.getLog(XmlHelper.class);
  +
  +   /**
  +    * The root of a JBoss Cache configuration XML file.  This is the <tt>&lt;mbean&gt;</tt> tag.
  +    */
      public static final String ROOT = "mbean";
  +
  +   /**
  +    * The <tt>&lt;attribute&gt;</tt> tag which forms the bulk of JBoss Cache configuration elements
  +    */
      public static final String ATTR = "attribute";
  +
  +   /**
  +    * The <tt>&lt;config&gt;</tt> tag may be embedded in the contents of an <tt>&lt;attribute&gt;</tt>, to specify more
  +    * complex configuration for certain parameters.
  +    */
      public static final String CONFIG_ATTR = "config";
  +
  +   /**
  +    * The <tt>&lt;name&gt;</tt> attribute to an <tt>&lt;attribute&gt;</tt> tag.
  +    */
      public static final String NAME = "name";
   
   
  @@ -42,13 +59,13 @@
       * Returns the contents of a specific node of given element name, provided a certain attribute exists and is set to value.
       * E.g., if you have a {@link Element} which represents the following XML snippet:
       * <pre>
  -    *   &gt;ItemQuantity Colour="Red"&lt;100&gt;/ItemQuantity&lt;
  -    *   &gt;ItemQuantity Colour="Blue"&lt;30&gt;/ItemQuantity&lt;
  -    *   &gt;ItemQuantity Colour="Black"&lt;10&gt;/ItemQuantity&lt;
  +    *   &lt;ItemQuantity Colour="Red"&gt;100&lt;/ItemQuantity&gt;
  +    *   &lt;ItemQuantity Colour="Blue"&gt;30&lt;/ItemQuantity&gt;
  +    *   &lt;ItemQuantity Colour="Black"&gt;10&lt;/ItemQuantity&gt;
       * <pre>
       * <p/>
       * The following results could be expected:
  -    * <p/>
  +    * </p>
       * <pre>
       *    getTagContents(element, "Red", "ItemQuantity", "Colour"); // 100
       *    getTagContents(element, "Black", "ItemQuantity", "Colour"); // 10
  @@ -58,6 +75,7 @@
       * </pre>
       * <p/>
       * None of the parameters should be null - otherwise the method may throw a NullPointerException.
  +    * </p>
       *
       * @param elem          - element to search through.
       * @param value         - expected value to match against
  @@ -89,15 +107,15 @@
       * Retrieves the value of a given attribute for the first encountered instance of a tag in an element.
       * <p/>
       * E.g., if you have a {@link Element} which represents the following XML snippet:
  -    * <p/>
  +    * </p>
       * <pre>
  -    *   &gt;ItemQuantity Colour="Red"&lt;100&gt;/ItemQuantity&lt;
  -    *   &gt;ItemQuantity Colour="Blue"&lt;30&gt;/ItemQuantity&lt;
  -    *   &gt;ItemQuantity Colour="Black"&lt;10&gt;/ItemQuantity&lt;
  +    *   &lt;ItemQuantity Colour="Red"&gt;100&lt;/ItemQuantity&gt;
  +    *   &lt;ItemQuantity Colour="Blue"&gt;30&lt;/ItemQuantity&gt;
  +    *   &lt;ItemQuantity Colour="Black"&gt;10&lt;/ItemQuantity&gt;
       * <pre>
       * <p/>
       * The following results could be expected:
  -    * <p/>
  +    * </p>
       * <pre>
       *    getAttributeValue(element, "ItemQuantity", "Colour"); // "Red"
       *    getTagContents(element, "Blah", "Colour"); // null
  @@ -257,10 +275,10 @@
       * E.g., if you have a {@link Element} which represents the following XML snippet:
       * <p/>
       * <pre>
  -    *   &gt;props&lt;
  +    *   &lt;props&gt;
       *       my.attrib.1 = blah
       *       my.attrib.2 = blahblah
  -    *   &gt;/props&lt;
  +    *   &lt;/props&gt;
       * <pre>
       * <p/>
       * The following results could be expected:
  
  
  



More information about the jboss-cvs-commits mailing list