gov.sns.xal.slg
Class LatticeSynchronizer

java.lang.Object
  |
  +--gov.sns.xal.slg.LatticeSynchronizer
All Implemented Interfaces:
Visitor

public class LatticeSynchronizer
extends java.lang.Object
implements Visitor

A visitor generating an XML document for the lattice. This document is not compatible with the on-line model. To make the document compatible with the on-line model it has to be transformed with an XSL stylesheet.


Constructor Summary
LatticeSynchronizer(Lattice lattice)
          Creates a new instance of LatticeSynchronizer
LatticeSynchronizer(Lattice lattice, java.lang.String paramSrc)
          Creates a new instance of LatticeSynchronizer
 
Method Summary
 org.w3c.dom.Document getDocument()
          Returns the whole lattice document as a DOM object.
 java.lang.String toString()
          Returns the whole lattice document as a string.
 void visit(BCMonitor e)
          Writes the element- and paramter-tags of a BCMonitor lattice element
 void visit(BLMonitor e)
          Writes the element- and paramter-tags of a BLMonitor lattice element
 void visit(BPMonitor e)
          Writes the element- and paramter-tags of a BPMonitor lattice element
 void visit(Dipole e)
          Writes the element- and paramter-tags of a Dipole lattice element
 void visit(Drift e)
          Writes the element- and paramter-tags of a Drift lattice element
 void visit(Foil e)
          Writes the element- and paramter-tags of a Foil lattice element
 void visit(HSteerer e)
          Writes the element- and paramter-tags of a HSteerer lattice element
 void visit(Marker e)
          Writes the element- and paramter-tags of a Marker lattice element
 void visit(Octupole e)
          Writes the element- and paramter-tags of an Octupole lattice element
 void visit(PermMarker e)
          Writes the element- and paramter-tags of a PermMarker lattice element
 void visit(Quadrupole e)
          Writes the element- and paramter-tags of a Quadrupole lattice element
 void visit(RFGap e)
          Writes the parameters of a RFGap lattice element
 void visit(Sextupole e)
          Writes the element- and paramter-tags of a Sextupole lattice element
 void visit(SkewQuad e)
          Writes the element- and paramter-tags of a SkewQuad lattice element
 void visit(SkewSext e)
          Writes the element- and paramter-tags of a SkewSext lattice element
 void visit(VSteerer e)
          Writes the element- and paramter-tags of a VSteerer lattice element
 void visit(WScanner e)
          Writes the element- and paramter-tags of a WScanner lattice element
 void writeTo(java.io.File file)
          Convenience method for writing an XML file
 void writeTo(java.io.Writer writer)
          Write XML to the specified url
 void writeToUrl(java.net.URL url)
          Write XML to the specified url
 void writeToUrlSpec(java.lang.String urlSpec)
          Write XML to the specified url
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LatticeSynchronizer

public LatticeSynchronizer(Lattice lattice)
Creates a new instance of LatticeSynchronizer


LatticeSynchronizer

public LatticeSynchronizer(Lattice lattice,
                           java.lang.String paramSrc)
Creates a new instance of LatticeSynchronizer

Method Detail

toString

public java.lang.String toString()
Returns the whole lattice document as a string.

Overrides:
toString in class java.lang.Object

getDocument

public org.w3c.dom.Document getDocument()
Returns the whole lattice document as a DOM object.


writeTo

public void writeTo(java.io.Writer writer)
Write XML to the specified url


writeTo

public void writeTo(java.io.File file)
             throws java.io.IOException
Convenience method for writing an XML file

java.io.IOException

writeToUrlSpec

public void writeToUrlSpec(java.lang.String urlSpec)
                    throws XmlDataAdaptor.WriteException
Write XML to the specified url

XmlDataAdaptor.WriteException

writeToUrl

public void writeToUrl(java.net.URL url)
                throws XmlDataAdaptor.WriteException
Write XML to the specified url

XmlDataAdaptor.WriteException

visit

public void visit(RFGap e)
Writes the parameters of a RFGap lattice element

Specified by:
visit in interface Visitor

visit

public void visit(PermMarker e)
Writes the element- and paramter-tags of a PermMarker lattice element

Specified by:
visit in interface Visitor

visit

public void visit(SkewSext e)
Writes the element- and paramter-tags of a SkewSext lattice element

Specified by:
visit in interface Visitor

visit

public void visit(Octupole e)
Writes the element- and paramter-tags of an Octupole lattice element

Specified by:
visit in interface Visitor

visit

public void visit(BCMonitor e)
Writes the element- and paramter-tags of a BCMonitor lattice element

Specified by:
visit in interface Visitor

visit

public void visit(HSteerer e)
Writes the element- and paramter-tags of a HSteerer lattice element

Specified by:
visit in interface Visitor

visit

public void visit(Dipole e)
Writes the element- and paramter-tags of a Dipole lattice element

Specified by:
visit in interface Visitor

visit

public void visit(VSteerer e)
Writes the element- and paramter-tags of a VSteerer lattice element

Specified by:
visit in interface Visitor

visit

public void visit(Drift e)
Writes the element- and paramter-tags of a Drift lattice element

Specified by:
visit in interface Visitor

visit

public void visit(Quadrupole e)
Writes the element- and paramter-tags of a Quadrupole lattice element

Specified by:
visit in interface Visitor

visit

public void visit(WScanner e)
Writes the element- and paramter-tags of a WScanner lattice element

Specified by:
visit in interface Visitor

visit

public void visit(BPMonitor e)
Writes the element- and paramter-tags of a BPMonitor lattice element

Specified by:
visit in interface Visitor

visit

public void visit(BLMonitor e)
Writes the element- and paramter-tags of a BLMonitor lattice element

Specified by:
visit in interface Visitor

visit

public void visit(Foil e)
Writes the element- and paramter-tags of a Foil lattice element

Specified by:
visit in interface Visitor

visit

public void visit(SkewQuad e)
Writes the element- and paramter-tags of a SkewQuad lattice element

Specified by:
visit in interface Visitor

visit

public void visit(Sextupole e)
Writes the element- and paramter-tags of a Sextupole lattice element

Specified by:
visit in interface Visitor

visit

public void visit(Marker e)
Writes the element- and paramter-tags of a Marker lattice element

Specified by:
visit in interface Visitor