Package org.apache.sis.internal.jaxb

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


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

    public Object unmarshal(XMLStreamReader input) throws JAXBException {
        final FilterVersion version = getFilterVersion();
        if (version != null) {
            input = new FilteredStreamReader(input, version);
        }
        final Context context = begin();
        try {
            return unmarshaller.unmarshal(input);
        } finally {
            context.finish();
        }
    }
View Full Code Here

    public <T> JAXBElement<T> unmarshal(XMLStreamReader input, final Class<T> declaredType) throws JAXBException {
        final FilterVersion version = getFilterVersion();
        if (version != null) {
            input = new FilteredStreamReader(input, version);
        }
        final Context context = begin();
        try {
            return unmarshaller.unmarshal(input, declaredType);
        } 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, declaredType);
        } catch (XMLStreamException e) {
            throw new JAXBException(e);
        } else {
            final Context context = begin();
            try {
                return unmarshaller.unmarshal(input, declaredType);
            } finally {
                context.finish();
            }
        }
    }
View Full Code Here

         * Substitute <gco:CharacterString> by <gmx:Anchor> if a linkage is found.
         */
        if (!(value instanceof Anchor)) {
            final String key = CharSequences.trimWhitespaces(value.toString());
            if (key != null && !key.isEmpty()) {
                final Context context = Context.current();
                final XLink linkage = Context.resolver(context).anchor(context, value, key);
                if (linkage != null) {
                    if (linkage instanceof Anchor) {
                        value = (Anchor) linkage;
                    } else {
View Full Code Here

     * @param timezone The timezone, or {@code null} for the default.
     *
     * @see #clearContext()
     */
    protected final void createContext(final boolean marshal, final Locale locale, final String timezone) {
        context = new Context(marshal ? Context.MARSHALLING : 0, locale,
                (timezone != null) ? TimeZone.getTimeZone(timezone) : null, null, null, null, null, null);
    }
View Full Code Here

     *
     * @param  marshalling {@code true} for marshalling, or {@code false} for unmarshalling.
     * @return The (un)marshalling context.
     */
    public static Context begin(final boolean marshalling) {
        return new Context(marshalling ? Context.MARSHALLING : 0, null, null, null, null,
                new ReferenceResolverMock(), null, null);
    }
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.