E - the type of the objects to providepublic abstract class AbstractXMLElementParser<E> extends Object implements XMLElementParser<E>
XMLElementParser interface.
Created: 05.12.2010 10:46:38| Modifier and Type | Field and Description |
|---|---|
protected String |
elementName |
protected org.slf4j.Logger |
logger |
protected Set<String> |
optionalAttributes |
protected Set<String> |
requiredAttributes |
protected Set<Class<?>> |
supportedParentTypes |
| Constructor and Description |
|---|
AbstractXMLElementParser(String elementName,
Set<String> requiredAttributes,
Set<String> optionalAttributes,
Class<?>... supportedParentTypes) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
assertAtLeastOneAttributeIsSet(Element element,
String... attributeNames) |
protected void |
assertAttributeIsNotSet(Element element,
String attributeName) |
protected void |
assertAttributeIsSet(Element element,
String attributeName) |
protected void |
assertElementName(String expectedName,
Element element) |
protected void |
checkAttributes(Element element,
Set<String> supportedAttributes) |
protected void |
checkAttributeSupport(Element element) |
protected void |
checkSupportedAttributes(Element element,
String... supportedAttributes) |
protected static org.databene.commons.SyntaxError |
createSyntaxError(String message,
Element element) |
protected static org.databene.commons.SyntaxError |
createSyntaxError(String message,
Element element,
Exception cause) |
protected abstract E |
doParse(Element element,
E[] parentPath,
ParseContext<E> context) |
protected void |
excludeAttributes(Element element,
String... attributeNames) |
protected String |
getOptionalAttribute(String name,
Element element) |
String |
getRequiredAttribute(String name,
Element element) |
protected Object |
parent(E[] parentPath) |
E |
parse(Element element,
E[] parentPath,
ParseContext<E> context) |
protected Boolean |
parseOptionalBoolean(String attributeName,
Element element) |
protected Integer |
parseOptionalInteger(String attributeName,
Element element) |
protected Long |
parseOptionalLong(String attributeName,
Element element) |
protected String |
parseOptionalName(Element element) |
protected String |
parseRequiredName(Element element) |
boolean |
supports(Element element,
E[] parentPath) |
protected static void |
syntaxError(String message,
Element element) |
protected void |
syntaxWarning(String message,
Element element) |
protected final org.slf4j.Logger logger
protected final String elementName
public boolean supports(Element element, E[] parentPath)
supports in interface XMLElementParser<E>public final E parse(Element element, E[] parentPath, ParseContext<E> context)
parse in interface XMLElementParser<E>protected abstract E doParse(Element element, E[] parentPath, ParseContext<E> context)
protected void checkAttributeSupport(Element element)
protected void checkSupportedAttributes(Element element, String... supportedAttributes)
protected void assertAtLeastOneAttributeIsSet(Element element, String... attributeNames)
protected void assertAttributeIsNotSet(Element element, String attributeName)
protected static org.databene.commons.SyntaxError createSyntaxError(String message, Element element)
protected static org.databene.commons.SyntaxError createSyntaxError(String message, Element element, Exception cause)
Copyright © 2006–2016 Volker Bergmann. All rights reserved.