Package org.jfree.xml.generator.model

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


    private ClassDescription createClassDescription (final BeanInfo beanInfo, final ClassDescription parent) {
        final PropertyDescriptor[] props = beanInfo.getPropertyDescriptors();
        final ArrayList properties = new ArrayList();
        for (int i = 0; i < props.length; i++) {
            final PropertyDescriptor propertyDescriptor = props[i];
            PropertyInfo pi;
            if (parent != null) {
                pi = parent.getProperty(propertyDescriptor.getName());
                if (pi != null) {
                    // Property already found, don't touch it
//                    Log.info (new Log.SimpleMessage
View Full Code Here


        if (!writeMethod || !readMethod) {
            // a property is useless for our purposes without having a read or write method.
            return null;
        }

        final PropertyInfo pi = new PropertyInfo(pd.getName(), pd.getPropertyType());
        pi.setConstrained(pd.isConstrained());
        pi.setDescription(pd.getShortDescription());
        pi.setNullable(true);
        pi.setPreserve(false);
        pi.setReadMethodAvailable(readMethod);
        pi.setWriteMethodAvailable(writeMethod);
        pi.setXmlName(pd.getName());
        if (isAttributeProperty(pd.getPropertyType())) {
            pi.setPropertyType(PropertyType.ATTRIBUTE);
            pi.setXmlHandler(getHandlerClass(pd.getPropertyType()));
        }
        else {
            pi.setPropertyType(PropertyType.ELEMENT);
        }
        return pi;
    }
View Full Code Here

     * @throws ObjectDescriptionException if there is a problem with the object description.
     */
    protected void handleAttributeDefinition(final String name, final String attribName, final String handlerClass)
        throws ObjectDescriptionException {

        final PropertyInfo propertyInfo = ModelBuilder.getInstance().createSimplePropertyInfo
            (getPropertyDescriptor(name));

        if (propertyInfo == null) {
            throw new ObjectDescriptionException("Unable to load property " + name);
        }

        propertyInfo.setComments(new Comments(getOpenComment(), getCloseComment()));
        propertyInfo.setPropertyType(PropertyType.ATTRIBUTE);
        propertyInfo.setXmlName(attribName);
        propertyInfo.setXmlHandler(handlerClass);
        this.propertyList.add(propertyInfo);
    }
View Full Code Here

     * @throws ObjectDescriptionException if there is a problem with the object description.
     */
    protected void handleElementDefinition(final String name, final String element)
        throws ObjectDescriptionException {

        final PropertyInfo propertyInfo = ModelBuilder.getInstance().createSimplePropertyInfo
            (getPropertyDescriptor(name));

        if (propertyInfo == null) {
            throw new ObjectDescriptionException("Unable to load property " + name);
        }

        propertyInfo.setComments(new Comments(getOpenComment(), getCloseComment()));
        propertyInfo.setPropertyType(PropertyType.ELEMENT);
        propertyInfo.setXmlName(element);
        propertyInfo.setXmlHandler(null);
        this.propertyList.add(propertyInfo);

    }
View Full Code Here

     *
     * @throws ObjectDescriptionException if there is a problem with the object description.
     */
    protected void handleLookupDefinition(final String name, final String lookupKey)
        throws ObjectDescriptionException {
        final PropertyInfo propertyInfo = ModelBuilder.getInstance().createSimplePropertyInfo
            (getPropertyDescriptor(name));

        if (propertyInfo == null) {
            throw new ObjectDescriptionException("Unable to load property " + name);
        }

        propertyInfo.setComments(new Comments(getOpenComment(), getCloseComment()));
        propertyInfo.setPropertyType(PropertyType.LOOKUP);
        propertyInfo.setXmlName(lookupKey);
        propertyInfo.setXmlHandler(null);
        this.propertyList.add(propertyInfo);
    }
View Full Code Here

    private ClassDescription createClassDescription (final BeanInfo beanInfo, final ClassDescription parent) {
        final PropertyDescriptor[] props = beanInfo.getPropertyDescriptors();
        final ArrayList properties = new ArrayList();
        for (int i = 0; i < props.length; i++) {
            final PropertyDescriptor propertyDescriptor = props[i];
            PropertyInfo pi;
            if (parent != null) {
                pi = parent.getProperty(propertyDescriptor.getName());
                if (pi != null) {
                    // Property already found, don't touch it
//                    Log.info (new Log.SimpleMessage
View Full Code Here

        if (!writeMethod || !readMethod) {
            // a property is useless for our purposes without having a read or write method.
            return null;
        }

        final PropertyInfo pi = new PropertyInfo(pd.getName(), pd.getPropertyType());
        pi.setConstrained(pd.isConstrained());
        pi.setDescription(pd.getShortDescription());
        pi.setNullable(true);
        pi.setPreserve(false);
        pi.setReadMethodAvailable(readMethod);
        pi.setWriteMethodAvailable(writeMethod);
        pi.setXmlName(pd.getName());
        if (isAttributeProperty(pd.getPropertyType())) {
            pi.setPropertyType(PropertyType.ATTRIBUTE);
            pi.setXmlHandler(getHandlerClass(pd.getPropertyType()));
        }
        else {
            pi.setPropertyType(PropertyType.ELEMENT);
        }
        return pi;
    }
View Full Code Here

     * @throws ObjectDescriptionException if there is a problem with the object description.
     */
    protected void handleAttributeDefinition(final String name, final String attribName, final String handlerClass)
        throws ObjectDescriptionException {

        final PropertyInfo propertyInfo = ModelBuilder.getInstance().createSimplePropertyInfo
            (getPropertyDescriptor(name));

        if (propertyInfo == null) {
            throw new ObjectDescriptionException("Unable to load property " + name);
        }

        propertyInfo.setComments(new Comments(getOpenComment(), getCloseComment()));
        propertyInfo.setPropertyType(PropertyType.ATTRIBUTE);
        propertyInfo.setXmlName(attribName);
        propertyInfo.setXmlHandler(handlerClass);
        this.propertyList.add(propertyInfo);
    }
View Full Code Here

     * @throws ObjectDescriptionException if there is a problem with the object description.
     */
    protected void handleElementDefinition(final String name, final String element)
        throws ObjectDescriptionException {

        final PropertyInfo propertyInfo = ModelBuilder.getInstance().createSimplePropertyInfo
            (getPropertyDescriptor(name));

        if (propertyInfo == null) {
            throw new ObjectDescriptionException("Unable to load property " + name);
        }

        propertyInfo.setComments(new Comments(getOpenComment(), getCloseComment()));
        propertyInfo.setPropertyType(PropertyType.ELEMENT);
        propertyInfo.setXmlName(element);
        propertyInfo.setXmlHandler(null);
        this.propertyList.add(propertyInfo);

    }
View Full Code Here

     *
     * @throws ObjectDescriptionException if there is a problem with the object description.
     */
    protected void handleLookupDefinition(final String name, final String lookupKey)
        throws ObjectDescriptionException {
        final PropertyInfo propertyInfo = ModelBuilder.getInstance().createSimplePropertyInfo
            (getPropertyDescriptor(name));

        if (propertyInfo == null) {
            throw new ObjectDescriptionException("Unable to load property " + name);
        }

        propertyInfo.setComments(new Comments(getOpenComment(), getCloseComment()));
        propertyInfo.setPropertyType(PropertyType.LOOKUP);
        propertyInfo.setXmlName(lookupKey);
        propertyInfo.setXmlHandler(null);
        this.propertyList.add(propertyInfo);
    }
View Full Code Here

TOP

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

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.