org.modeldriven.fuml.xmi.stream
Class StreamNode
java.lang.Object
org.modeldriven.fuml.xmi.stream.StreamNode
- All Implemented Interfaces:
- XmiElement, XmiNode
public class StreamNode
- extends Object
- implements XmiNode
Encapsulates a set of related XML (stream) events. Stream events are objects
allocated by the StAX parser from the current stream and include element and
attribute as well as namespace and location information. The primary event
encapsulated is always a start-element event, but one of more 'characters'
events may be added if character data for the element is encountered in the
stream.
- Author:
- Scott Cinnamond
StreamNode
public StreamNode(XMLEvent startElement,
XmiNode parent,
StreamContext context)
StreamNode
public StreamNode(XMLEvent startElement,
StreamContext context)
getLocation
public Location getLocation()
getLocalName
public String getLocalName()
- Specified by:
getLocalName in interface XmiElement
getNamespaceURI
public String getNamespaceURI()
- Specified by:
getNamespaceURI in interface XmiElement
getPrefix
public String getPrefix()
- Specified by:
getPrefix in interface XmiElement
getData
public String getData()
- Specified by:
getData in interface XmiElement
getXmiType
public String getXmiType()
- Specified by:
getXmiType in interface XmiElement
hasAttribute
public boolean hasAttribute(QName name)
- Specified by:
hasAttribute in interface XmiNode
hasAttributes
public boolean hasAttributes()
getAttributes
public Iterator<Attribute> getAttributes()
getAttribute
public Attribute getAttribute(QName name)
getAttribute
public Attribute getAttribute(String name)
getAttributeValue
public String getAttributeValue(QName name)
- Specified by:
getAttributeValue in interface XmiNode
getAttributeValue
public String getAttributeValue(String name)
hasXmiType
public boolean hasXmiType()
- Specified by:
hasXmiType in interface XmiElement
getXmiId
public String getXmiId()
- Specified by:
getXmiId in interface XmiElement
getLineNumber
public int getLineNumber()
- Specified by:
getLineNumber in interface XmiNode
getColumnNumber
public int getColumnNumber()
- Specified by:
getColumnNumber in interface XmiNode
add
public void add(StreamNode node)
getParent
public XmiNode getParent()
setParent
public void setParent(XmiNode parent)
getNodes
public List<XmiNode> getNodes()
- Specified by:
getNodes in interface XmiNode
hasNodes
public boolean hasNodes()
- Specified by:
hasNodes in interface XmiNode
findChildByName
public XmiNode findChildByName(String name)
findChildById
public XmiNode findChildById(String id)
removeChild
public boolean removeChild(XmiNode child)
getStartElementEvent
public XMLEvent getStartElementEvent()
accept
public void accept(XmiNodeVisitor visitor)
- Specified by:
accept in interface XmiNode
getContext
public StreamContext getContext()
addCharactersEvent
public void addCharactersEvent(XMLEvent charactersEvent)
hasCharacters
public boolean hasCharacters()
- Specified by:
hasCharacters in interface XmiNode
isIgnored
public boolean isIgnored()
Copyright © 2012. All Rights Reserved.