Definizione alla linea 37 del file JAXBMarshallerWrapperImpl.java.
Membri pubblici | |
JAXBMarshallerWrapperImpl (String packageName) throws JAXBMarshallerWrapperInitException | |
Creates a new instance of JAXBMarshallerWrapperImpl. | |
String | marshall (Object marshallable) throws JAXBMarshallerWrapperMarshallException |
Marshall di un XML Bindato con JAXB. | |
Object | unmarshall (URL url) throws JAXBMarshallerWrapperUnmarshallException |
Unmarshall di un URL che si riferisce ad un XML in un XML JAXB Object. | |
Object | unmarshall (File file) throws JAXBMarshallerWrapperUnmarshallException |
Unmarshall di un File XML in un XML JAXB Object. | |
Object | unmarshall (InputStream inputStream) throws JAXBMarshallerWrapperUnmarshallException |
Unmarshall di un InputStream XML in un XML JAXB Object. | |
Object | unmarshall (Source source) throws JAXBMarshallerWrapperUnmarshallException |
Object | unmarshall (String xmlString) throws JAXBMarshallerWrapperUnmarshallException |
Unmarshall di una Stringa in un XML JAXB Object. | |
void | setFormattedMarshalling (boolean value) throws JAXBMarshallerWrapperMarshallException |
Attiva/Disattiva il Marshalling "formattato", cioe' con Indentazione dell'XML. | |
boolean | isFormattedMarshalling () |
Verifica se e' attivo il Marshalling formattato. | |
Attributi privati | |
final JAXBContext | context |
JAXBContext. | |
final Marshaller | marshaller |
Marshaller. | |
final Unmarshaller | unmarshaller |
Marshaller. | |
boolean | formattedMarshalling |
Formatted Mashalling Setting. | |
Attributi privati statici | |
static String | exceptionPrefix = "[JAXBMarshallerWrapperImpl Exception]: " |
Prefisso Messaggio da inserire nelle Eccezioni lanciate. |
|
Creates a new instance of JAXBMarshallerWrapperImpl.
Definizione alla linea 58 del file JAXBMarshallerWrapperImpl.java. Riferimenti org.jaebi.server.service.xml.JAXBMarshallerWrapperImpl.context, org.jaebi.server.service.xml.JAXBMarshallerWrapperImpl.exceptionPrefix, org.jaebi.server.service.xml.JAXBMarshallerWrapperImpl.marshaller, e org.jaebi.server.service.xml.JAXBMarshallerWrapperImpl.unmarshaller. 00059 { 00060 00061 try { 00062 // JAXBContext 00063 context = JAXBContext.newInstance(packageName); 00064 // Marshaller 00065 marshaller = context.createMarshaller(); 00066 // Marshaller 00067 unmarshaller = context.createUnmarshaller(); 00068 } catch (JAXBException e) { 00069 throw new JAXBMarshallerWrapperInitException(exceptionPrefix + e); 00070 } 00071 }
|
|
Verifica se e' attivo il Marshalling formattato.
Implementa org.jaebi.server.service.xml.JAXBMarshallerWrapper. Definizione alla linea 169 del file JAXBMarshallerWrapperImpl.java. Riferimenti org.jaebi.server.service.xml.JAXBMarshallerWrapperImpl.formattedMarshalling. 00169 { 00170 return formattedMarshalling; 00171 }
|
|
Marshall di un XML Bindato con JAXB. Mashallare significa, in sostanza, "trasformare in Stringa", serializzando quindi l'Oggetto XML in una "forma" piu' comune e trasportabile.
Implementa org.jaebi.server.service.xml.JAXBMarshallerWrapper. Definizione alla linea 73 del file JAXBMarshallerWrapperImpl.java. Riferimenti org.jaebi.server.service.xml.JAXBMarshallerWrapperImpl.exceptionPrefix, e org.jaebi.server.service.xml.JAXBMarshallerWrapperImpl.marshaller. 00074 { 00075 00076 StringWriter writer = new StringWriter(); 00077 00078 try { 00079 marshaller.marshal(marshallable, writer); 00080 } catch (JAXBException e) { 00081 throw new JAXBMarshallerWrapperMarshallException(exceptionPrefix + e); 00082 } 00083 00084 return writer.toString(); 00085 }
|
|
Attiva/Disattiva il Marshalling "formattato", cioe' con Indentazione dell'XML.
Implementa org.jaebi.server.service.xml.JAXBMarshallerWrapper. Definizione alla linea 150 del file JAXBMarshallerWrapperImpl.java. Riferimenti org.jaebi.server.service.xml.JAXBMarshallerWrapperImpl.exceptionPrefix, org.jaebi.server.service.xml.JAXBMarshallerWrapperImpl.formattedMarshalling, e org.jaebi.server.service.xml.JAXBMarshallerWrapperImpl.marshaller. 00151 { 00152 00153 formattedMarshalling = value; 00154 try { 00155 if ( formattedMarshalling ) { 00156 /* XML Formatting Property Setting */ 00157 marshaller.setProperty( 00158 Marshaller.JAXB_FORMATTED_OUTPUT, new Boolean("true")); 00159 } else { 00160 /* XML Formatting Property Setting */ 00161 marshaller.setProperty( 00162 Marshaller.JAXB_FORMATTED_OUTPUT, new Boolean("false")); 00163 } 00164 } catch ( JAXBException e ) { 00165 throw new JAXBMarshallerWrapperMarshallException(exceptionPrefix + e); 00166 } 00167 }
|
|
Unmarshall di una Stringa in un XML JAXB Object. Converte in una struttura di oggetti JAXB una Stringa contenente XML.
Implementa org.jaebi.server.service.xml.JAXBMarshallerWrapper. Definizione alla linea 139 del file JAXBMarshallerWrapperImpl.java. Riferimenti org.jaebi.server.service.xml.JAXBMarshallerWrapperImpl.unmarshall(). 00140 { 00141 00142 /* Creazione StringBuffer che useremo nell'unmarshalling. 00143 * L'interfaccia della classe Unmashaller non prevede un metodo 00144 * che prenda in input, direttamente, un oggetto String */ 00145 StringBuffer xmlStr = new StringBuffer( xmlString ); 00146 00147 return unmarshall( new StreamSource( new StringReader( xmlStr.toString() ) ) ); 00148 }
Questo è il grafo delle chiamate per questa funzione: ![]() |
|
Implementa org.jaebi.server.service.xml.JAXBMarshallerWrapper. Definizione alla linea 125 del file JAXBMarshallerWrapperImpl.java. Riferimenti org.jaebi.server.service.xml.JAXBMarshallerWrapperImpl.exceptionPrefix, e org.jaebi.server.service.xml.JAXBMarshallerWrapperImpl.unmarshaller. 00126 { 00127 00128 Object xmlElement = null; 00129 00130 try { 00131 xmlElement = unmarshaller.unmarshal(source); 00132 } catch (JAXBException e) { 00133 throw new JAXBMarshallerWrapperUnmarshallException(exceptionPrefix + e); 00134 } 00135 00136 return xmlElement; 00137 }
|
|
Unmarshall di un InputStream XML in un XML JAXB Object. Converte in una struttura di oggetti JAXB un InputStream contenente XML.
Implementa org.jaebi.server.service.xml.JAXBMarshallerWrapper. Definizione alla linea 111 del file JAXBMarshallerWrapperImpl.java. Riferimenti org.jaebi.server.service.xml.JAXBMarshallerWrapperImpl.exceptionPrefix, e org.jaebi.server.service.xml.JAXBMarshallerWrapperImpl.unmarshaller. 00112 { 00113 00114 Object xmlElement = null; 00115 00116 try { 00117 xmlElement = unmarshaller.unmarshal(inputStream); 00118 } catch (JAXBException e) { 00119 throw new JAXBMarshallerWrapperUnmarshallException(exceptionPrefix + e); 00120 } 00121 00122 return xmlElement; 00123 }
|
|
Unmarshall di un File XML in un XML JAXB Object. Converte in una struttura di oggetti JAXB un File contenente XML.
Implementa org.jaebi.server.service.xml.JAXBMarshallerWrapper. Definizione alla linea 99 del file JAXBMarshallerWrapperImpl.java. Riferimenti org.jaebi.server.service.xml.JAXBMarshallerWrapperImpl.exceptionPrefix, e org.jaebi.server.service.xml.JAXBMarshallerWrapperImpl.unmarshaller. 00099 { 00100 Object xmlElement = null; 00101 00102 try { 00103 xmlElement = unmarshaller.unmarshal(file); 00104 } catch (JAXBException e) { 00105 throw new JAXBMarshallerWrapperUnmarshallException(exceptionPrefix + e); 00106 } 00107 00108 return xmlElement; 00109 }
|
|
Unmarshall di un URL che si riferisce ad un XML in un XML JAXB Object. Converte in una struttura di oggetti JAXB un URL contenente XML.
Implementa org.jaebi.server.service.xml.JAXBMarshallerWrapper. Definizione alla linea 87 del file JAXBMarshallerWrapperImpl.java. Riferimenti org.jaebi.server.service.xml.JAXBMarshallerWrapperImpl.exceptionPrefix, e org.jaebi.server.service.xml.JAXBMarshallerWrapperImpl.unmarshaller. Referenziato da org.jaebi.server.service.xml.JAXBMarshallerWrapperImpl.unmarshall(). 00087 { 00088 Object xmlElement = null; 00089 00090 try { 00091 xmlElement = unmarshaller.unmarshal(url); 00092 } catch (JAXBException e) { 00093 throw new JAXBMarshallerWrapperUnmarshallException(exceptionPrefix + e); 00094 } 00095 00096 return xmlElement; 00097 }
|
|
JAXBContext.
Definizione alla linea 39 del file JAXBMarshallerWrapperImpl.java. Referenziato da org.jaebi.server.service.xml.JAXBMarshallerWrapperImpl.JAXBMarshallerWrapperImpl(). |
|
Prefisso Messaggio da inserire nelle Eccezioni lanciate.
Definizione alla linea 47 del file JAXBMarshallerWrapperImpl.java. Referenziato da org.jaebi.server.service.xml.JAXBMarshallerWrapperImpl.JAXBMarshallerWrapperImpl(), org.jaebi.server.service.xml.JAXBMarshallerWrapperImpl.marshall(), org.jaebi.server.service.xml.JAXBMarshallerWrapperImpl.setFormattedMarshalling(), e org.jaebi.server.service.xml.JAXBMarshallerWrapperImpl.unmarshall(). |
|
Formatted Mashalling Setting.
Definizione alla linea 45 del file JAXBMarshallerWrapperImpl.java. Referenziato da org.jaebi.server.service.xml.JAXBMarshallerWrapperImpl.isFormattedMarshalling(), e org.jaebi.server.service.xml.JAXBMarshallerWrapperImpl.setFormattedMarshalling(). |
|
Marshaller.
Definizione alla linea 41 del file JAXBMarshallerWrapperImpl.java. Referenziato da org.jaebi.server.service.xml.JAXBMarshallerWrapperImpl.JAXBMarshallerWrapperImpl(), org.jaebi.server.service.xml.JAXBMarshallerWrapperImpl.marshall(), e org.jaebi.server.service.xml.JAXBMarshallerWrapperImpl.setFormattedMarshalling(). |
|
Marshaller.
Definizione alla linea 43 del file JAXBMarshallerWrapperImpl.java. Referenziato da org.jaebi.server.service.xml.JAXBMarshallerWrapperImpl.JAXBMarshallerWrapperImpl(), e org.jaebi.server.service.xml.JAXBMarshallerWrapperImpl.unmarshall(). |