| java.lang.Object org.cougaar.lib.vishnu.client.custom.CustomDataXMLize
All known Subclasses: org.cougaar.logistics.plugin.trans.TranscomDataXMLize,
CustomDataXMLize | public class CustomDataXMLize implements XMLizer,DirectTranslator(Code) | | Create either an XML document in the Vishnu Data format or Vishnu objects from ALP objects.
|
Constructor Summary | |
public | CustomDataXMLize(boolean direct, Logger logger) Chooses whether to use an XMLDataHelper or a DirectDataHelper depending on the setting of
direct . |
Method Summary | |
public Document | createDoc(Collection items, Collection changedAssets, String ignoredAssetClassName) Create an XML document from the set of input tasks and resources. | protected Element | createHeader(Document doc) Attach standard header - problem, data, window, and newobjects tags. | public void | createVishnuObjects(List items, Collection changed, List vishnuTasks, List vishnuResources, List changedVishnuResources) Populate vishnuTasks/Resources lists from Cougaar items. | protected String | fixName(String name) remove XML tags from name -- confuses parsing... | protected String | getAssetName(Asset asset) Get the name of the asset
This will be the item PG's item id. | protected String | getAssetType(Asset asset) Get the type of the asset
If the type PG nomenclature is null, use the type identification. | protected String | getTaskName() | protected boolean | processAsset(Object object, Object taskOrAsset) | protected boolean | processTask(Object object, Object taskOrAsset) | public void | setFormatDoc(Document formatDoc, SchedulingData schedData) | protected String | setName(String parentType, Object object, Asset asset) | protected void | setType(Object object, String type) | protected void | writeDocToStream(Document doc, OutputStream os) |
dataHelper | protected DataHelper dataHelper(Code) | | the data helper -- comes in two flavors : XML and direct translation
|
direct | protected boolean direct(Code) | | |
doc | protected Document doc(Code) | | document that is created, if producing XML = not direct mode
|
numFilesWritten | protected static int numFilesWritten(Code) | | used to form file names when writing XML to a file
|
schedData | protected SchedulingData schedData(Code) | | |
writeXMLToFile | protected boolean writeXMLToFile(Code) | | write XML that's posted to a file
|
CustomDataXMLize | public CustomDataXMLize(boolean direct, Logger logger)(Code) | | Chooses whether to use an XMLDataHelper or a DirectDataHelper depending on the setting of
direct .
Parameters: direct - - do direct Cougaar->Vishnu Object translation, no XML |
createHeader | protected Element createHeader(Document doc)(Code) | | Attach standard header - problem, data, window, and newobjects tags.
Parameters: doc - to add header to the new objects tag to attach all the new objects to |
fixName | protected String fixName(String name)(Code) | | remove XML tags from name -- confuses parsing...
|
getAssetName | protected String getAssetName(Asset asset)(Code) | | Get the name of the asset
This will be the item PG's item id. But if this is null, then it will
be the type PG nomenclature + identification.
Parameters: asset - to get name from the name |
getAssetType | protected String getAssetType(Asset asset)(Code) | | Get the type of the asset
If the type PG nomenclature is null, use the type identification.
Parameters: asset - to get name from the type |
getTaskName | protected String getTaskName()(Code) | | Transport by default -- override to use a different name for the task
|
processAsset | protected boolean processAsset(Object object, Object taskOrAsset)(Code) | | Create XML for asset, subclass to add fields
Parameters: object - node representing asset Parameters: taskOrAsset - asset being translated true if should add object to list of new objects |
processTask | protected boolean processTask(Object object, Object taskOrAsset)(Code) | | Create XML for task, subclass to add fields
Parameters: object - node representing task Parameters: taskOrAsset - task being translated true if should add object to list of new objects |
setFormatDoc | public void setFormatDoc(Document formatDoc, SchedulingData schedData)(Code) | | Called from prepareVishnuObjects, creates DirectDataHelper
See Also: CustomVishnuAllocatorPlugin.prepareVishnuObjects Parameters: formatDoc - - given to DirectDataHelper, so that it can figure out field attributes Parameters: schedData - - allows creation of Vishnu date fields |
setType | protected void setType(Object object, String type)(Code) | | if not doing direct translation, set the type of the Element
|
|
|