Class PropertiesReadHandler
- java.lang.Object
- 
- org.pentaho.reporting.libraries.xmlns.parser.AbstractXmlReadHandler
- 
- org.pentaho.reporting.libraries.xmlns.parser.PropertiesReadHandler
 
 
- 
- All Implemented Interfaces:
- XmlReadHandler
 
 public class PropertiesReadHandler extends AbstractXmlReadHandler A read handler that creates property-structures (name-value-pairs) and returns the properties as java.util.Properties collection.- Author:
- Thomas Morgner
 
- 
- 
Constructor SummaryConstructors Constructor Description PropertiesReadHandler()Creates a properties read-handler using "property" as child-tagname.PropertiesReadHandler(String propertyTagName)Creates a properties read-handler using the specified propertyTagName as child-tagname.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddoneParsing()Done parsing.protected XmlReadHandlergetHandlerForChild(String uri, String tagName, Attributes atts)Returns the handler for a child element.ObjectgetObject()Returns the resulting properties collection, never null.protected ArrayList<PropertyReadHandler>getPropertyHandlers()protected StringgetPropertyTagName()PropertiesgetResult()Returns the resulting properties collection, never null.- 
Methods inherited from class org.pentaho.reporting.libraries.xmlns.parser.AbstractXmlReadHandlercharacters, deriveParseParameters, endElement, getLocator, getRootHandler, getTagName, getUri, init, isSameNamespace, performExternalParsing, performExternalParsing, startElement, startParsing
 
- 
 
- 
- 
- 
Constructor Detail- 
PropertiesReadHandlerpublic PropertiesReadHandler() Creates a properties read-handler using "property" as child-tagname.
 - 
PropertiesReadHandlerpublic PropertiesReadHandler(String propertyTagName) Creates a properties read-handler using the specified propertyTagName as child-tagname.- Parameters:
- propertyTagName- the tag name for the child elements that define the properties.
 
 
- 
 - 
Method Detail- 
getPropertyHandlersprotected ArrayList<PropertyReadHandler> getPropertyHandlers() 
 - 
getPropertyTagNameprotected String getPropertyTagName() 
 - 
getHandlerForChildprotected XmlReadHandler getHandlerForChild(String uri, String tagName, Attributes atts) throws SAXException Returns the handler for a child element.- Overrides:
- getHandlerForChildin class- AbstractXmlReadHandler
- Parameters:
- tagName- the tag name.
- atts- the attributes.
- uri- the URI of the namespace of the current element.
- Returns:
- the handler or null, if the tagname is invalid.
- Throws:
- SAXException- if there is a parsing error.
 
 - 
doneParsingprotected void doneParsing() throws SAXExceptionDone parsing.- Overrides:
- doneParsingin class- AbstractXmlReadHandler
- Throws:
- SAXException- if there is a parsing error.
 
 - 
getResultpublic Properties getResult() Returns the resulting properties collection, never null.- Returns:
- the properties.
 
 - 
getObjectpublic Object getObject() throws SAXException Returns the resulting properties collection, never null.- Returns:
- the properties.
- Throws:
- SAXException- if there is a parsing error.
 
 
- 
 
-