Author: tv
Date: Thu Dec  5 20:35:08 2013
New Revision: 1548281

URL: http://svn.apache.org/r1548281
Log:
Add schema definition

Added:
    turbine/fulcrum/trunk/intake/src/dtd/intake.xsd   (with props)
Modified:
    turbine/fulcrum/trunk/intake/pom.xml
    turbine/fulcrum/trunk/intake/src/changes/changes.xml
    turbine/fulcrum/trunk/intake/src/dtd/intake.dtd

Modified: turbine/fulcrum/trunk/intake/pom.xml
URL: 
http://svn.apache.org/viewvc/turbine/fulcrum/trunk/intake/pom.xml?rev=1548281&r1=1548280&r2=1548281&view=diff
==============================================================================
--- turbine/fulcrum/trunk/intake/pom.xml (original)
+++ turbine/fulcrum/trunk/intake/pom.xml Thu Dec  5 20:35:08 2013
@@ -137,6 +137,7 @@
         <directory>src/dtd</directory>
         <includes>
           <include>intake.dtd</include>
+          <include>intake.xsd</include>
         </includes>
       </resource>
       <resource>

Modified: turbine/fulcrum/trunk/intake/src/changes/changes.xml
URL: 
http://svn.apache.org/viewvc/turbine/fulcrum/trunk/intake/src/changes/changes.xml?rev=1548281&r1=1548280&r2=1548281&view=diff
==============================================================================
--- turbine/fulcrum/trunk/intake/src/changes/changes.xml (original)
+++ turbine/fulcrum/trunk/intake/src/changes/changes.xml Thu Dec  5 20:35:08 
2013
@@ -27,7 +27,10 @@
   <body>
      <release version="1.1.1" date="in Subversion">
      </release>
-     <release version="1.1.0" date="2013-11-03">
+     <release version="1.1.0" date="2013-12-??">
+      <action dev="tv" type="add">
+        Add Intake schema derived from DTD
+      </action>
       <action dev="tv" type="update">
         Derive from Turbine parent POM 3
       </action>

Modified: turbine/fulcrum/trunk/intake/src/dtd/intake.dtd
URL: 
http://svn.apache.org/viewvc/turbine/fulcrum/trunk/intake/src/dtd/intake.dtd?rev=1548281&r1=1548280&r2=1548281&view=diff
==============================================================================
Binary files - no diff available.

