[CJ-dev] commonjava-projects/commonjava-opl/projects/opl-xdoclet/src/java/org/commonjava/opl/xdoclet
Brought to you by:
johnqueso
From: <joh...@co...> - 2004-03-08 15:00:57
|
Update of /cvsroot/commonjava/commonjava-projects/commonjava-opl/projects/opl-xdoclet/src/java/org/commonjava/opl/xdoclet/qtags In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28444/projects/opl-xdoclet/src/java/org/commonjava/opl/xdoclet/qtags Added Files: OplDelegateTag.java OplChildOfTag.java OplImplementsTag.java OplParentOfTag.java OplAttributeTag.java OplAuxImportTag.java OplParserTag.java Log Message: added xdoclet2 tag library to allow XSD, OPL, and NodeParser generation from simple POJO's. --- NEW FILE: OplDelegateTag.java --- /* Created on Mar 7, 2004 */ package org.commonjava.opl.xdoclet.qtags; import com.thoughtworks.qdox.model.DocletTag; /** Signifies a method which should be delegated to from within the node parser. * In other words, the node parser should replicate the method's signature, and * delegate directly to it. * * @author John Casey */ public interface OplDelegateTag extends DocletTag { /** * @qtags.default * @qtags.parameter default="true" */ String getValue_(); } --- NEW FILE: OplChildOfTag.java --- /* Created on Mar 6, 2004 */ package org.commonjava.opl.xdoclet.qtags; import java.util.Map; import com.thoughtworks.qdox.model.AbstractJavaEntity; import com.thoughtworks.qdox.model.DocletTag; /** Specifies an ancestor parser which should receive the result of this parser in some way. * @author John Casey */ public interface OplChildOfTag extends DocletTag { /** Specifies the type of ancestor parser (any class name) to lookup for adding the result of * this parser. * @qtags.required */ String getClass_(); /** Specifies whether this parser should fail if an ancestor parser of the specified type cannot * be found. * @qtags.parameter default="true" * @qtags.parameter allowed-value="true" * @qtags.parameter allowed-value="false" */ String getRequired(); /** Specifies the method to use in the ancestor parser for configuring it with this * parser's resulting instance. * @qtags.required */ String getSetter(); } --- NEW FILE: OplImplementsTag.java --- /* Created on Mar 7, 2004 */ package org.commonjava.opl.xdoclet.qtags; import com.thoughtworks.qdox.model.DocletTag; /** Tag denoting an interface which a node parser implementation should account for. * @author John Casey */ public interface OplImplementsTag extends DocletTag { /** Specifies an interface's class name which the node parser should implement. * @qtags.required */ String getClass_(); } --- NEW FILE: OplParentOfTag.java --- /* Created on Mar 5, 2004 */ package org.commonjava.opl.xdoclet.qtags; import com.thoughtworks.qdox.model.DocletTag; /** Declares a parent-child relationship from the perspective of the parent, along with restrictions * on child occurrence. * * @author John Casey */ public interface OplParentOfTag extends DocletTag { /** The node reference (name) of the child element. * @qtags.parameter required="true" */ String getRef_(); /** The maximum occurrence of the child within the parent node. * If not specified, assumed to be "unbounded". */ String getMaxOccurs(); /** The minimum occurrence of the child within the parent node. * If not specified, assumed to be "0". */ String getMinOccurs(); } --- NEW FILE: OplAttributeTag.java --- /* Created on Mar 5, 2004 */ package org.commonjava.opl.xdoclet.qtags; import com.thoughtworks.qdox.model.DocletTag; /** Attribute extracted by a parser. * @author John Casey */ public interface OplAttributeTag extends DocletTag { /** The name of the attribute. * @qtags.required */ String getName_(); /** Whether the attribute is required. * @qtags.parameter default="false" * @qtags.parameter allowed-value="true" * @qtags.parameter allowed-value="false" */ String getRequired(); /** Whether the attribute value will be resolved using the context properties before returning. * @qtags.parameter default="false" * @qtags.parameter allowed-value="true" * @qtags.parameter allowed-value="false" */ String getResolveValue(); /** One line of code to extract/format the value before setting it on the config instance. */ String getExtractor(); /** Set whether this attribute must be extracted before children can be parsed. * @qtags.parameter default="false" * @qtags.parameter allowed-value="true" * @qtags.parameter allowed-value="false" */ String getBeforeChildren(); /** The XML-Schema type of the attribute. Currently supports: * @qtags.parameter default="string" * * @qtags.parameter allowedValue="string" * @qtags.parameter allowedValue="boolean" * @qtags.parameter allowedValue="decimal" * @qtags.parameter allowedValue="float" * @qtags.parameter allowedValue="double" * @qtags.parameter allowedValue="duration" * @qtags.parameter allowedValue="datetime" * @qtags.parameter allowedValue="time" * @qtags.parameter allowedValue="date" * @qtags.parameter allowedValue="integer" * @qtags.parameter allowedValue="int" * @qtags.parameter allowedValue="nonPositiveInteger" * @qtags.parameter allowedValue="negativeInteger" * @qtags.parameter allowedValue="long" * @qtags.parameter allowedValue="short" * @qtags.parameter allowedValue="byte" * @qtags.parameter allowedValue="nonNegativeInteger" * @qtags.parameter allowedValue="unsignedLong" * @qtags.parameter allowedValue="unsignedInt" * @qtags.parameter allowedValue="unsignedShort" * @qtags.parameter allowedValue="unsignedByte" * @qtags.parameter allowedValue="positiveInteger" * @qtags.parameter allowedValue="ID" * @qtags.parameter allowedValue="IDREF" */ String getType(); } --- NEW FILE: OplAuxImportTag.java --- /* Created on Mar 7, 2004 */ package org.commonjava.opl.xdoclet.qtags; import com.thoughtworks.qdox.model.DocletTag; /** Used to specify an auxiliar import for the node parser, possibly to make * attribute extractor phrases easier to construct. * @author John Casey */ public interface OplAuxImportTag extends DocletTag { /** Specifies the import clause. * @qtags.required */ String getImport(); } --- NEW FILE: OplParserTag.java --- /* Created on Mar 5, 2004 */ package org.commonjava.opl.xdoclet.qtags; import com.thoughtworks.qdox.model.DocletTag; /** Represents a parser to the XSD/OPL file generation process. * @author John Casey */ public interface OplParserTag extends DocletTag { /** Specifies the name of this element in the schema. * @qtags.required */ String getNode(); /** Specifies that this parser is meant to be at the root of a document/configuration. * @qtags.parameter default="false" * @qtags.parameter allowed-value="true" * @qtags.parameter allowed-value="false" */ String getRoot(); } |