| java.lang.Object org.cougaar.lib.vishnu.client.custom.CustomDataXMLize org.cougaar.logistics.plugin.trans.TranscomDataXMLize
All known Subclasses: org.cougaar.logistics.plugin.trans.GenericDataXMLize,
TranscomDataXMLize | public class TranscomDataXMLize extends CustomDataXMLize (Code) | | Create either an XML document in the Vishnu Data format or Vishnu objects from ALP objects.
Overrides processAsset to exclude extraneous assets and processTask to add fields.
|
Method Summary | |
protected void | addIsAmmoField(Object object, GLMAsset baseAsset) | protected void | addTaskPersonField(Object object, GLMAsset baseAsset) | public Distance | distanceBetween(LatLonPoint start, LatLonPoint end) | public Distance | distanceBetween(LatLonPoint start, LatLonPoint end, double multiplier) | protected GLMAsset | getBaseAsset(AssetGroup directObject) try to determine base asset of asset group
Basically, we're trying to determine whether this is ammo or not, or people or not
and we need to go down the nested sets of things until we find atomic assets. | protected String | getOrganizationRole(Asset asset) | public boolean | interestingTask(Task t) | protected boolean | isAmmo(GLMAsset asset) An asset is an ammo container if it has a contents pg, since
only the Ammo Packer put a contents pg on a container. | protected boolean | isContainer(GLMAsset asset) | protected boolean | isPerson(GLMAsset asset) | protected boolean | processAsset(Object object, Object taskOrAsset) Create XML for asset, subclass to add fields
Ignore everything but GlobalAir, GlobalSea, and the null asset. | protected boolean | processTask(Object object, Object taskOrAsset) Create XML for task, subclass to add fields
Adds departure, arrival, from, to, name, type, and isPerson fields. |
assetIncludeSet | protected Set assetIncludeSet(Code) | | |
TranscomDataXMLize | public TranscomDataXMLize(boolean direct, Logger logger, Set includeSet)(Code) | | |
addTaskPersonField | protected void addTaskPersonField(Object object, GLMAsset baseAsset)(Code) | | subclass if people aren't relevant
|
distanceBetween | public Distance distanceBetween(LatLonPoint start, LatLonPoint end)(Code) | | Utility function to calculate the distance between two locations
Parameters: start - GeolocLocation starting point Parameters: end - GeolocLocation ending point Distance between the two points |
distanceBetween | public Distance distanceBetween(LatLonPoint start, LatLonPoint end, double multiplier)(Code) | | Utility function to calculate the distance between two locations
Parameters: start - GeolocLocation starting point Parameters: end - GeolocLocation ending point Parameters: multiplier - Multiplier for the final dist result Distance between the two points |
getBaseAsset | protected GLMAsset getBaseAsset(AssetGroup directObject)(Code) | | try to determine base asset of asset group
Basically, we're trying to determine whether this is ammo or not, or people or not
and we need to go down the nested sets of things until we find atomic assets.
|
getOrganizationRole | protected String getOrganizationRole(Asset asset)(Code) | | Get the relationship role of the org, where we're only really interested
in GlobalSea (SeaTransportationProvider) and GlobalAir (AirTransportationProvider)
|
interestingTask | public boolean interestingTask(Task t)(Code) | | |
isAmmo | protected boolean isAmmo(GLMAsset asset)(Code) | | An asset is an ammo container if it has a contents pg, since
only the Ammo Packer put a contents pg on a container.
NOTE : should call isContainer first!
|
processAsset | protected boolean processAsset(Object object, Object taskOrAsset)(Code) | | Create XML for asset, subclass to add fields
Ignore everything but GlobalAir, GlobalSea, and the null asset.
Uses statics for asset names from TranscomVishnuPlugin.
These are settable by properties.
NOTE : field names should match those in .dff file
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
Adds departure, arrival, from, to, name, type, and isPerson fields.
NOTE : field names should match those in .dff file
Parameters: object - node representing task Parameters: taskOrAsset - task being translated true if should add object to list of new objects |
Methods inherited from org.cougaar.lib.vishnu.client.custom.CustomDataXMLize | public Document createDoc(Collection items, Collection changedAssets, String ignoredAssetClassName)(Code)(Java Doc) protected Element createHeader(Document doc)(Code)(Java Doc) public void createVishnuObjects(List items, Collection changed, List vishnuTasks, List vishnuResources, List changedVishnuResources)(Code)(Java Doc) protected String fixName(String name)(Code)(Java Doc) protected String getAssetName(Asset asset)(Code)(Java Doc) protected String getAssetType(Asset asset)(Code)(Java Doc) protected String getTaskName()(Code)(Java Doc) protected boolean processAsset(Object object, Object taskOrAsset)(Code)(Java Doc) protected boolean processTask(Object object, Object taskOrAsset)(Code)(Java Doc) public void setFormatDoc(Document formatDoc, SchedulingData schedData)(Code)(Java Doc) protected String setName(String parentType, Object object, Asset asset)(Code)(Java Doc) protected void setType(Object object, String type)(Code)(Java Doc) protected void writeDocToStream(Document doc, OutputStream os)(Code)(Java Doc)
|
|
|