org.sourceprojects.xmlparser
Interface TagDefinitionParser<B>

Type Parameters:
B - Type of ContextObject to use
All Known Implementing Classes:
AbstractTagParser

Deprecated. Use TagDefinitionParser instead

@Deprecated
public interface TagDefinitionParser<B>

Interface for TagDefinitionParsers to implement. Defines basic methods to handle parsing and transforming of XML elements.

Since:
0.0.1
Author:
noctarius

Method Summary
 String getNamespace()
          Deprecated. Returns the namespace URI this TagDefinitionParser implementation handles
 String[] getTags()
          Deprecated. Returns a string array with all tags handled by this TagDefinitionParser implementation
 void parseElement(Element element, ParserContext<B> parserContext, DefinitionBuilder definitionBuilder)
          Deprecated. Parses an element.
 void parseElement(Element element, String localName, ParserContext<B> parserContext, DefinitionBuilder definitionBuilder)
          Deprecated. Parses an element.
 void parseElement(Element element, String localName, QName parent, ParserContext<B> parserContext, DefinitionBuilder definitionBuilder)
          Deprecated. Parses an element.
 Node transformElement(Element element, ParserContext<B> parserContext, DefinitionBuilder definitionBuilder)
          Deprecated. Transforms an element.
 Node transformElement(Element element, String localName, ParserContext<B> parserContext, DefinitionBuilder definitionBuilder)
          Deprecated. Transforms an element.
 Node transformElement(Element element, String localName, QName parent, ParserContext<B> parserContext, DefinitionBuilder definitionBuilder)
          Deprecated. Transforms an element.
 

Method Detail

getNamespace

String getNamespace()
Deprecated. 
Returns the namespace URI this TagDefinitionParser implementation handles

Returns:
NamespaceURI

getTags

String[] getTags()
Deprecated. 
Returns a string array with all tags handled by this TagDefinitionParser implementation

Returns:
handled tags

parseElement

void parseElement(Element element,
                  ParserContext<B> parserContext,
                  DefinitionBuilder definitionBuilder)
                  throws XmlParserParsingException
Deprecated. 
Parses an element. Method is called if a element combination namespace-tag (optional with parent hierarchy) is found

Parameters:
element - Element which was found
parserContext - ParserContext instance which was given to the XmlParser instance
definitionBuilder - DefinitionBuilder instance which was given to the XmlParser instance
Throws:
XmlParserParsingException - Is thrown when some error occurs. Implementation specific exceptions are wrapped into XmlParserParsingException

parseElement

void parseElement(Element element,
                  String localName,
                  ParserContext<B> parserContext,
                  DefinitionBuilder definitionBuilder)
                  throws XmlParserParsingException
Deprecated. 
Parses an element. Method is called if a element combination namespace-tag (optional with parent hierarchy) is found

Parameters:
element - Element which was found
localName - Name, as String, of the actual element
parserContext - ParserContext instance which was given to the XmlParser instance
definitionBuilder - DefinitionBuilder instance which was given to the XmlParser instance
Throws:
XmlParserParsingException - Is thrown when some error occurs. Implementation specific exceptions are wrapped into XmlParserParsingException

parseElement

void parseElement(Element element,
                  String localName,
                  QName parent,
                  ParserContext<B> parserContext,
                  DefinitionBuilder definitionBuilder)
                  throws XmlParserParsingException
Deprecated. 
Parses an element. Method is called if a element combination namespace-tag (optional with parent hierarchy) is found

Parameters:
element - Element which was found
localName - Name, as String, of the actual element
parent - QName instance of the parent element, null if no parent-hierarchy was defined
parserContext - ParserContext instance which was given to the XmlParser instance
definitionBuilder - DefinitionBuilder instance which was given to the XmlParser instance
Throws:
XmlParserParsingException - Is thrown when some error occurs. Implementation specific exceptions are wrapped into XmlParserParsingException

transformElement

Node transformElement(Element element,
                      ParserContext<B> parserContext,
                      DefinitionBuilder definitionBuilder)
                      throws XmlParserParsingException
Deprecated. 
Transforms an element. Method is called if a element combination namespace-tag (optional with parent hierarchy) is found

Parameters:
element - Element which was found
parserContext - ParserContext instance which was given to the XmlParser instance
definitionBuilder - DefinitionBuilder instance which was given to the XmlParser instance
Returns:
Node of the transformed element (defined against DefinitionBuilder.getDocument() Document), null if element should be removed from returning Document
Throws:
XmlParserParsingException - Is thrown when some error occurs. Implementation specific exceptions are wrapped into XmlParserParsingException

transformElement

Node transformElement(Element element,
                      String localName,
                      ParserContext<B> parserContext,
                      DefinitionBuilder definitionBuilder)
                      throws XmlParserParsingException
Deprecated. 
Transforms an element. Method is called if a element combination namespace-tag (optional with parent hierarchy) is found

Parameters:
element - Element which was found
localName - Name, as String, of the actual element
parserContext - ParserContext instance which was given to the XmlParser instance
definitionBuilder - DefinitionBuilder instance which was given to the XmlParser instance
Returns:
Node of the transformed element (defined against DefinitionBuilder.getDocument() Document), null if element should be removed from returning Document
Throws:
XmlParserParsingException - Is thrown when some error occurs. Implementation specific exceptions are wrapped into XmlParserParsingException

transformElement

Node transformElement(Element element,
                      String localName,
                      QName parent,
                      ParserContext<B> parserContext,
                      DefinitionBuilder definitionBuilder)
                      throws XmlParserParsingException
Deprecated. 
Transforms an element. Method is called if a element combination namespace-tag (optional with parent hierarchy) is found

Parameters:
element - Element which was found
localName - Name, as String, of the actual element
parent - QName instance of the parent element, null if no parent-hierarchy was defined
parserContext - ParserContext instance which was given to the XmlParser instance
definitionBuilder - DefinitionBuilder instance which was given to the XmlParser instance
Returns:
Node of the transformed element (defined against DefinitionBuilder.getDocument() Document), null if element should be removed from returning Document
Throws:
XmlParserParsingException - Is thrown when some error occurs. Implementation specific exceptions are wrapped into XmlParserParsingException


Copyright © 2010. All Rights Reserved.