Package org.eclipse.persistence.oxm.record

Examples of org.eclipse.persistence.oxm.record.FormattedWriterRecord


    public void setHelperContext(HelperContext helperContext) {
        aHelperContext = helperContext;
    }

    public String getStringFromAppInfoElement(Element appInfo) {
        FormattedWriterRecord record = new FormattedWriterRecord();
        record.setWriter(new StringWriter());
        record.node(appInfo, new NamespaceResolver());
        return record.getWriter().toString();
    }
View Full Code Here


        if (isFormattedOutput()) {
            if(MediaType.APPLICATION_JSON == mediaType) {
                writerRecord = new JSONFormattedWriterRecord();
                ((JSONFormattedWriterRecord) writerRecord).setWriter(writer);
            } else {
                writerRecord = new FormattedWriterRecord();
                ((FormattedWriterRecord) writerRecord).setWriter(writer);
            }
        } else {
            if(MediaType.APPLICATION_JSON == mediaType) {
                writerRecord = new JSONWriterRecord();
View Full Code Here

        XMLDescriptor xmlDescriptor = getDescriptor(object, isXMLRoot);
        AbstractSession session = xmlContext.getSession(xmlDescriptor);

        WriterRecord writerRecord;
        if (isFormattedOutput()) {
            writerRecord = new FormattedWriterRecord();
        } else {
            writerRecord = new WriterRecord();
        }
        writerRecord.setMarshaller(this);
        writerRecord.setWriter(writer);
View Full Code Here

        anXMLMarshaller.setSchemaLocation(xmlDocument.getSchemaLocation());
        anXMLMarshaller.setNoNamespaceSchemaLocation(xmlDocument.getNoNamespaceSchemaLocation());
       
        WriterRecord writerRecord;
        if(anXMLMarshaller.isFormattedOutput()) {
            writerRecord = new FormattedWriterRecord();
        } else {
            writerRecord = new WriterRecord();
        }
        writerRecord.setWriter(outputWriter);
        writerRecord.setMarshaller(anXMLMarshaller);
View Full Code Here

       
        // Ask the SDOXMLDocument if we should include the XML declaration in the resulting XML
        anXMLMarshaller.setFragment(!xmlDocument.isXMLDeclaration());
        WriterRecord writerRecord;
        if(anXMLMarshaller.isFormattedOutput()) {
            writerRecord = new FormattedWriterRecord();
        } else {
            writerRecord = new WriterRecord();
        }
        writerRecord.setWriter(writer);
        writerRecord.setMarshaller(anXMLMarshaller);
View Full Code Here

    public void setHelperContext(HelperContext helperContext) {
        aHelperContext = helperContext;
    }

    public String getStringFromAppInfoElement(Element appInfo) {
        FormattedWriterRecord record = new FormattedWriterRecord();
        record.setWriter(new StringWriter());
        record.node(appInfo, new NamespaceResolver());
        return record.getWriter().toString();
    }
View Full Code Here

        writer = wrapWriter(writer);
        if (isFormattedOutput()) {
            if(mediaType.isApplicationJSON()) {                         
                writerRecord = new JSONFormattedWriterRecord(writer, callbackName);               
            } else {
                writerRecord = new FormattedWriterRecord();
                ((FormattedWriterRecord) writerRecord).setWriter(writer);
            }
        } else {
            if(mediaType.isApplicationJSON()) {
                writerRecord = new JSONWriterRecord(writer, callbackName);               
View Full Code Here

TOP

Related Classes of org.eclipse.persistence.oxm.record.FormattedWriterRecord

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.