| java.lang.Object org.cougaar.lib.vishnu.client.custom.XMLDataHelper
XMLDataHelper | public class XMLDataHelper implements DataHelper(Code) | | Fills in DOM document nodes given Cougaar Objects.
|
Method Summary | |
public void | addListValue(Object parent, String fieldName, String type, Object toAppend) | public void | createAvailableScheduleListField(Object object, String name, Asset asset) Translates Asset available schedule into equivalent Vishnu XML. | public void | createBooleanField(Object parent, String name, boolean value) | public void | createDateField(Object parent, String name, Date date) shortcut to create a date field on parent
Translates date into string. | public Object | createField(Object parent, String parentType, String name) | public void | createField(Object parent, String parentType, String name, String value) | protected Object | createFieldPair(String name, String value) | public void | createFloatField(Object parent, String name, float value) | public void | createGeoloc(Object parent, String parentFieldName, NamedPosition loc) Translate a Cougaar GeolocLocation into the equivalent DOM structure. | public void | createLatLon(Object parent, String parentFieldName, LatLonPoint loc) | public Object | createObject(Object parent, String type) | public void | createRoleScheduleListField(Object object, String name, Asset asset) Translates Asset role schedule into equivalent Vishnu XML. | protected void | createScheduleFields(Collection schedule, Element list, boolean isRole) Walk the schedule and append interval elements to the list element for
each TimeSpan in the schedule. | public void | setDoc(Document doc) | public Object | startList(Object object, String name) |
createAvailableScheduleListField | public void createAvailableScheduleListField(Object object, String name, Asset asset)(Code) | | Translates Asset available schedule into equivalent Vishnu XML.
TimeSpans(PlanElements) in the available schedule get translated into Vishnu intervals.
Calls getScheduleFields to do real work.
Parameters: object - - the DOM Element to add the name list field to Parameters: name - - the name of the list field Parameters: asset - - the asset with the role schedule See Also: XMLDataHelper.createScheduleFields |
createBooleanField | public void createBooleanField(Object parent, String name, boolean value)(Code) | | shortcut to create a boolean field on parent
|
createDateField | public void createDateField(Object parent, String name, Date date)(Code) | | shortcut to create a date field on parent
Translates date into string.
|
createField | public Object createField(Object parent, String parentType, String name)(Code) | | add a field on parent
Parameters: parentType - - ignored, important in DirectDataHelper |
createField | public void createField(Object parent, String parentType, String name, String value)(Code) | | Generic field creation
adds a field as name-value pair to parent
See Also: XMLDataHelper.createFieldPair Parameters: parent - SchObject object to add the field to Parameters: parentType - - ignored, important in DirectDataHelper Parameters: name - field name Parameters: value - field's value |
createFloatField | public void createFloatField(Object parent, String name, float value)(Code) | | shortcut to create a float field on parent
|
createGeoloc | public void createGeoloc(Object parent, String parentFieldName, NamedPosition loc)(Code) | | Translate a Cougaar GeolocLocation into the equivalent DOM structure.
Adds a latlong object to the parent object, and adds the geoloc
to the parent.
Parameters: parent - - the Element to add the parentFieldName geoloc field to Parameters: parentFieldName - - the base name of the geoloc field Parameters: loc - - the Cougaar GeolocLocation to translate into a DOM structure |
createObject | public Object createObject(Object parent, String type)(Code) | | create a DOM Element of type type
Parameters: parent - - Element to attach this new Element to Parameters: type - - type of the new OBJECT Element |
createRoleScheduleListField | public void createRoleScheduleListField(Object object, String name, Asset asset)(Code) | | Translates Asset role schedule into equivalent Vishnu XML.
TimeSpans(PlanElements) in the role schedule get translated into Vishnu intervals.
Calls getScheduleFields to do real work.
Parameters: object - - the DOM Element to add the name list field to Parameters: name - - the name of the list field Parameters: asset - - the asset with the role schedule See Also: XMLDataHelper.createScheduleFields See Also: org.cougaar.planning.ldm.plan.RoleSchedule |
createScheduleFields | protected void createScheduleFields(Collection schedule, Element list, boolean isRole)(Code) | | Walk the schedule and append interval elements to the list element for
each TimeSpan in the schedule.
Parameters: schedule - TimeSpan Collection from the role schedule or available schedule Parameters: list - elem to add interval elements to Parameters: isRole - if true, sets the interval label1 to the Verb of the Task of the TimeSpan/PlanElement See Also: org.cougaar.util.TimeSpan See Also: org.cougaar.planning.ldm.plan.PlanElement |
setDoc | public void setDoc(Document doc)(Code) | | set the document that is being created
|
|
|