public class XMLWriter extends AbstractVisitor
| Modifier and Type | Field and Description |
|---|---|
protected int |
counter |
protected String |
init |
protected Map<InstanceLine,String> |
instances |
protected Map<AbstractLocation,String> |
locations |
protected XMLStreamWriter |
writer |
| Constructor and Description |
|---|
XMLWriter(OutputStream stream)
Constructor
|
XMLWriter(Writer writer)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
hasFlag(Element element,
String property)
Has the element flag
|
protected void |
indent()
Write text to the output
|
void |
visitBranchPoint(BranchPoint branchPoint)
Visitor of the branch point, tag 'branchpoint'
|
void |
visitCondition(Condition condition)
Visitor of the condition, tag 'condition'
|
void |
visitDocument(Document document)
Visitor of the document
|
void |
visitEdge(Edge edge)
Visitor of the edge, tag 'transition'
|
void |
visitInstanceLine(InstanceLine instance)
Visitor of the instanceLine, tag 'instance'
|
void |
visitLocation(Location location)
Visitor of the location
|
void |
visitMessage(Message message)
Visitor of the message, tag 'message'
|
void |
visitNail(Nail nail)
Visitor of the nail, tag 'nail'
|
void |
visitPrechart(Prechart prechart)
Visitor of the preChart, tag 'prechart'
|
void |
visitQueries(QueryList queries)
Visitor of the queries, tag 'queries'
|
void |
visitQuery(Query query)
Visitor of the query, tag 'query'
|
void |
visitTemplate(AbstractTemplate template)
Visitor of the template
|
void |
visitUpdate(Update update)
Visitor of the update, tag 'update'
|
protected void |
writeAttributes(Element element)
Write the attributes
|
protected void |
writeFlag(Element element,
String property)
Write the flag
|
protected void |
writePropertyAsElement(Element element,
String property,
boolean optional)
Write property as the xml element
|
protected void |
writePropertyAsLabel(Element element,
String name)
Write the property label, tag 'label' and the attribute 'kind', tag 'kind'
|
visitCut, visitElement, visitNode, visitPropertyprotected int counter
protected XMLStreamWriter writer
protected Map<AbstractLocation,String> locations
protected Map<InstanceLine,String> instances
protected String init
public XMLWriter(OutputStream stream) throws XMLStreamException
stream - - The output streamXMLStreamExceptionpublic XMLWriter(Writer writer) throws XMLStreamException
writer - - The java xml writerXMLStreamExceptionprotected void indent()
throws XMLStreamException
XMLStreamExceptionprotected void writePropertyAsElement(Element element, String property, boolean optional) throws XMLStreamException
element - - The elementproperty - - The propery stringoptional - - The optional valueXMLStreamExceptionprotected void writePropertyAsLabel(Element element, String name) throws XMLStreamException
element - - The elementname - - The property nameXMLStreamExceptionprotected void writeAttributes(Element element) throws XMLStreamException
element - - The elementXMLStreamExceptionprotected boolean hasFlag(Element element, String property)
element - - The elementproperty - - The propertyprotected void writeFlag(Element element, String property) throws XMLStreamException
element - - The element objectproperty - - The propertyXMLStreamExceptionpublic void visitDocument(Document document) throws Exception
visitDocument in interface VisitorvisitDocument in class AbstractVisitordocument - - The model documentExceptionpublic void visitTemplate(AbstractTemplate template) throws Exception
visitTemplate in interface VisitorvisitTemplate in class AbstractVisitortemplate - - The abstract templateExceptionpublic void visitLocation(Location location) throws Exception
visitLocation in interface VisitorvisitLocation in class AbstractVisitorlocation - - The locationExceptionpublic void visitBranchPoint(BranchPoint branchPoint) throws Exception
visitBranchPoint in interface VisitorvisitBranchPoint in class AbstractVisitorbranchPoint - - The branchPointExceptionpublic void visitEdge(Edge edge) throws Exception
visitEdge in interface VisitorvisitEdge in class AbstractVisitoredge - - The edgeExceptionpublic void visitNail(Nail nail) throws Exception
visitNail in interface VisitorvisitNail in class AbstractVisitornail - - The nailExceptionpublic void visitInstanceLine(InstanceLine instance) throws Exception
visitInstanceLine in interface VisitorvisitInstanceLine in class AbstractVisitorinstance - - The instanceLineExceptionpublic void visitPrechart(Prechart prechart) throws Exception
visitPrechart in interface VisitorvisitPrechart in class AbstractVisitorprechart - - The prechartExceptionpublic void visitMessage(Message message) throws Exception
visitMessage in interface VisitorvisitMessage in class AbstractVisitormessage - - The messageExceptionpublic void visitCondition(Condition condition) throws Exception
visitCondition in interface VisitorvisitCondition in class AbstractVisitorcondition - - The conditionExceptionpublic void visitUpdate(Update update) throws Exception
visitUpdate in interface VisitorvisitUpdate in class AbstractVisitorupdate - - The updateExceptionpublic void visitQueries(QueryList queries) throws Exception
visitQueries in interface VisitorvisitQueries in class AbstractVisitorqueries - - The QueryListModelExceptionpublic void visitQuery(Query query) throws Exception
visitQuery in interface VisitorvisitQuery in class AbstractVisitorquery - - The queryPropertyExceptionCopyright © 2014 Uppsala University and Aalborg University. All Rights Reserved.