xmlBlaster 2.2.0 API

org.xmlBlaster.util
Class AttributeSaxFactory

java.lang.Object
  extended by org.xmlBlaster.util.SaxHandlerBase
      extended by org.xmlBlaster.util.AttributeSaxFactory
All Implemented Interfaces:
org.xml.sax.ContentHandler, org.xml.sax.ErrorHandler, org.xml.sax.ext.LexicalHandler

public class AttributeSaxFactory
extends SaxHandlerBase

This class parses an xml string to generate an Attribute which can be used either in PluginConfig or on the normal properties server- or clientside.

Author:
Michele Laghi, Marcel Ruff
See Also:
engine.runlevel requirement
  <action do='LOAD'
             onStartupRunlevel='3'
             sequence='5'
             onFail='RESOURCE_CONFIGURATION_PLUGINFAILED'/>
 

Field Summary
private  java.lang.String attributeKey
           
private  boolean attributeReplace
           
private  I_AttributeUser attributeUser
           
private  java.lang.StringBuffer attributeValue
           
private  boolean embeddedCDATA
           
private  XmlBlasterException ex
           
private  Global glob
           
private  boolean inAttribute
           
private static java.util.logging.Logger log
           
private  java.lang.String ME
           
private  int subTagCounter
           
private  boolean wrappedInCDATA
           
 
Fields inherited from class org.xmlBlaster.util.SaxHandlerBase
character, locator, xmlLiteral, xmlSource
 
Constructor Summary
AttributeSaxFactory(Global glob, I_AttributeUser attributeUser)
          Can be used as singleton.
 
Method Summary
 void characters(char[] ch, int start, int length)
          The characters to be filled
 void endElement(java.lang.String uri, java.lang.String localName, java.lang.String name)
          End element, event from SAX parser.
 java.lang.String getName()
          A human readable name of this factory
 boolean isInAttribute()
           
 void reset(I_AttributeUser attributeUser)
          resets the factory (to be invoked before parsing)
 void startCDATA()
          Report the start of a CDATA section.
 void startElement(java.lang.String uri, java.lang.String localName, java.lang.String name, org.xml.sax.Attributes attrs)
          Start element, event from SAX parser.
 
Methods inherited from class org.xmlBlaster.util.SaxHandlerBase
comment, endCDATA, endDocument, endDTD, endEntity, endPrefixMapping, error, fatalError, getUseLexicalHandler, ignorableWhitespace, init, init, init, notationDecl, processingInstruction, setDocumentLocator, setUseLexicalHandler, skippedEntity, startDocument, startDTD, startEntity, startPrefixMapping, toString, toXml, unparsedEntityDecl, warning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ME

private java.lang.String ME

glob

private final Global glob

log

private static java.util.logging.Logger log

ex

private XmlBlasterException ex

attributeUser

private I_AttributeUser attributeUser

attributeKey

private java.lang.String attributeKey

attributeReplace

private boolean attributeReplace

attributeValue

private java.lang.StringBuffer attributeValue

inAttribute

private boolean inAttribute

wrappedInCDATA

private boolean wrappedInCDATA

embeddedCDATA

private boolean embeddedCDATA

subTagCounter

private int subTagCounter
Constructor Detail

AttributeSaxFactory

public AttributeSaxFactory(Global glob,
                           I_AttributeUser attributeUser)
Can be used as singleton.

Method Detail

reset

public void reset(I_AttributeUser attributeUser)
resets the factory (to be invoked before parsing)


isInAttribute

public boolean isInAttribute()

startElement

public final void startElement(java.lang.String uri,
                               java.lang.String localName,
                               java.lang.String name,
                               org.xml.sax.Attributes attrs)
Start element, event from SAX parser.

Specified by:
startElement in interface org.xml.sax.ContentHandler
Overrides:
startElement in class SaxHandlerBase
Parameters:
name - Tag name
attrs - the attributes of the tag

startCDATA

public void startCDATA()
Description copied from class: SaxHandlerBase
Report the start of a CDATA section. (interface LexicalHandler)

Specified by:
startCDATA in interface org.xml.sax.ext.LexicalHandler
Overrides:
startCDATA in class SaxHandlerBase

characters

public void characters(char[] ch,
                       int start,
                       int length)
The characters to be filled

Specified by:
characters in interface org.xml.sax.ContentHandler
Overrides:
characters in class SaxHandlerBase

endElement

public void endElement(java.lang.String uri,
                       java.lang.String localName,
                       java.lang.String name)
End element, event from SAX parser.

Specified by:
endElement in interface org.xml.sax.ContentHandler
Overrides:
endElement in class SaxHandlerBase
Parameters:
name - Tag name

getName

public java.lang.String getName()
A human readable name of this factory

Returns:
"AttributeSaxFactory"

xmlBlaster 2.2.0 API

Copyright © 1999-2014 The xmlBlaster.org contributers.