public class XMLDataFactory extends Object
Modifier and Type | Field and Description |
---|---|
protected static HashMap<String,XMLFlatData> |
xmldata |
Constructor and Description |
---|
XMLDataFactory() |
Modifier and Type | Method and Description |
---|---|
static XMLTable |
buildTable(String sourceID,
ILogger androidLogger,
String newTableID,
String fromStructureOfTableID,
ArrayList<String[]> fromList,
String targetFullpath,
IXMLStruct xmlStruct)
Construct a new table.
Copy data structure from 'fromTableID', copy data from 'fromList' |
protected static ILogger |
getLogger() |
static XMLTable |
getTable(ILogger androidLogger,
String tableID,
InputStream istream,
IXMLStruct xmlStruct) |
static XMLTable |
getTable(ILogger logger,
String tableID,
String fromFullpath,
IXMLStruct xmlStruct)
Usage ex.:
InputStream istr = res.getAssets().open(configName + ".xml"); IXMLStruct xmlStruct = new IXMLStruct() { @Override public String rootTag() { return "xtables"; } @Override public String tableTag() { return "table"; } @Override public String recordTag() { return "record"; } }; ILogger logger = new Logger(); skintable = XMLDataFactory.getTable(logger, configTablename, istr, xmlStruct); |
static XMLTable |
getTable(String sourceID,
ILogger androidLogger,
String tableID,
InputStream istream,
IXMLStruct xmlStruct) |
static XMLTable |
getTable(String sourceID,
ILogger androidLogger,
String tableID,
InputStream istream,
IXMLStruct xmlStruct,
boolean reload) |
static XMLTable |
getTable(String sourceID,
ILogger androidLogger,
String tableID,
String fromFullpath,
IXMLStruct xmlStruct) |
static XMLTable |
getTable(String sourceID,
ILogger androidLogger,
String tableID,
String fromFullpath,
IXMLStruct xmlStruct,
boolean reload) |
static XMLTable |
getTableReusing(String sourceID,
ILogger androidLogger,
String tableID,
IXMLStruct xmlStruct)
Get a table, don't reload.
|
protected static XMLFlatData |
getXMLData(String dataName,
InputStream istream,
IXMLStruct xmlStruct,
boolean forceReload) |
static void |
writeTables(IXMLStruct xmlStrct,
String fullpath,
XMLTable[] tables) |
protected static HashMap<String,XMLFlatData> xmldata
protected static XMLFlatData getXMLData(String dataName, InputStream istream, IXMLStruct xmlStruct, boolean forceReload)
public static XMLTable buildTable(String sourceID, ILogger androidLogger, String newTableID, String fromStructureOfTableID, ArrayList<String[]> fromList, String targetFullpath, IXMLStruct xmlStruct)
sourceID
- androidLogger
- newTableID
- fromStructureOfTableID
- fromList
- targetFullpath
- xmlStruct
- public static XMLTable getTable(ILogger logger, String tableID, String fromFullpath, IXMLStruct xmlStruct)
logger
- tableID
- fromFullpath
- xmlStruct
- public static XMLTable getTable(String sourceID, ILogger androidLogger, String tableID, String fromFullpath, IXMLStruct xmlStruct)
public static XMLTable getTable(ILogger androidLogger, String tableID, InputStream istream, IXMLStruct xmlStruct)
androidLogger
- tableID
- istream
- xmlStruct
- getTable(ILogger, String, String, IXMLStruct)
public static XMLTable getTableReusing(String sourceID, ILogger androidLogger, String tableID, IXMLStruct xmlStruct)
sourceID
- androidLogger
- tableID
- xmlStruct
- public static XMLTable getTable(String sourceID, ILogger androidLogger, String tableID, InputStream istream, IXMLStruct xmlStruct)
public static XMLTable getTable(String sourceID, ILogger androidLogger, String tableID, InputStream istream, IXMLStruct xmlStruct, boolean reload)
public static XMLTable getTable(String sourceID, ILogger androidLogger, String tableID, String fromFullpath, IXMLStruct xmlStruct, boolean reload)
public static void writeTables(IXMLStruct xmlStrct, String fullpath, XMLTable[] tables) throws Exception
Exception
Copyright © 2024. All rights reserved.