|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.openharbor.beck.unmarshal.DefaultUnmarshaller
com.openharbor.beck.unmarshal.GroupUnmarshaller
com.openharbor.beck.unmarshal.CollectionUnmarshaller
Maps to a collection, with members mapped from contained elements.
| Field Summary |
| Fields inherited from class com.openharbor.beck.unmarshal.DefaultUnmarshaller |
data, documentState, log |
| Constructor Summary | |
CollectionUnmarshaller()
|
|
| Method Summary | |
void |
addChild(Unmarshaller child)
Create a reference from this object to the given child object. |
protected java.util.Collection |
getCollection()
|
java.lang.Class |
getObjectClass()
|
java.lang.Object |
getValue(Unmarshaller child,
java.lang.Object[] getterParameters)
Traverse an existing relationship from parent to child. |
java.lang.Object |
getValue(Unmarshaller child,
java.lang.Object[] getterParameters,
boolean toRemove,
boolean toReplace)
|
java.lang.Class |
getValueClass(JavaBeanUnmarshaller parent)
Find the expected class of a child object; for example, the declared class of a field or JavaBean property. |
java.lang.Object |
removeValue(Unmarshaller child,
java.lang.Object[] getterParameters)
|
java.lang.Object |
replaceValue(Unmarshaller child,
java.lang.Object[] getterParameters)
|
void |
setValue(Unmarshaller child,
java.lang.Object[] getterParameters)
Create a relationship from parent to child. |
| Methods inherited from class com.openharbor.beck.unmarshal.GroupUnmarshaller |
locateChild, removeChildAt, removeLastChild, swapLastChildWith |
| Methods inherited from class com.openharbor.beck.unmarshal.DefaultUnmarshaller |
addToParent, addValue, afterEndObject, disengage, disengaged, endElement, endObject, engage, getChildClass, getMap, getMapFromXML, getObject, getParent, getSource, getSourceXPath, getXMLContext, getXName, getXPath, isEngaged, newObject, processAttributes, referToThis, reset, rethrow, setMapFromXML, setObject, setObjectClass, setParentAndSource, setValue, setXMLContext, startElement, startObject, toString, trim |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public CollectionUnmarshaller()
| Method Detail |
public java.lang.Class getObjectClass()
getObjectClass in interface UnmarshallergetObjectClass in class DefaultUnmarshaller
public void addChild(Unmarshaller child)
throws java.lang.Exception
Unmarshaller
addChild in interface UnmarshalleraddChild in class DefaultUnmarshallerjava.lang.Exceptionprotected java.util.Collection getCollection()
getCollection in class GroupUnmarshaller
public void setValue(Unmarshaller child,
java.lang.Object[] getterParameters)
throws java.lang.Exception
Setter
setValue in interface Setterchild - describes the child object. child.getParent() describes the parent.getterParameters - additional parameters to the setter method, such as LocaleTag.
java.lang.Exception - something went wrong
public java.lang.Object removeValue(Unmarshaller child,
java.lang.Object[] getterParameters)
throws java.lang.Exception
removeValue in interface Setterjava.lang.Exception
public java.lang.Object replaceValue(Unmarshaller child,
java.lang.Object[] getterParameters)
throws java.lang.Exception
replaceValue in interface Setterjava.lang.Exception
public java.lang.Object getValue(Unmarshaller child,
java.lang.Object[] getterParameters)
throws java.lang.Exception
SetterTraverse an existing relationship from parent to child. Call child.setObject() and child.setObjectClass() to record the child's identity and type, and return a reference to the child.
This method is used to resolve XPaths. Given an object and an XPath, we create an Unmarshaller for every level of the XPath, use the mapper to retrieve the corresponding setters, then traverse the object model using this method.
getValue in interface Setterchild - Child unmarshaller, which represents the property we're interested in. The parent
(or the object whose property is to be read) can be accessed by child.getParent().getterParameters - the parameters the getter takes. Typically, getters take no parameters,
and null can be passed in. With mutli-lingual properties however,
LocaleTag must be passed in to identify the language of interest,
java.lang.Exception - something went wrong
public java.lang.Object getValue(Unmarshaller child,
java.lang.Object[] getterParameters,
boolean toRemove,
boolean toReplace)
throws java.lang.Exception
java.lang.Exceptionpublic java.lang.Class getValueClass(JavaBeanUnmarshaller parent)
Setter
getValueClass in interface Setterparent - describes the parent object, or null
if the parent is not yet known.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||