Added: turbine/fulcrum/trunk/intake/src/dtd/intake.xsd
URL: 
http://svn.apache.org/viewvc/turbine/fulcrum/trunk/intake/src/dtd/intake.xsd?rev=1548281&view=auto
==============================================================================
--- turbine/fulcrum/trunk/intake/src/dtd/intake.xsd (added)
+++ turbine/fulcrum/trunk/intake/src/dtd/intake.xsd Thu Dec  5 20:35:08 2013
@@ -0,0 +1,266 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<schema xmlns="http://www.w3.org/2001/XMLSchema"; 
+    targetNamespace="http://turbine.apache.org/schema/intake/4.0"; 
+    xmlns:tns="http://turbine.apache.org/schema/intake/4.0"; 
+    elementFormDefault="qualified">
+
+    <element name="input-data" type="tns:input-dataComplexType">
+    </element>
+    <complexType name="groupComplexType">
+        <sequence>
+            <element minOccurs="1" maxOccurs="unbounded" name="field" 
type="tns:fieldComplexType">
+            </element>
+        </sequence>
+        <attribute use="required" name="key" type="string">
+            <annotation>
+                <documentation>A short identifier for the group. It is only 
+                used in query parameters so it does not have to be descriptive.
+                This value must be unique across all groups in the enclosing 
+                input-data element.</documentation>
+            </annotation>
+        </attribute>
+        <attribute use="required" name="name" type="string">
+            <annotation>
+                <documentation>Name of the group. This is the value used to 
+                get the group from the Intake Service. It must be unique 
+                across all groups in the enclosing input-data 
element.</documentation>
+            </annotation>
+        </attribute>
+        <attribute name="mapToObject" type="string">
+            <annotation>
+                <documentation>Class name of the object that will be mapped to 
the
+                group.  Instances of this class can be used to set
+                the values of the fields within the group.  The
+                Intake Service can also set the attributes of
+                the object from the fields in the group.
+
+                This class name actually used by the intake service
+                will be basePackage+"."+mapToObject.
+
+                Example:
+                basePackage=org.apache.turbine.om
+                mapToObject=TurbineUser
+                Effective class name = org.apache.turbine.om.TurbineUser
+
+                Default: null</documentation>
+            </annotation>
+        </attribute>
+        <attribute name="pool-capacity" type="string">
+            <annotation>
+                <documentation>Capacity of the pool used to store instances of 
the fields
+                within this group.
+
+                Default: 128</documentation>
+            </annotation>
+        </attribute>
+    </complexType>
+    <complexType name="input-dataComplexType">
+        <annotation>
+            <documentation>The input-data element is the root of the intake 
+            XML definition file.</documentation>
+        </annotation>
+        <sequence>
+            <element minOccurs="1" maxOccurs="unbounded" name="group"
+                type="tns:groupComplexType">
+            </element>
+        </sequence>
+        <attribute name="basePackage" type="string">
+            <annotation>
+                <documentation>Base package to use for specifying the class 
+                names of mapped objects. This value will be prepended to the 
+                class name of the mapped object to form the fully qualified 
+                class name.
+                
+                Example: org.apache.turbine.om
+                Default: ""</documentation>
+            </annotation>
+        </attribute>
+        <attribute name="groupPrefix" type="string">
+            <annotation>
+                <documentation>Prefix to be assigned to all groups within the 
+                input-data element. This is used to make group name unique if 
+                the same group name is used in multiple definition files.
+                
+                Default: null</documentation>
+            </annotation>
+        </attribute>
+    </complexType>
+    <complexType name="fieldComplexType">
+        <annotation>
+            <documentation>The field element defines a field within a group.
+            This will be used to validate one HTML input field.</documentation>
+        </annotation>
+        <sequence>
+            <element minOccurs="0" maxOccurs="unbounded" name="rule"
+                type="tns:ruleComplexType">
+            </element>
+        </sequence>
+        <attribute name="key" type="string" use="required">
+            <annotation>
+                <documentation>A short identifier for the field.  It is only 
used in
+                query parameters.  It must be unique across all fields
+                within the enclosing group element.</documentation>
+            </annotation>
+        </attribute>
+        <attribute name="name" type="string" use="required">
+            <annotation>
+                <documentation>The name of the field.  This is the identifier 
used to
+                get the field from the Intake Service.  It must be unique
+                across all fields all fields within the enclosing group
+                element.</documentation>
+            </annotation>
+        </attribute>
+        <attribute name="displayName" type="string">
+            <annotation>
+                <documentation>An optional name for the field that can be used 
for display
+                on HTML forms.  This is intended to be a friendly name for 
labels etc. or
+                a localization key.
+
+                Default: name</documentation>
+            </annotation>
+        </attribute>
+        <attribute name="displaySize" type="string">
+            <annotation>
+                <documentation>An optional size value to use when create the 
HTML input tag
+                for this field.</documentation>
+            </annotation>
+        </attribute>
+        <attribute name="type" default="String">
+            <annotation>
+                <documentation>Type of data contained in the field.
+
+                Default: "String"</documentation>
+            </annotation>
+            <simpleType>
+                <restriction base="string">
+                    <enumeration value="boolean"></enumeration>
+                    <enumeration value="BigDecimal"></enumeration>
+                    <enumeration value="int"></enumeration>
+                    <enumeration value="float"></enumeration>
+                    <enumeration value="FileItem"></enumeration>
+                    <enumeration value="String"></enumeration>
+                    <enumeration value="DateString"></enumeration>
+                    <enumeration value="ComboKey"></enumeration>
+                    <enumeration value="double"></enumeration>
+                    <enumeration value="short"></enumeration>
+                    <enumeration value="long"></enumeration>
+                    <enumeration value="custom"></enumeration>
+                </restriction>
+            </simpleType>
+        </attribute>
+        <attribute name="multiValued" type="boolean" default="false">
+            <annotation>
+                <documentation>If this is true, the field will accept multiple 
values.
+                Otherwise, the field only accepts a single value.
+
+                Default: false</documentation>
+            </annotation>
+        </attribute>
+        <attribute name="fieldClass" type="string">
+            <annotation>
+                <documentation>Name of the class used for handling the field. 
This is used to
+                customize field types. The attribute is only interpreted if the
+                type attribute is set to "custom".
+
+                If the the name of the class is not fully qualified, it will
+                be prepended with org.apache.fulcrum.intake.model.
+                For example: a value of "CurrencyField" will be read as
+                
"org.apache.fulcrum.intake.model.CurrencyField".</documentation>
+            </annotation>
+        </attribute>
+        <attribute name="mapToObject" type="string">
+            <annotation>
+                <documentation>Class name of the mapped object.  This will 
override the
+                mapToObject attribute of the enclosing group element.
+
+                Default: mapToObject from the enclosing group 
element</documentation>
+            </annotation>
+        </attribute>
+        <attribute name="mapToProperty" type="string">
+            <annotation>
+                <documentation>Name of the property within the mapped object 
that
+                will be mapped to the field.  This value has no meaning
+                if mapToObject is not set.
+
+                This is used to determine the names of the getter and
+                setter methods in the mapped object.  The actually
+                attribute within the object is never accessed directly.
+
+                When determining the name of the getter and setter methods,
+                the first character of the value of mapToProperty is made
+                uppercase.  It is the prepended with either "get" or "set"
+                appropriately.
+
+                The getter method must not take any parameters.  The setter
+                method must take exactly one parameter.  For more information
+                of the details of determining the methods, see the javadocs
+                for java.beans.PropertyDescriptor.
+
+                Note: Specifying an empty string for the value of this 
attribute
+                will have the effect of not mapping this field.  This is very
+                useful in cases where the group has a value for mapToObject but
+                there are fields in the group which should not be mapped.
+
+                Default: The name of the field.</documentation>
+            </annotation>
+        </attribute>
+        <attribute name="validator" type="string">
+            <annotation>
+                <documentation>Name of the class used for validating the value 
of the
+                field.  This is used to have the field validated by a custom
+                validator object.  If this is not set, a default validator
+                will be used according to the field type.
+
+                If the the name of the class is not fully qualified, it will
+                be prepended with org.apache.fulcrum.intake.validator.
+                For example: a value of "NumberValidator" will be read as
+                "org.apache.fulcrum.intake.validator.NumberValidator".
+
+                Default: default validator for the field type.</documentation>
+            </annotation>
+        </attribute>
+        <attribute name="defaultValue" type="string">
+            <annotation>
+                <documentation>Default value to be used for the value of the 
field if one
+                is not supplied my the mapped object.
+
+                Default: null</documentation>
+            </annotation>
+        </attribute>
+        <attribute name="emptyValue" type="string">
+            <annotation>
+                <documentation>Value to be used for the value of the field if 
it is not
+                supplied by the parameters returned from an input form.
+
+                Default: null</documentation>
+            </annotation>
+        </attribute>
+    </complexType>
+
+    <complexType name="ruleComplexType">
+        <annotation>
+            <documentation>The rule element is used to describe validation 
rules for 
+            fields.</documentation>
+        </annotation>
+        <simpleContent>
+            <annotation>
+                <documentation>Error message set for the field if the 
validation rule
+                fails.</documentation>
+            </annotation>
+            <extension base="string">
+                <attribute name="name" type="string" use="required">
+                    <annotation>
+                        <documentation>Name of the rule.  The valid rule names 
vary 
+                        by field type.</documentation>
+                    </annotation>
+                </attribute>
+                <attribute name="value" type="string" use="required">
+                    <annotation>
+                        <documentation>Value passed to the rule.  The meaning 
of this 
+                        attribute varies by rule.</documentation>
+                    </annotation>
+                </attribute>
+            </extension>
+        </simpleContent>
+    </complexType>
+</schema>
\ No newline at end of file

Propchange: turbine/fulcrum/trunk/intake/src/dtd/intake.xsd
------------------------------------------------------------------------------
    svn:mime-type = text/plain


Reply via email to