Class XmlSourceFormat
java.lang.Object
org.apache.torque.generator.source.stream.XmlSourceFormat
- All Implemented Interfaces:
StreamSourceFormat
The source type representing an XML source.
$Id: XmlSourceFormat.java 1917241 2024-04-21 13:29:41Z tv $
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanChecks whether other is equal to this instance.Gets the filename extension this source type typically has.getKey()Returns an unique key for the source type.inthashCode()Returns a hash code of this instance consistent with equals..parse(InputStream xmlStream, ControllerState controllerState) Parses a stream containing xml data and creates a source element hierarchy from it.toString()
-
Constructor Details
-
XmlSourceFormat
public XmlSourceFormat()
-
-
Method Details
-
getKey
Returns an unique key for the source type.- Specified by:
getKeyin interfaceStreamSourceFormat- Returns:
- "xml".
-
getFilenameExtension
Gets the filename extension this source type typically has.- Specified by:
getFilenameExtensionin interfaceStreamSourceFormat- Returns:
- "xml".
-
parse
public SourceElement parse(InputStream xmlStream, ControllerState controllerState) throws SourceException Parses a stream containing xml data and creates a source element hierarchy from it.- Specified by:
parsein interfaceStreamSourceFormat- Parameters:
xmlStream- the stream containing the xml data, not null.controllerState- the controller state, not null.- Returns:
- the root element of the created hierarchy.
- Throws:
SourceException- if an error occurs reading the input stream, parsing the XML data or if the SAX parser is not configured correctly.
-
hashCode
public int hashCode()Returns a hash code of this instance consistent with equals.. As all instances of this class are equal to each other, the hash code is always the same. -
equals
Checks whether other is equal to this instance. All instances of this class are equal to each other. -
toString
-