jv.loader

## Class PgJvxLoader

- java.lang.Object
- - jv.loader.PgAbstractLoader
  - - jv.loader.PgJvxLoader

- All Implemented Interfaces:
    PgLoaderIf

      public final class PgJvxLoader
      extends PgAbstractLoader

  Loader for geometry files given in JavaView's JVX file format. For details see the webpage on supported file formats.

- - ### Field Summary

    - ### Fields inherited from interface jv.loader.PgLoaderIf

      `GEOM_DATA_AUTHOR, GEOM_DATA_COLORS, GEOM_DATA_HEADER, GEOM_DATA_INFO, GEOM_DATA_NORMALS, GEOM_DATA_TEXTURE, GEOM_DATA_VECTORS`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `PgJvxLoader()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static java.lang.String[][]` | `parseFunList(PsXmlNode parentNode, java.lang.String type, java.lang.String[] attr)` Parse an array of PsXmlNodes of same element type, where each element has data consisting of a blank separated list of functions to be interpreted.
    `PgJvxSrc[]` | `read(java.io.BufferedReader in)` Read XML file and fill a new PsJvxSrc class.
    `static PgJvxSrc[]` | `read(java.lang.String fileName)` Read geometry from file in JavaView JVX format.
    `java.lang.String` | `write(PgJvxSrc[] geom)` Write all geometries in a XML tree structure of instances of type `PsXmlNode` and create a XML formatted string.
    `boolean` | `write(java.io.Writer writer, PgJvxSrc[] geom)` Write all geometries in a XML tree structure of instances of type `PsXmlNode` and into a writer.

    - ### Methods inherited from class jv.loader.PgAbstractLoader

      `getAnimations, getDisplayOption, getGeometries, getSpecializedGeometries, isAnimation, isEnabledOptimization, load, read, setAnimation, setDisplayOption, setGeometryOption, write`

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

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

- - ### Constructor Detail

    - #### PgJvxLoader

          public PgJvxLoader()

  - ### Method Detail

    - #### read

          public static PgJvxSrc[] read(java.lang.String fileName)

      Read geometry from file in JavaView JVX format.

      Alternatively, one may call load(BuffereredReader) followed by getGeometries() resp. getAnimations() to have a finer control about which information one wants to use from a source. For example, optional display information must be retrieve by a subsequent call getDisplayOption() if available.

      Parameters:
        `fileName` - File or URL to read data from.

    - #### read

          public PgJvxSrc[] read(java.io.BufferedReader in)

      Read XML file and fill a new PsJvxSrc class.

      Alternatively, one may call load(BuffereredReader) followed by getGeometries() resp. getAnimations() to have a finer control about which information one wants to use from a source. For example, optional display information must be retrieve by a subsequent call getDisplayOption() if available.

      Specified by:
        `read` in interface `PgLoaderIf`
      Overrides:
        `read` in class `PgAbstractLoader`
      Parameters:
        `in` - BufferedReader to read textual data from.
      Returns:
        Array of JVX geometries.
      See Also:
        `PgAbstractLoader.write(Writer, PgJvxSrc [])`

    - #### write

          public boolean write(java.io.Writer writer,
                      PgJvxSrc[] geom)

      Write all geometries in a XML tree structure of instances of type `PsXmlNode` and into a writer.
      Specified by:
        `write` in interface `PgLoaderIf`
      Overrides:
        `write` in class `PgAbstractLoader`
      Parameters:
        `writer` - Write all data to this stream
        `geom` - Array with geometries to save
      Returns:
        `true` on success.
      See Also:
        `write(PgJvxSrc [])`

    - #### write

          public java.lang.String write(PgJvxSrc[] geom)

      Write all geometries in a XML tree structure of instances of type `PsXmlNode` and create a XML formatted string.
      Parameters:
        `geom` - Array with geometries to save
      Returns:
        formatted string of xml tree.
      See Also:
        `write(Writer, PgJvxSrc [])`

    - #### parseFunList

          public static java.lang.String[][] parseFunList(PsXmlNode parentNode,
                                          java.lang.String type,
                                          java.lang.String[] attr)

      Parse an array of PsXmlNodes of same element type, where each element has data consisting of a blank separated list of functions to be interpreted.
      Parameters:
        `parentNode` - parent node containing a set of color nodes as children
        `type` - type of elements in array
        `attr` - array of attributes the vector might have, may be null.
      Returns:
        parsed string array, or null if failed

"

The software JavaView? is copyright protected. All Rights Reserved.
"