cz.cuni.mff.ksi.jinfer.base.objects.nodes
Class AbstractStructuralNode
java.lang.Object
cz.cuni.mff.ksi.jinfer.base.objects.nodes.AbstractNamedNode
cz.cuni.mff.ksi.jinfer.base.objects.nodes.AbstractStructuralNode
- All Implemented Interfaces:
- NamedNode, StructuralNode
- Direct Known Subclasses:
- Element, SimpleData
public abstract class AbstractStructuralNode
- extends AbstractNamedNode
- implements StructuralNode
Class representing a XML node (rule in grammar): element and text node.
AbstractStructuralNode
protected AbstractStructuralNode(List<String> context,
String name,
Map<String,Object> metadata,
boolean mutable)
- Create new structural node given all members.
- Parameters:
context
- context of the node in document (if any)name
- name of the nodemetadata
- any metadata associated with nodemutable
- whether node is to be created as mutable
AbstractStructuralNode
protected AbstractStructuralNode(List<String> context,
String name,
Map<String,Object> metadata)
- Create new immutable structural node.
- Parameters:
context
- context of the node in document (if any)name
- name of the nodemetadata
- any metadata associated with node
getType
public abstract StructuralNodeType getType()
- Specified by:
getType
in interface StructuralNode
- Returns:
- enum value of type of actual instance.
isElement
public boolean isElement()
- Specified by:
isElement
in interface StructuralNode
- Returns:
- true if node type is element.
isSimpleData
public boolean isSimpleData()
- Specified by:
isSimpleData
in interface StructuralNode
- Returns:
- true if node type is simple data.
toString
public String toString()
- Overrides:
toString
in class AbstractNamedNode
Generated on Fri Dec 9 00:01:25 CET 2011