Package org.jfree.xml.util

Examples of org.jfree.xml.util.MultiplexMappingDefinition


    protected void addMultiplexMapping(final Class baseClass,
                                       final String typeAttr,
                                       final MultiplexMappingEntry[] mdef) {
       
        this.classToHandlerMapping.addMultiplexMapping(
            new MultiplexMappingDefinition(baseClass, typeAttr, mdef)
        );
    }
View Full Code Here


            return loadHandlerClass(manualDefinition.getReadHandler());
        }

        // check whether a multiplexer is defined ...
        // find multiplexer for this class...
        MultiplexMappingDefinition mplex =
            getFactoryLoader().getMultiplexDefinition(classToRead);
        if (mplex == null) {
            mplex = this.classToHandlerMapping.getMultiplexDefinition(classToRead);
        }
        if (mplex != null) {
            final String attributeValue = atts.getValue(mplex.getAttributeName());
            if (attributeValue == null) {
                throw new XmlReaderException(
                    "Multiplexer type attribute is not defined: " + mplex.getAttributeName()
                    + " for " + classToRead
                );
            }
            final MultiplexMappingEntry entry =
                mplex.getEntryForType(attributeValue);
            if (entry == null) {
                throw new XmlReaderException(
                    "Invalid type attribute value: " + mplex.getAttributeName() + " = "
                    + attributeValue
                );
            }
            final Class c = loadClass(entry.getTargetClass());
            if (!c.equals(mplex.getBaseClass())) {
                return findHandlerForClass(c, atts, history);
            }
        }

        // check for generic classes ...
View Full Code Here

    protected void addMultiplexMapping(final Class baseClass,
                                       final String typeAttr,
                                       final MultiplexMappingEntry[] mdef) {
       
        this.classToHandlerMapping.addMultiplexMapping(
            new MultiplexMappingDefinition(baseClass, typeAttr, mdef)
        );
       
    }
View Full Code Here

        String attributeName = null;
        String attributeValue = null;

        // find multiplexer for this class...
        MultiplexMappingDefinition mplex =
            getFactoryLoader().getMultiplexDefinition(baseClass);
        if (mplex == null) {
            mplex = this.classToHandlerMapping.getMultiplexDefinition(baseClass);
        }
        if (mplex != null) {
            final MultiplexMappingEntry entry =
                mplex.getEntryForClass(classToWrite.getName());
            if (entry != null) {
                attributeName = mplex.getAttributeName();
                attributeValue = entry.getAttributeValue();
            }
            else {
                throw new XMLWriterException(
                    "Unable to find child mapping for multiplexer "
View Full Code Here

    protected void addMultiplexMapping(final Class baseClass,
                                       final String typeAttr,
                                       final MultiplexMappingEntry[] mdef) {
       
        this.classToHandlerMapping.addMultiplexMapping(
            new MultiplexMappingDefinition(baseClass, typeAttr, mdef)
        );
    }
View Full Code Here

            return loadHandlerClass(manualDefinition.getReadHandler());
        }

        // check whether a multiplexer is defined ...
        // find multiplexer for this class...
        MultiplexMappingDefinition mplex =
            getFactoryLoader().getMultiplexDefinition(classToRead);
        if (mplex == null) {
            mplex = this.classToHandlerMapping.getMultiplexDefinition(classToRead);
        }
        if (mplex != null) {
            final String attributeValue = atts.getValue(mplex.getAttributeName());
            if (attributeValue == null) {
                throw new XmlReaderException(
                    "Multiplexer type attribute is not defined: " + mplex.getAttributeName()
                    + " for " + classToRead
                );
            }
            final MultiplexMappingEntry entry =
                mplex.getEntryForType(attributeValue);
            if (entry == null) {
                throw new XmlReaderException(
                    "Invalid type attribute value: " + mplex.getAttributeName() + " = "
                    + attributeValue
                );
            }
            final Class c = loadClass(entry.getTargetClass());
            if (!c.equals(mplex.getBaseClass())) {
                Log.debug(
                    "Continue search on next level : " + c + " after " + mplex.getBaseClass()
                );
                return findHandlerForClass(c, atts, history);
            }
            else {
                Log.debug ("Muliplexer is also generic definition ...");
View Full Code Here

    protected void addMultiplexMapping(final Class baseClass,
                                       final String typeAttr,
                                       final MultiplexMappingEntry[] mdef) {
       
        this.classToHandlerMapping.addMultiplexMapping(
            new MultiplexMappingDefinition(baseClass, typeAttr, mdef)
        );
       
    }
View Full Code Here

        String attributeName = null;
        String attributeValue = null;

        // find multiplexer for this class...
        MultiplexMappingDefinition mplex =
            getFactoryLoader().getMultiplexDefinition(baseClass);
        if (mplex == null) {
            mplex = this.classToHandlerMapping.getMultiplexDefinition(baseClass);
        }
        if (mplex != null) {
            final MultiplexMappingEntry entry =
                mplex.getEntryForClass(classToWrite.getName());
            if (entry != null) {
                attributeName = mplex.getAttributeName();
                attributeValue = entry.getAttributeValue();
            }
            else {
                throw new XMLWriterException(
                    "Unable to find child mapping for multiplexer "
View Full Code Here

TOP

Related Classes of org.jfree.xml.util.MultiplexMappingDefinition

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.