dlr         02/01/15 02:49:15

  Modified:    src/java/org/apache/stratum/xo Mapper.java
  Log:
  Improved JavaDoc for map() instance methods.
  
  Revision  Changes    Path
  1.8       +18 -10    
jakarta-turbine-stratum/src/java/org/apache/stratum/xo/Mapper.java
  
  Index: Mapper.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-turbine-stratum/src/java/org/apache/stratum/xo/Mapper.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -u -r1.7 -r1.8
  --- Mapper.java       15 Jan 2002 05:05:46 -0000      1.7
  +++ Mapper.java       15 Jan 2002 10:49:15 -0000      1.8
  @@ -139,7 +139,7 @@
    *
    * @author <a href="mailto:[EMAIL PROTECTED]";>Jason van Zyl</a>
    * @author <a href="mailto:[EMAIL PROTECTED]";>Daniel Rall</a>
  - * @version $Id: Mapper.java,v 1.7 2002/01/15 05:05:46 jvanzyl Exp $
  + * @version $Id: Mapper.java,v 1.8 2002/01/15 10:49:15 dlr Exp $
    */
   
   // How to use the resources package to pull in the
  @@ -227,22 +227,30 @@
           introspector.clearCache();
       }
   
  -    public Object map(File file, String beanClass)
  +    /**
  +     * Loads a XML document (first trying the classpath, then the file
  +     * system), maps it to an instance of the JavaBean
  +     * <code>beanClass</code>, and returns the instance.
  +     *
  +     * @param xmlInput The path (either classpath resource or file
  +     * system) to the XML data file to process.
  +     * @see #map(InputStream, String)
  +     */
  +    public Object map(File xmlInput, String beanClass)
           throws Exception
       {
           // Get the base directory
           basePath = FileUtils.dirname(file.getAbsolutePath());
           
  -        return map(new FileInputStream(file), beanClass);
  +        return map(new FileInputStream(xmlInput), beanClass);
       }
   
       /**
  -     * Loads a XML document (first trying the classpath, then the file
  -     * system), maps it to an instance of the JavaBean
  -     * <code>beanClass</code>, and returns the instance.
  +     * Loads a XML document from <code>xmlInput</code>, maps it to an
  +     * instance of the JavaBean <code>beanClass</code>, and returns
  +     * the instance.
        *
  -     * @param source The path (either classpath resource or file
  -     * system) to the XML data file.
  +     * @param xmlInput A stream of the XML data to process.
        * @param beanClass The fully qualified class name of the parent
        * bean, or <code>null</code> to read it from the
        * <code>className</code> attribute of the first <code>Node</code>
  @@ -250,11 +258,11 @@
        * @return The fleshed-out instance of <code>beanClass</code>.
        * @exception DocumentException If the buildprocess fails.
        */
  -    public Object map(InputStream inputStream, String beanClass)
  +    public Object map(InputStream xmlInput, String beanClass)
           throws Exception 
       {
           SAXReader xmlReader = new SAXReader();
  -        document = xmlReader.read(inputStream);
  +        document = xmlReader.read(xmlInput);
   
           // Assure we have the beanClass
           Element rootElement = document.getRootElement();
  
  
  

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to