Author: painter
Date: Tue Nov 6 18:12:34 2018
New Revision: 1845949
URL: http://svn.apache.org/viewvc?rev=1845949&view=rev
Log:
JavaDoc cleanup
Removed:
turbine/fulcrum/trunk/xslt/project.properties
turbine/fulcrum/trunk/xslt/project.xml
Modified:
turbine/fulcrum/trunk/xslt/src/java/org/apache/fulcrum/xslt/DefaultXSLTService.java
turbine/fulcrum/trunk/xslt/src/java/org/apache/fulcrum/xslt/XSLTService.java
turbine/fulcrum/trunk/xslt/src/java/org/apache/fulcrum/xslt/XSLTServiceFacade.java
Modified:
turbine/fulcrum/trunk/xslt/src/java/org/apache/fulcrum/xslt/DefaultXSLTService.java
URL:
http://svn.apache.org/viewvc/turbine/fulcrum/trunk/xslt/src/java/org/apache/fulcrum/xslt/DefaultXSLTService.java?rev=1845949&r1=1845948&r2=1845949&view=diff
==============================================================================
---
turbine/fulcrum/trunk/xslt/src/java/org/apache/fulcrum/xslt/DefaultXSLTService.java
(original)
+++
turbine/fulcrum/trunk/xslt/src/java/org/apache/fulcrum/xslt/DefaultXSLTService.java
Tue Nov 6 18:12:34 2018
@@ -25,9 +25,11 @@ import java.io.Writer;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Hashtable;
-import java.util.Iterator;
import java.util.Map;
+import java.util.Map.Entry;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.transform.Result;
import javax.xml.transform.Source;
import javax.xml.transform.Templates;
@@ -36,8 +38,6 @@ import javax.xml.transform.TransformerFa
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.stream.StreamSource;
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
import org.apache.avalon.framework.activity.Initializable;
import org.apache.avalon.framework.configuration.Configurable;
@@ -49,8 +49,8 @@ import org.apache.avalon.framework.conte
import org.apache.avalon.framework.logger.AbstractLogEnabled;
import org.apache.avalon.framework.service.ServiceManager;
import org.apache.avalon.framework.service.Serviceable;
-import org.w3c.dom.Node;
import org.w3c.dom.Document;
+import org.w3c.dom.Node;
/**
* Implementation of the Turbine XSLT Service. It transforms xml with a given
@@ -84,7 +84,7 @@ public class DefaultXSLTService extends
/**
* Cache of compiled Templates.
*/
- protected Hashtable cache = new Hashtable();
+ protected Hashtable<URL, Templates> cache = new Hashtable<URL,
Templates>();
protected final static String STYLESHEET_PATH = "path";
@@ -188,7 +188,7 @@ public class DefaultXSLTService extends
}
}
- protected void transform(String xslName, Source xmlin, Result xmlout, Map
params)
+ protected void transform(String xslName, Source xmlin, Result xmlout,
Map<?, ?> params)
throws Exception
{
try
@@ -198,9 +198,8 @@ public class DefaultXSLTService extends
if (params != null)
{
- for (Iterator it = params.entrySet().iterator(); it.hasNext();
)
- {
- Map.Entry entry = (Map.Entry) it.next();
+ for ( Entry<?, ?> entry : params.entrySet() )
+ {
transformer.setParameter(String.valueOf(entry.getKey()),
entry.getValue());
}
}
@@ -304,7 +303,7 @@ public class DefaultXSLTService extends
* @param params
* A set of parameters that will be forwarded to the XSLT
*/
- public void transform(String xslName, Reader in, Writer out, Map params)
+ public void transform(String xslName, Reader in, Writer out, Map<?, ?>
params)
throws Exception
{
Source xmlin = new StreamSource(in);
@@ -323,7 +322,7 @@ public class DefaultXSLTService extends
* @param params
* A set of parameters that will be forwarded to the XSLT
*/
- public String transform(String xslName, Reader in, Map params)
+ public String transform(String xslName, Reader in, Map<?, ?> params)
throws Exception
{
StringWriter sw = new StringWriter();
@@ -344,7 +343,7 @@ public class DefaultXSLTService extends
* @param params
* A set of parameters that will be forwarded to the XSLT
*/
- public void transform(String xslName, Node in, Writer out, Map params)
+ public void transform(String xslName, Node in, Writer out, Map<?, ?>
params)
throws Exception
{
Source xmlin = new DOMSource(in);
@@ -363,7 +362,7 @@ public class DefaultXSLTService extends
* @param params
* A set of parameters that will be forwarded to the XSLT
*/
- public String transform(String xslName, Node in, Map params)
+ public String transform(String xslName, Node in, Map<?, ?> params)
throws Exception
{
StringWriter sw = new StringWriter();
@@ -379,7 +378,7 @@ public class DefaultXSLTService extends
* @return the transformed output
* @throws Exception the transformation failed
*/
- public String transform(String xslName, Map params) throws Exception {
+ public String transform(String xslName, Map<?, ?> params) throws Exception
{
StringWriter sw = new StringWriter();
transform(xslName, sw, params);
@@ -394,7 +393,7 @@ public class DefaultXSLTService extends
* @param params A set of parameters that will be forwarded to the XSLT
* @throws Exception the transformation failed
*/
- public void transform(String xslName, Writer out, Map params) throws
Exception {
+ public void transform(String xslName, Writer out, Map<?, ?> params) throws
Exception {
DocumentBuilderFactory documentBuilderFactory =
DocumentBuilderFactory.newInstance();
DocumentBuilder documentBuilder =
documentBuilderFactory.newDocumentBuilder();
Modified:
turbine/fulcrum/trunk/xslt/src/java/org/apache/fulcrum/xslt/XSLTService.java
URL:
http://svn.apache.org/viewvc/turbine/fulcrum/trunk/xslt/src/java/org/apache/fulcrum/xslt/XSLTService.java?rev=1845949&r1=1845948&r2=1845949&view=diff
==============================================================================
---
turbine/fulcrum/trunk/xslt/src/java/org/apache/fulcrum/xslt/XSLTService.java
(original)
+++
turbine/fulcrum/trunk/xslt/src/java/org/apache/fulcrum/xslt/XSLTService.java
Tue Nov 6 18:12:34 2018
@@ -91,7 +91,7 @@ public interface XSLTService
* @param params A set of parameters that will be forwarded to the XSLT
* @throws Exception the transformation failed
*/
- void transform(String xslName, Reader in, Writer out, Map params) throws
Exception;
+ void transform(String xslName, Reader in, Writer out, Map<?, ?> params)
throws Exception;
/**
* Uses an xsl file to transform xml input from a reader and returns a
@@ -103,7 +103,7 @@ public interface XSLTService
* @return the transformed output
* @throws Exception the transformation failed
*/
- String transform(String xslName, Reader in, Map params) throws Exception;
+ String transform(String xslName, Reader in, Map<?, ?> params) throws
Exception;
/**
* Uses an xsl file to transform xml input from a DOM note and writes the
@@ -115,7 +115,7 @@ public interface XSLTService
* @param params A set of parameters that will be forwarded to the XSLT
* @throws Exception the transformation failed
*/
- void transform(String xslName, Node in, Writer out, Map params) throws
Exception;
+ void transform(String xslName, Node in, Writer out, Map<?, ?> params)
throws Exception;
/**
* Uses an xsl file to transform xml input from a DOM note and returns a
@@ -127,7 +127,7 @@ public interface XSLTService
* @return the transformed output
* @throws Exception the transformation failed
*/
- String transform(String xslName, Node in, Map params) throws Exception;
+ String transform(String xslName, Node in, Map<?, ?> params) throws
Exception;
/**
* Uses an xsl file without any xml input.
@@ -137,7 +137,7 @@ public interface XSLTService
* @return the transformed output
* @throws Exception the transformation failed
*/
- String transform(String xslName, Map params) throws Exception;
+ String transform(String xslName, Map<?, ?> params) throws Exception;
/**
* Uses an xsl file without any xml input.
@@ -145,9 +145,8 @@ public interface XSLTService
* @param xslName The name of the file that contains the xsl stylesheet
* @param out The writer for the transformed output.
* @param params A set of parameters that will be forwarded to the XSLT
- * @return the transformed output
* @throws Exception the transformation failed
*/
- void transform(String xslName, Writer out, Map params) throws Exception;
+ void transform(String xslName, Writer out, Map<?, ?> params) throws
Exception;
}
Modified:
turbine/fulcrum/trunk/xslt/src/java/org/apache/fulcrum/xslt/XSLTServiceFacade.java
URL:
http://svn.apache.org/viewvc/turbine/fulcrum/trunk/xslt/src/java/org/apache/fulcrum/xslt/XSLTServiceFacade.java?rev=1845949&r1=1845948&r2=1845949&view=diff
==============================================================================
---
turbine/fulcrum/trunk/xslt/src/java/org/apache/fulcrum/xslt/XSLTServiceFacade.java
(original)
+++
turbine/fulcrum/trunk/xslt/src/java/org/apache/fulcrum/xslt/XSLTServiceFacade.java
Tue Nov 6 18:12:34 2018
@@ -124,7 +124,7 @@ public class XSLTServiceFacade
* @param params A set of parameters that will be forwarded to the XSLT
* @throws Exception the transformation failed
*/
- void transform(String xslName, Reader in, Writer out, Map params) throws
Exception
+ void transform(String xslName, Reader in, Writer out, Map<?, ?> params)
throws Exception
{
getService().transform(xslName, in, out, params);
}
@@ -139,7 +139,7 @@ public class XSLTServiceFacade
* @return the transformed output
* @throws Exception the transformation failed
*/
- String transform(String xslName, Reader in, Map params) throws Exception
+ String transform(String xslName, Reader in, Map<?, ?> params) throws
Exception
{
return getService().transform(xslName, in, params);
}
@@ -154,7 +154,7 @@ public class XSLTServiceFacade
* @param params A set of parameters that will be forwarded to the XSLT
* @throws Exception the transformation failed
*/
- void transform(String xslName, Node in, Writer out, Map params) throws
Exception
+ void transform(String xslName, Node in, Writer out, Map<?, ?> params)
throws Exception
{
getService().transform(xslName, in, out, params);
}
@@ -169,7 +169,7 @@ public class XSLTServiceFacade
* @return the transformed output
* @throws Exception the transformation failed
*/
- String transform(String xslName, Node in, Map params) throws Exception
+ String transform(String xslName, Node in, Map<?, ?> params) throws
Exception
{
return getService().transform(xslName, in, params);
}
@@ -182,7 +182,7 @@ public class XSLTServiceFacade
* @return the transformed output
* @throws Exception the transformation failed
*/
- public String transform(String xslName, Map params) throws Exception {
+ public String transform(String xslName, Map<?, ?> params) throws Exception
{
return getService().transform(xslName, params);
}
@@ -194,7 +194,7 @@ public class XSLTServiceFacade
* @param params A set of parameters that will be forwarded to the XSLT
* @throws Exception the transformation failed
*/
- public void transform(String xslName, Writer out, Map params) throws
Exception {
+ public void transform(String xslName, Writer out, Map<?, ?> params) throws
Exception {
getService().transform(xslName, out, params);
}
}