JavaView® v2.12

jv.loader
Class PgJvxLoader

java.lang.Object
  |
  +--jv.loader.PgJvxLoader
All Implemented Interfaces:
PgLoaderIf

public class PgJvxLoader
extends java.lang.Object
implements PgLoaderIf

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

Version:
20.05.01, 1.50 revised (kp) Parsing of label attributes completed.
20.05.01, 1.40 revised (kp) Two methods parseLabelAtt and parseFun moved from PsXmlLoader.
30.10.00, 1.30 revised (kp) Merge with 2.00.a3 version, some methods moved to PsXmlLoader.
18.10.00, 1.20 revised (kp) Handling of several arrows added.
09.07.00, 1.10 revised (kp) Print length of lists as informal attribute.
27.03.00, 1.00 created (kp)
Author:
Konrad Polthier

Constructor Summary
PgJvxLoader()
           
 
Method Summary
 PvDisplayOption getDisplayOption()
          Get display options which some parsers and geometry file formats supply.
 boolean isAnimation()
          Determine if currently loaded data is an animation.
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.
 void setAnimation(boolean flag)
          Set flag whether current geometry data is an animation.
 void setDisplayOption(PvDisplayOption option)
          Set the display options to be saved within the geometry file.
static 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 java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PgJvxLoader

public PgJvxLoader()
Method Detail

getDisplayOption

public PvDisplayOption getDisplayOption()
Get display options which some parsers and geometry file formats supply. This geometry file format does not support loading/saving of display options. Instead, use "jvd" configuration files.
Specified by:
getDisplayOption in interface PgLoaderIf

setDisplayOption

public void setDisplayOption(PvDisplayOption option)
Set the display options to be saved within the geometry file. This method must be called before writing the geometry. This geometry file format does not support loading/saving of display options. Instead, use "jvd" configuration files.
Specified by:
setDisplayOption in interface PgLoaderIf

isAnimation

public boolean isAnimation()
Determine if currently loaded data is an animation.
Specified by:
isAnimation in interface PgLoaderIf

setAnimation

public void setAnimation(boolean flag)
Set flag whether current geometry data is an animation.
Specified by:
setAnimation in interface PgLoaderIf

read

public static PgJvxSrc[] read(java.lang.String fileName)
Read geometry from file in JavaView JVX format.
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.
Specified by:
read in interface PgLoaderIf
Parameters:
in - BufferedReader to read textual data from.

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
Parameters:
writer - Write all data to this stream
geom - Array with geometries to save
Returns:
true on success.
See Also:
write(PgJvxSrc [])

write

public static 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

JavaView® v2.12

The software JavaView® is copyright protected. All Rights Reserved.