You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by cz...@apache.org on 2002/02/04 16:29:58 UTC
cvs commit: xml-cocoon2/src/java/org/apache/cocoon/transformation SQLTransformer.java
cziegeler 02/02/04 07:29:58
Modified: src/java/org/apache/cocoon/transformation
SQLTransformer.java
Log:
JavaDoc update
Revision Changes Path
1.4 +39 -15 xml-cocoon2/src/java/org/apache/cocoon/transformation/SQLTransformer.java
Index: SQLTransformer.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/transformation/SQLTransformer.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- SQLTransformer.java 4 Feb 2002 14:08:34 -0000 1.3
+++ SQLTransformer.java 4 Feb 2002 15:29:57 -0000 1.4
@@ -82,7 +82,7 @@
* @author <a href="mailto:giacomo.pati@pwr.ch">Giacomo Pati</a>
* (PWR Organisation & Entwicklung)
* @author <a href="mailto:sven.beauprez@the-ecorp.com">Sven Beauprez</a>
- * @version CVS $Id: SQLTransformer.java,v 1.3 2002/02/04 14:08:34 cziegeler Exp $
+ * @version CVS $Id: SQLTransformer.java,v 1.4 2002/02/04 15:29:57 cziegeler Exp $
*/
public class SQLTransformer extends AbstractTransformer implements Composable, Recyclable, Disposable, Configurable {
@@ -212,11 +212,13 @@
}
}
- /** BEGIN SitemapComponent methods **/
+ /**
+ * Setup for the current request
+ */
public void setup( SourceResolver resolver, Map objectModel,
String source, Parameters parameters )
- throws ProcessingException, SAXException, IOException {
+ throws ProcessingException, SAXException, IOException {
// setup instance variables
this.queries = new Vector();
this.current_value = new StringBuffer();
@@ -283,10 +285,6 @@
}
}
- /** END SitemapComponent methods **/
-
- /** BEGIN my very own methods **/
-
/**
* This will be the meat of SQLTransformer, where the query is run.
*/
@@ -655,10 +653,10 @@
}
/**
- Qualifies an element name by giving it a prefix.
- @param name the element name
- @param prefix the prefix to qualify with
- @return a namespace qualified name that is correct
+ * Qualifies an element name by giving it a prefix.
+ * @param name the element name
+ * @param prefix the prefix to qualify with
+ * @return a namespace qualified name that is correct
*/
protected String nsQualify( String name, String prefix ) {
if ( name == null || "".equals( name ) ) {
@@ -671,10 +669,9 @@
}
}
- /** END my very own methods **/
-
- /** BEGIN SAX ContentHandler handlers **/
-
+ /**
+ * ContentHandler method
+ */
public void startPrefixMapping( String prefix, String uri ) throws SAXException {
if ( uri.equals( my_uri ) ) {
inPrefix = prefix;
@@ -683,6 +680,9 @@
}
}
+ /**
+ * ContentHandler method
+ */
public void endPrefixMapping( String prefix ) throws SAXException {
if ( !prefix.equals( inPrefix ) ) {
super.contentHandler.endPrefixMapping( prefix );
@@ -690,6 +690,9 @@
}
+ /**
+ * ContentHandler method
+ */
public void setDocumentLocator( Locator locator ) {
if (getLogger().isDebugEnabled()) {
getLogger().debug( "PUBLIC ID: " + locator.getPublicId() );
@@ -699,6 +702,9 @@
super.contentHandler.setDocumentLocator( locator );
}
+ /**
+ * ContentHandler method
+ */
public void startElement( String uri, String name, String raw,
Attributes attributes ) throws SAXException {
if ( !uri.equals( my_uri ) ) {
@@ -726,6 +732,9 @@
}
}
+ /**
+ * ContentHandler method
+ */
public void endElement( String uri, String name,
String raw ) throws SAXException {
if ( !uri.equals( my_uri ) ) {
@@ -755,6 +764,9 @@
}
}
+ /**
+ * ContentHandler method
+ */
public void characters( char ary[], int start,
int length ) throws SAXException {
if ( current_state != SQLTransformer.STATE_INSIDE_VALUE_ELEMENT &&
@@ -767,19 +779,31 @@
current_value.append( ary, start, length );
}
+ /**
+ * Helper method for generating SAX events
+ */
private void attribute( AttributesImpl attr, String name, String value ) {
attr.addAttribute( outUri, name, nsQualify( name, outPrefix ), "CDATA", value );
}
+ /**
+ * Helper method for generating SAX events
+ */
private void start( String name, AttributesImpl attr ) throws SAXException {
super.contentHandler.startElement( outUri, name, nsQualify( name, outPrefix ), attr );
attr.clear();
}
+ /**
+ * Helper method for generating SAX events
+ */
private void end( String name ) throws SAXException {
super.contentHandler.endElement( outUri, name, nsQualify( name, outPrefix ) );
}
+ /**
+ * Helper method for generating SAX events
+ */
private void data( String data ) throws SAXException {
if ( data != null ) {
super.contentHandler.characters( data.toCharArray(), 0, data.length() );
----------------------------------------------------------------------
In case of troubles, e-mail: webmaster@xml.apache.org
To unsubscribe, e-mail: cocoon-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-cvs-help@xml.apache.org