Package org.jfree.xml.util

Examples of org.jfree.xml.util.PropertyDefinition


            writer.startBlock();

            final PropertyDefinition[] propertyDefs = this.factory.getPropertyDefinitions();
            final RootXmlWriteHandler rootHandler = getRootHandler();
            for (int i = 0; i < propertyDefs.length; i++) {
                final PropertyDefinition pDef = propertyDefs[i];
                final String elementName = pDef.getElementName();
                rootHandler.write
                    (elementName, this.factory.getProperty(pDef.getPropertyName()),
                            this.factory.getTypeForTagName(elementName), writer);
            }
            writer.endBlock();
            writer.writeCloseTag(tagName);
        }
View Full Code Here


                // if this is a lookup, then ignore
                if (lookups.contains(cDef.getPropertyName())) {
                    continue;
                }
                if (this.objectFactory.isPropertyDefinition(cDef.getPropertyName())) {
                    final PropertyDefinition pd = this.objectFactory.getPropertyDefinitionByPropertyName(
                        cDef.getPropertyName()
                    );
                    final XmlReadHandler handler = (XmlReadHandler) this.createdHandler.get(
                        pd.getElementName()
                    );
                    if (handler != null) {
                        this.objectFactory.setProperty(pd.getPropertyName(), handler.getObject());
                    }
                }
                // hoping that the attribute is set ..
            }

            this.object = this.objectFactory.createObject();
            Object oldValue = null;
            if (this.objectFactory.getRegisterName() != null) {
                oldValue = rootHandler.getHelperObject(this.objectFactory.getRegisterName());
                rootHandler.setHelperObject(this.objectFactory.getRegisterName(), this.object);
            }

            final PropertyDefinition[] propertyDefs = this.objectFactory.getPropertyDefinitions();
            for (int i = 0; i < propertyDefs.length; i++) {
                final PropertyDefinition pdef = propertyDefs[i];
                final XmlReadHandler handler = (XmlReadHandler) this.createdHandler.get(
                    pdef.getElementName()
                );
                if (handler == null) {
                    continue;
                }
                this.objectFactory.setProperty(pdef.getPropertyName(), handler.getObject());
            }

            this.objectFactory.writeObjectProperties(this.object);

            if (this.objectFactory.getRegisterName() != null) {
View Full Code Here

                // if this is a lookup, then ignore
                if (lookups.contains(cDef.getPropertyName())) {
                    continue;
                }
                if (this.objectFactory.isPropertyDefinition(cDef.getPropertyName())) {
                    final PropertyDefinition pd = this.objectFactory.getPropertyDefinitionByPropertyName(
                        cDef.getPropertyName()
                    );
                    final XmlReadHandler handler = (XmlReadHandler) this.createdHandler.get(
                        pd.getElementName()
                    );
                    if (handler != null) {
                        this.objectFactory.setProperty(pd.getPropertyName(), handler.getObject());
                    }
                }
                // hoping that the attribute is set ..
            }

            this.object = this.objectFactory.createObject();
            Object oldValue = null;
            if (this.objectFactory.getRegisterName() != null) {
                oldValue = rootHandler.getObject(this.objectFactory.getRegisterName());
                rootHandler.putObject(this.objectFactory.getRegisterName(), this.object);
            }

            final PropertyDefinition[] propertyDefs = this.objectFactory.getPropertyDefinitions();
            for (int i = 0; i < propertyDefs.length; i++) {
                final PropertyDefinition pdef = propertyDefs[i];
                final XmlReadHandler handler = (XmlReadHandler) this.createdHandler.get(
                    pdef.getElementName()
                );
                if (handler == null) {
                    continue;
                }
                this.objectFactory.setProperty(pdef.getPropertyName(), handler.getObject());
            }

            this.objectFactory.writeObjectProperties(this.object);

            if (this.objectFactory.getRegisterName() != null) {
View Full Code Here

            writer.startBlock();

            final PropertyDefinition[] propertyDefs = this.factory.getPropertyDefinitions();
            final RootXmlWriteHandler rootHandler = getRootHandler();
            for (int i = 0; i < propertyDefs.length; i++) {
                final PropertyDefinition pDef = propertyDefs[i];
                final String elementName = pDef.getElementName();
                // System.out.println("Searching: " + elementName + " [" + object.getClass() + "]");
                rootHandler.write
                    (elementName, this.factory.getProperty(pDef.getPropertyName()),
                            this.factory.getTypeForTagName(elementName), writer);
            }
            writer.endBlock();
            writer.writeCloseTag(tagName);
        }
View Full Code Here

TOP

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

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.