cz.cuni.mff.ksi.jinfer.base.objects.nodes
Class Element
java.lang.Object
cz.cuni.mff.ksi.jinfer.base.objects.nodes.AbstractNamedNode
cz.cuni.mff.ksi.jinfer.base.objects.nodes.AbstractStructuralNode
cz.cuni.mff.ksi.jinfer.base.objects.nodes.Element
- All Implemented Interfaces:
- NamedNode, StructuralNode
public class Element
- extends AbstractStructuralNode
Class representing a XML element.
Element
public Element(List<String> context,
String name,
Map<String,Object> metadata,
Regexp<AbstractStructuralNode> subnodes,
List<Attribute> attributes)
- Create immutable element given all members.
- Parameters:
context
- context of the element in document (if any)name
- name of the nodemetadata
- any metadata associated with the nodesubnodes
- regular expression representing subnodes of the element (content model)attributes
- attributes of the element
getMutable
public static Element getMutable()
- Standard method of obtaining empty mutable element.
Be sure to set all members properly before using the element or calling
setImmutable()
.
- Returns:
- new Element with empty fields, which is mutable
getType
public StructuralNodeType getType()
- Specified by:
getType
in interface StructuralNode
- Specified by:
getType
in class AbstractStructuralNode
- Returns:
- enum value of type of actual instance.
getSubnodes
public Regexp<AbstractStructuralNode> getSubnodes()
- Get the subnodes regexp.
- Returns:
- subnodes
getAttributes
public List<Attribute> getAttributes()
- Get all attributes of element
- Returns:
- list of attributes
setImmutable
public void setImmutable()
- Description copied from class:
AbstractNamedNode
- Set object to immutable mode (cannot be changed back to mutable).
Lock the node for changing.
- Overrides:
setImmutable
in class AbstractNamedNode
toString
public String toString()
- Overrides:
toString
in class AbstractStructuralNode
Generated on Fri Dec 9 00:01:25 CET 2011