public void serializeBody(JAXBElement e, XMLSerializer target, Object outerPeer) throws SAXException, IOException, XMLStreamException { Class scope = e.getScope(); if(e.isGlobalScope()) scope = null; QName n = e.getName(); ElementBeanInfoImpl bi = grammar.getElement(scope,n); if(bi==null) { tbi = grammar.getBeanInfo(e.getDeclaredType(),true); } catch (JAXBException x) { return; Object value = e.getValue(); target.startElement(n.getNamespaceURI(),n.getLocalPart(),n.getPrefix(),null); if(value==null) {
public void serializeBody(JAXBElement e, XMLSerializer target, Object outerPeer) throws SAXException, IOException, XMLStreamException { Class scope = e.getScope(); if(e.isGlobalScope()) scope = null; QName n = e.getName(); ElementBeanInfoImpl bi = grammar.getElement(scope,n); if(bi==null) { tbi = grammar.getBeanInfo(e.getDeclaredType(),true); } catch (JAXBException x) { return; Object value = e.getValue(); target.startElement(n.getNamespaceURI(),n.getLocalPart(),n.getPrefix(),null); if(value==null) {
/** * Creates and returns a deep copy of a given {@code javax.xml.bind.JAXBElement<java.lang.String>} instance. * * @param e * The instance to copy or {@code null}. * @return * A deep copy of {@code e} or {@code null} if {@code e} is {@code null}. */ @SuppressWarnings("unchecked") private static JAXBElement<String> copyOfStringElement(final JAXBElement<String> e) { // CC-XJC Version 2.0 Build 2011-09-16T18:27:24+0000 if (e!= null) { final JAXBElement<String> copy = new JAXBElement<>(e.getName(), e.getDeclaredType(), e.getScope(), e.getValue()); copy.setNil(e.isNil()); // CBuiltinLeafInfo: java.lang.String copy.setValue(((String) copy.getValue())); return copy; } return null; }
@Nullable public static <DATATYPE> JAXBElement <DATATYPE> getClonedJAXBElement (@Nullable final JAXBElement <DATATYPE> aObj) { if (aObj == null) return null; final DATATYPE aClonedValue = CloneHelper.getClonedValue (aObj.getValue ()); final JAXBElement <DATATYPE> ret = new JAXBElement <> (aObj.getName (), aObj.getDeclaredType (), aObj.getScope (), aClonedValue); ret.setNil (aObj.isNil ()); return ret; } }
/** * Creates and returns a deep copy of a given {@code javax.xml.bind.JAXBElement<java.lang.String>} instance. * * @param e * The instance to copy or {@code null}. * @return * A deep copy of {@code e} or {@code null} if {@code e} is {@code null}. */ @SuppressWarnings("unchecked") private static JAXBElement<String> copyOfStringElement(final JAXBElement<String> e) { // CC-XJC Version 2.0 Build 2011-09-16T18:27:24+0000 if (e!= null) { final JAXBElement<String> copy = new JAXBElement<>(e.getName(), e.getDeclaredType(), e.getScope(), e.getValue()); copy.setNil(e.isNil()); // CBuiltinLeafInfo: java.lang.String copy.setValue(((String) copy.getValue())); return copy; } return null; }
/** * Creates and returns a deep copy of a given {@code JAXBElement} instance. * * @param element * The instance to copy or {@code null}. * @return * A deep copy of {@code element} or {@code null} if {@code element} is {@code null}. */ @SuppressWarnings("unchecked") private static JAXBElement copyOf(final JAXBElement element) { // CC-XJC Version 2.0 Build 2011-09-16T18:27:24+0000 if (element!= null) { final JAXBElement copy = new JAXBElement(element.getName(), element.getDeclaredType(), element.getScope(), element.getValue()); copy.setNil(element.isNil()); copy.setValue(copyOf(copy.getValue())); return copy; } return null; }
/** * Creates and returns a deep copy of a given {@code JAXBElement} instance. * * @param element * The instance to copy or {@code null}. * @return * A deep copy of {@code element} or {@code null} if {@code element} is {@code null}. */ @SuppressWarnings("unchecked") private static JAXBElement copyOf(final JAXBElement element) { // CC-XJC Version 2.0 Build 2011-09-16T18:27:24+0000 if (element!= null) { final JAXBElement copy = new JAXBElement(element.getName(), element.getDeclaredType(), element.getScope(), element.getValue()); copy.setNil(element.isNil()); copy.setValue(copyOf(copy.getValue())); return copy; } return null; }
/** * Creates and returns a deep copy of a given {@code JAXBElement} instance. * * @param element * The instance to copy or {@code null}. * @return * A deep copy of {@code element} or {@code null} if {@code element} is {@code null}. */ @SuppressWarnings("unchecked") private static JAXBElement copyOf(final JAXBElement element) { // CC-XJC Version 2.0 Build 2011-09-16T18:27:24+0000 if (element!= null) { final JAXBElement copy = new JAXBElement(element.getName(), element.getDeclaredType(), element.getScope(), element.getValue()); copy.setNil(element.isNil()); copy.setValue(copyOf(copy.getValue())); return copy; } return null; }
/** * Creates and returns a deep copy of a given {@code JAXBElement} instance. * * @param element * The instance to copy or {@code null}. * @return * A deep copy of {@code element} or {@code null} if {@code element} is {@code null}. */ @SuppressWarnings("unchecked") private static JAXBElement copyOf(final JAXBElement element) { // CC-XJC Version 2.0 Build 2011-09-16T18:27:24+0000 if (element!= null) { final JAXBElement copy = new JAXBElement(element.getName(), element.getDeclaredType(), element.getScope(), element.getValue()); copy.setNil(element.isNil()); copy.setValue(copyOf(copy.getValue())); return copy; } return null; }
@SuppressWarnings({ "unchecked", "rawtypes" }) private JAXBElement<?> doDuplicateJAXBElement(JAXBElement<?> originalObject) { if (originalObject == null) return null; final JAXBElement<?> sourceElement = (JAXBElement<?>) originalObject; final Object sourceObject = sourceElement.getValue(); final Object copyObject = doDuplicate(sourceObject); final JAXBElement copyElement = new JAXBElement( sourceElement.getName(), sourceElement.getDeclaredType(), sourceElement.getScope(), copyObject); return copyElement; }
/** * Creates and returns a deep copy of a given {@code javax.xml.bind.JAXBElement<com.evolveum.midpoint.xml.ns._public.common.common_3.ResourceType>} instance. * * @param e * The instance to copy or {@code null}. * @return * A deep copy of {@code e} or {@code null} if {@code e} is {@code null}. */ @SuppressWarnings("unchecked") private static JAXBElement<ResourceType> copyOfResourceTypeElement(final JAXBElement<ResourceType> e) { // CC-XJC Version 2.0 Build 2011-09-16T18:27:24+0000 if (e!= null) { final JAXBElement<ResourceType> copy = new JAXBElement<ResourceType>(e.getName(), e.getDeclaredType(), e.getScope(), e.getValue()); copy.setNil(e.isNil()); // CClassInfo: com.evolveum.midpoint.xml.ns._public.common.common_3.ResourceType copy.setValue(((((ResourceType) copy.getValue()) == null)?null:((ResourceType) copy.getValue()).clone())); return copy; } return null; }
/** * Creates and returns a deep copy of a given {@code javax.xml.bind.JAXBElement<com.evolveum.midpoint.xml.ns._public.common.common_3.NodeType>} instance. * * @param e * The instance to copy or {@code null}. * @return * A deep copy of {@code e} or {@code null} if {@code e} is {@code null}. */ @SuppressWarnings("unchecked") private static JAXBElement<NodeType> copyOfNodeTypeElement(final JAXBElement<NodeType> e) { // CC-XJC Version 2.0 Build 2011-09-16T18:27:24+0000 if (e!= null) { final JAXBElement<NodeType> copy = new JAXBElement<NodeType>(e.getName(), e.getDeclaredType(), e.getScope(), e.getValue()); copy.setNil(e.isNil()); // CClassInfo: com.evolveum.midpoint.xml.ns._public.common.common_3.NodeType copy.setValue(((((NodeType) copy.getValue()) == null)?null:((NodeType) copy.getValue()).clone())); return copy; } return null; }
/** * Creates and returns a deep copy of a given {@code javax.xml.bind.JAXBElement<com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectCollectionType>} instance. * * @param e * The instance to copy or {@code null}. * @return * A deep copy of {@code e} or {@code null} if {@code e} is {@code null}. */ @SuppressWarnings("unchecked") private static JAXBElement<ObjectCollectionType> copyOfObjectCollectionTypeElement(final JAXBElement<ObjectCollectionType> e) { // CC-XJC Version 2.0 Build 2011-09-16T18:27:24+0000 if (e!= null) { final JAXBElement<ObjectCollectionType> copy = new JAXBElement<ObjectCollectionType>(e.getName(), e.getDeclaredType(), e.getScope(), e.getValue()); copy.setNil(e.isNil()); // CClassInfo: com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectCollectionType copy.setValue(((((ObjectCollectionType) copy.getValue()) == null)?null:((ObjectCollectionType) copy.getValue()).clone())); return copy; } return null; }
/** * Creates and returns a deep copy of a given {@code javax.xml.bind.JAXBElement<com.evolveum.midpoint.xml.ns._public.common.common_3.ConnectorType>} instance. * * @param e * The instance to copy or {@code null}. * @return * A deep copy of {@code e} or {@code null} if {@code e} is {@code null}. */ @SuppressWarnings("unchecked") private static JAXBElement<ConnectorType> copyOfConnectorTypeElement(final JAXBElement<ConnectorType> e) { // CC-XJC Version 2.0 Build 2011-09-16T18:27:24+0000 if (e!= null) { final JAXBElement<ConnectorType> copy = new JAXBElement<ConnectorType>(e.getName(), e.getDeclaredType(), e.getScope(), e.getValue()); copy.setNil(e.isNil()); // CClassInfo: com.evolveum.midpoint.xml.ns._public.common.common_3.ConnectorType copy.setValue(((((ConnectorType) copy.getValue()) == null)?null:((ConnectorType) copy.getValue()).clone())); return copy; } return null; }
/** * Creates and returns a deep copy of a given {@code javax.xml.bind.JAXBElement<com.evolveum.midpoint.xml.ns._public.common.common_3.ShadowType>} instance. * * @param e * The instance to copy or {@code null}. * @return * A deep copy of {@code e} or {@code null} if {@code e} is {@code null}. */ @SuppressWarnings("unchecked") private static JAXBElement<ShadowType> copyOfShadowTypeElement(final JAXBElement<ShadowType> e) { // CC-XJC Version 2.0 Build 2011-09-16T18:27:24+0000 if (e!= null) { final JAXBElement<ShadowType> copy = new JAXBElement<ShadowType>(e.getName(), e.getDeclaredType(), e.getScope(), e.getValue()); copy.setNil(e.isNil()); // CClassInfo: com.evolveum.midpoint.xml.ns._public.common.common_3.ShadowType copy.setValue(((((ShadowType) copy.getValue()) == null)?null:((ShadowType) copy.getValue()).clone())); return copy; } return null; }
/** * Creates and returns a deep copy of a given {@code javax.xml.bind.JAXBElement<com.evolveum.midpoint.xml.ns._public.common.common_3.FunctionLibraryType>} instance. * * @param e * The instance to copy or {@code null}. * @return * A deep copy of {@code e} or {@code null} if {@code e} is {@code null}. */ @SuppressWarnings("unchecked") private static JAXBElement<FunctionLibraryType> copyOfFunctionLibraryTypeElement(final JAXBElement<FunctionLibraryType> e) { // CC-XJC Version 2.0 Build 2011-09-16T18:27:24+0000 if (e!= null) { final JAXBElement<FunctionLibraryType> copy = new JAXBElement<FunctionLibraryType>(e.getName(), e.getDeclaredType(), e.getScope(), e.getValue()); copy.setNil(e.isNil()); // CClassInfo: com.evolveum.midpoint.xml.ns._public.common.common_3.FunctionLibraryType copy.setValue(((((FunctionLibraryType) copy.getValue()) == null)?null:((FunctionLibraryType) copy.getValue()).clone())); return copy; } return null; }
/** * Creates and returns a deep copy of a given {@code javax.xml.bind.JAXBElement<com.evolveum.midpoint.xml.ns._public.model.scripting_3.ActionExpressionType>} instance. * * @param e * The instance to copy or {@code null}. * @return * A deep copy of {@code e} or {@code null} if {@code e} is {@code null}. */ @SuppressWarnings("unchecked") private static JAXBElement<ActionExpressionType> copyOfActionExpressionTypeElement(final JAXBElement<ActionExpressionType> e) { // CC-XJC Version 2.0 Build 2011-09-16T18:27:24+0000 if (e!= null) { final JAXBElement<ActionExpressionType> copy = new JAXBElement<ActionExpressionType>(e.getName(), e.getDeclaredType(), e.getScope(), e.getValue()); copy.setNil(e.isNil()); // CClassInfo: com.evolveum.midpoint.xml.ns._public.model.scripting_3.ActionExpressionType copy.setValue(((((ActionExpressionType) copy.getValue()) == null)?null:((ActionExpressionType) copy.getValue()).clone())); return copy; } return null; }
/** * Creates and returns a deep copy of a given {@code javax.xml.bind.JAXBElement<com.evolveum.midpoint.xml.ns._public.model.scripting_3.FilterExpressionType>} instance. * * @param e * The instance to copy or {@code null}. * @return * A deep copy of {@code e} or {@code null} if {@code e} is {@code null}. */ @SuppressWarnings("unchecked") private static JAXBElement<FilterExpressionType> copyOfFilterExpressionTypeElement(final JAXBElement<FilterExpressionType> e) { // CC-XJC Version 2.0 Build 2011-09-16T18:27:24+0000 if (e!= null) { final JAXBElement<FilterExpressionType> copy = new JAXBElement<FilterExpressionType>(e.getName(), e.getDeclaredType(), e.getScope(), e.getValue()); copy.setNil(e.isNil()); // CClassInfo: com.evolveum.midpoint.xml.ns._public.model.scripting_3.FilterExpressionType copy.setValue(((((FilterExpressionType) copy.getValue()) == null)?null:((FilterExpressionType) copy.getValue()).clone())); return copy; } return null; }
/** * Creates and returns a deep copy of a given {@code javax.xml.bind.JAXBElement<com.evolveum.midpoint.xml.ns._public.common.common_3.FormFieldGroupType>} instance. * * @param e * The instance to copy or {@code null}. * @return * A deep copy of {@code e} or {@code null} if {@code e} is {@code null}. */ @SuppressWarnings("unchecked") private static JAXBElement<FormFieldGroupType> copyOfFormFieldGroupTypeElement(final JAXBElement<FormFieldGroupType> e) { // CC-XJC Version 2.0 Build 2011-09-16T18:27:24+0000 if (e!= null) { final JAXBElement<FormFieldGroupType> copy = new JAXBElement<FormFieldGroupType>(e.getName(), e.getDeclaredType(), e.getScope(), e.getValue()); copy.setNil(e.isNil()); // CClassInfo: com.evolveum.midpoint.xml.ns._public.common.common_3.FormFieldGroupType copy.setValue(((((FormFieldGroupType) copy.getValue()) == null)?null:((FormFieldGroupType) copy.getValue()).clone())); return copy; } return null; }
/** * Creates and returns a deep copy of a given {@code javax.xml.bind.JAXBElement<com.evolveum.midpoint.xml.ns._public.model.scripting_3.SearchExpressionType>} instance. * * @param e * The instance to copy or {@code null}. * @return * A deep copy of {@code e} or {@code null} if {@code e} is {@code null}. */ @SuppressWarnings("unchecked") private static JAXBElement<SearchExpressionType> copyOfSearchExpressionTypeElement(final JAXBElement<SearchExpressionType> e) { // CC-XJC Version 2.0 Build 2011-09-16T18:27:24+0000 if (e!= null) { final JAXBElement<SearchExpressionType> copy = new JAXBElement<SearchExpressionType>(e.getName(), e.getDeclaredType(), e.getScope(), e.getValue()); copy.setNil(e.isNil()); // CClassInfo: com.evolveum.midpoint.xml.ns._public.model.scripting_3.SearchExpressionType copy.setValue(((((SearchExpressionType) copy.getValue()) == null)?null:((SearchExpressionType) copy.getValue()).clone())); return copy; } return null; }