org.modeldriven.fuml.xmi.stream
Class StreamReader

java.lang.Object
  extended by org.modeldriven.fuml.xmi.stream.StreamReader
All Implemented Interfaces:
XmiReader

public class StreamReader
extends Object
implements XmiReader

Stream based XmiReader implementation utilizing the StAX parser. For more information on the StAX parser, see the package-level documentation. Only start-element, end-element and character(s) events are processed, other events being ignored. Certain start-element events are also ignored based on namespace-sensitive configuration information. Events of interest are allocated from the stream into immutable nodes and arranged into a hierarchy for ease of processing by interested clients. Clients are notified using a standard event-listener pattern. NOTE: event queues are not currently used to asynchronously publish events, as clients are intended to completely process relevant portions of the stream freeing or "clipping" any and all possible allocated nodes from the hierarchy for garbage collection.

Author:
Scott Cinnamond

Constructor Summary
StreamReader()
           
 
Method Summary
 void addStreamNodeListener(StreamNodeListener listener)
           
static String getEventTypeString(int eventType)
          Returns the String representation of the given integer constant.
 Collection read(InputStream stream)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StreamReader

public StreamReader()
Method Detail

read

public Collection read(InputStream stream)
Specified by:
read in interface XmiReader

getEventTypeString

public static final String getEventTypeString(int eventType)
Returns the String representation of the given integer constant.

Parameters:
eventType - Type of event.
Returns:
String representation of the event

addStreamNodeListener

public void addStreamNodeListener(StreamNodeListener listener)


Copyright © 2012. All Rights Reserved.