org.modeldriven.fuml.xmi.stream
Class StreamNode

java.lang.Object
  extended by 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

Constructor Summary
StreamNode(XMLEvent startElement, StreamContext context)
           
StreamNode(XMLEvent startElement, XmiNode parent, StreamContext context)
           
 
Method Summary
 void accept(XmiNodeVisitor visitor)
           
 void add(StreamNode node)
           
 void addCharactersEvent(XMLEvent charactersEvent)
           
 XmiNode findChildById(String id)
           
 XmiNode findChildByName(String name)
           
 Attribute getAttribute(QName name)
           
 Attribute getAttribute(String name)
           
 Iterator<Attribute> getAttributes()
           
 String getAttributeValue(QName name)
           
 String getAttributeValue(String name)
           
 int getColumnNumber()
           
 StreamContext getContext()
           
 String getData()
           
 int getLineNumber()
           
 String getLocalName()
           
 Location getLocation()
           
 String getNamespaceURI()
           
 List<XmiNode> getNodes()
           
 XmiNode getParent()
           
 String getPrefix()
           
 XMLEvent getStartElementEvent()
           
 String getXmiId()
           
 String getXmiType()
           
 boolean hasAttribute(QName name)
           
 boolean hasAttributes()
           
 boolean hasCharacters()
           
 boolean hasNodes()
           
 boolean hasXmiType()
           
 boolean isIgnored()
           
 boolean removeChild(XmiNode child)
           
 void setParent(XmiNode parent)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StreamNode

public StreamNode(XMLEvent startElement,
                  XmiNode parent,
                  StreamContext context)

StreamNode

public StreamNode(XMLEvent startElement,
                  StreamContext context)
Method Detail

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.