Package org.apache.sis.internal.jaxb

Examples of org.apache.sis.internal.jaxb.Context


     */
    private Object unmarshal(XMLStreamReader input, final FilterVersion version)
            throws XMLStreamException, JAXBException
    {
        input = new FilteredStreamReader(input, version);
        final Context context = begin();
        final Object object;
        try {
            object = unmarshaller.unmarshal(input);
        } finally {
            context.finish();
        }
        input.close(); // Despite its name, this method does not close the underlying input stream.
        return object;
    }
View Full Code Here


     */
    private <T> JAXBElement<T> unmarshal(XMLStreamReader input, final FilterVersion version, final Class<T> declaredType)
            throws XMLStreamException, JAXBException
    {
        input = new FilteredStreamReader(input, version);
        final Context context = begin();
        final JAXBElement<T> object;
        try {
            object = unmarshaller.unmarshal(input, declaredType);
        } finally {
            context.finish();
        }
        input.close(); // Despite its name, this method does not close the underlying input stream.
        return object;
    }
View Full Code Here

        if (version != null) try {
            return unmarshal(XMLInputFactory.createXMLStreamReader(input), version);
        } catch (XMLStreamException e) {
            throw new JAXBException(e);
        } else {
            final Context context = begin();
            try {
                return unmarshaller.unmarshal(input);
            } finally {
                context.finish();
            }
        }
    }
View Full Code Here

                s.close();
            }
        } catch (Exception e) { // (IOException | XMLStreamException) on the JDK7 branch.
            throw new JAXBException(e);
        } else {
            final Context context = begin();
            try {
                return unmarshaller.unmarshal(input);
            } finally {
                context.finish();
            }
        }
    }
View Full Code Here

                s.close();
            }
        } catch (Exception e) { // (IOException | XMLStreamException) on the JDK7 branch.
            throw new JAXBException(e);
        } else {
            final Context context = begin();
            try {
                return unmarshaller.unmarshal(input);
            } finally {
                context.finish();
            }
        }
    }
View Full Code Here

        if (version != null) try {
            return unmarshal(XMLInputFactory.createXMLStreamReader(input), version);
        } catch (XMLStreamException e) {
            throw new JAXBException(e);
        } else {
            final Context context = begin();
            try {
                return unmarshaller.unmarshal(input);
            } finally {
                context.finish();
            }
        }
    }
View Full Code Here

        if (version != null) try {
            return unmarshal(XMLInputFactory.createXMLStreamReader(input), version);
        } catch (XMLStreamException e) {
            throw new JAXBException(e);
        } else {
            final Context context = begin();
            try {
                return unmarshaller.unmarshal(input);
            } finally {
                context.finish();
            }
        }
    }
View Full Code Here

     */
    @Override
    public URI unmarshal(final GO_CharacterString value) throws URISyntaxException {
        final String text = StringAdapter.toString(value);
        if (text != null) {
            final Context context = Context.current();
            return Context.converter(context).toURI(context, text);
        }
        return null;
    }
View Full Code Here

        if (version != null) try {
            return unmarshal(XMLInputFactory.createXMLStreamReader(input), version);
        } catch (XMLStreamException e) {
            throw new JAXBException(e);
        } else {
            final Context context = begin();
            try {
                return unmarshaller.unmarshal(input);
            } finally {
                context.finish();
            }
        }
    }
View Full Code Here

     * @return The wrapper for the given URI, or {@code null}.
     */
    @Override
    public GO_CharacterString marshal(final URI value) {
        if (value != null) {
            final Context context = Context.current();
            final GO_CharacterString wrapper = CharSequenceAdapter.wrap(context, value, value.toString());
            if (wrapper != null) {
                if (!Context.isFlagSet(context, Context.SUBSTITUTE_FILENAME)) {
                    wrapper.type = GO_CharacterString.FILENAME;
                }
View Full Code Here

TOP

Related Classes of org.apache.sis.internal.jaxb.Context

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.