use of org.eclipse.persistence.oxm.attachment.XMLAttachmentMarshaller in project eclipselink by eclipse-ee4j.
the class SDOXMLHelperDelegate method serialize.
@Override
public void serialize(XMLDocument xmlDocument, OutputStream outputStream, Object options) throws IOException {
XMLMarshaller xmlMarshaller = getXmlMarshaller();
XMLAttachmentMarshaller attachmentMarshaller = xmlMarshaller.getAttachmentMarshaller();
// temporarily null out the attachment marshaller as it should not be used during serialization
xmlMarshaller.setAttachmentMarshaller(null);
OutputStreamWriter writer = new OutputStreamWriter(outputStream, xmlMarshaller.getEncoding());
save(xmlDocument, writer, xmlMarshaller);
xmlMarshaller.setAttachmentMarshaller(attachmentMarshaller);
}
use of org.eclipse.persistence.oxm.attachment.XMLAttachmentMarshaller in project eclipselink by eclipse-ee4j.
the class LoadAndSaveBase64AttachmentTestCases method setUp.
@Override
public void setUp() {
super.setUp();
XMLMarshaller aMarshaller = ((SDOXMLHelper) xmlHelper).getXmlMarshaller();
XMLUnmarshaller anUnmarshaller = ((SDOXMLHelper) xmlHelper).getXmlUnmarshaller();
XMLAttachmentMarshaller anAttachmentMarshaller = new AttachmentMarshallerImpl("c_id0");
XMLAttachmentUnmarshaller anAttachmentUnmarshaller = new AttachmentUnmarshallerImpl("Testing".getBytes());
aMarshaller.setAttachmentMarshaller(anAttachmentMarshaller);
anUnmarshaller.setAttachmentUnmarshaller(anAttachmentUnmarshaller);
}
use of org.eclipse.persistence.oxm.attachment.XMLAttachmentMarshaller in project eclipselink by eclipse-ee4j.
the class LoadAndSaveMimeTypeOnPropertyTestCases method setUp.
@Override
public void setUp() {
super.setUp();
XMLMarshaller aMarshaller = ((SDOXMLHelper) xmlHelper).getXmlMarshaller();
XMLUnmarshaller anUnmarshaller = ((SDOXMLHelper) xmlHelper).getXmlUnmarshaller();
XMLAttachmentMarshaller anAttachmentMarshaller = new AttachmentMarshallerImpl("c_id0");
XMLAttachmentUnmarshaller anAttachmentUnmarshaller = new AttachmentUnmarshallerImpl("Testing".getBytes());
aMarshaller.setAttachmentMarshaller(anAttachmentMarshaller);
anUnmarshaller.setAttachmentUnmarshaller(anAttachmentUnmarshaller);
}
use of org.eclipse.persistence.oxm.attachment.XMLAttachmentMarshaller in project eclipselink by eclipse-ee4j.
the class LoadAndSaveMimeTypeOnPropertyManyTestCases method setUp.
@Override
public void setUp() {
super.setUp();
XMLMarshaller aMarshaller = ((SDOXMLHelper) xmlHelper).getXmlMarshaller();
XMLUnmarshaller anUnmarshaller = ((SDOXMLHelper) xmlHelper).getXmlUnmarshaller();
XMLAttachmentMarshaller anAttachmentMarshaller = new AttachmentMarshallerImpl("c_id0");
XMLAttachmentUnmarshaller anAttachmentUnmarshaller = new AttachmentUnmarshallerImpl("Testing".getBytes());
aMarshaller.setAttachmentMarshaller(anAttachmentMarshaller);
anUnmarshaller.setAttachmentUnmarshaller(anAttachmentUnmarshaller);
}
use of org.eclipse.persistence.oxm.attachment.XMLAttachmentMarshaller in project eclipselink by eclipse-ee4j.
the class LoadAndSaveMimeTypeOnXSDManyTestCases method setUp.
@Override
public void setUp() {
super.setUp();
XMLMarshaller aMarshaller = ((SDOXMLHelper) xmlHelper).getXmlMarshaller();
XMLUnmarshaller anUnmarshaller = ((SDOXMLHelper) xmlHelper).getXmlUnmarshaller();
XMLAttachmentMarshaller anAttachmentMarshaller = new AttachmentMarshallerImpl("c_id0");
XMLAttachmentUnmarshaller anAttachmentUnmarshaller = new AttachmentUnmarshallerImpl("Testing".getBytes());
aMarshaller.setAttachmentMarshaller(anAttachmentMarshaller);
anUnmarshaller.setAttachmentUnmarshaller(anAttachmentUnmarshaller);
}
Aggregations