Interface XMLObject

All Known Subinterfaces:
DataSourceItem, MguiNumber, Shape
All Known Implementing Classes:
AbstractGraphEdge, AbstractGraphNode, AbstractNetworkGraph, AbstractNetworkGraphConnection, AbstractNetworkGraphNode, Attribute, AttributeList, AttributeObjectVideoTask, AttributeSelection, AttributeSelectionMap, BoolPolygon2DInt, Box3D, Box3DInt, Camera3D, CaminoProcess, CaminoProject, CaretAreaColourInOptions, CaretAreaColourOutputOptions, CaretMetricInOptions, CaretMetricOptions, CaretPaintInOptions, CaretPaintOutOptions, CaretSurfaceInOptions, CaretSurfaceOutOptions, ChangeSectionVideoTask, Circle2D, Circle2DInt, Colour, Colour1f, Colour2f, Colour3f, Colour4f, ColourMap, ContinuousColourMap, CorticalHemisphereSet3DInt, CorticalNetworkGraph, CorticalNetworkGraphConnection, CorticalNetworkGraphNode, CorticalNetworkMatrixInOptions, CorticalSurfaceSet3DInt, Cube3D, DataConnection, DataField, DataQuery, DataSource, DataSourceOutOptions, DataTable, DataTableSet, DefaultGraph, DefaultGraphEdge, DefaultGraphNode, DefaultIOOptions, DiscreteColourMap, DiscreteColourMapInOptions, DiscreteColourMapOutOptions, Ellipse2D, Ellipse2DInt, ExportDataTableExcelOptions, ExportDataTableOptions, ExportDataTableTextOptions, FreesurferSurfaceOutputOptions, FreesurferVertexDataInOptions, GiftiInputOptions, GiftiOutputOptions, Graph2D, Graph2DInt, Graph3D, Graph3DInt, Graph3DOutputOptions, GraphInputOptions, GraphOutputOptions, Grid3D, GridVertexDataColumn, Image2DInt, Image3DInt, ImageStackVideoOptions, ImportDataTableOptions, ImportDataTableTextOptions, InterfaceAbstractGraph, InterfaceConsoleDisplay, InterfaceDataTable, InterfaceDataTableTitle, InterfaceDisplayPanel, InterfaceGraphDisplay, InterfaceGraphDisplayTitle, InterfaceGraphic, InterfaceGraphic2D, InterfaceGraphic3D, InterfaceGraphicWindow, InterfaceIOOptions, InterfaceLayoutWindow, InterfacePipeline, InterfacePlotDisplay, InterfaceProject, InterfaceShape, InterfaceSplitPanel, InterfaceTabbedDisplayPanel, InterfaceWorkspace, IntPolygon2DInt, JavaProcess, LayoutItem, Line2DInt, LineSegment2D, LineSegment3D, LPolygon2DInt, LPolygon3DInt, Map, Map2D, Map3D, MatrixInOptions, MatrixInt, MatrixOutOptions, Mesh2DInt, Mesh3D, Mesh3DInt, MguiBoolean, MguiDouble, MguiFloat, MguiInteger, MguiLong, MguiShort, MincSurfaceDataInOptions, MincSurfaceDataOutOptions, MorphSections3DInt, NameMap, NameMapInOptions, NameMapOutOptions, NativeProcess, NeuralNetConnection, NeuralNetGraph, NeuralNetNode, PajekGraphInputOptions, PipelineFork, PipelineInputOptions, PipelineOutputOptions, PipelineProcess, PipelineProcessInstance, PipelineProcessLibrary, PipelineTask, Plane3D, Plane3DInt, Point2D, Point2DInt, PointSet2D, PointSet2DInputOptions, PointSet2DInt, PointSet3D, PointSet3DDataInputOptions, PointSet3DInputOptions, PointSet3DInt, Polygon2D, Polygon2DInt, Polygon3D, Polygon3DInt, PolygonSet3DInputOptions, PolygonSet3DInt, ProjectDirectory, ProjectInstance, RadialRep2D, RadialRep2DInt, Radius2D, Rect2D, Rect2DInt, Rect3D, Rect3DInt, RotateView3DTask, SectionSet2DInt, SectionSet3DInt, SetView3DTask, Shape2D, Shape2DInt, Shape2DSelectionSet, Shape3D, Shape3DInt, ShapeAttribute, ShapeDataInputOptions, ShapeInputOptions, ShapeModel3D, ShapeModel3DInputOptions, ShapeModel3DOutputOptions, ShapeOutputOptions, ShapeSelectionSet, ShapeSet2DInt, ShapeSet3DInt, Sphere3D, StlOutputOptions, StringVectorInOptions, StringVectorInt, SurfaceDataInputOptions, SurfaceDataOutputOptions, SurfaceInputOptions, SurfaceOutputOptions, TensorVolume3DInt, TestTextureInt, Text2D, Text2DInt, Text2DIntMouseCoords, Triangle2D, Triangle3D, VariableInt, Vector2D, Vector2DInt, Vector3ColourMap, Vector3D, Vector3DInputOptions, Vector3DInt, VectorInt, VectorSet3DInputOptions, VectorSet3DInt, VertexDataColumn, Video, Video3D, VideoInputOptions, VideoOutputOptions, VideoTask, VideoTask3D, View3D, View3DInputOptions, View3DOutputOptions, Volume2DInt, Volume3DInt, Volume4DInputOptions, Volume4DInt, VolumeInputOptions, VolumeInputOptions, VolumeOutputOptions, VolumeSet3DInt, WindowedColourModel, WorkspaceOutputOptions, X3DScene3DInt, XMLOutputOptions

