| java.lang.Object org.openlaszlo.iv.flash.context.ContextFactory
ContextFactory | abstract public class ContextFactory (Code) | | Factory class for creating various types of context from other objects.
author: James Taylor |
Method Summary | |
public static Context | createContext(String[][] data, int row) Creates StandardContext from specified data and specified row. | public static Context | createContext(Context parent, String[][] data, int row) Creates StandardContext from specified data and specified row
Format of the data is the following:
name0 , name1 , name2 , ... | public static Context | createContext(String[][] data) | public static Context | createContext(Context parent, String[][] data) Creates StandardContext from specified data
Format of the data is the following:
foo0 , ... | public static Context | createContext(Node n) | public static Context | createContext(Context parent, Node n) | public static Context | createContext(Map o) | public static Context | createContext(Context parent, Map o) | public static Context | createContext(Context parent, String surl, FlashFile flashFile, boolean useRowStyle) Reads datasource from given url, detects it's type: xml or text (so far)
and creates a Context of the corresponding type.
Datasources can be specified by url or inline. | public static Object | readContext(String surl, FlashFile flashFile) Reads datasource from specified url, detects the type of this context text or url (so far)
and creates LineReader for text or IVUrl for xml. | public static String[][] | readStandardContext(String surl, FlashFile flashFile) Reads datasource from specified url, assuming that it's in text (tabular) format and
returns two-dimensional array of Strings. | public static void | setStandardContextData(StandardContext context, String[][] data) Sets specified data to the specified context
Format of the data is the following:
foo0 , ... | public static void | setStandardContextData(StandardContext context, String[][] data, int row) Sets specified data at specified row to the specified context
Format of the data is the following:
name0 , name1 , name2 , ... |
createContext | public static Context createContext(Context parent, String[][] data, int row) throws IVException(Code) | | Creates StandardContext from specified data and specified row
Format of the data is the following:
name0 , name1 , name2 , ...
value00, value01, value02, ...
value10, value11, value12, ...
....
Created context will contain values from specified row
Parameters: parent - parent of return context Parameters: data - specified strings array Parameters: row - take values from this specified row StandardContext with parent exception: IVException - |
createContext | public static Context createContext(Context parent, String[][] data) throws IVException(Code) | | Creates StandardContext from specified data
Format of the data is the following:
foo0 , ... , name , value , fooN, ...
... , ... , name0 , value0 , ... , ...
... , ... , name1 , value1 , ...
.....
Created context will contain values with names from corresponding columns
Parameters: parent - parent of return context Parameters: data - specified strings array StandardContext with parent exception: IVException - |
createContext | public static Context createContext(Context parent, String surl, FlashFile flashFile, boolean useRowStyle) throws IVException, java.io.IOException(Code) | | Reads datasource from given url, detects it's type: xml or text (so far)
and creates a Context of the corresponding type.
Datasources can be specified by url or inline. If url starts
with '#' then this is inline datasource which is completely given
in the url string.
Parameters: parent - will be used as parent for the created context ( null ok ) Parameters: surl - url or inline datasource Parameters: flashFile - current flash file from which this datasource isrequested Parameters: useRowStyle - if the datasource is tabular, determines whetherthe row or column datasource style is used. a context exception: IVException - exception: IOException - |
readContext | public static Object readContext(String surl, FlashFile flashFile) throws IVException, java.io.IOException(Code) | | Reads datasource from specified url, detects the type of this context text or url (so far)
and creates LineReader for text or IVUrl for xml.
I believe it has to be rewritten in future, it's too ugly!
Parameters: surl - either url to datasource or datasource itself (perfixed with #) Parameters: flashFile - flash file which location is used to resolve relative urls LineReader for text datasources or IVUrl for xml datasources exception: IVException - exception: java.io.IOException - |
readStandardContext | public static String[][] readStandardContext(String surl, FlashFile flashFile) throws IVException, java.io.IOException(Code) | | Reads datasource from specified url, assuming that it's in text (tabular) format and
returns two-dimensional array of Strings.
If the datasource is not in tabular format, then throw an exception
Parameters: surl - either url to datasource or datasource itself (perfixed with #) Parameters: flashFile - flash file which location is used to resolve relative urls two-dimensional array of Strings exception: IVException - exception: java.io.IOException - |
setStandardContextData | public static void setStandardContextData(StandardContext context, String[][] data) throws IVException(Code) | | Sets specified data to the specified context
Format of the data is the following:
foo0 , ... , name , value , fooN, ...
... , ... , name0 , value0 , ... , ...
... , ... , name1 , value1 , ...
.....
Parameters: context - specified standard context Parameters: data - specified data exception: IVException - |
setStandardContextData | public static void setStandardContextData(StandardContext context, String[][] data, int row) throws IVException(Code) | | Sets specified data at specified row to the specified context
Format of the data is the following:
name0 , name1 , name2 , ...
value00, value01, value02, ...
value10, value11, value12, ...
....
Parameters: context - specified standard context Parameters: data - specified data Parameters: row - specified row exception: IVException - |
|
|