@Override protected void processComplexElement() throws SAXException { // Remove original startElement event as it has been precluded by the startElement call below getEvents().remove(0); createEmptyObject(); // execute events on the child executeEvents(getParent().getChildRecord()); } }
@Override protected void processSimpleElement() throws SAXException { // Remove original startElement event as it has been precluded by the startElement call below getEvents().remove(0); // testcase: <team><manager>10</manager></team> where 10=text() or id mapping createEmptyObject(); executeEvents(getParent().getChildRecord()); }
Object valueToSet = unmarshalRecord.getChildRecord().getCurrentObject(); if (xmlCompositeObjectMapping.getConverter() != null) { Converter converter = xmlCompositeObjectMapping.getConverter();
public void endElement(XPathFragment xPathFragment, UnmarshalRecord unmarshalRecord) { Object collection = unmarshalRecord.getContainerInstance(this); if (null != unmarshalRecord.getChildRecord()) { Object objectValue = unmarshalRecord.getChildRecord().getCurrentObject(); if(xmlAnyCollectionMapping.getConverter() != null) { objectValue = xmlAnyCollectionMapping.getConverter().convertDataValueToObjectValue(objectValue, unmarshalRecord.getSession(), unmarshalRecord.getUnmarshaller()); Object childObject = unmarshalRecord.getChildRecord().getCurrentObject();
childRecord.startDocument(); childRecord.startElement(xPathFragment.getNamespaceURI(), xPathFragment.getLocalName(), xPathFragment.getShortName(), atts); unmarshalRecord.getXMLReader().setContentHandler(unmarshalRecord.getChildRecord()); try { unmarshalRecord.getXMLReader().setProperty("http://xml.org/sax/properties/lexical-handler", unmarshalRecord.getChildRecord()); } catch (SAXNotRecognizedException ex) { } catch (SAXNotSupportedException ex) {
public void endElement(XPathFragment xPathFragment, UnmarshalRecord unmarshalRecord) { if (null == unmarshalRecord.getChildRecord()) { SAXFragmentBuilder builder = unmarshalRecord.getFragmentBuilder(); UnmarshalKeepAsElementPolicy keepAsElementPolicy = xmlCompositeObjectMapping.getKeepAsElementPolicy(); Object object = unmarshalRecord.getChildRecord().getCurrentObject(); if (xmlCompositeObjectMapping.getConverter() != null) { Converter converter = xmlCompositeObjectMapping.getConverter();
public void endElement(XPathFragment xPathFragment, UnmarshalRecord unmarshalRecord, Object collection) { if (null == unmarshalRecord.getChildRecord()) { SAXFragmentBuilder builder = unmarshalRecord.getFragmentBuilder(); UnmarshalKeepAsElementPolicy keepAsElementPolicy = xmlCompositeCollectionMapping.getKeepAsElementPolicy(); Object objectValue = unmarshalRecord.getChildRecord().getCurrentObject(); if (xmlCompositeCollectionMapping.hasConverter()) { Converter converter = xmlCompositeCollectionMapping.getConverter();
public void endElement(XPathFragment xPathFragment, UnmarshalRecord unmarshalRecord) { unmarshalRecord.removeNullCapableValue(this); UnmarshalRecord childRecord = unmarshalRecord.getChildRecord(); if (null != childRecord) { Object childObject = childRecord.getCurrentObject();