Moved the global configurator so seperate interface so xsd binds are
correct.
This commit is contained in:
parent
aebe8a24d3
commit
e94bb5ffe8
1
todo.txt
1
todo.txt
|
@ -1,7 +1,6 @@
|
|||
|
||||
-- x4o TODO list --
|
||||
|
||||
- fix bind of attributeFromBody on module !
|
||||
- static field constant converter
|
||||
- full Xinclude test
|
||||
- compleet eld doc html/css.
|
||||
|
|
|
@ -38,6 +38,7 @@ import org.x4o.xml.element.ElementClass;
|
|||
import org.x4o.xml.element.ElementClassAttribute;
|
||||
import org.x4o.xml.element.ElementClassBase;
|
||||
import org.x4o.xml.element.ElementConfigurator;
|
||||
import org.x4o.xml.element.ElementConfiguratorGlobal;
|
||||
import org.x4o.xml.element.ElementLanguage;
|
||||
import org.x4o.xml.element.ElementException;
|
||||
import org.x4o.xml.element.ElementInterface;
|
||||
|
@ -231,7 +232,7 @@ public class X4ODebugWriter {
|
|||
//module.getElementInterfaces();
|
||||
//module.getElementNamespaceContexts();
|
||||
|
||||
debugElementConfigurator(module.getGlobalElementConfigurators());
|
||||
debugElementConfiguratorGlobal(module.getElementConfiguratorGlobals());
|
||||
debugElementBindingHandler(module.getElementBindingHandlers());
|
||||
|
||||
for (ElementAttributeHandler p:module.getElementAttributeHandlers()) {
|
||||
|
@ -467,6 +468,16 @@ public class X4ODebugWriter {
|
|||
}
|
||||
}
|
||||
|
||||
private void debugElementConfiguratorGlobal(List<ElementConfiguratorGlobal> elementConfigurators) throws SAXException {
|
||||
for (ElementConfiguratorGlobal elementConfigurator:elementConfigurators) {
|
||||
AttributesImpl atts = new AttributesImpl();
|
||||
atts.addAttribute ("", "description", "", "", elementConfigurator.getDescription());
|
||||
atts.addAttribute ("", "className", "", "", elementConfigurator.getClass().getName());
|
||||
debugWriter.startElement (DEBUG_URI, "elementConfiguratorGlobal", "", atts);
|
||||
debugWriter.endElement(DEBUG_URI, "elementConfiguratorGlobal", "");
|
||||
}
|
||||
}
|
||||
|
||||
private void debugElementClassAttributes(Collection<ElementClassAttribute> elementClassAttributes) throws SAXException {
|
||||
for (ElementClassAttribute elementClassAttribute:elementClassAttributes) {
|
||||
AttributesImpl atts = new AttributesImpl();
|
||||
|
|
|
@ -45,6 +45,7 @@ import org.x4o.xml.element.ElementBindingHandler;
|
|||
import org.x4o.xml.element.ElementClass;
|
||||
import org.x4o.xml.element.ElementClassAttribute;
|
||||
import org.x4o.xml.element.ElementConfigurator;
|
||||
import org.x4o.xml.element.ElementConfiguratorGlobal;
|
||||
import org.x4o.xml.element.ElementLanguage;
|
||||
import org.x4o.xml.element.ElementException;
|
||||
import org.x4o.xml.element.ElementInterface;
|
||||
|
@ -89,10 +90,10 @@ public class X4OPhaseHandlerFactory {
|
|||
}
|
||||
}
|
||||
|
||||
private void runElementConfigurators(List<ElementConfigurator> ecs,Element e,X4OPhaseHandler phase) throws X4OPhaseException {
|
||||
int size = ecs.size();
|
||||
for (int i=0;i<size;i++) {
|
||||
ElementConfigurator ec = ecs.get(i);
|
||||
private void runElementConfigurator(ElementConfigurator ec,Element e,X4OPhaseHandler phase) throws X4OPhaseException {
|
||||
//int size = ecs.size();
|
||||
//for (int i=0;i<size;i++) {
|
||||
//ElementConfigurator ec = ecs.get(i);
|
||||
if (ec.isConfigAction()) {
|
||||
runConf.add(new RunConfigurator(e,ec));
|
||||
return;
|
||||
|
@ -110,7 +111,7 @@ public class X4OPhaseHandlerFactory {
|
|||
} catch (ElementException ee) {
|
||||
throw new X4OPhaseException(phase,ee);
|
||||
}
|
||||
}
|
||||
//}
|
||||
}
|
||||
|
||||
private void debugPhaseMessage(String message,X4OPhaseHandler phaseHandler) throws X4OPhaseException {
|
||||
|
@ -436,7 +437,9 @@ public class X4OPhaseHandlerFactory {
|
|||
}
|
||||
|
||||
logger.finest("Do ElementClass Config Configurators: "+element.getElementClass().getElementConfigurators().size());
|
||||
runElementConfigurators(element.getElementClass().getElementConfigurators(),element,this);
|
||||
for (ElementConfigurator ec:element.getElementClass().getElementConfigurators()) {
|
||||
runElementConfigurator(ec,element,this);
|
||||
}
|
||||
}
|
||||
};
|
||||
X4OPhaseHandler result = new ConfigElementPhase();
|
||||
|
@ -458,8 +461,10 @@ public class X4OPhaseHandlerFactory {
|
|||
return;
|
||||
}
|
||||
for (ElementInterface ei:element.getElementLanguage().findElementInterfaces(element.getElementObject())) {
|
||||
logger.finest("Do ElementInterface Config Configurators: "+element.getElementClass().getElementConfigurators().size());
|
||||
runElementConfigurators(ei.getElementConfigurators(),element,this);
|
||||
logger.finest("Do ElementInterface Config Configurators: "+ei.getElementConfigurators().size());
|
||||
for (ElementConfigurator ec:ei.getElementConfigurators()) {
|
||||
runElementConfigurator(ec,element,this);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -479,8 +484,10 @@ public class X4OPhaseHandlerFactory {
|
|||
}
|
||||
public void runElementPhase(Element element) throws X4OPhaseException {
|
||||
for (ElementLanguageModule mod:element.getElementLanguage().getElementLanguageModules()) {
|
||||
logger.finest("Do Element Config Global Configurators: "+mod.getGlobalElementConfigurators().size());
|
||||
runElementConfigurators(mod.getGlobalElementConfigurators(),element,this);
|
||||
logger.finest("Do Element Config Global Configurators: "+mod.getElementConfiguratorGlobals().size());
|
||||
for (ElementConfiguratorGlobal ec:mod.getElementConfiguratorGlobals()) {
|
||||
runElementConfigurator(ec,element,this);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -523,7 +530,9 @@ public class X4OPhaseHandlerFactory {
|
|||
Collections.sort(handlers,elementAttributeHandlerComparator);
|
||||
List<ElementConfigurator> handlers2 = new ArrayList<ElementConfigurator>(handlers.size());
|
||||
handlers2.addAll(handlers);
|
||||
runElementConfigurators(handlers2,element,this);
|
||||
for (ElementConfigurator ec:handlers) {
|
||||
runElementConfigurator(ec,element,this);
|
||||
}
|
||||
}
|
||||
};
|
||||
X4OPhaseHandler result = new ConfigGlobalAttributePhase();
|
||||
|
|
|
@ -244,7 +244,7 @@ public class EldModuleLoaderCore implements ElementLanguageModuleLoader {
|
|||
elementClassList.add(ec);
|
||||
|
||||
ec = new DefaultElementClass("configurator",null,BeanElement.class);
|
||||
ec.addElementParent(CEL_ROOT_URI, "module");
|
||||
//ec.addElementParent(CEL_ROOT_URI, "module");
|
||||
ec.addElementParent("", "elementInterface");
|
||||
ec.addElementParent("", "element");
|
||||
try {
|
||||
|
@ -261,6 +261,22 @@ public class EldModuleLoaderCore implements ElementLanguageModuleLoader {
|
|||
}
|
||||
elementClassList.add(ec);
|
||||
|
||||
ec = new DefaultElementClass("configuratorGlobal",null,BeanElement.class);
|
||||
ec.addElementParent(CEL_ROOT_URI, "module");
|
||||
try {
|
||||
attr = (ElementClassAttribute)X4OLanguageClassLoader.newInstance(elementLanguage.getLanguageConfiguration().getDefaultElementClassAttribute());
|
||||
attr.setName("bean.class");
|
||||
attr.setRequired(true);
|
||||
ec.addElementClassAttribute(attr);
|
||||
|
||||
attr = (ElementClassAttribute)X4OLanguageClassLoader.newInstance(elementLanguage.getLanguageConfiguration().getDefaultElementClassAttribute());
|
||||
attr.setName("configAction");
|
||||
ec.addElementClassAttribute(attr);
|
||||
} catch (Exception e) {
|
||||
throw new ElementLanguageModuleLoaderException(this,e.getMessage(),e);
|
||||
}
|
||||
elementClassList.add(ec);
|
||||
|
||||
ec = new DefaultElementClass("description",null,DescriptionElement.class);
|
||||
ec.setSchemaContentBase("string");
|
||||
ec.addElementParent(CEL_ROOT_URI, "module");
|
||||
|
|
|
@ -33,7 +33,7 @@ import org.x4o.xml.element.Element;
|
|||
import org.x4o.xml.element.ElementAttributeHandler;
|
||||
import org.x4o.xml.element.ElementBindingHandler;
|
||||
import org.x4o.xml.element.ElementBindingHandlerException;
|
||||
import org.x4o.xml.element.ElementConfigurator;
|
||||
import org.x4o.xml.element.ElementConfiguratorGlobal;
|
||||
import org.x4o.xml.element.ElementLanguage;
|
||||
import org.x4o.xml.element.ElementInterface;
|
||||
import org.x4o.xml.element.ElementLanguageModule;
|
||||
|
@ -56,7 +56,7 @@ public class ElementModuleBindingHandler extends AbstractElementBindingHandler
|
|||
ElementNamespaceContext.class,
|
||||
ElementBindingHandler.class,
|
||||
ElementAttributeHandler.class,
|
||||
ElementConfigurator.class,
|
||||
ElementConfiguratorGlobal.class,
|
||||
};
|
||||
|
||||
|
||||
|
@ -125,9 +125,9 @@ public class ElementModuleBindingHandler extends AbstractElementBindingHandler
|
|||
elementLanguageModule.addElementAttributeHandler(elementAttributeHandler);
|
||||
return;
|
||||
}
|
||||
if (childObject instanceof ElementConfigurator) {
|
||||
ElementConfigurator elementConfigurator = (ElementConfigurator)childObject;
|
||||
elementLanguageModule.addGlobalElementConfigurator(elementConfigurator);
|
||||
if (childObject instanceof ElementConfiguratorGlobal) {
|
||||
ElementConfiguratorGlobal elementConfigurator = (ElementConfiguratorGlobal)childObject;
|
||||
elementLanguageModule.addElementConfiguratorGlobal(elementConfigurator);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -49,7 +49,7 @@ public abstract class AbstractElementLanguageModule extends AbstractElementMetaB
|
|||
/** The binding rules */
|
||||
private List<ElementBindingHandler> elementBindingHandlers = null;
|
||||
|
||||
private List<ElementConfigurator> globalElementConfigurators = null;
|
||||
private List<ElementConfiguratorGlobal> elementConfiguratorGlobals = null;
|
||||
|
||||
private List<ElementInterface> elementInterfaces = null;
|
||||
|
||||
|
@ -65,7 +65,7 @@ public abstract class AbstractElementLanguageModule extends AbstractElementMetaB
|
|||
logger.finest("Creating new ParsingContext");
|
||||
elementAttributeHandlers = new ArrayList<ElementAttributeHandler>(4);
|
||||
elementBindingHandlers = new ArrayList<ElementBindingHandler>(4);
|
||||
globalElementConfigurators = new ArrayList<ElementConfigurator>(4);
|
||||
elementConfiguratorGlobals = new ArrayList<ElementConfiguratorGlobal>(4);
|
||||
elementInterfaces = new ArrayList<ElementInterface>(20);
|
||||
elementNamespaceContexts = new HashMap<String,ElementNamespaceContext>(10);
|
||||
}
|
||||
|
@ -140,22 +140,22 @@ public abstract class AbstractElementLanguageModule extends AbstractElementMetaB
|
|||
/**
|
||||
* @see org.x4o.xml.element.ElementLanguageModule#addGlobalElementConfigurator(ElementConfigurator)
|
||||
*/
|
||||
public void addGlobalElementConfigurator(ElementConfigurator elementConfigurator) {
|
||||
public void addElementConfiguratorGlobal(ElementConfiguratorGlobal elementConfigurator) {
|
||||
if (elementConfigurator==null) {
|
||||
throw new NullPointerException("Can't add null");
|
||||
}
|
||||
if (elementConfigurator.getId()==null) {
|
||||
throw new NullPointerException("Can't add with null id property.");
|
||||
}
|
||||
logger.finer("Adding GlobalElementConfigurator: "+elementConfigurator);
|
||||
globalElementConfigurators.add(elementConfigurator);
|
||||
logger.finer("Adding ElementConfiguratorGlobal: "+elementConfigurator);
|
||||
elementConfiguratorGlobals.add(elementConfigurator);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.x4o.xml.element.ElementLanguageModule#getGlobalElementConfigurators()
|
||||
* @see org.x4o.xml.element.ElementLanguageModule#getElementConfiguratorGlobals()
|
||||
*/
|
||||
public List<ElementConfigurator> getGlobalElementConfigurators() {
|
||||
return globalElementConfigurators;
|
||||
public List<ElementConfiguratorGlobal> getElementConfiguratorGlobals() {
|
||||
return elementConfiguratorGlobals;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -25,7 +25,7 @@ package org.x4o.xml.element;
|
|||
|
||||
|
||||
/**
|
||||
* Provides an Interface to configure Element(Object) more.
|
||||
* Provides an Interface to configure Element(Object).
|
||||
*
|
||||
*
|
||||
* @author Willem Cazanders
|
||||
|
|
|
@ -0,0 +1,35 @@
|
|||
/*
|
||||
* Copyright (c) 2004-2012, Willem Cazander
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
||||
* the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||||
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package org.x4o.xml.element;
|
||||
|
||||
|
||||
/**
|
||||
* Provides an Interface to configure Element(Object) global.
|
||||
*
|
||||
* @author Willem Cazanders
|
||||
* @version 1.0 Nov 18, 2012
|
||||
*/
|
||||
public interface ElementConfiguratorGlobal extends ElementConfigurator {
|
||||
|
||||
}
|
|
@ -79,16 +79,16 @@ public interface ElementLanguageModule extends ElementMetaBase {
|
|||
List<ElementBindingHandler> getElementBindingHandlers();
|
||||
|
||||
/**
|
||||
* Adds an GlobalElementConfigurator.
|
||||
* Adds an ElementConfiguratorGlobal.
|
||||
* @param elementConfigurator The ElementConfigurtor to add.
|
||||
*/
|
||||
void addGlobalElementConfigurator(ElementConfigurator elementConfigurator);
|
||||
void addElementConfiguratorGlobal(ElementConfiguratorGlobal elementConfigurator);
|
||||
|
||||
/**
|
||||
* Gets all global ElementConfigurators.
|
||||
* Gets all ElementConfiguratorGlobals.
|
||||
* @return All gloval ElementConfigurators.
|
||||
*/
|
||||
List<ElementConfigurator> getGlobalElementConfigurators();
|
||||
List<ElementConfiguratorGlobal> getElementConfiguratorGlobals();
|
||||
|
||||
/**
|
||||
* Adds an ElementInterface.
|
||||
|
|
|
@ -1,37 +1,13 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
|
||||
Copyright (c) 2004-2012, Willem Cazander
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
||||
that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this list of conditions and the
|
||||
following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
||||
the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
||||
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||||
OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||||
TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
-->
|
||||
<!-- ==================================================================== -->
|
||||
<!-- ===== Automatic generated schema for language: cel ===== -->
|
||||
<!-- ==================================================================== -->
|
||||
<!--
|
||||
ProviderName: x4o.org
|
||||
ModuleName: Core Element Language
|
||||
ProviderName: cel.x4o.org
|
||||
ModuleName: Core Element Languag Module
|
||||
Namespaces: 2
|
||||
Namespace: http://cel.x4o.org/xml/ns/cel-core
|
||||
Created on: Fri Aug 24 17:54:18 CEST 2012
|
||||
Created on: Sun Nov 18 03:27:37 CET 2012
|
||||
-->
|
||||
<schema xmlns="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:this="http://cel.x4o.org/xml/ns/cel-core"
|
||||
|
@ -48,8 +24,8 @@
|
|||
<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"/>
|
||||
<attribute name="description" type="string"/>
|
||||
</complexType>
|
||||
<complexType name="descriptionType">
|
||||
<simpleContent>
|
||||
|
@ -72,8 +48,14 @@
|
|||
<attribute name="autoAttributes" type="boolean"/>
|
||||
<attribute name="schemaContentComplex" type="boolean"/>
|
||||
<attribute name="schemaContentMixed" type="boolean"/>
|
||||
<attribute name="description" type="string"/>
|
||||
<attribute name="id" type="string"/>
|
||||
<attribute name="description" type="string"/>
|
||||
</complexType>
|
||||
<complexType name="configuratorGlobalType">
|
||||
<choice minOccurs="0" maxOccurs="unbounded"/>
|
||||
<attribute name="bean.class" type="string" use="required"/>
|
||||
<attribute name="configAction" type="string"/>
|
||||
<anyAttribute/>
|
||||
</complexType>
|
||||
<complexType name="configuratorType">
|
||||
<choice minOccurs="0" maxOccurs="unbounded">
|
||||
|
@ -95,13 +77,14 @@
|
|||
<element name="classConverter" type="this:classConverterType"/>
|
||||
</choice>
|
||||
<attribute name="name" type="string"/>
|
||||
<attribute name="objectConverter" type="string"/>
|
||||
<attribute name="runResolveEL" type="boolean"/>
|
||||
<attribute name="runConverters" type="boolean"/>
|
||||
<attribute name="runBeanFill" type="boolean"/>
|
||||
<attribute name="required" type="boolean"/>
|
||||
<attribute name="defaultValue" type="string"/>
|
||||
<attribute name="objectConverter" type="string"/>
|
||||
<attribute name="disableEL" type="boolean"/>
|
||||
<attribute name="disableFill" type="boolean"/>
|
||||
<attribute name="description" type="string"/>
|
||||
<attribute name="id" type="string"/>
|
||||
<attribute name="description" type="string"/>
|
||||
</complexType>
|
||||
<complexType name="classConverterType">
|
||||
<choice minOccurs="0" maxOccurs="unbounded"/>
|
||||
|
@ -122,8 +105,8 @@
|
|||
<element name="description" type="this:descriptionType"/>
|
||||
</choice>
|
||||
<attribute name="interfaceClass" type="string"/>
|
||||
<attribute name="description" type="string"/>
|
||||
<attribute name="id" type="string"/>
|
||||
<attribute name="description" type="string"/>
|
||||
</complexType>
|
||||
<complexType name="elementParentType">
|
||||
<choice minOccurs="0" maxOccurs="unbounded"/>
|
||||
|
@ -134,6 +117,7 @@
|
|||
<element name="namespace" type="this:namespaceType"/>
|
||||
<element name="description" type="this:descriptionType"/>
|
||||
<element name="element" type="this:elementType"/>
|
||||
<element name="configuratorGlobal" type="this:configuratorGlobalType"/>
|
||||
<element name="configurator" type="this:configuratorType"/>
|
||||
<element name="attributeHandler" type="this:attributeHandlerType"/>
|
||||
<element name="attribute" type="this:attributeType"/>
|
||||
|
|
|
@ -1,37 +1,13 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
|
||||
Copyright (c) 2004-2012, Willem Cazander
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
||||
that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this list of conditions and the
|
||||
following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
||||
the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
||||
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||||
OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||||
TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
-->
|
||||
<!-- ==================================================================== -->
|
||||
<!-- ===== Automatic generated schema for language: cel ===== -->
|
||||
<!-- ==================================================================== -->
|
||||
<!--
|
||||
ProviderName: x4o.org
|
||||
ModuleName: Core Element Language
|
||||
ProviderName: cel.x4o.org
|
||||
ModuleName: Core Element Languag Module
|
||||
Namespaces: 2
|
||||
Namespace: http://cel.x4o.org/xml/ns/cel-root
|
||||
Created on: Fri Aug 24 17:54:18 CEST 2012
|
||||
Created on: Sun Nov 18 03:27:37 CET 2012
|
||||
-->
|
||||
<schema xmlns="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:cel-core="http://cel.x4o.org/xml/ns/cel-core"
|
||||
|
@ -42,7 +18,7 @@
|
|||
<choice minOccurs="0" maxOccurs="unbounded">
|
||||
<element ref="cel-core:attributeHandler"/>
|
||||
<element ref="cel-core:bindingHandler"/>
|
||||
<element ref="cel-core:configurator"/>
|
||||
<element ref="cel-core:configuratorGlobal"/>
|
||||
<element ref="cel-core:description"/>
|
||||
<element ref="cel-core:elementInterface"/>
|
||||
<element ref="cel-core:namespace"/>
|
||||
|
@ -51,8 +27,8 @@
|
|||
<attribute name="sourceResource" type="string"/>
|
||||
<attribute name="elementLanguageModuleLoader" type="string"/>
|
||||
<attribute name="providerName" type="string"/>
|
||||
<attribute name="description" type="string"/>
|
||||
<attribute name="id" type="string"/>
|
||||
<attribute name="description" type="string"/>
|
||||
</complexType>
|
||||
</element>
|
||||
</schema>
|
|
@ -1,37 +1,13 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
|
||||
Copyright (c) 2004-2012, Willem Cazander
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
||||
that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this list of conditions and the
|
||||
following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
||||
the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
||||
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||||
OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||||
TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
-->
|
||||
<!-- ==================================================================== -->
|
||||
<!-- ===== Automatic generated schema for language: eld ===== -->
|
||||
<!-- ==================================================================== -->
|
||||
<!--
|
||||
ProviderName: x4o.org
|
||||
ProviderName: eld.x4o.org
|
||||
ModuleName: Element Language Definition
|
||||
Namespaces: 3
|
||||
Namespace: http://eld.x4o.org/xml/ns/eld-conv
|
||||
Created on: Fri Aug 24 17:55:33 CEST 2012
|
||||
Created on: Sun Nov 18 03:32:55 CET 2012
|
||||
-->
|
||||
<schema xmlns="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:this="http://eld.x4o.org/xml/ns/eld-conv"
|
||||
|
|
|
@ -1,37 +1,13 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
|
||||
Copyright (c) 2004-2012, Willem Cazander
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
||||
that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this list of conditions and the
|
||||
following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
||||
the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
||||
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||||
OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||||
TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
-->
|
||||
<!-- ==================================================================== -->
|
||||
<!-- ===== Automatic generated schema for language: eld ===== -->
|
||||
<!-- ==================================================================== -->
|
||||
<!--
|
||||
ProviderName: x4o.org
|
||||
ProviderName: eld.x4o.org
|
||||
ModuleName: Element Language Definition
|
||||
Namespaces: 3
|
||||
Namespace: http://eld.x4o.org/xml/ns/eld-lang
|
||||
Created on: Fri Aug 24 17:55:33 CEST 2012
|
||||
Created on: Sun Nov 18 03:32:55 CET 2012
|
||||
-->
|
||||
<schema xmlns="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:conv="http://eld.x4o.org/xml/ns/eld-conv"
|
||||
|
@ -44,12 +20,12 @@
|
|||
</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="description" type="string"/>
|
||||
<attribute name="id" type="string"/>
|
||||
</complexType>
|
||||
|
@ -60,6 +36,11 @@
|
|||
</extension>
|
||||
</simpleContent>
|
||||
</complexType>
|
||||
<complexType name="elementSkipPhaseType">
|
||||
<choice minOccurs="0" maxOccurs="unbounded"/>
|
||||
<attribute name="name" type="string" use="required"/>
|
||||
<anyAttribute/>
|
||||
</complexType>
|
||||
<complexType name="elementType">
|
||||
<choice minOccurs="0" maxOccurs="unbounded">
|
||||
<element name="attribute" type="this:attributeType"/>
|
||||
|
@ -68,14 +49,15 @@
|
|||
<element name="configurator" type="this:configuratorType"/>
|
||||
<element name="description" type="this:descriptionType"/>
|
||||
<element name="elementParent" type="this:elementParentType"/>
|
||||
<element name="elementSkipPhase" type="this:elementSkipPhaseType"/>
|
||||
</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>
|
||||
|
@ -84,6 +66,13 @@
|
|||
<attribute name="name" type="string" use="required"/>
|
||||
<anyAttribute/>
|
||||
</complexType>
|
||||
<complexType name="configuratorGlobalType">
|
||||
<choice minOccurs="0" maxOccurs="unbounded"/>
|
||||
<attribute name="id" type="string" use="required"/>
|
||||
<attribute name="bean.class" type="string" use="required"/>
|
||||
<attribute name="configAction" type="string"/>
|
||||
<anyAttribute/>
|
||||
</complexType>
|
||||
<complexType name="configuratorType">
|
||||
<choice minOccurs="0" maxOccurs="unbounded">
|
||||
<element name="description" type="this:descriptionType"/>
|
||||
|
@ -94,8 +83,11 @@
|
|||
<anyAttribute/>
|
||||
</complexType>
|
||||
<complexType name="attributeFromBodyType">
|
||||
<choice minOccurs="0" maxOccurs="unbounded"/>
|
||||
<choice minOccurs="0" maxOccurs="unbounded">
|
||||
<element name="description" type="this:descriptionType"/>
|
||||
</choice>
|
||||
<attribute name="bodyType" type="string"/>
|
||||
<attribute name="id" type="string" use="required"/>
|
||||
<attribute name="name" type="string" use="required"/>
|
||||
</complexType>
|
||||
<complexType name="attributeHandlerType">
|
||||
|
@ -131,11 +123,12 @@
|
|||
<element name="bean" type="this:beanType"/>
|
||||
</choice>
|
||||
<attribute name="name" type="string"/>
|
||||
<attribute name="required" type="boolean"/>
|
||||
<attribute name="defaultValue" type="string"/>
|
||||
<attribute name="runResolveEL" type="boolean"/>
|
||||
<attribute name="objectConverter" type="string"/>
|
||||
<attribute name="disableEL" type="boolean"/>
|
||||
<attribute name="disableFill" type="boolean"/>
|
||||
<attribute name="runConverters" type="boolean"/>
|
||||
<attribute name="runBeanFill" type="boolean"/>
|
||||
<attribute name="required" type="boolean"/>
|
||||
<attribute name="description" type="string"/>
|
||||
<attribute name="id" type="string"/>
|
||||
</complexType>
|
||||
|
@ -155,7 +148,9 @@
|
|||
<anyAttribute/>
|
||||
</complexType>
|
||||
<complexType name="classBindingHandlerType">
|
||||
<choice minOccurs="0" maxOccurs="unbounded"/>
|
||||
<choice minOccurs="0" maxOccurs="unbounded">
|
||||
<element name="description" type="this:descriptionType"/>
|
||||
</choice>
|
||||
<attribute name="id" type="string" use="required"/>
|
||||
<attribute name="childClass" type="string"/>
|
||||
<attribute name="parentClass" type="string"/>
|
||||
|
@ -188,6 +183,12 @@
|
|||
</documentation>
|
||||
</annotation>
|
||||
</element>
|
||||
<element name="elementSkipPhase" type="this:elementSkipPhaseType">
|
||||
<annotation>
|
||||
<documentation xml:lang="en">Adds an phase to skip to the parent element.
|
||||
</documentation>
|
||||
</annotation>
|
||||
</element>
|
||||
<element name="element" type="this:elementType"/>
|
||||
<element name="attributeAlias" type="this:attributeAliasType">
|
||||
<annotation>
|
||||
|
@ -195,6 +196,12 @@
|
|||
</documentation>
|
||||
</annotation>
|
||||
</element>
|
||||
<element name="configuratorGlobal" type="this:configuratorGlobalType">
|
||||
<annotation>
|
||||
<documentation xml:lang="en">Define an className in bean.class for an ElementConfiguratorGlobal.
|
||||
</documentation>
|
||||
</annotation>
|
||||
</element>
|
||||
<element name="configurator" type="this:configuratorType">
|
||||
<annotation>
|
||||
<documentation xml:lang="en">Define an className in bean.class for an ElementConfigurator.
|
||||
|
|
|
@ -104,12 +104,19 @@
|
|||
<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"/>
|
||||
<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"/>
|
||||
<elementParent tag="module" uri="http://eld.x4o.org/xml/ns/eld-root"/>
|
||||
<elementParent tag="elementInterface"/>
|
||||
<elementParent tag="element"/>
|
||||
</element>
|
||||
|
|
|
@ -1,37 +1,13 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
|
||||
Copyright (c) 2004-2012, Willem Cazander
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
||||
that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this list of conditions and the
|
||||
following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
||||
the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
||||
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||||
OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||||
TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
-->
|
||||
<!-- ==================================================================== -->
|
||||
<!-- ===== Automatic generated schema for language: eld ===== -->
|
||||
<!-- ==================================================================== -->
|
||||
<!--
|
||||
ProviderName: x4o.org
|
||||
ProviderName: eld.x4o.org
|
||||
ModuleName: Element Language Definition
|
||||
Namespaces: 3
|
||||
Namespace: http://eld.x4o.org/xml/ns/eld-root
|
||||
Created on: Fri Aug 24 17:55:33 CEST 2012
|
||||
Created on: Sun Nov 18 03:32:55 CET 2012
|
||||
-->
|
||||
<schema xmlns="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:conv="http://eld.x4o.org/xml/ns/eld-conv"
|
||||
|
@ -42,12 +18,11 @@
|
|||
<element name="module">
|
||||
<complexType>
|
||||
<choice minOccurs="0" maxOccurs="unbounded">
|
||||
<element ref="lang:attributeFromBody"/>
|
||||
<element ref="lang:attributeHandler"/>
|
||||
<element ref="lang:bean"/>
|
||||
<element ref="lang:bindingHandler"/>
|
||||
<element ref="lang:classBindingHandler"/>
|
||||
<element ref="lang:configurator"/>
|
||||
<element ref="lang:configuratorGlobal"/>
|
||||
<element ref="lang:description"/>
|
||||
<element ref="lang:elementInterface"/>
|
||||
<element ref="lang:namespace"/>
|
||||
|
|
|
@ -68,7 +68,7 @@ public class EldDocGenerator {
|
|||
for (ElementAttributeHandler attr:mod.getElementAttributeHandlers()) {
|
||||
writer.writeAttributeHandler(basePath,attr,mod);
|
||||
}
|
||||
for (ElementConfigurator conf:mod.getGlobalElementConfigurators()) {
|
||||
for (ElementConfigurator conf:mod.getElementConfiguratorGlobals()) {
|
||||
writer.writeElementConfigurator(basePath,conf,mod);
|
||||
}
|
||||
for (ElementInterface iface:mod.getElementInterfaces()) {
|
||||
|
|
|
@ -37,6 +37,7 @@ import org.x4o.xml.element.ElementBindingHandler;
|
|||
import org.x4o.xml.element.ElementClass;
|
||||
import org.x4o.xml.element.ElementClassAttribute;
|
||||
import org.x4o.xml.element.ElementConfigurator;
|
||||
import org.x4o.xml.element.ElementConfiguratorGlobal;
|
||||
import org.x4o.xml.element.ElementLanguage;
|
||||
import org.x4o.xml.element.ElementInterface;
|
||||
import org.x4o.xml.element.ElementLanguageModule;
|
||||
|
@ -148,7 +149,7 @@ public class EldDocHtmlWriter {
|
|||
attrHandlers =+ mod.getElementAttributeHandlers().size();
|
||||
bindHandlers =+ mod.getElementBindingHandlers().size();
|
||||
interFaces =+ mod.getElementInterfaces().size();
|
||||
eleConfigs =+ mod.getGlobalElementConfigurators().size();
|
||||
eleConfigs =+ mod.getElementConfiguratorGlobals().size();
|
||||
for (ElementNamespaceContext ns:mod.getElementNamespaceContexts()) {
|
||||
namespaces++;
|
||||
elements =+ ns.getElementClasses().size();
|
||||
|
@ -225,7 +226,7 @@ public class EldDocHtmlWriter {
|
|||
printElementInterfaces(pw,mod.getElementInterfaces(),pathPrefixModule);
|
||||
printAttributeHandlers(pw,mod.getElementAttributeHandlers(),pathPrefixModule);
|
||||
printBindingHandlers(pw,mod.getElementBindingHandlers(),pathPrefixModule);
|
||||
printConfigurators(pw, mod.getGlobalElementConfigurators(),pathPrefixModule);
|
||||
printConfiguratorGlobals(pw, mod.getElementConfiguratorGlobals(),pathPrefixModule);
|
||||
printNamespaces(pw, mod.getElementNamespaceContexts(),pathPrefix,mod);
|
||||
|
||||
printBottom(pw,pathPrefix);
|
||||
|
@ -482,6 +483,14 @@ public class EldDocHtmlWriter {
|
|||
printTableEnd(pw);
|
||||
}
|
||||
|
||||
private void printConfiguratorGlobals(PrintWriter pw,List<ElementConfiguratorGlobal> confs,String pathPrefix) {
|
||||
printTableStart(pw,"Configurators");
|
||||
for (ElementConfigurator conf:confs) {
|
||||
printTableRowOverview(pw,pathPrefix+"conf/"+toSafeUri(conf.getId())+".html",conf.getId(),conf.getDescription());
|
||||
}
|
||||
printTableEnd(pw);
|
||||
}
|
||||
|
||||
private void printBindingHandlers(PrintWriter pw,List<ElementBindingHandler> binds,String pathPrefix) {
|
||||
printTableStart(pw,"Binding handlers");
|
||||
for (ElementBindingHandler bind:binds) {
|
||||
|
|
Loading…
Reference in a new issue