|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.phoenix_int.aserver.types.PHXSimpleType
com.phoenix_int.aserver.types.PHXSimpleArray
com.phoenix_int.aserver.types.PHXRawFileArray
public class PHXRawFileArray
Wraps an array of PHXRawFile variables for the ScriptWrapper utility.
PHXSimpleArray| Field Summary |
|---|
| Fields inherited from class com.phoenix_int.aserver.types.PHXSimpleArray |
|---|
_data, _lockDims, _lockResize |
| Constructor Summary | |
|---|---|
PHXRawFileArray() |
|
PHXRawFileArray(java.lang.Object data) |
|
| Method Summary | |
|---|---|
protected void |
_getMetaData(PHXSimpleType v2)Worker which takes the meta data from an instance of PHXSimpleType and sets it into our meta data. |
protected void |
_setMetaData(PHXSimpleType v2)Sets a simple type's meta data based on the meta data in this object. |
protected java.lang.Object |
allocateElement(java.lang.Class elementClass)Allocates a single element in a default state. |
protected boolean |
dataTypeOK(java.lang.Class c)Must override this function and return true if the specified class is acceptable as an array element component type. |
protected java.lang.Object |
elementFromString(java.lang.String val)Sub-classes must provide an implementation of this function which converts a string form of a single element to Object form. |
void |
fromFile(int index)loads the file from disk for an element of an 1D array. |
void |
fromFile(int[] index)loads the file from disk for an element of an array. |
void |
fromFile(int[] index, java.lang.String fileName)Sets the filename and then reads from disk for an element of an array. |
void |
fromFile(int index, java.lang.String fileName)Sets the filename and then reads from disk for an element of an 1D array. |
void |
fromString(int[] index, java.lang.String value)converts a String representation to the internal value for an element of an array |
void |
fromString(int index, java.lang.String value)converts a String representation to the internal value for an element of an 1D array |
java.lang.String |
getBaseName()gets the base name of the files stored in the array |
java.lang.String |
getContents(int index)retrieves the contents of the file for an element of an 1D array |
java.lang.String |
getContents(int[] index)retrieves the contents of the file for an element of an array |
java.lang.String |
getFileExtension(int index)Returns the extension of the file for an element of an 1D array |
java.lang.String |
getFileExtension(int[] index)Returns the extension of the file for an element of an array |
boolean |
getIsBinary()Tells whether or not the array contains binary files or not. |
java.lang.String |
getMimeType()get mime type of the files in the array Currently all elements of an array should have the same mime type. |
java.lang.String |
getName(int index)retrieves the name of the file for an element of an 1D array |
java.lang.String |
getName(int[] index)retrieves the name of the file for an element of an array |
java.lang.String |
getNameCoded(int index)retrieves the name of the file in coded form (without $variables replaced) for an element of an 1D array |
java.lang.String |
getNameCoded(int[] index)retrieves the name of the file in coded form (without $variables replaced) for an element of an array |
java.lang.String[] |
getNames()get file names of the elements as an array |
java.lang.String[] |
getNamesCoded()get coded file names of the elements as an array |
java.lang.String |
getNamesCodedString()get coded file names of the elements as a comma separated string |
java.lang.String |
getNamesString()get file names as a comma separated list |
java.lang.String[] |
getURLs()get URLs of the elements as an array |
java.lang.String |
getURLsString()get URLs of the elements as a comma separated string |
PHXRawFile |
getValue(int index)a utility function to return the internal PHXRawFile that represents the array element for the 1D array. |
PHXRawFile |
getValue(int[] index)a utility function to return the internal PHXRawFile that represents the array element for the array. |
boolean |
hasChanged(int index)checks to see if the file has changed since the last time getContents() was called for an element of an 1D array |
boolean |
hasChanged(int[] index)checks to see if the file has changed since the last time getContents() was called for an element of an array |
void |
markAsRead(int index)set markAsRead flag for an element for an 1D array call this function after you manually get the contents of the file. |
void |
markAsRead(int[] index)set markAsRead flag for an element for an array call this function after you manually get the contents of the file. |
void |
readFile(int index)loads the file from disk for an element of an 1D array. |
void |
readFile(int[] index)loads the file from disk for an element of an array. |
void |
setBaseName(java.lang.String name)sets the base name of files for this array |
void |
setContents(int[] index, java.lang.String contents)sets the contents of the file for an array element for an array. |
void |
setContents(int index, java.lang.String contents)sets the contents of the file for an array element for an 1D array. |
void |
setFileExtension(int[] index, java.lang.String extension)Sets the extension of the file for an element of an array It is preferred that you use setName() and let the system automatically figure out the extension based on what you pass in. |
void |
setFileExtension(int index, java.lang.String extension)Sets the extension of the file for an element of an 1D array It is preferred that you use setName() and let the system automatically figure out the extension based on what you pass in. |
void |
setIsBinary(boolean value)Forces elements of this array to be binary or not. |
void |
setMimeType(java.lang.String value)Set mime type the array Currently all elements of an array should have the same mime type. |
void |
setName(int[] index, java.lang.String name)sets the name of the file for an element of an array |
void |
setName(int index, java.lang.String name)sets the name of the file for an element of an 1D array |
void |
setValue(int[] index, PHXRawFile val)a utility function to set the internal PHXRawFile that represents the array element for the array. |
void |
setValue(int[] index, java.lang.String val)a utility function to set the value of an array element for the 1D array. |
void |
setValue(int index, PHXRawFile val)a utility function to set the internal PHXRawFile that represents the array element for the 1D array. |
void |
setValue(int index, java.lang.String val)a utility function to set the value of an array element for the 1D array. |
void |
toFile(int index)writes the file to disk for an element of an 1D array |
void |
toFile(int[] index)writes the file to disk for an element of an array |
void |
toFile(int[] index, java.lang.String fileName)sets the filename and then writes the file to disk for an element of an array. |
void |
toFile(int index, java.lang.String fileName)sets the filename and then writes the file to disk for an element of an 1D array. |
java.lang.String |
toString(int index)converts an element of the 1D array to a string |
java.lang.String |
toString(int[] index)converts an element of the array to a string |
| Methods inherited from class com.phoenix_int.aserver.types.PHXSimpleArray |
|---|
_getMetaData, _setMetaData, checkRectangular, fromString, fromString, fromString2, generateFor, generateFor, getArray, getArrayElement, getArrayElement, getComponentType, getComponentType, getDimensions, getDimensions, getFirst, getLength, getLength, getLockResize, getnDIndex, getNumDimensions, getNumDimensions, getSelf, incrementIndex, lockDimensions, newIndex, parseIndex, resize, setArray, setArrayElement, setArrayElement, setDimensions, setFirst, setLength, setLength, setLockResize, toString, toString, toString2, toString2, toString2, validElement |
| Methods inherited from class com.phoenix_int.aserver.types.PHXSimpleType |
|---|
addPropertyChangeListener, getDescription, getEnumTokens, getHasChanged, getUnits, removePropertyChangeListener, setDescription, setHasChanged, setUnits |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public PHXRawFileArray()
public PHXRawFileArray(java.lang.Object data)
| Method Detail |
|---|
public java.lang.String getName(int index)
index - array indexpublic java.lang.String getName(int[] index)
index - array indexpublic java.lang.String getNameCoded(int index)
index - array indexpublic java.lang.String getNameCoded(int[] index)
index - array indexpublic java.lang.String getFileExtension(int index)
index - array indexpublic java.lang.String getFileExtension(int[] index)
index - array index
public void setFileExtension(int index,
java.lang.String extension)
throws java.io.IOException
It is preferred that you use setName() and let the system automatically figure out the extension based on what you pass in. Then, you can use readFile() and writeFile() without passing filenames to those calls. This allows for progress monitoring to work correctly in all cases.
index - array indexextension - file extensionjava.io.IOException
public void setFileExtension(int[] index,
java.lang.String extension)
throws java.lang.Exception
It is preferred that you use setName() and let the system automatically figure out the extension based on what you pass in. Then, you can use readFile() and writeFile() without passing filenames to those calls. This allows for progress monitoring to work correctly in all cases.
index - array indexextension - file extensionjava.lang.Exception
public void setName(int index,
java.lang.String name)
throws java.io.IOException
index - array indexname - file namejava.io.IOException
public void setName(int[] index,
java.lang.String name)
throws java.lang.Exception
index - array indexname - file namejava.lang.Exception
public void setBaseName(java.lang.String name)
throws java.io.IOException
name - base namejava.io.IOExceptionpublic java.lang.String getBaseName()
public boolean getIsBinary()
public void setIsBinary(boolean value)
public java.lang.String getMimeType()
public void setMimeType(java.lang.String value)
public java.lang.String[] getNames()
public java.lang.String getNamesString()
public java.lang.String[] getNamesCoded()
public java.lang.String getNamesCodedString()
public java.lang.String[] getURLs()
public java.lang.String getURLsString()
public void setContents(int index,
java.lang.String contents)
throws java.io.IOException
index - array indexcontents - the contents of the filejava.io.IOException
public void setContents(int[] index,
java.lang.String contents)
throws java.lang.Exception
index - array indexcontents - the contents of the filejava.lang.Exception
public java.lang.String getContents(int index)
throws java.lang.Exception
index - array indexjava.lang.Exception
public java.lang.String getContents(int[] index)
throws java.lang.Exception
index - array indexjava.lang.Exception
public void fromFile(int index)
throws java.io.IOException
index - array indexjava.io.IOException - thrown if the file can't be loaded.
public void fromFile(int[] index)
throws java.io.IOException
index - array indexjava.io.IOException - thrown if the file can't be loaded.
public void readFile(int index)
throws java.io.IOException
index - array indexjava.io.IOException - thrown if the file can't be loaded.
public void readFile(int[] index)
throws java.io.IOException
index - array indexjava.io.IOException - thrown if the file can't be loaded.
public void fromFile(int index,
java.lang.String fileName)
throws java.io.IOException
index - array indexfileName - file namejava.io.IOException - thrown if the file can't be loaded.
public void fromFile(int[] index,
java.lang.String fileName)
throws java.io.IOException
index - array indexfileName - file namejava.io.IOException - thrown if the file can't be loaded.public void markAsRead(int index)
index - array indexpublic void markAsRead(int[] index)
index - array indexpublic boolean hasChanged(int index)
index - array indexpublic boolean hasChanged(int[] index)
index - array index
public void toFile(int index,
java.lang.String fileName)
throws java.io.IOException
index - array indexfileName - name of the file to writejava.io.IOException - thrown if the file can't be written.
public void toFile(int[] index,
java.lang.String fileName)
throws java.io.IOException
index - array indexfileName - name of the file to writejava.io.IOException - thrown if the file can't be written.
public void toFile(int index)
throws java.io.IOException
index - array indexjava.io.IOException - thrown if the file can't be written.
public void toFile(int[] index)
throws java.io.IOException
index - array indexjava.io.IOException - thrown if the file can't be written.public java.lang.String toString(int index)
toString in class PHXSimpleArrayindex - array indexpublic java.lang.String toString(int[] index)
toString in class PHXSimpleArrayindex - array index
public void fromString(int index,
java.lang.String value)
fromString in class PHXSimpleArrayindex - array indexvalue - the value to convert
public void fromString(int[] index,
java.lang.String value)
fromString in class PHXSimpleArrayindex - array indexvalue - the value to convertpublic PHXRawFile getValue(int index)
index - array indexpublic PHXRawFile getValue(int[] index)
index - array index
public void setValue(int index,
PHXRawFile val)
index - array indexval - array element to set
public void setValue(int[] index,
PHXRawFile val)
index - array indexval - array element to set
public void setValue(int index,
java.lang.String val)
throws java.io.IOException
index - array indexval - value to setjava.io.IOException
public void setValue(int[] index,
java.lang.String val)
throws java.io.IOException
index - array indexval - value to setjava.io.IOExceptionprotected boolean dataTypeOK(java.lang.Class c)
PHXSimpleArraydataTypeOK in class PHXSimpleArrayprotected java.lang.Object elementFromString(java.lang.String val)
PHXSimpleArrayelementFromString in class PHXSimpleArrayprotected void _getMetaData(PHXSimpleType v2)
PHXSimpleArray_getMetaData in class PHXSimpleArrayprotected void _setMetaData(PHXSimpleType v2)
PHXSimpleArray_setMetaData in class PHXSimpleArray
protected java.lang.Object allocateElement(java.lang.Class elementClass)
throws java.lang.IllegalAccessException,
java.lang.InstantiationException
allocateElement in class PHXSimpleArrayjava.lang.IllegalAccessExceptionjava.lang.InstantiationException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||