org.licas.parsers.types

## Class FileObjectParser

- java.lang.Object
- - org.licas.parsers.types.FileObjectParser

- All Implemented Interfaces:
    org.ai_heuristic.def.ParserDef

      public class FileObjectParser
      extends java.lang.Object
      implements org.ai_heuristic.def.ParserDef

  This class parses a `FileObject` to or from XML.
  Author:
    Kieran Greer

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `FileObjectParser()` Creates a new instance of FileObjectParser

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.Object` | `parse(org.licas_xml.abs.Element fileXml)` Parse the xml element to return the java object.
    `org.licas_xml.abs.Element` | `serialize(java.lang.Object nextObj)` Convert the file object into xml format if a parser exists.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### FileObjectParser

          public FileObjectParser()

      Creates a new instance of FileObjectParser

  - ### Method Detail

    - #### parse

          public java.lang.Object parse(org.licas_xml.abs.Element fileXml)
                                 throws java.lang.Exception

      Parse the xml element to return the java object.
      Specified by:
        `parse` in interface `org.ai_heuristic.def.ParserDef`
      Parameters:
        `fileXml` - a description of the file object.
      Returns:
        the xml elements or the original String if not xml.
      Throws:
        `java.lang.Exception` - any error.

    - #### serialize

          public org.licas_xml.abs.Element serialize(java.lang.Object nextObj)

      Convert the file object into xml format if a parser exists.
      Specified by:
        `serialize` in interface `org.ai_heuristic.def.ParserDef`
      Parameters:
        `nextObj` - the object to convert.
      Returns:
        the object converted into an XML-based description.