com.uppaal.model.io2
Class XTAWriter

java.lang.Object
  extended by com.uppaal.model.core2.AbstractVisitor
      extended by com.uppaal.model.io2.XTAWriter
All Implemented Interfaces:
Visitor

public class XTAWriter
extends AbstractVisitor

A class that facilitates writing .xta from a Document.

Implemented via the visitor pattern.


Field Summary
protected  int level
           
protected  Map<Element,String> names
           
protected  Writer writer
           
 
Constructor Summary
XTAWriter(OutputStream stream)
           
 
Method Summary
 UGIWriter createUGIWriter(OutputStream stream)
          Create and return a new UGI writer.
protected  boolean hasFlag(Element element, String property)
           
protected  boolean isEmpty(String str)
           
 void visitDocument(Document document)
           
 void visitTemplate(AbstractTemplate template)
           
protected  void writeNonEmptyProperty(Element element, String name)
           
protected  void writeNonEmptyProperty(Element element, String name, String format)
           
 
Methods inherited from class com.uppaal.model.core2.AbstractVisitor
visitBranchPoint, visitCondition, visitCut, visitEdge, visitElement, visitInstanceLine, visitLocation, visitMessage, visitNail, visitNode, visitPrechart, visitProperty, visitUpdate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

names

protected Map<Element,String> names

writer

protected Writer writer

level

protected int level
Constructor Detail

XTAWriter

public XTAWriter(OutputStream stream)
Method Detail

createUGIWriter

public UGIWriter createUGIWriter(OutputStream stream)
Create and return a new UGI writer.


isEmpty

protected boolean isEmpty(String str)

hasFlag

protected boolean hasFlag(Element element,
                          String property)

writeNonEmptyProperty

protected void writeNonEmptyProperty(Element element,
                                     String name,
                                     String format)
                              throws IOException
Throws:
IOException

writeNonEmptyProperty

protected void writeNonEmptyProperty(Element element,
                                     String name)
                              throws IOException
Throws:
IOException

visitDocument

public void visitDocument(Document document)
                   throws Exception
Specified by:
visitDocument in interface Visitor
Overrides:
visitDocument in class AbstractVisitor
Throws:
Exception

visitTemplate

public void visitTemplate(AbstractTemplate template)
                   throws Exception
Specified by:
visitTemplate in interface Visitor
Overrides:
visitTemplate in class AbstractVisitor
Throws:
Exception


Copyright © 2012 Uppsala University and Aalborg University. All Rights Reserved.