Class DataFileWriter

java.lang.Object
repast.simphony.integration.DataFileWriter
All Implemented Interfaces:
Queryable, Writer

public class DataFileWriter extends Object implements Writer, Queryable
  • Constructor Details

    • DataFileWriter

      public DataFileWriter()
    • DataFileWriter

      public DataFileWriter(Object source)
    • DataFileWriter

      public DataFileWriter(Queryable dataSource)
  • Method Details

    • write

      public void write() throws org.jdom.JDOMException, IOException
      Specified by:
      write in interface Writer
      Throws:
      org.jdom.JDOMException
      IOException
    • setNewLineConverter

      public void setNewLineConverter(EscapeConverter newLineConverter)
    • getNewLineConverter

      public EscapeConverter getNewLineConverter()
    • writeValueDelimiter

      public void writeValueDelimiter(Object data, String delimiter)
    • writeValuePattern

      public void writeValuePattern(Object data, String type, String pattern)
    • setDestFileName

      public void setDestFileName(String fileName)
    • getDestFileName

      public String getDestFileName()
    • setDescriptorFileName

      public void setDescriptorFileName(String descriptorFileName)
    • getDescriptorFileName

      public String getDescriptorFileName()
    • mark

      public void mark() throws IOException
      Throws:
      IOException
    • popMark

      public void popMark()
    • reset

      public void reset() throws IOException
      Throws:
      IOException
    • selectNode

      public Object selectNode(String path)
      Description copied from interface: Queryable
      Selects a node from using the current location (or root if no such thing exists) using the specified path. If multiple nodes are returned with the query this will be the first one.
      Specified by:
      selectNode in interface Queryable
      Parameters:
      path - the XPath query
      Returns:
      the selected node (can be null if the query failed)
    • selectNode

      public Object selectNode(Object curContext, String path)
      Description copied from interface: Queryable
      Selects a node using the specified context as the current location. If multiple nodes are returned with the query this will be the first one.
      Specified by:
      selectNode in interface Queryable
      Parameters:
      curContext - the context of the query
      path - the query
      Returns:
      the value of the query
      See Also:
    • selectNodes

      public List<?> selectNodes(String path)
      Description copied from interface: Queryable
      Selects multiple nodes using the query.
      Specified by:
      selectNodes in interface Queryable
      Parameters:
      path - the query
      Returns:
      the result
    • selectNodes

      public List<?> selectNodes(Object curContext, String path)
      Description copied from interface: Queryable
      Selects multiple nodes using the query based at the specified context.
      Specified by:
      selectNodes in interface Queryable
      path - the query
      Returns:
      the result
    • getRoot

      public Object getRoot()
      Description copied from interface: Queryable
      Retrieves the root object.
      Specified by:
      getRoot in interface Queryable
      Returns:
      the root
    • getValue

      public Object getValue(Object o)
      Description copied from interface: Queryable
      Extracts a value from a Node and returns it. What this means is implementation dependent.
      Specified by:
      getValue in interface Queryable
      Parameters:
      o - the node to extract a value from
      Returns:
    • setWrittenObject

      public void setWrittenObject(Queryable queryable)
      Specified by:
      setWrittenObject in interface Writer