| java.lang.Object org.cougaar.tools.csmart.core.cdata.AssetDataCallbackImpl
AssetDataCallbackImpl | public class AssetDataCallbackImpl implements AssetDataCallback(Code) | | AssetDataCallbackImpl.java
Implements
AssetDataCallback . This class is
the guts behind parsing a prototype-dat.ini file. Some
of the methods are implemented to do what we need, meaning
the original callback was for actually creating a valid
asset object where we just want to parse the data. Because
of that, some methods may look to be named weird, based on
their actual function.
Created: Fri Mar 8 12:40:31 2002
|
Method Summary | |
public void | addPropertyToAsset(PropertyGroup propertyGroup) Adds a new Property to the asset. | public void | addRelationship(String typeId, String itemId, String supportedAgent, String type, long start, long end) Adds a new Relationship to the asset. | public void | callSetter(NewPropertyGroup propertyGroup, String setterName, String type, Object[] arguments) This is a "creative interpretation" of the callSetter method. | public void | createMyLocalAsset(String assetClassName) Creates an AgentAssetData and assigns
its class name. | public NewPropertyGroup | createPropertyGroup(String propGroupName) | public AgentAssetData | getAgentAssetData() Gets the AgentAssetData created with this callback. | public ConfigFinder | getConfigFinder() | public long | getDefaultEndTime() | public long | getDefaultStartTime() | public String | getType(String type) Parses out the correct type. | public boolean | hasMyLocalAsset() Checks if a local asset exists. | public long | parseDate(String dateString) | public Object | parseExpr(String type, String arg) Parses the given expression. | public void | setLocationSchedule(String latStr, String lonStr) |
AssetDataCallbackImpl | public AssetDataCallbackImpl(String agentName)(Code) | | Creates a new AssetDataCallbackImpl instance.
|
addPropertyToAsset | public void addPropertyToAsset(PropertyGroup propertyGroup)(Code) | | Adds a new Property to the asset.
This method is required by the callback
|
addRelationship | public void addRelationship(String typeId, String itemId, String supportedAgent, String type, long start, long end)(Code) | | Adds a new Relationship to the asset.
Parameters: typeId - Type Id for the new Relationship Parameters: itemId - Item Id for the new Relationship Parameters: supportedAgent - Agent supported in this relationship Parameters: type - Type of Relationship Parameters: start - Start time for new Relationship Parameters: end - Stop time for new Relationship |
callSetter | public void callSetter(NewPropertyGroup propertyGroup, String setterName, String type, Object[] arguments)(Code) | | This is a "creative interpretation" of the callSetter method.
This implementation Creates the PGPropData for the passed in
name.
Parameters: setterName - Not used Parameters: type - Type of PGPropData Parameters: arguments - Arguments for the PGPropData |
createMyLocalAsset | public void createMyLocalAsset(String assetClassName)(Code) | | Creates an AgentAssetData and assigns
its class name.
Parameters: assetClassName - - Name of the Asset Class |
createPropertyGroup | public NewPropertyGroup createPropertyGroup(String propGroupName) throws Exception(Code) | | Creates a PropGroupData with the given name
Parameters: propGroupName - Name of the new property group exception: Exception - if an error occurs |
getAgentAssetData | public AgentAssetData getAgentAssetData()(Code) | | Gets the AgentAssetData created with this callback.
If the AgentAssetData has not been
created yet, null is returned.
a current AgentAssetData object |
getConfigFinder | public ConfigFinder getConfigFinder()(Code) | | Gets an instance of the ConfigFinder for the CSMART module
a valid ConfigFinder instance |
getDefaultStartTime | public long getDefaultStartTime()(Code) | | Returns the default start time
TimeSpan.MIN_VALUE a long value |
getType | public String getType(String type)(Code) | | Parses out the correct type. Collections
are enclosed in '< >' and Measures start with '/'
Parameters: type - String with type to be parsed a parsed type as a String value |
hasMyLocalAsset | public boolean hasMyLocalAsset()(Code) | | Checks if a local asset exists.
a boolean value |
parseExpr | public Object parseExpr(String type, String arg)(Code) | | Parses the given expression.
Parameters: type - Unparsed Type(s) Parameters: arg - Unparsed Argument(s) an Object value |
setLocationSchedule | public void setLocationSchedule(String latStr, String lonStr)(Code) | | Not implemented
Parameters: latStr - Parameters: lonStr - |
|
|