public void endElement(XPathFragment xPathFragment, UnmarshalRecord unmarshalRecord) { Object collection = unmarshalRecord.getContainerInstance(this); endElement(xPathFragment, unmarshalRecord, collection); }
public void addAttributeValue(UnmarshalRecord unmarshalRecord, ContainerValue containerValue, Object value) { Object collection = unmarshalRecord.getContainerInstance(containerValue); addAttributeValue(unmarshalRecord, containerValue, value, collection); }
public void addAttributeValue(UnmarshalRecord unmarshalRecord, ContainerValue containerValue, Object value) { addAttributeValue(unmarshalRecord, containerValue, value, unmarshalRecord.getContainerInstance(containerValue)); }
public void attribute(UnmarshalRecord unmarshalRecord, String namespaceURI, String localName, String value) { Object collection = unmarshalRecord.getContainerInstance(this); if (xmlCompositeDirectCollectionMapping.usesSingleNode()) { StringTokenizer stringTokenizer = new StringTokenizer(value); while (stringTokenizer.hasMoreTokens()) { addUnmarshalValue(unmarshalRecord, stringTokenizer.nextToken(), collection); } } else { addUnmarshalValue(unmarshalRecord, value, collection); } }
public void attribute(UnmarshalRecord unmarshalRecord, String namespaceURI, String localName, String value) { DirectMapContainerPolicy cp = (DirectMapContainerPolicy) xmlAnyAttributeMapping.getContainerPolicy(); Object containerInstance = unmarshalRecord.getContainerInstance(this); boolean includeAttribute = true; if(!xmlAnyAttributeMapping.isNamespaceDeclarationIncluded() && XMLConstants.XMLNS_URL.equals(namespaceURI)){ includeAttribute = false; }else if(!xmlAnyAttributeMapping.isSchemaInstanceIncluded() && XMLConstants.SCHEMA_INSTANCE_URL.equals(namespaceURI)){ includeAttribute = false; } if(includeAttribute){ QName key = new QName(namespaceURI, localName); cp.addInto(key, value, containerInstance, unmarshalRecord.getSession()); } }
public void endElement(XPathFragment xPathFragment, UnmarshalRecord unmarshalRecord) { XMLField xmlField = (XMLField) xmlCompositeDirectCollectionMapping.getField(); if (!xmlField.getLastXPathFragment().nameIsText()) { return; } Object value = unmarshalRecord.getStringBuffer().toString(); Object collection = unmarshalRecord.getContainerInstance(this); unmarshalRecord.resetStringBuffer(); if (xmlCompositeDirectCollectionMapping.usesSingleNode()) { StringTokenizer stringTokenizer = new StringTokenizer((String) value); while (stringTokenizer.hasMoreTokens()) { addUnmarshalValue(unmarshalRecord, stringTokenizer.nextToken(), collection); } } else { if (value.equals(XMLConstants.EMPTY_STRING)) { if (xmlCompositeDirectCollectionMapping.getNullPolicy().isNullRepresentedByEmptyNode() || xmlCompositeDirectCollectionMapping.getNullPolicy().isNullRepresentedByXsiNil()) { return; } } addUnmarshalValue(unmarshalRecord, value, collection); } }
public boolean startElement(XPathFragment xPathFragment, UnmarshalRecord unmarshalRecord, Attributes atts) { XMLField xmlField = (XMLField) xmlCompositeDirectCollectionMapping.getField(); if (xmlField.getLastXPathFragment().nameIsText()) { String type = atts.getValue(XMLConstants.SCHEMA_INSTANCE_URL, XMLConstants.SCHEMA_TYPE_ATTRIBUTE); if (null != type) { String namespaceURI = null; int colonIndex = type.indexOf(XMLConstants.COLON); if (colonIndex > -1) { String prefix = type.substring(0, colonIndex); namespaceURI = unmarshalRecord.resolveNamespacePrefix(prefix); type = type.substring(colonIndex + 1); } unmarshalRecord.setTypeQName(new QName(namespaceURI, type)); } if (xmlCompositeDirectCollectionMapping.getNullPolicy().isNullRepresentedByXsiNil() && xmlCompositeDirectCollectionMapping.getNullPolicy().valueIsNull(atts)) { getContainerPolicy().addInto(null, unmarshalRecord.getContainerInstance(this), unmarshalRecord.getSession()); } } else if (xmlField.getLastXPathFragment().isAttribute()) { if (!this.xmlCompositeDirectCollectionMapping.usesSingleNode()) { String namespaceURI = xmlField.getLastXPathFragment().getNamespaceURI(); if (namespaceURI == null) { namespaceURI = XMLConstants.EMPTY_STRING; } String value = atts.getValue(namespaceURI, xmlField.getLastXPathFragment().getLocalName()); Object collection = unmarshalRecord.getContainerInstance(this); addUnmarshalValue(unmarshalRecord, value, collection); } } return true; }
public void endElement(XPathFragment xPathFragment, UnmarshalRecord unmarshalRecord) { Object collection = unmarshalRecord.getContainerInstance(this.containerNodeValue); if(null != xmlChoiceCollectionMapping.getConverter()) { UnmarshalContext unmarshalContext = unmarshalRecord.getUnmarshalContext(); unmarshalRecord.setUnmarshalContext(new ChoiceUnmarshalContext(unmarshalContext, xmlChoiceCollectionMapping.getConverter())); this.choiceElementNodeValue.endElement(xPathFragment, unmarshalRecord, collection); unmarshalRecord.setUnmarshalContext(unmarshalContext); } else { this.choiceElementNodeValue.endElement(xPathFragment, unmarshalRecord, collection); } }
getContainerPolicy().addInto(null, unmarshalRecord.getContainerInstance(this), unmarshalRecord.getSession()); } else { XMLField xmlFld = (XMLField) this.xmlCompositeCollectionMapping.getField();
public boolean startElement(XPathFragment xPathFragment, UnmarshalRecord unmarshalRecord, Attributes atts) { try { Object collection = unmarshalRecord.getContainerInstance(this); startElementProcessText(unmarshalRecord, collection); XMLContext xmlContext = unmarshalRecord.getUnmarshaller().getXMLContext();
public void endElement(XPathFragment xPathFragment, UnmarshalRecord unmarshalRecord) { Object collection = unmarshalRecord.getContainerInstance(this); if (null != unmarshalRecord.getChildRecord()) {