Package org.jfree.xml.generator.model

Examples of org.jfree.xml.generator.model.ClassDescription


                ClassModelTags.INCLUDE_TAG, ClassModelTags.SOURCE_ATTR, sources[i], comments
            );
        }

        for (int i = 0; i < this.model.size(); i++) {
            final ClassDescription cd = this.model.get(i);
            writeClassDescription(writer, cd);
        }

        final ManualMappingInfo[] mappings = getModel().getMappingModel().getManualMapping();
        for (int i = 0; i < mappings.length; i++) {
View Full Code Here


    private Class[] findElementTypes(final DescriptionModel model) {
        final ArrayList baseClasses = new ArrayList();

        for (int i = 0; i < model.size(); i++) {
            final ClassDescription cd = model.get(i);
            if (!baseClasses.contains(cd.getObjectClass())) {
                baseClasses.add(cd.getObjectClass());
            }

            final PropertyInfo[] properties = cd.getProperties();
            for (int p = 0; p < properties.length; p++) {
                // filter primitive types ... they cannot form a generalization
                // relation
                if (!properties[p].getPropertyType().equals(PropertyType.ELEMENT)) {
                    continue;
View Full Code Here

     * @param model the model which should get its superclasses updated.
     */
    private void fillSuperClasses(final DescriptionModel model) {
        // Fill superclasses
        for (int i = 0; i < model.size(); i++) {
            final ClassDescription cd = model.get(i);
            final Class parent = cd.getObjectClass().getSuperclass();
            if (parent == null) {
                continue;
            }
            final ClassDescription superCD = model.get(parent);
            if (superCD != null) {
                cd.setSuperClass(superCD.getObjectClass());
            }
        }
    }
View Full Code Here

                superClass = Object.class;
            }

            try {
                final BeanInfo bi = Introspector.getBeanInfo(classes[i], superClass);
                final ClassDescription parent = model.get(classes[i]);
                final ClassDescription cd = createClassDescription(bi, parent);
                if (cd != null) {
                    model.addClassDescription(cd);
                }
            }
            catch (IntrospectionException ie) {
View Full Code Here

        }

        final PropertyInfo[] propArray = (PropertyInfo[])
            properties.toArray(new PropertyInfo[properties.size()]);

        final ClassDescription cd;
        if (parent != null) {
            cd = parent;
        }
        else {
            cd = new ClassDescription(beanInfo.getBeanDescriptor().getBeanClass());
            cd.setDescription(beanInfo.getBeanDescriptor().getShortDescription());
        }

        cd.setProperties(propArray);
        return cd;
    }
View Full Code Here

     * Iterates through all the class descriptions in the model, setting the superclass
     * attribute in all cases where the superclass definitions are contained in the model.
     */
    protected void fillSuperClasses() {
        for (int i = 0; i < this.model.size(); i++) {
            final ClassDescription cd = this.model.get(i);
            final Class parent = cd.getObjectClass().getSuperclass();
            if (parent == null) {
                continue;
            }
            final ClassDescription superCD = this.model.get(parent);
            if (superCD != null) {
                cd.setSuperClass(superCD.getObjectClass());
            }
        }
    }
View Full Code Here

    protected boolean startObjectDefinition(final String className, final String register, final boolean ignore) {
        final Class c = loadClass(className);
        if (c == null) {
            return false;
        }
        this.currentClassDescription = new ClassDescription(c);
        this.currentClassDescription.setPreserve(ignore);
        this.currentClassDescription.setRegisterKey(register);
        try {
            this.currentBeanInfo = Introspector.getBeanInfo(c, Object.class);
        }
View Full Code Here

        this.extension = IOUtils.getInstance().getFileExtension(target);

        // split into classDescriptionByPackage ...
        this.classDescriptionByPackage = new HashNMap();
        for (int i = 0; i < model.size(); i++) {
            final ClassDescription cd = model.get(i);
            if (cd.getSource() == null) {
                final String packageName = getPackage(cd.getObjectClass());
                final String includeFileName = this.plainFileName + "-" + packageName
                    + this.extension;
                this.classDescriptionByPackage.add(includeFileName, cd);
            }
            else {
                this.classDescriptionByPackage.add(cd.getSource(), cd);
            }
        }

        final MappingModel mappingModel = model.getMappingModel();
View Full Code Here

        writeXMLHeader(writer);
        writeStandardComment(writer, getModel().getModelComments());
        getWriterSupport().writeTag(writer, ClassModelTags.OBJECTS_TAG);

        while (values.hasNext()) {
            final ClassDescription cd = (ClassDescription) values.next();
            writeClassDescription(writer, cd);
        }


        while (manualMappings.hasNext()) {
View Full Code Here

            }
        }

        final Iterator values = this.classDescriptionByPackage.getAll("");
        while (values.hasNext()) {
            final ClassDescription cd = (ClassDescription) values.next();
            writeClassDescription(writer, cd);
        }

        final Iterator manualMappings = this.manualMappingByPackage.getAll("");
        while (manualMappings.hasNext()) {
View Full Code Here

TOP

Related Classes of org.jfree.xml.generator.model.ClassDescription

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.