JClass DesktopViews 6.3.0 API
Documentation

com.klg.jclass.util.io
Class OutputDataProperties

java.lang.Object
  |
  +--com.klg.jclass.util.io.Properties
        |
        +--com.klg.jclass.util.io.OutputProperties
              |
              +--com.klg.jclass.util.io.OutputDataProperties
All Implemented Interfaces:
Cloneable, Serializable

public class OutputDataProperties
extends OutputProperties

Encapsulate the properties that may be needed to save a data file

See Also:
Serialized Form

Field Summary
static int DATA_FILE_TEXT
           
static int DATA_FILE_XML
           
static String[] dataSave_i18n_strings
           
static String[] dataSave_strings
           
static int[] dataSave_values
           
static int EMBED_DATA
           
protected  String fileCharset
           
static int NO_DATA
           
 
Fields inherited from class com.klg.jclass.util.io.OutputProperties
fileAccess, outputFileName, propertyName, saveType
 
Fields inherited from class com.klg.jclass.util.io.Properties
ABSOLUTE, CHARSET_ASCII, CHARSET_ISO, CHARSET_UTF_8, charsets, DEFAULT_ACCESS, DEFAULT_CHARSET_NAME, fileAccess_i18n_strings, fileAccess_strings, fileAccess_values, ignoreExternalResourceExceptions, RELATIVE_URL, RESOLVING_CLASS, SERVLET, URL
 
Constructor Summary
OutputDataProperties()
          Default constructor.
OutputDataProperties(String outputFileName, String propertyName, String saveType, int fileAccess)
          Constructor which specifies output fileName, propertyName, saveType, and fileAccess
 
Method Summary
 String getFileCharset()
          Gets the name of the charset to use when reading data
 int getSaveTypeAsEnum()
          Return the save type as an enum.
static int getSaveTypeEnumFromString(String accessString, boolean useI18n)
          Get the file access enum from its string representation.
static String getSaveTypeStringFromEnum(int accessValue, boolean useI18n)
          Get the file access string representation from its enum value.
 void setFileCharset(String fileCharset)
          Sets the name of the charset to use when reading data
 void setSaveType(int saveEnum)
          Set the type of file to save as an enum.
 void setSaveType(String saveType)
          Sets the type of file to save as a string.
 
Methods inherited from class com.klg.jclass.util.io.OutputProperties
getFileAccess, getOutputFileName, getPropertyName, getSaveType, setFileAccess, setOutputFileName, setPropertyName
 
Methods inherited from class com.klg.jclass.util.io.Properties
clone, getDefaultAccess, getFileAccessEnumFromString, getFileAccessStringFromEnum, ignoreExternalResourceExceptions, setIgnoreExternalResourceExceptions
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NO_DATA

public static final int NO_DATA
See Also:
Constant Field Values

EMBED_DATA

public static final int EMBED_DATA
See Also:
Constant Field Values

DATA_FILE_TEXT

public static final int DATA_FILE_TEXT
See Also:
Constant Field Values

DATA_FILE_XML

public static final int DATA_FILE_XML
See Also:
Constant Field Values

dataSave_values

public static final int[] dataSave_values

dataSave_strings

public static final String[] dataSave_strings

dataSave_i18n_strings

public static final String[] dataSave_i18n_strings

fileCharset

protected String fileCharset
Constructor Detail

OutputDataProperties

public OutputDataProperties()
Default constructor. Properties set to defaults


OutputDataProperties

public OutputDataProperties(String outputFileName,
                            String propertyName,
                            String saveType,
                            int fileAccess)
Constructor which specifies output fileName, propertyName, saveType, and fileAccess

Parameters:
outputFileName - Name of actual output data file to write to (if null, no data is written out)
propertyName - Name to write to the property
saveType - The type of file to save
fileAccess - Type of access to file. Must be one of Properties.DEFAULT_ACCESS, Properties.ABSOLUTE, Properties.RESOLVING_CLASS, Properties.URL, Properties.RELATIVE_URL, Properties.SERVLET
Method Detail

getFileCharset

public String getFileCharset()
Gets the name of the charset to use when reading data

Returns:
The name of the current charset

setFileCharset

public void setFileCharset(String fileCharset)
Sets the name of the charset to use when reading data

Parameters:
fileCharset - The name of a supported charset

setSaveType

public void setSaveType(String saveType)
Sets the type of file to save as a string.

Overrides:
setSaveType in class OutputProperties
Parameters:
saveType - The new way to save data. Must be one of "None", "Embed", "Text", or "Xml".

setSaveType

public void setSaveType(int saveEnum)
Set the type of file to save as an enum.

Parameters:
saveEnum - The new save type as an enum. Must be one of: NO_DATA, EMDED_DATA, DATA_FILE_TEXT, DATA_FILE_XML

getSaveTypeAsEnum

public int getSaveTypeAsEnum()
Return the save type as an enum.

Returns:
The save type as an enum. Will be one of: NO_DATA, EMDED_DATA, DATA_FILE_TEXT, DATA_FILE_XML

getSaveTypeEnumFromString

public static int getSaveTypeEnumFromString(String accessString,
                                            boolean useI18n)
Get the file access enum from its string representation. Default access is absolute access. May be over-ridden to provide different behaviour for sub-classes.

Parameters:
accessString - The string version of the fileAccess
useI18n - Use the internationalized strings
Returns:
The enum corresponding to the string

getSaveTypeStringFromEnum

public static String getSaveTypeStringFromEnum(int accessValue,
                                               boolean useI18n)
Get the file access string representation from its enum value.

Parameters:
accessValue - The enum version of the fileAccess
useI18n - Use the internationalized strings
Returns:
The String reprsentation of the fileAccess enum

Copyright © 2004 Quest Software Inc..
All rights reserved.