Update of 
/cvsroot/xdoclet-plugins/xdoclet-plugins/plugin-castor/src/main/java/org/xdoclet/plugin/castor/qtags
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10182

Added Files:
        CastorClassTag.java CastorFieldTag.java CastorFieldXmlTag.java 
Log Message:
Initial ersion of castor plugin

--- NEW FILE: CastorClassTag.java ---
/*
 * Copyright (c) 2003
 * XDoclet Team
 * All rights reserved.
 */
package org.xdoclet.plugin.castor.qtags;

/**
 * Defines classes that should have a mapping definition. Applies to: Java Bean
 *
 * @author Diogo Quintela
 *
 * @qtags.location class
 * @qtags.once
 */
public interface CastorClassTag extends com.thoughtworks.qdox.model.DocletTag {
    /**
     * The name of the class this class depends on
     */
    String getDepends();

    /**
     * Should be used only if this class extends another class for which 
mapping information is provided. It
     * should not be used if the extended class is not used in the mapping file.
     */
    String getExtends();

    /**
     * If true, the class will be introspected to determine its field and the 
fields specified in the mapping
     * file will be used to override the field found during the introspection.
     *
     * @qtags.default true
     */
    boolean isAutoComplete();

    /**
     * The fields that form the class's primary key.
     */
    String getIdentity();

    /**
     * Define the access to the class.
     *
     * @qtags.allowed-value read-only
     * @qtags.allowed-value shared
     * @qtags.allowed-value exclusive
     * @qtags.allowed-value db-locked
     * @qtags.default shared
     */
    String getAccess();

    /**
     * The key-generator strategy to be used by Castor.
     */
    String getKeyGenerator();

    /**
     * An optional description.
     */
    String getDescription();

    /**
     * The name of the table in the database that the class is mapped to.
     */
    String getTable();

    /**
     * The fields that form the class's xml mapping name
     */
    String getXml();

    /**
     * The namespace URI to be used for the class.
     */
    String getNsUri();

    /**
     * The namespace prefix to be used for the class.
     */
    String getNsPrefix();

    /**
     * The namespace prefix to be used for the class.
     */
    String getLdapDn();

    /**
     * The namespace prefix to be used for the class.
     */
    String getLdapOc();

    /**
     * Cache type
     *
     * @qtags.allowed-value none
     * @qtags.allowed-value count-limited
     * @qtags.allowed-value time-limited
     * @qtags.allowed-value unlimited
     * @qtags.default count-limited
     */
    String getCacheType();

    /**
     * Cache capacity
     */
    int getCacheCapacity();

    /**
     * True if constructor verification should be done, otherwise false. <br>
     * NOTE: This is an undocumented option.
     * <a 
href="http://castor.codehaus.org/xml-mapping.html#7.4-Preventing-Castor-from-checking-for-a-default-constructor";>7.4-Preventing-Castor-from-checking-for-a-default-constructor</a>
     *
     * @qtags.default true
     */
    boolean isVerifyConstructable();
}
--- NEW FILE: CastorFieldXmlTag.java ---
/*
 * Copyright (c) 2003
 * XDoclet Team
 * All rights reserved.
 */
package org.xdoclet.plugin.castor.qtags;

/**
 * Defines methods/fields that should have a mapping definition. Applies to: 
Java Bean
 *
 * @author Diogo Quintela
 *
 * @qtags.location field
 * @qtags.location method
 * @qtags.once
 */
public interface CastorFieldXmlTag extends 
com.thoughtworks.qdox.model.DocletTag {
    /**
     * The name of the element or attribute
     */
    String getName_();

    /**
     * XML Schema type (of the value of this field) that requires specific 
handling in the Castor Marshalling
     * Framework (such as 'QName' for instance)
     */
    String getType();

    /**
     * Allows the user to specify the "sub-path" for which the value should be 
marshalled to and from.  This
     * is useful for "wrapping" values in elements or for mapping values that 
appear on sub-elements  to the
     * current "element" represented by the class mapping.
     */
    String getLocation();

    /**
     * Allows overriding the matches rules for the name of the element. It is a 
standard regular expression
     * and will be used instead of the 'name' field
     */
    String getMatches();

    /**
     * When using a QName value, you can provide a default prefix that is used 
when marshalling value of type
     * QName
     */
    String getQnamePrefix();

    /**
     * Indicates if this field has to be treated as a reference by the 
unmarshaller. In order to work
     * properly, you must specify the node type to 'attribute' for both the 
'id' and the 'reference' fields
     */
    boolean isReference();

    /**
     * Indicates if the name corresponds to an attribute, an element, or text 
content. By default, primitive
     * types are assumed to be an attribute otherwise the node is assumed to be 
an element
     *
     * @qtags.allowed-value element
     * @qtags.allowed-value attribute
     * @qtags.allowed-value text
     * @qtags.default text
     */
    String getNode();

    /**
     * If no name is specified this attribute controls how castor will 
automatically create a name for the
     * field. Normally the name is created using the field name, however many 
times it is necessary to
     * create the name by using the class type instead (such as heterogenenous 
collections).
     *
     * @qtags.allowed-value deriveByClass
     * @qtags.allowed-value deriveByField
     */
    String getAutoNaming();

    /**
     * Allows for making this field transient for XML. The default value is 
inherited from the <field> element.
     *
     * @qtags.default false
     */
    boolean isTransient();
}
--- NEW FILE: CastorFieldTag.java ---
/*
 * Copyright (c) 2003
 * XDoclet Team
 * All rights reserved.
 */
package org.xdoclet.plugin.castor.qtags;

/**
 * Defines methods/fields that should have a mapping definition. Applies to: 
Java Bean
 *
 * @author Diogo Quintela
 *
 * @qtags.location field
 * @qtags.location method
 * @qtags.once
 */
public interface CastorFieldTag extends com.thoughtworks.qdox.model.DocletTag {
    /**
     * The Java type of the field. It is used to access the field. Castor will 
use this information to cast
     * the XML information (like string into integer). It is also used to 
define the signature of the
     * accessors method. If a collection is specified, this is used to specify 
the type of the object inside
     * the collection. If type is not specified it defaults to the return type 
of the method.
     */
    String getType();

    /**
     * Flag to indicate if the field is compulsory.
     *
     * @qtags.default true
     */
    boolean isRequired();

    /**
     * Flag to indicate if the field should be accessed directly rather than 
using getter / setter methods
     *
     * @qtags.default false
     */
    boolean isDirect();

    /**
     * Flag to indicate if the field loaded lazily.
     *
     * @qtags.default true
     */
    boolean isLazy();

    /**
     * Flag to indicate if the field should be ignored during marshalling - 
useful when used with the
     * auto-complete option of &#064;castor.class
     *
     * @qtags.default false
     */
    boolean isTransient();

    /**
     * Field handler to use
     */
    String getHandler();

    /**
     * The method used to set the property value
     */
    String getSetMethod();

    /**
     * The method used to get the property value
     */
    String getGetMethod();

    /**
     * The factory method for instantiation of FieldHandler
     */
    String getCreateMethod();

    /**
     * The factory method for instantiation of FieldHandler
     *
     * @qtags.allowed-value array
     * @qtags.allowed-value arraylist
     * @qtags.allowed-value vector
     * @qtags.allowed-value hashtable
     * @qtags.allowed-value collection
     * @qtags.allowed-value set
     * @qtags.allowed-value map
     * @qtags.default vector
     */
    String getCollection();
}


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
xdoclet-plugins-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xdoclet-plugins-commits

Reply via email to