| org.cougaar.planning.plugin.legacy.SimplePlugin org.cougaar.planning.plugin.asset.AssetDataPlugin
All known Subclasses: org.cougaar.mlm.plugin.organization.OrgDataPlugin, org.cougaar.mlm.plugin.organization.SimpleOrgDataPlugin, org.cougaar.planning.plugin.asset.AssetDataParamPlugin,
AssetDataPlugin | public class AssetDataPlugin extends SimplePlugin (Code) | | Generic plugin to create a local asset and the Report tasks
associated with all the local asset's relationships.
Local asset must have ClusterPG and
RelationshipPG, Presumption is that the 'other' assets in all the
relationships have both Cluster and Relationship PGs.
Currently assumes that each Agent has exactly 1 local asset.
Extensions of this class load this information from specific media such as files.
Now supports adding additional relationships via plugin parameters. Each
parameter represents 1 relationship between the local asset and some 'other'
asset. Parameter must completely identify both the other asset and the
relationship. Building the other asset requires knowing the asset's message
address (ClusterPG), item identification (ItemIdentificationPG), and type
identification (TypeIdentificationPG). Building the relationship requires
knowing the role and optionally the start and end times.
Parameter format -
Relationship:MessageAddress=,\
ItemIdentification=,\
TypeIdentification=,\
Role=\
StartTime=\
EndTime=
Sample parameter -
Relationship:MessageAddress=DISCOM-1-AD,ItemIdentification=DISCOM-1-AD,TypeIdentification=UTC/NBTTT,Role=Superior,StartTime=01/01/2001 12:00 am,EndTime= 01/01/2010 11:59 pm
StartTime and EndTime specifications are optional. Will default to
getDefaultStartTime()/getDefaultEndTime() if not included
|
Method Summary | |
protected void | addParamRelationship(String param) | protected void | addParamRelationships() | protected void | addPropertyToAsset(PropertyGroup pg) | protected void | addRelationship(String typeId, String itemId, String otherAgentId, String roleName, long start, long end) | protected void | callSetter(NewPropertyGroup pg, String setterName, String type, Object[] arguments) Creates and calls the appropriate "setter" method for the property
which is of type className. | protected Object | createMeasureObject(String className, double quantity, String unitOfMeasure) | protected void | createMyLocalAsset(String assetClassName) | protected NewPropertyGroup | createPropertyGroup(String propertyName) | protected NewTask | createReportTask(Asset reportingAsset, Asset sendto, Collection roles, long startTime, long endTime) | public void | execute() | protected Asset | getAsset(String className, String itemIdentification, String typeIdentification, String agentName) | protected AssetDataReader | getAssetDataReader() | public long | getDefaultEndTime() | public long | getDefaultStartTime() | protected int | getMeasureUnit(String measureClass, String unitOfMeasure) | protected Verb | getReportVerb(Collection roles) | protected String | getType(String type) | protected void | initAssets() | public void | load(Object object) | public long | parseDate(String dateString) | protected Object | parseExpr(String type, String arg) | protected Object | parseWithCOF(Class cl, String val) | protected void | processAssets() | protected void | report(Relationship relationship) | public void | setAssetInitializerService(AssetInitializerService ais) | protected void | setLocationSchedule(String latStr, String lonStr) | protected void | setupSubscriptions() |
ATTRIBUTE_DELIMITER | final public static String ATTRIBUTE_DELIMITER(Code) | | |
ETERNITY | protected static TrivialTimeSpan ETERNITY(Code) | | |
KEYWORD_DELIMITER | final public static String KEYWORD_DELIMITER(Code) | | |
RELATIONSHIP_KEY | final public static String RELATIONSHIP_KEY(Code) | | |
VALUE_DELIMITER | final public static String VALUE_DELIMITER(Code) | | |
myOtherAssets | protected Map myOtherAssets(Code) | | |
myRelationships | protected List myRelationships(Code) | | |
addParamRelationship | protected void addParamRelationship(String param)(Code) | | |
addParamRelationships | protected void addParamRelationships()(Code) | | |
callSetter | protected void callSetter(NewPropertyGroup pg, String setterName, String type, Object[] arguments)(Code) | | Creates and calls the appropriate "setter" method for the property
which is of type className.
|
createMeasureObject | protected Object createMeasureObject(String className, double quantity, String unitOfMeasure)(Code) | | Returns a measure object which is an instance of className and has
a quantity of unitOfMeasure
|
createMyLocalAsset | protected void createMyLocalAsset(String assetClassName)(Code) | | |
execute | public void execute()(Code) | | |
getDefaultEndTime | public long getDefaultEndTime()(Code) | | |
getDefaultStartTime | public long getDefaultStartTime()(Code) | | |
getMeasureUnit | protected int getMeasureUnit(String measureClass, String unitOfMeasure)(Code) | | Returns the integer value for the appropriate
unitOfMeasure field in the measureClass
|
initAssets | protected void initAssets()(Code) | | |
processAssets | protected void processAssets()(Code) | | Parses the prototype-ini file and in the process sets up
the relationships with pairs of "relationship"/"asset
|
setupSubscriptions | protected void setupSubscriptions()(Code) | | |
|
|