| java.lang.Object org.cougaar.lib.vishnu.client.BaseXMLize
All known Subclasses: org.cougaar.lib.vishnu.client.FormatXMLize, org.cougaar.lib.vishnu.client.ALPXMLize,
BaseXMLize | abstract public class BaseXMLize (Code) | | Create and return xml for first class log plan objects.
Element name is extracted from object class, by taking the
last field of the object class, and dropping a trailing "Impl",
if it exists.
|
Method Summary | |
protected void | addNodes(Document doc, Object obj, Element parentElement, int searchDepth, Collection createdNodes) Recursively introspect and add nodes to the XML document.
Keeps a Set of objects (as these can be circular) and stops
when it tries to introspect over an object a second time.
Also keeps a depth counter, decrements for each call to addNodes,
and stops when the counter is zero. | abstract protected Element | createRootNode(Document doc, String tag, boolean isTask, boolean isResource, Object obj, String resourceClassName) | protected void | generateElem(Document doc, Element parentElement, String propertyName, Object propertyValue, int searchDepth, boolean isList, boolean isFirst, Collection createdNodes) | abstract protected void | generateElementReachedMaxDepth(Document doc, Element parentElement, Object obj) Already seen this object or reached maximum depth. | abstract protected void | generateLeaf(Document doc, Element parentElement, String propertyName, Object propertyValue) | abstract protected void | generateNonLeaf(Document doc, Element parentElement, String propertyName, Object propertyValue, int searchDepth, boolean isList, boolean isFirst, Collection createdNodes) | public List | getDynamicAssetProperties(Asset asset) | public Element | getPlanObjectXML(Object obj, Document doc, String resourceClassName) | public Element | getPlanObjectXML(Object obj, Document doc, int searchDepth, String resourceClassName) | public Collection | getPlanObjectXMLNodes(Object obj, Document doc, String resourceClassName) | public Collection | getPlanObjectXMLNodes(Object obj, Document doc, int searchDepth, String resourceClassName) | protected List | getProperties(Object obj, Map listProps) | protected Object | getReadResult(Object obj, Method rm) | protected String | getValueOfPrimitiveFloat(Object value) | protected boolean | ignoreClass(Class aClass) | protected boolean | isPrimitive(Class propertyClass) Includes Double, Integer, etc. | protected boolean | isPrimitiveFloat(Class theClass) | protected boolean | isUniqueObject(Object obj) | protected PropertyDescriptor[] | prunePropertiesFromMeasure(AbstractMeasure measure, PropertyDescriptor[] properties) Removes redundant measure properties.
Returns only the common unit measure. | protected void | reportTime(String prefix, Date start) |
DEFAULT_UID_DEPTH | final protected int DEFAULT_UID_DEPTH(Code) | | Maximum search depth -- Integer.MAX_VALUE means unlimited. *
|
MAX_VALUE_STRING | final protected static String MAX_VALUE_STRING(Code) | | |
MIN_VALUE_STRING | final protected static String MIN_VALUE_STRING(Code) | | |
abstractMeasureClass | protected Class abstractMeasureClass(Code) | | |
classToBeanInfo | protected Map classToBeanInfo(Code) | | |
commonUnitToNoUnders | protected Map commonUnitToNoUnders(Code) | | |
addNodes | protected void addNodes(Document doc, Object obj, Element parentElement, int searchDepth, Collection createdNodes)(Code) | | Recursively introspect and add nodes to the XML document.
Keeps a Set of objects (as these can be circular) and stops
when it tries to introspect over an object a second time.
Also keeps a depth counter, decrements for each call to addNodes,
and stops when the counter is zero. Use Integer.MAX_VALUE to
indicate an unlimited search.
|
createRootNode | abstract protected Element createRootNode(Document doc, String tag, boolean isTask, boolean isResource, Object obj, String resourceClassName)(Code) | | subclass to generate different tag
|
generateElementReachedMaxDepth | abstract protected void generateElementReachedMaxDepth(Document doc, Element parentElement, Object obj)(Code) | | Already seen this object or reached maximum depth.
Write the UID if possible, otherwise write the "toString".
|
generateNonLeaf | abstract protected void generateNonLeaf(Document doc, Element parentElement, String propertyName, Object propertyValue, int searchDepth, boolean isList, boolean isFirst, Collection createdNodes)(Code) | | |
getDynamicAssetProperties | public List getDynamicAssetProperties(Asset asset)(Code) | | |
getReadResult | protected Object getReadResult(Object obj, Method rm)(Code) | | Invoke read method on object
Object that is the result of the read |
ignoreClass | protected boolean ignoreClass(Class aClass)(Code) | | ignore these classes when generating properties
Ignore : Class, AspectScoreRange, WorkflowImpl
|
isPrimitive | protected boolean isPrimitive(Class propertyClass)(Code) | | Includes Double, Integer, etc. and Boolean as primitive types.
Checks to see if class is a direct descendant of Number or a
Boolean.
true when class is of a primitive type |
isPrimitiveFloat | protected boolean isPrimitiveFloat(Class theClass)(Code) | | |
isUniqueObject | protected boolean isUniqueObject(Object obj)(Code) | | |
prunePropertiesFromMeasure | protected PropertyDescriptor[] prunePropertiesFromMeasure(AbstractMeasure measure, PropertyDescriptor[] properties)(Code) | | Removes redundant measure properties.
Returns only the common unit measure.
For example, for Distance, returns only the meters property and discards furlongs.
(Converts underscores in common unit names.)
Parameters: measure - needed so can get common unit Parameters: properties - initial complete set of measure properties array containing the one property descriptor for the common unit property |
|
|