Changed global element configurator to seperate interface, fixed few

javadoc warnings and worked on elddoc html output and added
more descriptions in eld.
This commit is contained in:
Willem Cazander 2012-11-18 06:15:24 +01:00
parent e94bb5ffe8
commit 9b286c7fbf
15 changed files with 203 additions and 120 deletions

View file

@ -54,7 +54,7 @@ src/build/gnu-up.sh <scm_username> <version>
-- Make site --
cd project-root/;
mvn -Psite-elddoc clean package site site:stage
MAVEN_OPTS="-Xmx512m -XX:MaxPermSize=128m" mvn -Psite-elddoc clean package site site:stage
-- Check for code style --

View file

@ -355,10 +355,10 @@ public class X4ODebugWriter {
}
/**
* Todo move after xpath support
* @param element
* @param buff
* @return
* Todo move after xpath support.
* @param element The element.
* @param buff The buffer.
* @return Returns the buffer of the builf path.
*/
private StringBuffer getElementPath(Element element,StringBuffer buff) {
if (element.getParent()==null) {

View file

@ -150,6 +150,7 @@ public class EldModuleLoaderCore implements ElementLanguageModuleLoader {
throw new ElementLanguageModuleLoaderException(this,e.getMessage(),e);
}
namespace.setId(CEL_CORE);
namespace.setUri(CEL_CORE_URI);
namespace.setSchemaUri(CEL_CORE_XSD_URI);
namespace.setSchemaResource(CEL_CORE_XSD_FILE);
@ -189,6 +190,7 @@ public class EldModuleLoaderCore implements ElementLanguageModuleLoader {
throw new ElementLanguageModuleLoaderException(this,e.getMessage(),e);
}
namespace.setId(CEL_ROOT);
namespace.setUri(CEL_ROOT_URI);
namespace.setSchemaUri(CEL_ROOT_XSD_URI);
namespace.setSchemaResource(CEL_ROOT_XSD_FILE);
@ -285,6 +287,7 @@ public class EldModuleLoaderCore implements ElementLanguageModuleLoader {
ec.addElementParent("", "configurator");
ec.addElementParent("", "elementInterface");
ec.addElementParent("", "element");
ec.addElementParent("", "attribute");
elementClassList.add(ec);
ec = new DefaultElementClass("elementParent",null,ElementClassAddParentElement.class);

View file

@ -52,7 +52,7 @@ public class AttributeFromBodyConfigurator extends AbstractElementConfigurator {
throw new ElementConfiguratorException(this,"name attribute is empty.");
}
if (bodyType==null) {
bodyType = "characters";
bodyType = ElementType.characters.name();
}
String value = null;
if ("characters".equals(bodyType)) {

View file

@ -138,7 +138,7 @@ public abstract class AbstractElementLanguageModule extends AbstractElementMetaB
}
/**
* @see org.x4o.xml.element.ElementLanguageModule#addGlobalElementConfigurator(ElementConfigurator)
* @see org.x4o.xml.element.ElementLanguageModule#addElementConfiguratorGlobal(ElementConfiguratorGlobal)
*/
public void addElementConfiguratorGlobal(ElementConfiguratorGlobal elementConfigurator) {
if (elementConfigurator==null) {

View file

@ -125,8 +125,7 @@ public class AttributeMap<K,V> implements Map<K,V> {
/**
* Gets the value of the attributes. uses the uri if not null.
*
* @param name
* The name of the attributes.
* @param name The name of the attributes.
* @return The value of the attribute.
*/
private String getValue(String name) {
@ -140,9 +139,8 @@ public class AttributeMap<K,V> implements Map<K,V> {
}
/**
* @see getValue(String name)
* @param key
* The name of the attribute.
* Gets the attribute value.
* @param key The name of the attribute.
* @return The value of the attribute.
*/
private String getValue(Object key) {

View file

@ -7,7 +7,7 @@
ModuleName: Core Element Languag Module
Namespaces: 2
Namespace: http://cel.x4o.org/xml/ns/cel-core
Created on: Sun Nov 18 03:27:37 CET 2012
Created on: Sun Nov 18 05:10:55 CET 2012
-->
<schema xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:this="http://cel.x4o.org/xml/ns/cel-core"
@ -18,14 +18,14 @@
</choice>
<attribute name="uri" type="string" use="required"/>
<attribute name="name" type="string"/>
<attribute name="prefixMapping" type="string"/>
<attribute name="elementNamespaceInstanceProvider" type="string"/>
<attribute name="schemaUri" type="string"/>
<attribute name="schemaResource" type="string"/>
<attribute name="schemaPrefix" type="string"/>
<attribute name="languageRoot" type="boolean"/>
<attribute name="prefixMapping" type="string"/>
<attribute name="id" type="string"/>
<attribute name="description" type="string"/>
<attribute name="id" type="string"/>
</complexType>
<complexType name="descriptionType">
<simpleContent>
@ -43,13 +43,13 @@
</choice>
<attribute name="objectClass" type="string"/>
<attribute name="elementClass" type="string"/>
<attribute name="tag" type="string"/>
<attribute name="schemaContentBase" type="string"/>
<attribute name="autoAttributes" type="boolean"/>
<attribute name="schemaContentComplex" type="boolean"/>
<attribute name="schemaContentMixed" type="boolean"/>
<attribute name="id" type="string"/>
<attribute name="tag" type="string"/>
<attribute name="description" type="string"/>
<attribute name="id" type="string"/>
</complexType>
<complexType name="configuratorGlobalType">
<choice minOccurs="0" maxOccurs="unbounded"/>
@ -75,6 +75,7 @@
<complexType name="attributeType">
<choice minOccurs="0" maxOccurs="unbounded">
<element name="classConverter" type="this:classConverterType"/>
<element name="description" type="this:descriptionType"/>
</choice>
<attribute name="name" type="string"/>
<attribute name="objectConverter" type="string"/>
@ -83,8 +84,8 @@
<attribute name="runBeanFill" type="boolean"/>
<attribute name="required" type="boolean"/>
<attribute name="defaultValue" type="string"/>
<attribute name="id" type="string"/>
<attribute name="description" type="string"/>
<attribute name="id" type="string"/>
</complexType>
<complexType name="classConverterType">
<choice minOccurs="0" maxOccurs="unbounded"/>
@ -105,8 +106,8 @@
<element name="description" type="this:descriptionType"/>
</choice>
<attribute name="interfaceClass" type="string"/>
<attribute name="id" type="string"/>
<attribute name="description" type="string"/>
<attribute name="id" type="string"/>
</complexType>
<complexType name="elementParentType">
<choice minOccurs="0" maxOccurs="unbounded"/>

View file

@ -7,7 +7,7 @@
ModuleName: Core Element Languag Module
Namespaces: 2
Namespace: http://cel.x4o.org/xml/ns/cel-root
Created on: Sun Nov 18 03:27:37 CET 2012
Created on: Sun Nov 18 05:10:55 CET 2012
-->
<schema xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:cel-core="http://cel.x4o.org/xml/ns/cel-core"
@ -27,8 +27,8 @@
<attribute name="sourceResource" type="string"/>
<attribute name="elementLanguageModuleLoader" type="string"/>
<attribute name="providerName" type="string"/>
<attribute name="id" type="string"/>
<attribute name="description" type="string"/>
<attribute name="id" type="string"/>
</complexType>
</element>
</schema>

View file

@ -7,7 +7,7 @@
ModuleName: Element Language Definition
Namespaces: 3
Namespace: http://eld.x4o.org/xml/ns/eld-conv
Created on: Sun Nov 18 03:32:55 CET 2012
Created on: Sun Nov 18 05:06:09 CET 2012
-->
<schema xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:this="http://eld.x4o.org/xml/ns/eld-conv"

View file

@ -7,7 +7,7 @@
ModuleName: Element Language Definition
Namespaces: 3
Namespace: http://eld.x4o.org/xml/ns/eld-lang
Created on: Sun Nov 18 03:32:55 CET 2012
Created on: Sun Nov 18 05:06:09 CET 2012
-->
<schema xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:conv="http://eld.x4o.org/xml/ns/eld-conv"
@ -20,12 +20,12 @@
</choice>
<attribute name="uri" type="string" use="required"/>
<attribute name="name" type="string"/>
<attribute name="prefixMapping" type="string"/>
<attribute name="languageRoot" type="boolean"/>
<attribute name="elementNamespaceInstanceProvider" type="string"/>
<attribute name="schemaUri" type="string"/>
<attribute name="schemaResource" type="string"/>
<attribute name="schemaPrefix" type="string"/>
<attribute name="languageRoot" type="boolean"/>
<attribute name="prefixMapping" type="string"/>
<attribute name="description" type="string"/>
<attribute name="id" type="string"/>
</complexType>
@ -53,11 +53,11 @@
</choice>
<attribute name="objectClass" type="string"/>
<attribute name="elementClass" type="string"/>
<attribute name="tag" type="string"/>
<attribute name="schemaContentBase" type="string"/>
<attribute name="autoAttributes" type="boolean"/>
<attribute name="schemaContentComplex" type="boolean"/>
<attribute name="schemaContentMixed" type="boolean"/>
<attribute name="schemaContentBase" type="string"/>
<attribute name="tag" type="string"/>
<attribute name="description" type="string"/>
<attribute name="id" type="string"/>
</complexType>
@ -121,14 +121,15 @@
<element ref="conv:urlConverter"/>
<element name="attributeAlias" type="this:attributeAliasType"/>
<element name="bean" type="this:beanType"/>
<element name="description" type="this:descriptionType"/>
</choice>
<attribute name="name" type="string"/>
<attribute name="defaultValue" type="string"/>
<attribute name="runResolveEL" type="boolean"/>
<attribute name="objectConverter" type="string"/>
<attribute name="runConverters" type="boolean"/>
<attribute name="runBeanFill" type="boolean"/>
<attribute name="objectConverter" type="string"/>
<attribute name="runResolveEL" type="boolean"/>
<attribute name="required" type="boolean"/>
<attribute name="defaultValue" type="string"/>
<attribute name="description" type="string"/>
<attribute name="id" type="string"/>
</complexType>
@ -176,7 +177,12 @@
<attribute name="namespaceUri" type="string"/>
<anyAttribute/>
</complexType>
<element name="namespace" type="this:namespaceType"/>
<element name="namespace" type="this:namespaceType">
<annotation>
<documentation xml:lang="en">Defines an namespace for the language.
</documentation>
</annotation>
</element>
<element name="description" type="this:descriptionType">
<annotation>
<documentation xml:lang="en">An ELD elementDescription field which lets you type text like this one in xml characters instead of an attribute.
@ -189,7 +195,12 @@
</documentation>
</annotation>
</element>
<element name="element" type="this:elementType"/>
<element name="element" type="this:elementType">
<annotation>
<documentation xml:lang="en">The xml element.
</documentation>
</annotation>
</element>
<element name="attributeAlias" type="this:attributeAliasType">
<annotation>
<documentation xml:lang="en">Defines an alias for an attribute name.
@ -226,7 +237,12 @@
</documentation>
</annotation>
</element>
<element name="attribute" type="this:attributeType"/>
<element name="attribute" type="this:attributeType">
<annotation>
<documentation xml:lang="en">XML Element Attribute tag.
</documentation>
</annotation>
</element>
<element name="bindingHandler" type="this:bindingHandlerType">
<annotation>
<documentation xml:lang="en">Define an className in bean.class for an ElementBindingHandler interface.
@ -245,7 +261,12 @@
</documentation>
</annotation>
</element>
<element name="elementInterface" type="this:elementInterfaceType"/>
<element name="elementInterface" type="this:elementInterfaceType">
<annotation>
<documentation xml:lang="en">Config element objects by java interface.
</documentation>
</annotation>
</element>
<element name="elementParent" type="this:elementParentType">
<annotation>
<documentation xml:lang="en">Adds an parent element tag for xsd

View file

@ -52,7 +52,9 @@
>
<!-- Root Element for nice namespace'ing -->
<element tag="module" objectClass="${parentLanguageConfiguration.defaultElementLanguageModule}" elementClass="org.x4o.xml.eld.lang.ModuleElement">
<attribute name="id" required="true"/>
<attribute name="id" required="true">
<description>The module id.</description>
</attribute>
<description>The module root element.</description>
</element>
</namespace>
@ -68,55 +70,89 @@
<!-- First copy some core elements over from parent config -->
<element tag="namespace" objectClass="${parentLanguageConfiguration.defaultElementNamespaceContext}">
<attribute name="uri" required="true"/>
<description>Defines an namespace for the language.</description>
<attribute name="uri" required="true">
<description>The namespace id.</description>
</attribute>
</element>
<element tag="element" objectClass="${parentLanguageConfiguration.defaultElementClass}">
<description>The xml element.</description>
<attribute name="objectClass">
<description>The class of the wrapped object.</description>
<classConverter/>
</attribute>
<attribute name="elementClass">
<attribute name="elementClass">
<description>An custom element class to config object.</description>
<classConverter/>
</attribute>
</element>
<element tag="elementInterface" objectClass="${parentLanguageConfiguration.defaultElementInterface}">
<attribute name="id" required="true"/>
<description>Config element objects by java interface.</description>
<attribute name="id" required="true">
<description>The interface id.</description>
</attribute>
<attribute name="interfaceClass" required="true">
<description>The interface class.</description>
<classConverter/>
</attribute>
</element>
<element tag="attribute" objectClass="${parentLanguageConfiguration.defaultElementClassAttribute}"/>
<element tag="attribute" objectClass="${parentLanguageConfiguration.defaultElementClassAttribute}">
<description>XML Element Attribute tag.</description>
</element>
<!-- Create some support elements to make language readable. -->
<element tag="bindingHandler" elementClass="org.x4o.xml.eld.lang.BeanElement">
<description>Define an className in bean.class for an ElementBindingHandler interface.</description>
<attribute name="id" required="true"/>
<attribute name="bean.class" required="true"/>
<attribute name="id" required="true">
<description>The binding handler id.</description>
</attribute>
<attribute name="bean.class" required="true">
<description>The class of the binding handler.</description>
</attribute>
<elementParent tag="module" uri="http://eld.x4o.org/xml/ns/eld-root"/>
<elementParent tag="elementInterface"/>
</element>
<element tag="attributeHandler" elementClass="org.x4o.xml.eld.lang.BeanElement">
<description>Define an className in bean.class for an ElementAttributeHandler.</description>
<attribute name="id" required="true"/>
<attribute name="bean.class" required="true"/>
<attribute name="attributeName" required="true"/>
<attribute name="id" required="true">
<description>The atttribute handler id.</description>
</attribute>
<attribute name="bean.class" required="true">
<description>The class of the attribute handler.</description>
</attribute>
<attribute name="attributeName" required="true">
<description>The xml attribute name.</description>
</attribute>
<elementParent tag="module" uri="http://eld.x4o.org/xml/ns/eld-root"/>
</element>
<element tag="configuratorGlobal" elementClass="org.x4o.xml.eld.lang.BeanElement">
<description>Define an className in bean.class for an ElementConfiguratorGlobal.</description>
<attribute name="id" required="true"/>
<attribute name="bean.class" required="true"/>
<attribute name="configAction"/>
<attribute name="id" required="true">
<description>The global element configurator id.</description>
</attribute>
<attribute name="bean.class" required="true">
<description>The class of the element configurator.</description>
</attribute>
<attribute name="configAction">
<description>If set to true then run in config phase.</description>
</attribute>
<elementParent tag="module" uri="http://eld.x4o.org/xml/ns/eld-root"/>
</element>
<element tag="configurator" elementClass="org.x4o.xml.eld.lang.BeanElement">
<description>Define an className in bean.class for an ElementConfigurator.</description>
<attribute name="id" required="true"/>
<attribute name="bean.class" required="true"/>
<attribute name="configAction"/>
<attribute name="id" required="true">
<description>The element configurator id.</description>
</attribute>
<attribute name="bean.class" required="true">
<description>The class of the global element configurator.</description>
</attribute>
<attribute name="configAction">
<description>If set to true then run in config phase.</description>
</attribute>
<elementParent tag="elementInterface"/>
<elementParent tag="element"/>
</element>
@ -129,6 +165,7 @@
<elementParent tag="configurator"/>
<elementParent tag="elementInterface"/>
<elementParent tag="element"/>
<elementParent tag="attribute"/>
<elementParent tag="attributeFromBody"/>
<elementParent tag="classBindingHandler"/>
</element>
@ -139,48 +176,69 @@
<element tag="elementParent" elementClass="org.x4o.xml.eld.lang.ElementClassAddParentElement">
<description>Adds an parent element tag for xsd</description>
<elementParent tag="element"/>
<attribute name="tag"/>
<attribute name="namespaceUri"/>
<attribute name="tag">
<description>The parent tag to have object for.</description>
</attribute>
<attribute name="namespaceUri">
<description>The element namespace uri if non local.</description>
</attribute>
</element>
<element tag="elementSkipPhase" elementClass="org.x4o.xml.eld.lang.SkipPhaseElement">
<description>Adds an phase to skip to the parent element.</description>
<attribute name="name" required="true"/>
<attribute name="name" required="true">
<description>The name of the phase to skip.</description>
</attribute>
<elementParent tag="element"/>
</element>
<element tag="attributeHandlerNextAttribute" elementClass="org.x4o.xml.eld.lang.NextAttributeElement">
<description>Defines the parameter order.</description>
<attribute name="attributeName" required="true"/>
<attribute name="attributeName" required="true">
<description>The attribute name to run after this attribute.</description>
</attribute>
<elementParent tag="attributeHandler"/>
<elementParent tag="bean"/>
</element>
<element tag="attributeAlias" elementClass="org.x4o.xml.eld.lang.AttributeAliasElement">
<description>Defines an alias for an attribute name.</description>
<attribute name="name" required="true"/>
<attribute name="name" required="true">
<description>The alias name to add to the attribute.</description>
</attribute>
<elementParent tag="attribute"/>
</element>
<element tag="attributeFromBody" objectClass="org.x4o.xml.eld.lang.AttributeFromBodyConfigurator" autoAttributes="false">
<description>Defines an alias for an attribute name.</description>
<attribute name="name" required="true"/>
<attribute name="id" required="true"/>
<attribute name="bodyType"/>
<attribute name="id" required="true">
<description>The id for this configurator.</description>
</attribute>
<attribute name="name" required="true">
<description>The attribute name to fill the value.</description>
</attribute>
<attribute name="bodyType">
<description>See org.x4o.xml.element.Element.ElementType for options defaults to 'characters'.</description>
</attribute>
</element>
<element tag="classBindingHandler" objectClass="org.x4o.xml.eld.lang.ElementRefectionBindingHandler"
autoAttributes="false"
>
<description>Lets you dynamicly bind to object togecher.</description>
<attribute name="id" required="true"/>
<attribute name="id" required="true">
<description>The id for this binding handler.</description>
</attribute>
<attribute name="parentClass">
<description>The parent class.</description>
<classConverter/>
</attribute>
<attribute name="childClass">
<description>The child class.</description>
<classConverter/>
</attribute>
<attribute name="method">
<description>The method name of the method used to add the child to the parent.</description>
</attribute>
</element>
@ -190,7 +248,9 @@
<element tag="bean" elementClass="org.x4o.xml.eld.lang.BeanElement">
<!-- BIG NOTE: maybe beanElement most go to meta to have clean impl. -->
<description>Loads bean into the Element</description>
<attribute name="bean.class"/>
<attribute name="bean.class">
<description>The class name of the the class to load.</description>
</attribute>
<elementParent tag="module" uri="http://eld.x4o.org/xml/ns/eld-root"/>
<elementParent tag="elementInterface"/>
<elementParent tag="element"/>
@ -204,11 +264,14 @@
schemaResource="eld-conv-1.0.xsd"
schemaPrefix="conv"
name="Element Attribute Converters"
id="eld-conv"
>
<!-- Config all converters, move ? -->
<element tag="beanConverter" elementClass="org.x4o.xml.eld.lang.BeanElement">
<description>Define an loadable in bean.class for an ObjectConverter.</description>
<attribute name="bean.class"/>
<attribute name="bean.class">
<description>The class name of the converter to load.</description>
</attribute>
<elementParent tag="attribute" uri="http://eld.x4o.org/xml/ns/eld-lang"/>
<!-- todo: make converter which loads converter so xsd is correct. -->
</element>
@ -224,17 +287,20 @@
<element tag="enumConverter" objectClass="org.x4o.xml.conv.text.EnumConverter" />
<element tag="stringSplitConverter" objectClass="org.x4o.xml.conv.text.StringSplitConverter">
<attribute name="classTo" required="true"><classConverter/></attribute>
<attribute name="split" required="true"/>
<attribute name="splitSize" required="true"/>
<attribute name="singleToMethod"/>
<attribute name="useNativeType"/>
<attribute name="classTo" required="true">
<description>The class name to convert the string to.</description>
<classConverter/>
</attribute>
<attribute name="split" required="true" description="The split regex."/>
<attribute name="splitSize" required="true" description="The split value expected size."/>
<attribute name="singleToMethod" description="Shortcut to use only this method for the 'to' convert."/>
<attribute name="useNativeType" description="Set to true to convert to native data type."/>
</element>
<element tag="stringSplitConverterStep" objectClass="org.x4o.xml.conv.text.StringSplitConverterStep">
<attribute name="fromMethod" required="true"/>
<attribute name="toMethod" required="false"/>
<attribute name="fromOrder" required="true"/>
<attribute name="toOrder" required="true"/>
<attribute name="fromMethod" required="true" description="The convert 'from' method step."/>
<attribute name="toMethod" required="false" description="The convert 'to' method step."/>
<attribute name="fromOrder" required="true" description="The convert 'from' order."/>
<attribute name="toOrder" required="true" description="The convert 'to' order."/>
</element>
</namespace>
</root:module>

View file

@ -7,7 +7,7 @@
ModuleName: Element Language Definition
Namespaces: 3
Namespace: http://eld.x4o.org/xml/ns/eld-root
Created on: Sun Nov 18 03:32:55 CET 2012
Created on: Sun Nov 18 05:06:09 CET 2012
-->
<schema xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:conv="http://eld.x4o.org/xml/ns/eld-conv"
@ -29,9 +29,9 @@
</choice>
<attribute name="id" type="string" use="required"/>
<attribute name="name" type="string"/>
<attribute name="providerName" type="string"/>
<attribute name="sourceResource" type="string"/>
<attribute name="elementLanguageModuleLoader" type="string"/>
<attribute name="providerName" type="string"/>
<attribute name="description" type="string"/>
</complexType>
</element>

View file

@ -91,7 +91,6 @@ public class EmptyXmlTest extends TestCase {
try {
parser.parseResource("tests/empty-xml/empty-xml.xml");
} catch (SAXException e) {
e.printStackTrace();
boolean hasError = e.getMessage().contains("Premature end of file."); // java6+ sax message
if (hasError==false) {
hasError = e.getMessage().contains("A well-formed document requires a root element."); // xercesImpl sax message

View file

@ -111,18 +111,15 @@ public class EldDocHtmlWriter {
pw.write("\n\n");
pw.flush();
pw.print("body { background-color: #FFFFFF; color:#000000 }\n");
pw.print("h1 { font-size: 145% }\n");
pw.print(".TableHeadingColor { background: #CCCCFF; color:#000000 }\n");
pw.print("h1 { font-size: 145%;text-align: center; }\n");
pw.print(".Copyright { font-size: 70%;text-align: center; }\n");
pw.print(".TableHeadingColor { background: #CCCCFF; color:#000000;font-weight: bold;font-size: 110%; }\n");
pw.print(".TableSubHeadingColor { background: #EEEEFF; color:#000000 }\n");
pw.print(".TableRowColor { background: #FFFFFF; color:#000000 }\n");
pw.print(".FrameTitleFont { font-size: 100%; font-family: Helvetica, Arial, sans-serif; color:#000000 }\n");
pw.print(".FrameHeadingFont { font-size: 90%; font-family: Helvetica, Arial, sans-serif; color:#000000 }\n");
pw.print(".FrameItemFont { font-size: 90%; font-family: Helvetica, Arial, sans-serif; color:#000000 }\n");
pw.print(".NavBarCell1 { background-color:#EEEEFF; color:#000000}\n");
pw.print(".NavBarCell1Rev { background-color:#00008B; color:#FFFFFF}\n");
pw.print(".NavBarFont1 { font-family: Arial, Helvetica, sans-serif; color:#000000;color:#000000;}\n");
pw.print(".NavBarFont1Rev { font-family: Arial, Helvetica, sans-serif; color:#FFFFFF;color:#FFFFFF;}\n");
pw.print(".NavBarCell2 { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF; color:#000000}\n");
pw.print(".NavBarCell1 a { font-size: 120%;font-weight: bold;}\n");
pw.print(".NavBarCell2 { font-size: 80%;font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF; color:#000000}\n");
pw.print(".NavBarCell3 { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF; color:#000000}\n");
pw.flush();
} finally {
@ -517,40 +514,38 @@ public class EldDocHtmlWriter {
private void printTableStart(PrintWriter pw,String title) {
pw.print("<table border=\"1\" width=\"100%\" cellpadding=\"3\" cellspacing=\"0\" summary=\"\">\n");
pw.print("<tr bgcolor=\"#CCCCFF\" class=\"TableHeadingColor\">\n");
pw.print("<th align=\"left\" colspan=\"2\"><font size=\"+2\">\n");
pw.print("<b>");
pw.print("\t<tr class=\"TableHeadingColor\">\n");
pw.print("\t\t<th align=\"left\" colspan=\"2\">\n");
pw.print(title);
pw.print("</b>");
pw.print("</font></th>\n</tr>\n");
pw.print("</th>\n\t</tr>\n");
}
private void printTableRowSummary(PrintWriter pw,String name,String description) {
pw.print("<tr bgcolor=\"white\" class=\"TableRowColor\">\n");
pw.print("<td width=\"20%\">");
pw.print("\t<tr class=\"TableRowColor\">\n");
pw.print("\t\t<td width=\"20%\">");
pw.print(name);
pw.print("</td>\n");
pw.print("<td>\n");
pw.print("\t\t<td>");
if (description!=null) {
pw.print(description);
}
pw.print("</td>\n");
pw.print("</tr>\n");
pw.print("\t\t</td>\n");
pw.print("\t</tr>\n");
}
private void printTableRowOverview(PrintWriter pw,String href,String hrefTitle,String description) {
pw.print("<tr bgcolor=\"white\" class=\"TableRowColor\">\n");
pw.print("<td width=\"20%\"><b><a href=\"\n");
pw.print("\t<tr class=\"TableRowColor\">\n");
pw.print("\t\t<td width=\"20%\"><b><a href=\"\n");
pw.print(href);
pw.print("\">");
pw.print(hrefTitle);
pw.print("</a></b></td>\n");
pw.print("<td>\n");
pw.print("</a></td>\n");
pw.print("\t\t<td>");
if (description!=null) {
pw.print(description);
}
pw.print("</td>\n");
pw.print("</tr>\n");
pw.print("\t\t</td>\n");
pw.print("\t</tr>\n");
}
private void printTableEnd(PrintWriter pw) {
@ -573,13 +568,13 @@ public class EldDocHtmlWriter {
}
private void printPageIndexTitle(PrintWriter pw,String title,String titleContext,String description) {
pw.print("<h1><center>");
pw.print("<h1>");
pw.print(title);
pw.print(" ");
if (titleContext!=null) {
pw.print(titleContext);
}
pw.print("</center></h1>\n");
pw.print("</h1>\n");
if (description!=null) {
pw.print(description);
}
@ -609,25 +604,23 @@ public class EldDocHtmlWriter {
pw.print("<a href=\"#skip-navbar_top\" title=\"Skip navigation links\"></a>\n");
pw.print("<table border=\"0\" width=\"100%\" cellpadding=\"1\" cellspacing=\"0\" summary=\"\">\n");
pw.print("<tr>\n");
pw.print("<td colspan=\"2\" bgcolor=\"#EEEEFF\" class=\"NavBarCell1\">\n");
pw.print("<td colspan=\"2\" class=\"NavBarCell1\">\n");
pw.print("<a name=\"navbar_top_firstrow\"><!-- --></a>\n");
pw.print("<table border=\"0\" cellpadding=\"1\" cellspacing=\"0\" summary=\"\">\n");
pw.print("<tr align=\"center\" valign=\"top\">\n");
//pw.print("<TD BGCOLOR=\"#EEEEFF\" CLASS=\"NavBarCell1Rev\"> &nbsp;<FONT CLASS=\"NavBarFont1Rev\"><B>Overview</B></FONT>&nbsp;</TD>\n");
pw.print("\t<tr align=\"center\" valign=\"top\">\n");
printNavBar(pw,pathPrefix);
pw.print("</tr>\n");
pw.print("\t</tr>\n");
pw.print("</table>\n");
pw.print("</td>\n");
pw.print("<td align=\"right\" valign=\"top\" rowspan=\"3\"><EM>\n</EM></td>");
pw.print("<td align=\"right\" valign=\"top\" rowspan=\"3\"><em>\n</em></td>");
pw.print("</tr>\n");
pw.print("<tr>\n");
pw.print("<TD BGCOLOR=\"white\" CLASS=\"NavBarCell2\"><FONT SIZE=\"-2\">\n");
pw.print("&nbsp;PREV&nbsp;&nbsp;NEXT</FONT></TD>\n");
pw.print("<TD BGCOLOR=\"white\" CLASS=\"NavBarCell2\"><FONT SIZE=\"-2\">...</TD>\n");
pw.print("<td class=\"NavBarCell2\">\n");
pw.print("&nbsp;PREV&nbsp;&nbsp;NEXT</td>\n");
pw.print("<td class=\"NavBarCell2\"></td>\n");
pw.print("</tr>\n");
pw.print("</table>\n");
@ -645,23 +638,23 @@ public class EldDocHtmlWriter {
pw.print("<a href=\"#skip-navbar_bottom\" title=\"Skip navigation links\"></a>\n");
pw.print("<table border=\"0\" width=\"100%\" cellpadding=\"1\" cellspacing=\"0\" summary=\"\">\n");
pw.print("<tr>\n");
pw.print("<td colspan=\"2\" bgcolor=\"#EEEEFF\" class=\"NavBarCell1\">\n");
pw.print("<td colspan=\"2\" class=\"NavBarCell1\">\n");
pw.print("<a name=\"navbar_bottom_firstrow\"><!-- --></a>\n");
pw.print("<table border=\"0\" cellpadding=\"1\" cellspacing=\"0\" summary=\"\">\n");
pw.print("<tr align=\"center\" valign=\"top\">\n");
pw.print("\t<tr align=\"center\" valign=\"top\">\n");
printNavBar(pw,pathPrefix);
pw.print("</tr>\n");
pw.print("\t</tr>\n");
pw.print("</table>\n");
pw.print("</td>\n");
pw.print("<td align=\"right\" valign=\"top\" rowspan=\"3\"><EM>\n</EM></td>");
pw.print("<td align=\"right\" valign=\"top\" rowspan=\"3\"><em>\n</em></td>");
pw.print("</tr>\n");
pw.print("<tr>\n");
pw.print("<TD BGCOLOR=\"white\" CLASS=\"NavBarCell2\"><FONT SIZE=\"-2\">\n");
pw.print("&nbsp;PREV&nbsp;&nbsp;NEXT</FONT></TD>\n");
pw.print("<TD BGCOLOR=\"white\" CLASS=\"NavBarCell2\"><FONT SIZE=\"-2\">...</TD>\n");
pw.print("<td class=\"NavBarCell2\">\n");
pw.print("&nbsp;PREV&nbsp;&nbsp;NEXT</td>\n");
pw.print("<td class=\"NavBarCell2\"></td>\n");
pw.print("</tr>\n");
pw.print("</table>\n");
@ -669,7 +662,9 @@ public class EldDocHtmlWriter {
pw.print("<hr/>\n");
pw.print("\n");
pw.print("<div class=\"Copyright\">");
pw.print("Copyright &#169; todo. All Rights Reserved.\n");
pw.print("</div>\n");
pw.print("\n");
pw.print("</body>\n");
@ -678,8 +673,8 @@ public class EldDocHtmlWriter {
}
private void printNavBar(PrintWriter pw,String pathPrefix) throws IOException {
pw.print("<td bgcolor=\"#EEEEFF\" class=\"NavBarCell1\"><a href=\""+pathPrefix+"index.html\"><font class=\"NavBarFont1\"><b>Index</B></font></a>&nbsp;</td>\n");
pw.print("<td bgcolor=\"#EEEEFF\" class=\"NavBarCell1\"><a href=\""+pathPrefix+"module-overview.html\"><font class=\"NavBarFont1\"><b>Modules</B></font></a>&nbsp;</td>\n");
pw.print("<td bgcolor=\"#EEEEFF\" class=\"NavBarCell1\"><a href=\""+pathPrefix+"namespace-overview.html\"><font class=\"NavBarFont1\"><b>Namespaces</B></font></a>&nbsp;</td>\n");
pw.print("\t\t<td class=\"NavBarCell1\"><a href=\""+pathPrefix+"index.html\">Index</a>&nbsp;</td>\n");
pw.print("\t\t<td class=\"NavBarCell1\"><a href=\""+pathPrefix+"module-overview.html\">Modules</a>&nbsp;</td>\n");
pw.print("\t\t<td class=\"NavBarCell1\"><a href=\""+pathPrefix+"namespace-overview.html\">Namespaces</a>&nbsp;</td>\n");
}
}

View file

@ -114,8 +114,8 @@ public class BeanPropertyComparator<T> implements Comparator<T> {
/**
* Returns the Comparable property of the object.
* @param object
* @return
* @param object The object to get the property field of.
* @return Returns the Comparable casted object of the property field of the object.
* @throws ClassCastException
*/
@SuppressWarnings("unchecked")