public interface XMLObject
Interface specifies methods for obtaining or writing the data contained in an implementing class in XML format.

See http://www.saxproject.org for further information.

Since:
1.0
Version:
1.0
Author:
Andrew Reid
  • Nested Class Summary

    Nested Classes
    Modifier and Type Interface Description
    static class  XMLObject.XMLEncoding
    Defines the data I/O encoding, for internal XML representations.
    static class  XMLObject.XMLType
    Defines the type of XML write to perform: Normal: Objects are written by reference if possible, fully otherwise Full: Objects are fully written Reference: Objects are written by reference if possible, short otherwise Short: Objects are written in short form
  • Method Summary

    Modifier and Type Method Description
    java.lang.String getDTD()
    Returns the Data Type Declaration (DTD) for this object's XML representation
    java.lang.String getLocalName()
    Returns the local name associated with this XML object.
    java.lang.String getShortXML​(int tab)
    Returns a short XML representation of this object.
    java.lang.String getXML()
    Returns this object's XML representation as a single string.
    java.lang.String getXML​(int tab)
    Returns this object's XML representation as a single string.
    java.lang.String getXMLSchema()
    Returns the XML schema for this object's XML representation
    void handleXMLElementEnd​(java.lang.String localName)
    Handles the end of an XML element.
    void handleXMLElementStart​(java.lang.String localName, org.xml.sax.Attributes attributes, XMLObject.XMLType type)
    Handles the start of an XML element.
    void handleXMLString​(java.lang.String s)
    Handles a string within an XML element.
    void writeXML​(int tab, java.io.Writer writer)
    Writes the XML representation of this object to file.
    void writeXML​(int tab, java.io.Writer writer, ProgressUpdater progress_bar)
    Writes the XML representation of this object to file, as XMLType.Normal.
    void writeXML​(int tab, java.io.Writer writer, XMLOutputOptions options, ProgressUpdater progress_bar)
    Writes the XML representation of this object to file.
  • Method Details

    • getDTD

      java.lang.String getDTD()
      Returns the Data Type Declaration (DTD) for this object's XML representation

      See http://en.wikipedia.org/wiki/Document_Type_Definition for a description.

      Returns:
    • getXMLSchema

      java.lang.String getXMLSchema()
      Returns the XML schema for this object's XML representation

      See http://en.wikipedia.org/wiki/XML_schema.

      Returns:
    • getXML

      java.lang.String getXML()
      Returns this object's XML representation as a single string. NOTE: this is not feasible for larger objects and containers, thus may not be implemented for these objects. Use the writeXML(int,java.io.Writer,mgui.io.standard.xml.XMLOutputOptions,mgui.interfaces.ProgressUpdater) functions to write larger objects to file.
      Returns:
    • getXML

      java.lang.String getXML​(int tab)
      Returns this object's XML representation as a single string. NOTE: this is not feasible for larger objects and containers, thus may not be implemented for these objects. Use the writeXML(int,java.io.Writer,mgui.io.standard.xml.XMLOutputOptions,mgui.interfaces.ProgressUpdater) functions to write larger objects to file.
      Parameters:
      tab - The number of tabs to place before the opening XML wrapper
      Returns:
    • handleXMLElementStart

      void handleXMLElementStart​(java.lang.String localName, org.xml.sax.Attributes attributes, XMLObject.XMLType type) throws org.xml.sax.SAXException
      Handles the start of an XML element.
      Parameters:
      localName - Local name of the element
      attributes - Set of element attributes
      type - The XMLType of this element
      Throws:
      org.xml.sax.SAXException
    • handleXMLElementEnd

      void handleXMLElementEnd​(java.lang.String localName) throws org.xml.sax.SAXException
      Handles the end of an XML element.
      Parameters:
      localName - Local name of the element
      Throws:
      org.xml.sax.SAXException
    • handleXMLString

      void handleXMLString​(java.lang.String s) throws org.xml.sax.SAXException
      Handles a string within an XML element.
      Parameters:
      s - String to handle
      Throws:
      org.xml.sax.SAXException
    • getLocalName

      java.lang.String getLocalName()
      Returns the local name associated with this XML object.
      Returns:
    • writeXML

      void writeXML​(int tab, java.io.Writer writer, XMLOutputOptions options, ProgressUpdater progress_bar) throws java.io.IOException
      Writes the XML representation of this object to file. The basic contract for this method is that it should not write a newline character at its start or end. The default format of XMLFormat.Ascii will be used.
      Parameters:
      tab - The number of tabs to place before the XML text
      writer - The writer
      options - XMLOutputOptions defining the write parameters
      progress_bar - Optional progress updater (may be null)
      Throws:
      java.io.IOException
    • writeXML

      void writeXML​(int tab, java.io.Writer writer, ProgressUpdater progress_bar) throws java.io.IOException
      Writes the XML representation of this object to file, as XMLType.Normal. The default format of XMLFormat.Ascii will be used. The basic contract for this method is that it should not write a newline character at its start or end.
      Parameters:
      tab - The number of tabs to place before the XML text
      writer - The writer
      progress_bar - Optional progress updater (may be null)
      Throws:
      java.io.IOException
    • writeXML

      void writeXML​(int tab, java.io.Writer writer) throws java.io.IOException
      Writes the XML representation of this object to file. The basic contract for this method is that it should not write a newline character at its start or end. The default format of XMLFormat.Ascii will be used.
      Parameters:
      tab - The number of tabs to place before the XML text
      writer - The writer
      Throws:
      java.io.IOException
    • getShortXML

      java.lang.String getShortXML​(int tab)
      Returns a short XML representation of this object.
      Parameters:
      tab -
      Returns: