public class ParsedElement extends Object implements Serializable
| Constructor and Description |
|---|
ParsedElement(Map<IElementAttribute<?>,Object> attributeValues,
Map<IElementStructure<?>,List<ParsedElement>> children)
Construtor para elementos com filhos.
|
ParsedElement(Map<IElementAttribute<?>,Object> attributeValues,
String contentValue)
Construtor para elementos sem filhos.
|
| Modifier and Type | Method and Description |
|---|---|
void |
checkValues()
Verifica os valores dos atributos.
|
IElementAttribute<?> |
getAttribute(String name)
Obtém o atributo com o nome especificado.
|
Set<IElementAttribute<?>> |
getAttributes()
Obtém o conjunto de atributos.
|
<E> E |
getAttributeValue(String name)
Obtém o valor do atributo com o nome especificado.
|
Set<IElementStructure<?>> |
getChildren()
Obtém o conjunto de elementos filhos.
|
List<ParsedElement> |
getChildren(String name)
Obtém a lista de elementos-filhos com um determinado nome.
|
String |
getContentValue()
Obtém o valor lido do conteúdo do elemento.
|
boolean |
hasAttributeValue(String name)
Indica se o atributo foi definido.
|
boolean |
hasChildren(String name)
Verifica se existe algum elemento filho com um determinado nome.
|
public ParsedElement(Map<IElementAttribute<?>,Object> attributeValues, String contentValue) throws ParseException
attributeValues - mapa de valores dos atributos.contentValue - valor do conteúdo (aceita null).ParseException - em caso de erro.public ParsedElement(Map<IElementAttribute<?>,Object> attributeValues, Map<IElementStructure<?>,List<ParsedElement>> children) throws ParseException
attributeValues - mapa de valores dos atributos.children - lista de elementos-filhos.ParseException - em caso de erro.public String getContentValue()
public void checkValues()
throws ParseException
ParseException - em caso de erro nos valores.public boolean hasChildren(String name)
name - o nome do elemento filho.public List<ParsedElement> getChildren(String name)
name - o nome dos filhos.public <E> E getAttributeValue(String name)
E - o tipo do valor do atributo.name - o nome do atributo.public IElementAttribute<?> getAttribute(String name)
name - o nome do atributo.public Set<IElementStructure<?>> getChildren()
public Set<IElementAttribute<?>> getAttributes()
public boolean hasAttributeValue(String name)
name - o nome do atributo.Copyright © 2017. All rights reserved.