Package org.eclipse.persistence.oxm

Examples of org.eclipse.persistence.oxm.MediaType


              if(value == null){
                   throw new PropertyException(key, Constants.EMPTY_STRING);                 
                 }
                xmlMarshaller.setEqualUsingIdenity(((Boolean) value).booleanValue());
            } else if (MarshallerProperties.MEDIA_TYPE.equals(key)) {
                MediaType mType = null;
                if(value instanceof MediaType) {
                    mType = (MediaType) value;
                } else if(value instanceof String) {
                    mType = MediaType.getMediaType((String)value);
                }
View Full Code Here


     * INTERNAL:
     */
    public void setMarshaller(XMLMarshaller marshaller) {
        this.marshaller = marshaller;
        if(marshaller != null){
            MediaType mediaType = marshaller.getMediaType();
            if(marshaller.getNamespacePrefixMapper() != null){
              namespaceAware = true;              
            }else{
              namespaceAware = mediaType == MediaType.APPLICATION_XML;
            }
View Full Code Here

              if(value == null){
                   throw new PropertyException(key, XMLConstants.EMPTY_STRING);                 
                 }
                xmlMarshaller.setEqualUsingIdenity(((Boolean) value).booleanValue());
            } else if (MarshallerProperties.MEDIA_TYPE.equals(key)) {
                MediaType mType = null;
                if(value instanceof MediaType) {
                    mType = (MediaType) value;
                } else if(value instanceof String) {
                    mType = MediaType.getMediaType((String)value);
                }
View Full Code Here

    public void setProperty(String key, Object value) throws PropertyException {
        if (key == null) {
            throw new IllegalArgumentException();
        }
        if (key.equals(UnmarshallerProperties.MEDIA_TYPE)) {
            MediaType mType = null;
            if(value instanceof MediaType) {
                mType = (MediaType) value;
            } else if(value instanceof String) {
                mType = MediaType.getMediaType((String)value);
            }
View Full Code Here

            inputSource.setSystemId(this.systemId);
        }
       
        if(xmlUnmarshaller.isAutoDetectMediaType()){
          BufferedReader bufferedReader = getBufferedReaderForInputSource(inputSource);         
          MediaType mediaType = getMediaType(bufferedReader);       
            return unmarshal(getNewXMLReader(mediaType), new InputSource(bufferedReader));     
        }
        return unmarshal(getXMLReader(), inputSource);
    }
View Full Code Here

            inputSource.setSystemId(this.systemId);
        }

        if(xmlUnmarshaller.isAutoDetectMediaType()){
          BufferedReader bufferedReader = getBufferedReaderForInputSource(inputSource);         
          MediaType mediaType = getMediaType(bufferedReader);       
            return unmarshal(getNewXMLReader(clazz, mediaType), new InputSource(bufferedReader), clazz);          
        }
        return unmarshal(getXMLReader(clazz), inputSource, clazz);
    }
View Full Code Here

              if(value == null){
                   throw new PropertyException(key, Constants.EMPTY_STRING);                 
                 }
                xmlMarshaller.setEqualUsingIdenity(((Boolean) value).booleanValue());
            } else if (MarshallerProperties.MEDIA_TYPE.equals(key)) {
                MediaType mType = null;
                if(value instanceof MediaType) {
                    mType = (MediaType) value;
                } else if(value instanceof String) {
                    mType = MediaType.getMediaType((String)value);
                }
View Full Code Here

     * INTERNAL:
     */
    public void setMarshaller(XMLMarshaller marshaller) {
        this.marshaller = marshaller;
        if(marshaller != null){
            MediaType mediaType = marshaller.getMediaType();
            if(marshaller.getNamespacePrefixMapper() != null){
              namespaceAware = true;              
            }else{
              namespaceAware = mediaType == MediaType.APPLICATION_XML;
            }
View Full Code Here

     * INTERNAL:
     */
    public void setMarshaller(XMLMarshaller marshaller) {
        this.marshaller = marshaller;
        if(marshaller != null){
            MediaType mediaType = marshaller.getMediaType();
            if(marshaller.getNamespacePrefixMapper() != null){
              namespaceAware = true;              
            }else{
              namespaceAware = mediaType == MediaType.APPLICATION_XML;
            }
View Full Code Here

              if(value == null){
                   throw new PropertyException(key, XMLConstants.EMPTY_STRING);                 
                 }
                xmlMarshaller.setEqualUsingIdenity(((Boolean) value).booleanValue());
            } else if (MarshallerProperties.MEDIA_TYPE.equals(key)) {
                MediaType mType = null;
                if(value instanceof MediaType) {
                    mType = (MediaType) value;
                } else if(value instanceof String) {
                    mType = MediaType.getMediaType((String)value);
                }
View Full Code Here

TOP

Related Classes of org.eclipse.persistence.oxm.MediaType

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.