From c38c283fe9071c7b3e3fe59d74db25b4d5ce12af Mon Sep 17 00:00:00 2001 From: Willem Cazander Date: Wed, 12 Sep 2012 16:10:30 +0200 Subject: [PATCH] Upped pom version and fixed pmd warnings in code. --- .project | 2 +- pom.xml | 6 +- x4o-core/pom.xml | 2 +- .../x4o/xml/conv/text/BooleanConverter.java | 2 +- .../x4o/xml/core/AbstractX4OPhaseHandler.java | 2 +- .../org/x4o/xml/core/X4OEntityResolver.java | 20 ++--- .../org/x4o/xml/core/X4OParserSupport.java | 2 +- .../main/java/org/x4o/xml/core/X4OPhase.java | 12 +-- .../org/x4o/xml/core/X4OPhaseException.java | 4 +- .../x4o/xml/core/X4OPhaseHandlerFactory.java | 6 +- .../core/config/X4OLanguageConfiguration.java | 52 ++++++------ .../core/config/X4OLanguagePropertyKeys.java | 50 +++++------ .../java/org/x4o/xml/eld/EldModuleLoader.java | 8 ++ .../org/x4o/xml/eld/EldModuleLoaderCore.java | 38 +++++---- .../main/java/org/x4o/xml/eld/EldParser.java | 51 ++++++----- .../org/x4o/xml/eld/EldParserSupport.java | 1 + .../org/x4o/xml/eld/EldParserSupportCore.java | 1 + .../eld/lang/ElementModuleBindingHandler.java | 2 +- ...ElementNamespaceContextBindingHandler.java | 1 - .../org/x4o/xml/eld/lang/ModuleElement.java | 3 +- .../x4o/xml/eld/lang/SkipPhaseElement.java | 1 + .../org/x4o/xml/eld/xsd/EldXsdXmlWriter.java | 20 ++--- .../org/x4o/xml/element/AbstractElement.java | 2 +- .../AbstractElementAttributeHandler.java | 2 +- .../AbstractElementBindingHandler.java | 2 +- .../x4o/xml/element/AbstractElementClass.java | 2 +- .../AbstractElementClassAttribute.java | 2 +- .../xml/element/AbstractElementClassBase.java | 2 +- .../element/AbstractElementConfigurator.java | 2 +- .../xml/element/AbstractElementInterface.java | 2 +- .../xml/element/AbstractElementLanguage.java | 3 +- .../AbstractElementLanguageModule.java | 7 +- .../xml/element/AbstractElementMetaBase.java | 2 +- .../AbstractElementNamespaceContext.java | 2 +- .../element/ElementAttributeValueParser.java | 1 - .../xml/element/ElementBindingHandler.java | 2 - .../element/ElementConfiguratorException.java | 13 +++ .../xml/element/ElementLanguageModule.java | 6 +- .../element/ElementLanguageModuleLoader.java | 6 +- .../ElementLanguageModuleLoaderSibling.java | 4 +- .../xml/element/ElementNamespaceContext.java | 15 +++- .../ElementNamespaceInstanceProvider.java | 3 - .../DefaultElementAttributeValueParser.java | 16 ++-- .../DefaultX4OLanguageConfiguration.java | 16 ++-- .../impl/config/DefaultX4OLanguageLoader.java | 10 +-- .../org/x4o/xml/impl/el/X4OELContext.java | 4 +- .../main/java/org/x4o/xml/sax/XMLWriter.java | 84 +++++++++---------- x4o-elddoc/pom.xml | 2 +- x4o-meta/pom.xml | 2 +- .../xml/meta/MetaLanguageSiblingLoader.java | 10 ++- .../xml/meta/lang/BeanPropertyComparator.java | 1 - .../x4o/xml/meta/lang/PropertyElement.java | 3 +- x4o-plugin/pom.xml | 6 +- x4o-plugin/x4o-plugin-ant-elddoc/pom.xml | 2 +- x4o-plugin/x4o-plugin-ant-schema/pom.xml | 2 +- 55 files changed, 285 insertions(+), 239 deletions(-) diff --git a/.project b/.project index 4a9b562..018de1f 100644 --- a/.project +++ b/.project @@ -1,7 +1,7 @@ x4o - x4o-base, Eclipse with Maven build project. + X4O Project build with Eclipse and Maven. diff --git a/pom.xml b/pom.xml index 37e662b..9163f59 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.x4o x4o pom - 0.8.2-SNAPSHOT + 0.8.5-SNAPSHOT x4o Creates an easy xml layer for objects and creating your own xml language implementations. http://www.x4o.org @@ -38,6 +38,10 @@ scm:git:ssh://git.sv.gnu.org:/srv/git/x4o.git http://git.savannah.gnu.org/cgit/x4o.git + + savannah + https://savannah.nongnu.org/bugs/?group=x4o + 3.0.1 diff --git a/x4o-core/pom.xml b/x4o-core/pom.xml index badb6cd..0390b1b 100644 --- a/x4o-core/pom.xml +++ b/x4o-core/pom.xml @@ -3,7 +3,7 @@ x4o org.x4o - 0.8.2-SNAPSHOT + 0.8.5-SNAPSHOT x4o-core jar diff --git a/x4o-core/src/main/java/org/x4o/xml/conv/text/BooleanConverter.java b/x4o-core/src/main/java/org/x4o/xml/conv/text/BooleanConverter.java index df138c5..f473cf0 100644 --- a/x4o-core/src/main/java/org/x4o/xml/conv/text/BooleanConverter.java +++ b/x4o-core/src/main/java/org/x4o/xml/conv/text/BooleanConverter.java @@ -45,7 +45,7 @@ public class BooleanConverter extends AbstractStringObjectConverter { public Object convertStringTo(String str, Locale locale) throws ObjectConverterException { // WARNING: this alway returns a boolean :''( - return new Boolean(str); + return Boolean.valueOf(str); } public String convertStringBack(Object obj,Locale locale) throws ObjectConverterException { diff --git a/x4o-core/src/main/java/org/x4o/xml/core/AbstractX4OPhaseHandler.java b/x4o-core/src/main/java/org/x4o/xml/core/AbstractX4OPhaseHandler.java index 567f5f6..51b6802 100644 --- a/x4o-core/src/main/java/org/x4o/xml/core/AbstractX4OPhaseHandler.java +++ b/x4o-core/src/main/java/org/x4o/xml/core/AbstractX4OPhaseHandler.java @@ -36,7 +36,7 @@ import org.x4o.xml.element.ElementLanguage; * @author Willem Cazander * @version 1.0 Dec 31, 2008 */ -abstract public class AbstractX4OPhaseHandler implements X4OPhaseHandler { +public abstract class AbstractX4OPhaseHandler implements X4OPhaseHandler { protected X4OPhase phase = null; protected List X4OPhaseListeners = null; diff --git a/x4o-core/src/main/java/org/x4o/xml/core/X4OEntityResolver.java b/x4o-core/src/main/java/org/x4o/xml/core/X4OEntityResolver.java index 46c44a1..de33d0e 100644 --- a/x4o-core/src/main/java/org/x4o/xml/core/X4OEntityResolver.java +++ b/x4o-core/src/main/java/org/x4o/xml/core/X4OEntityResolver.java @@ -147,17 +147,15 @@ public class X4OEntityResolver implements EntityResolver { } } - if (basePath!=null && systemId!=null) { - if (systemId.startsWith(basePath.toExternalForm())) { - logger.finer("Base reference basePath: "+basePath+" systemId: "+systemId); - try { - InputSource in = new InputSource(new URL(systemId).openStream()); - in.setPublicId(publicId); - in.setSystemId(systemId); - return in; - } catch (IOException e) { - throw new IOException("Could not open: "+systemId+" error: "+e.getMessage(),e); - } + if (basePath!=null && systemId!=null && systemId.startsWith(basePath.toExternalForm())) { + logger.finer("Base reference basePath: "+basePath+" systemId: "+systemId); + try { + InputSource in = new InputSource(new URL(systemId).openStream()); + in.setPublicId(publicId); + in.setSystemId(systemId); + return in; + } catch (IOException e) { + throw new IOException("Could not open: "+systemId+" error: "+e.getMessage(),e); } } diff --git a/x4o-core/src/main/java/org/x4o/xml/core/X4OParserSupport.java b/x4o-core/src/main/java/org/x4o/xml/core/X4OParserSupport.java index 538647f..b628152 100644 --- a/x4o-core/src/main/java/org/x4o/xml/core/X4OParserSupport.java +++ b/x4o-core/src/main/java/org/x4o/xml/core/X4OParserSupport.java @@ -37,7 +37,7 @@ public interface X4OParserSupport { * Loads the language ElementLanguage to provide support. * * @return Returns the ElementLanguage. - * @throws X4OParserSupportException + * @throws X4OParserSupportException Is thrown when supporting language could not be loaded. */ ElementLanguage loadElementLanguageSupport() throws X4OParserSupportException; } diff --git a/x4o-core/src/main/java/org/x4o/xml/core/X4OPhase.java b/x4o-core/src/main/java/org/x4o/xml/core/X4OPhase.java index 65c3c96..f941ae5 100644 --- a/x4o-core/src/main/java/org/x4o/xml/core/X4OPhase.java +++ b/x4o-core/src/main/java/org/x4o/xml/core/X4OPhase.java @@ -31,7 +31,7 @@ package org.x4o.xml.core; */ public enum X4OPhase { - /** Defines this meta startup phase */ + /** Defines this meta startup phase. */ startupX4OPhase(true), /** Load all meta info of the language we are creating. */ @@ -46,10 +46,10 @@ public enum X4OPhase { /** Optional extra config phase for injecting bean instances into the EL context. */ configGlobalElBeansPhase(true), - /** emty meta phase to refer to that sax is ready and element s are waiting for processing */ + /** emty meta phase to refer to that sax is ready and element s are waiting for processing. */ startX4OPhase(true), - /** re runnable phases which config xml to beans and binds them together */ + /** re runnable phases which config xml to beans and binds them together. */ configElementPhase, configElementInterfacePhase, configGlobalElementPhase, @@ -76,10 +76,10 @@ public enum X4OPhase { /** Rerun all needed phases for all element that requested it. */ runDirtyElementLastPhase, - /** Releases all Elements, which clears attributes and childeren etc.. */ + /** Releases all Elements, which clears attributes and childeren etc. */ releasePhase(true), - /** write all phases and stuff to debug sax stream */ + /** write all phases and stuff to debug sax stream. */ debugPhase; /** Defines which phase we start, when context is created. */ @@ -101,7 +101,7 @@ public enum X4OPhase { private boolean runOnce = false; /** - * Creates an X4O Phase + * Creates an X4O Phase. */ private X4OPhase() { } diff --git a/x4o-core/src/main/java/org/x4o/xml/core/X4OPhaseException.java b/x4o-core/src/main/java/org/x4o/xml/core/X4OPhaseException.java index 969bd57..55467f3 100644 --- a/x4o-core/src/main/java/org/x4o/xml/core/X4OPhaseException.java +++ b/x4o-core/src/main/java/org/x4o/xml/core/X4OPhaseException.java @@ -32,7 +32,7 @@ package org.x4o.xml.core; public class X4OPhaseException extends Exception { /** The serial version uid */ - static final long serialVersionUID = 10l; + static final long serialVersionUID = 10L; private X4OPhaseHandler exceptionPhase = null; @@ -68,7 +68,7 @@ public class X4OPhaseException extends Exception { } /** - * Returns the X4OPhaseHandler which created this Exception + * Returns the X4OPhaseHandler which created this Exception. * @return An X4OPhaseHandler */ public X4OPhaseHandler getX4OPhaseHandler() { diff --git a/x4o-core/src/main/java/org/x4o/xml/core/X4OPhaseHandlerFactory.java b/x4o-core/src/main/java/org/x4o/xml/core/X4OPhaseHandlerFactory.java index 47fedd2..576cc2a 100644 --- a/x4o-core/src/main/java/org/x4o/xml/core/X4OPhaseHandlerFactory.java +++ b/x4o-core/src/main/java/org/x4o/xml/core/X4OPhaseHandlerFactory.java @@ -561,10 +561,8 @@ public class X4OPhaseHandlerFactory { Object value = valueString; ElementClassAttribute attrClass = element.getElementClass().getElementClassAttributeByName(name); if (attrClass!=null) { - if (attrClass.getRunResolveEL()==null || attrClass.getRunResolveEL()) { - if (attrParser.isELParameter(name, valueString, element)) { - value = attrParser.getELParameterValue(valueString, element); - } + if (attrClass.getRunResolveEL()==null || attrClass.getRunResolveEL() && attrParser.isELParameter(name, valueString, element)) { + value = attrParser.getELParameterValue(valueString, element); } if (attrClass.getRunConverters()==null || attrClass.getRunConverters()) { value = attrParser.getConvertedParameterValue(name, value, element); diff --git a/x4o-core/src/main/java/org/x4o/xml/core/config/X4OLanguageConfiguration.java b/x4o-core/src/main/java/org/x4o/xml/core/config/X4OLanguageConfiguration.java index 3367d70..f0c6a49 100644 --- a/x4o-core/src/main/java/org/x4o/xml/core/config/X4OLanguageConfiguration.java +++ b/x4o-core/src/main/java/org/x4o/xml/core/config/X4OLanguageConfiguration.java @@ -39,10 +39,10 @@ import org.x4o.xml.element.ElementLanguage; public interface X4OLanguageConfiguration { /** Prefix where we load all language definitions from. */ - public final static String DEFAULT_LANG_PATH_PREFIX = "META-INF"; + public static final String DEFAULT_LANG_PATH_PREFIX = "META-INF"; /** The modules file to startup the language definition process. */ - public final static String DEFAULT_LANG_MODULES_FILE = "-modules.xml"; + public static final String DEFAULT_LANG_MODULES_FILE = "-modules.xml"; /** * Returns the language for which this ElementLanguage is created. @@ -73,75 +73,75 @@ public interface X4OLanguageConfiguration { // Core interfaces are also in class for text reference without instance - public Class getDefaultElementNamespaceContext(); - public Class getDefaultElementInterface(); - public Class getDefaultElement(); - public Class getDefaultElementClass(); - public Class getDefaultElementClassAttribute(); + Class getDefaultElementNamespaceContext(); + Class getDefaultElementInterface(); + Class getDefaultElement(); + Class getDefaultElementClass(); + Class getDefaultElementClassAttribute(); // Other needed interfaces in class form also - public Class getDefaultElementLanguageModule(); - public Class getDefaultElementBodyComment(); - public Class getDefaultElementBodyCharacters(); - public Class getDefaultElementBodyWhitespace(); - public Class getDefaultElementNamespaceInstanceProvider(); - public Class getDefaultElementAttributeValueParser(); - public Class getDefaultElementObjectPropertyValue(); - public Class getDefaultElementAttributeHandlerComparator(); + Class getDefaultElementLanguageModule(); + Class getDefaultElementBodyComment(); + Class getDefaultElementBodyCharacters(); + Class getDefaultElementBodyWhitespace(); + Class getDefaultElementNamespaceInstanceProvider(); + Class getDefaultElementAttributeValueParser(); + Class getDefaultElementObjectPropertyValue(); + Class getDefaultElementAttributeHandlerComparator(); /** * @return Returns the X4OLanguageVersionFilter which filters the best version to use. */ - public Class getDefaultX4OLanguageVersionFilter(); + Class getDefaultX4OLanguageVersionFilter(); /** * @return Returns the X4OLanguageLoader which loads languages into the element context. */ - public Class getDefaultX4OLanguageLoader(); + Class getDefaultX4OLanguageLoader(); /** * Creates and filles the inital element language used to store the language. * @return The newly created ElementLanguage. */ - public ElementLanguage createElementLanguage(); + ElementLanguage createElementLanguage(); /** * @return Returns Map of SAX properties which are set. */ - public Map getSAXParserProperties(); + Map getSAXParserProperties(); /** * @return Returns Map of SAX properties which are optional set. */ - public Map getSAXParserPropertiesOptional(); + Map getSAXParserPropertiesOptional(); /** * @return Returns Map of SAX features which are set on the xml parser. */ - public Map getSAXParserFeatures(); + Map getSAXParserFeatures(); /** * @return Returns Map of SAX features which are optional set. */ - public Map getSAXParserFeaturesOptional(); + Map getSAXParserFeaturesOptional(); /** * @return Returns List of SAX features which are required for xml parsing. */ - public List getSAXParserFeaturesRequired(); + List getSAXParserFeaturesRequired(); /** * @return Returns null or an X4ODebugWriter to write parsing steps and debug data to. */ - public X4ODebugWriter getX4ODebugWriter(); + X4ODebugWriter getX4ODebugWriter(); /** * @return Returns true if this config has a debug writer. */ - public boolean hasX4ODebugWriter(); + boolean hasX4ODebugWriter(); /** * @param debugWriter The debug writer to set */ - public void setX4ODebugWriter(X4ODebugWriter debugWriter); + void setX4ODebugWriter(X4ODebugWriter debugWriter); } diff --git a/x4o-core/src/main/java/org/x4o/xml/core/config/X4OLanguagePropertyKeys.java b/x4o-core/src/main/java/org/x4o/xml/core/config/X4OLanguagePropertyKeys.java index 31548a3..00716fd 100644 --- a/x4o-core/src/main/java/org/x4o/xml/core/config/X4OLanguagePropertyKeys.java +++ b/x4o-core/src/main/java/org/x4o/xml/core/config/X4OLanguagePropertyKeys.java @@ -31,36 +31,36 @@ package org.x4o.xml.core.config; */ public class X4OLanguagePropertyKeys { - public final static String LANGUAGE_NAME = X4OLanguageProperty.LANGUAGE_NAME.toUri(); - public final static String LANGUAGE_VERSION = X4OLanguageProperty.LANGUAGE_VERSION.toUri(); + public static final String LANGUAGE_NAME = X4OLanguageProperty.LANGUAGE_NAME.toUri(); + public static final String LANGUAGE_VERSION = X4OLanguageProperty.LANGUAGE_VERSION.toUri(); - public final static String DEBUG_OUTPUT_STREAM = X4OLanguageProperty.DEBUG_OUTPUT_STREAM.toUri(); - public final static String DEBUG_OUTPUT_HANDLER = X4OLanguageProperty.DEBUG_OUTPUT_HANDLER.toUri(); - public final static String DEBUG_OUTPUT_ELD_PARSER = X4OLanguageProperty.DEBUG_OUTPUT_ELD_PARSER.toUri(); + public static final String DEBUG_OUTPUT_STREAM = X4OLanguageProperty.DEBUG_OUTPUT_STREAM.toUri(); + public static final String DEBUG_OUTPUT_HANDLER = X4OLanguageProperty.DEBUG_OUTPUT_HANDLER.toUri(); + public static final String DEBUG_OUTPUT_ELD_PARSER = X4OLanguageProperty.DEBUG_OUTPUT_ELD_PARSER.toUri(); - public final static String INPUT_BUFFER_SIZE = X4OLanguageProperty.INPUT_BUFFER_SIZE.toUri(); - public final static String INPUT_EMPTY_NAMESPACE_URI = X4OLanguageProperty.INPUT_EMPTY_NAMESPACE_URI.toUri(); + public static final String INPUT_BUFFER_SIZE = X4OLanguageProperty.INPUT_BUFFER_SIZE.toUri(); + public static final String INPUT_EMPTY_NAMESPACE_URI = X4OLanguageProperty.INPUT_EMPTY_NAMESPACE_URI.toUri(); - public final static String INPUT_SOURCE_STREAM = X4OLanguageProperty.INPUT_SOURCE_STREAM.toUri(); - public final static String INPUT_SOURCE_ENCODING = X4OLanguageProperty.INPUT_SOURCE_ENCODING.toUri(); - public final static String INPUT_SOURCE_OBJECT = X4OLanguageProperty.INPUT_SOURCE_OBJECT.toUri(); - public final static String INPUT_SOURCE_SYSTEM_ID = X4OLanguageProperty.INPUT_SOURCE_SYSTEM_ID.toUri(); - public final static String INPUT_SOURCE_BASE_PATH = X4OLanguageProperty.INPUT_SOURCE_BASE_PATH.toUri(); + public static final String INPUT_SOURCE_STREAM = X4OLanguageProperty.INPUT_SOURCE_STREAM.toUri(); + public static final String INPUT_SOURCE_ENCODING = X4OLanguageProperty.INPUT_SOURCE_ENCODING.toUri(); + public static final String INPUT_SOURCE_OBJECT = X4OLanguageProperty.INPUT_SOURCE_OBJECT.toUri(); + public static final String INPUT_SOURCE_SYSTEM_ID = X4OLanguageProperty.INPUT_SOURCE_SYSTEM_ID.toUri(); + public static final String INPUT_SOURCE_BASE_PATH = X4OLanguageProperty.INPUT_SOURCE_BASE_PATH.toUri(); - public final static String CONFIG_ERROR_HANDLER = X4OLanguageProperty.CONFIG_ERROR_HANDLER.toUri(); - public final static String CONFIG_ENTITY_RESOLVER = X4OLanguageProperty.CONFIG_ENTITY_RESOLVER.toUri(); + public static final String CONFIG_ERROR_HANDLER = X4OLanguageProperty.CONFIG_ERROR_HANDLER.toUri(); + public static final String CONFIG_ENTITY_RESOLVER = X4OLanguageProperty.CONFIG_ENTITY_RESOLVER.toUri(); - public final static String EL_BEAN_INSTANCE_MAP = X4OLanguageProperty.EL_BEAN_INSTANCE_MAP.toUri(); - public final static String EL_FACTORY_INSTANCE = X4OLanguageProperty.EL_FACTORY_INSTANCE.toUri(); + public static final String EL_BEAN_INSTANCE_MAP = X4OLanguageProperty.EL_BEAN_INSTANCE_MAP.toUri(); + public static final String EL_FACTORY_INSTANCE = X4OLanguageProperty.EL_FACTORY_INSTANCE.toUri(); - public final static String PHASE_STOP_AFTER = X4OLanguageProperty.PHASE_STOP_AFTER.toUri(); - public final static String PHASE_SKIP_RELEASE = X4OLanguageProperty.PHASE_SKIP_RELEASE.toUri(); - public final static String PHASE_SKIP_RUN = X4OLanguageProperty.PHASE_SKIP_RUN.toUri(); - public final static String PHASE_SKIP_SIBLINGS = X4OLanguageProperty.PHASE_SKIP_SIBLINGS.toUri(); + public static final String PHASE_STOP_AFTER = X4OLanguageProperty.PHASE_STOP_AFTER.toUri(); + public static final String PHASE_SKIP_RELEASE = X4OLanguageProperty.PHASE_SKIP_RELEASE.toUri(); + public static final String PHASE_SKIP_RUN = X4OLanguageProperty.PHASE_SKIP_RUN.toUri(); + public static final String PHASE_SKIP_SIBLINGS = X4OLanguageProperty.PHASE_SKIP_SIBLINGS.toUri(); - public final static String VALIDATION_SCHEMA_PATH = X4OLanguageProperty.VALIDATION_SCHEMA_PATH.toUri(); - public final static String VALIDATION_INPUT = X4OLanguageProperty.VALIDATION_INPUT.toUri(); - public final static String VALIDATION_INPUT_XSD = X4OLanguageProperty.VALIDATION_INPUT_XSD.toUri(); - public final static String VALIDATION_ELD = X4OLanguageProperty.VALIDATION_ELD.toUri(); - public final static String VALIDATION_ELD_XSD = X4OLanguageProperty.VALIDATION_ELD_XSD.toUri(); + public static final String VALIDATION_SCHEMA_PATH = X4OLanguageProperty.VALIDATION_SCHEMA_PATH.toUri(); + public static final String VALIDATION_INPUT = X4OLanguageProperty.VALIDATION_INPUT.toUri(); + public static final String VALIDATION_INPUT_XSD = X4OLanguageProperty.VALIDATION_INPUT_XSD.toUri(); + public static final String VALIDATION_ELD = X4OLanguageProperty.VALIDATION_ELD.toUri(); + public static final String VALIDATION_ELD_XSD = X4OLanguageProperty.VALIDATION_ELD_XSD.toUri(); } diff --git a/x4o-core/src/main/java/org/x4o/xml/eld/EldModuleLoader.java b/x4o-core/src/main/java/org/x4o/xml/eld/EldModuleLoader.java index aa9d2e4..210c3ea 100644 --- a/x4o-core/src/main/java/org/x4o/xml/eld/EldModuleLoader.java +++ b/x4o-core/src/main/java/org/x4o/xml/eld/EldModuleLoader.java @@ -42,6 +42,11 @@ public class EldModuleLoader implements ElementLanguageModuleLoader { private String eldResource = null; private boolean isEldCore = false; + /** + * Creates an ELD/CEL module loader. + * @param eldResource The resource to load. + * @param isEldCore If true then load CEL else load ELD. + */ public EldModuleLoader(String eldResource,boolean isEldCore) { if (eldResource==null) { throw new NullPointerException("Can't load null eld resource."); @@ -52,6 +57,9 @@ public class EldModuleLoader implements ElementLanguageModuleLoader { } /** + * Loads the ELD language into the module. + * @param elementLanguage The langauge to load for. + * @param elementLanguageModule The module to load it in. * @see org.x4o.xml.element.ElementLanguageModuleLoader#loadLanguageModule(org.x4o.xml.element.ElementLanguage, org.x4o.xml.element.ElementLanguageModule) */ public void loadLanguageModule(ElementLanguage elementLanguage,ElementLanguageModule elementLanguageModule) throws ElementLanguageModuleLoaderException { diff --git a/x4o-core/src/main/java/org/x4o/xml/eld/EldModuleLoaderCore.java b/x4o-core/src/main/java/org/x4o/xml/eld/EldModuleLoaderCore.java index ce129f0..4bd145e 100644 --- a/x4o-core/src/main/java/org/x4o/xml/eld/EldModuleLoaderCore.java +++ b/x4o-core/src/main/java/org/x4o/xml/eld/EldModuleLoaderCore.java @@ -59,22 +59,28 @@ import org.x4o.xml.impl.DefaultElementClass; public class EldModuleLoaderCore implements ElementLanguageModuleLoader { private Logger logger = null; - private static final String _CEL_XMLNS = "http://cel.x4o.org/xml/ns/"; - private static final String _CEL_CORE = "cel-core"; - private static final String _CEL_ROOT = "cel-root"; - private static final String _CEL_XSD_FILE = "-1.0.xsd"; - private static final String CEL_CORE_URI = _CEL_XMLNS+_CEL_CORE; - private static final String CEL_ROOT_URI = _CEL_XMLNS+_CEL_ROOT; - private static final String CEL_CORE_XSD_URI = CEL_CORE_URI+_CEL_XSD_FILE; - private static final String CEL_ROOT_XSD_URI = CEL_ROOT_URI+_CEL_XSD_FILE; - private static final String CEL_CORE_XSD_FILE = _CEL_CORE+_CEL_XSD_FILE; - private static final String CEL_ROOT_XSD_FILE = _CEL_ROOT+_CEL_XSD_FILE; + private static final String PP_CEL_XMLNS = "http://cel.x4o.org/xml/ns/"; + private static final String PP_CEL_XSD_FILE = "-1.0.xsd"; + private static final String CEL_CORE = "cel-core"; + private static final String CEL_ROOT = "cel-root"; + private static final String CEL_CORE_URI = PP_CEL_XMLNS+CEL_CORE; + private static final String CEL_ROOT_URI = PP_CEL_XMLNS+CEL_ROOT; + private static final String CEL_CORE_XSD_URI = CEL_CORE_URI+PP_CEL_XSD_FILE; + private static final String CEL_ROOT_XSD_URI = CEL_ROOT_URI+PP_CEL_XSD_FILE; + private static final String CEL_CORE_XSD_FILE = CEL_CORE+PP_CEL_XSD_FILE; + private static final String CEL_ROOT_XSD_FILE = CEL_ROOT+PP_CEL_XSD_FILE; + /** + * Creates the CEL module loader. + */ public EldModuleLoaderCore() { logger = Logger.getLogger(EldModuleLoaderCore.class.getName()); } /** + * Loads the CEL language into the module. + * @param elementLanguage The langauge to load for. + * @param elementLanguageModule The module to load it in. * @see org.x4o.xml.element.ElementLanguageModuleLoader#loadLanguageModule(org.x4o.xml.element.ElementLanguage, org.x4o.xml.element.ElementLanguageModule) */ public void loadLanguageModule(ElementLanguage elementLanguage,ElementLanguageModule elementLanguageModule) throws ElementLanguageModuleLoaderException { @@ -137,7 +143,9 @@ public class EldModuleLoaderCore implements ElementLanguageModuleLoader { throw new ElementLanguageModuleLoaderException(this,e.getMessage(),e); } try { - namespace.setElementNamespaceInstanceProvider((ElementNamespaceInstanceProvider)X4OLanguageClassLoader.newInstance(elementLanguage.getLanguageConfiguration().getDefaultElementNamespaceInstanceProvider())); + namespace.setElementNamespaceInstanceProvider((ElementNamespaceInstanceProvider) + X4OLanguageClassLoader.newInstance(elementLanguage.getLanguageConfiguration().getDefaultElementNamespaceInstanceProvider()) + ); } catch (Exception e) { throw new ElementLanguageModuleLoaderException(this,e.getMessage(),e); } @@ -145,7 +153,7 @@ public class EldModuleLoaderCore implements ElementLanguageModuleLoader { namespace.setUri(CEL_CORE_URI); namespace.setSchemaUri(CEL_CORE_XSD_URI); namespace.setSchemaResource(CEL_CORE_XSD_FILE); - namespace.setSchemaPrefix(_CEL_CORE); + namespace.setSchemaPrefix(CEL_CORE); logger.finer("Loading elementClassList size: "+elementClassList.size()); for (ElementClass ecL:elementClassList) { @@ -174,7 +182,9 @@ public class EldModuleLoaderCore implements ElementLanguageModuleLoader { throw new ElementLanguageModuleLoaderException(this,e.getMessage(),e); } try { - namespace.setElementNamespaceInstanceProvider((ElementNamespaceInstanceProvider)X4OLanguageClassLoader.newInstance(elementLanguage.getLanguageConfiguration().getDefaultElementNamespaceInstanceProvider())); + namespace.setElementNamespaceInstanceProvider((ElementNamespaceInstanceProvider) + X4OLanguageClassLoader.newInstance(elementLanguage.getLanguageConfiguration().getDefaultElementNamespaceInstanceProvider()) + ); } catch (Exception e) { throw new ElementLanguageModuleLoaderException(this,e.getMessage(),e); } @@ -182,7 +192,7 @@ public class EldModuleLoaderCore implements ElementLanguageModuleLoader { namespace.setUri(CEL_ROOT_URI); namespace.setSchemaUri(CEL_ROOT_XSD_URI); namespace.setSchemaResource(CEL_ROOT_XSD_FILE); - namespace.setSchemaPrefix(_CEL_ROOT); + namespace.setSchemaPrefix(CEL_ROOT); namespace.addElementClass(new DefaultElementClass("module",elementLanguage.getLanguageConfiguration().getDefaultElementLanguageModule(),ModuleElement.class)); namespace.setLanguageRoot(true); // Only define single language root so xsd is (mostly) not cicle import. try { diff --git a/x4o-core/src/main/java/org/x4o/xml/eld/EldParser.java b/x4o-core/src/main/java/org/x4o/xml/eld/EldParser.java index ade4dfe..b73b8aa 100644 --- a/x4o-core/src/main/java/org/x4o/xml/eld/EldParser.java +++ b/x4o-core/src/main/java/org/x4o/xml/eld/EldParser.java @@ -26,6 +26,7 @@ package org.x4o.xml.eld; import org.x4o.xml.core.X4ODriver; import org.x4o.xml.core.X4OParser; import org.x4o.xml.core.config.X4OLanguageProperty; +import org.x4o.xml.core.config.X4OLanguagePropertyKeys; import org.x4o.xml.element.ElementLanguage; import org.x4o.xml.element.ElementLanguageModule; @@ -48,47 +49,57 @@ public class EldParser extends X4OParser { /** Defines the identifier of the 'Core Element Language' language. */ public static final String CEL_LANGUAGE = "cel"; - protected EldParser() { - this(false); - } + /** The EL key to access the parent language configuration. */ + public static final String EL_PARENT_LANGUAGE_CONFIGURATION = "parentLanguageConfiguration"; + /** The EL key to access the parent language module. */ + public static final String EL_PARENT_ELEMENT_LANGUAGE_MODULE = "parentElementLanguageModule"; + + /** The EL key to access the parent language element langauge. */ + public static final String EL_PARENT_LANGUAGE_ELEMENT_LANGUAGE = "parentLanguageElementLanguage"; + + /** + * Creates an Eld language parser for the language support. + * @param isEldCore If true then langauge is not eld but cel. + */ protected EldParser(boolean isEldCore) { super(isEldCore?CEL_LANGUAGE:ELD_LANGUAGE,ELD_VERSION); } /** - * getDriver for unit tests + * Returns the X4ODriver object. + * @return The X4ODriver. */ protected X4ODriver getDriver() { - return super.getDriver(); + X4ODriver driver = super.getDriver(); + // FAKE operation to make PMD happy as it does not see that "Overriding method merely calls super" + // this method is here only for visibility for unit tests of this package. + driver.getProperty(X4OLanguagePropertyKeys.LANGUAGE_NAME); + return driver; } /** - * Start the second x4o parsing for eld files. + * Creates the ELD x4o language parser. * @param elementLanguage The elementLanguage to fill. * @param elementLanguageModule The elementLanguageModule from to fill. */ public EldParser(ElementLanguage elementLanguage,ElementLanguageModule elementLanguageModule) { - this(false); - if (elementLanguage.getLanguageConfiguration().getLanguagePropertyBoolean(X4OLanguageProperty.DEBUG_OUTPUT_ELD_PARSER)) { - getDriver().getElementLanguage().getLanguageConfiguration().setX4ODebugWriter(elementLanguage.getLanguageConfiguration().getX4ODebugWriter()); // move to .. - } - addELBeanInstance(PARENT_LANGUAGE_CONFIGURATION, elementLanguage.getLanguageConfiguration()); - addELBeanInstance(PARENT_LANGUAGE_ELEMENT_LANGUAGE, elementLanguage); - addELBeanInstance(PARENT_ELEMENT_LANGUAGE_MODULE, elementLanguageModule); + this(elementLanguage,elementLanguageModule,false); } + /** + * Creates the ELD or CEL x4o language parser. + * @param elementLanguage The elementLanguage to fill. + * @param elementLanguageModule The elementLanguageModule from to fill. + * @param isEldCore If true then langauge is not eld but cel. + */ public EldParser(ElementLanguage elementLanguage,ElementLanguageModule elementLanguageModule,boolean isEldCore) { this(isEldCore); if (elementLanguage.getLanguageConfiguration().getLanguagePropertyBoolean(X4OLanguageProperty.DEBUG_OUTPUT_ELD_PARSER)) { getDriver().getElementLanguage().getLanguageConfiguration().setX4ODebugWriter(elementLanguage.getLanguageConfiguration().getX4ODebugWriter()); } - addELBeanInstance(PARENT_LANGUAGE_CONFIGURATION, elementLanguage.getLanguageConfiguration()); - addELBeanInstance(PARENT_LANGUAGE_ELEMENT_LANGUAGE, elementLanguage); - addELBeanInstance(PARENT_ELEMENT_LANGUAGE_MODULE, elementLanguageModule); + addELBeanInstance(EL_PARENT_LANGUAGE_CONFIGURATION, elementLanguage.getLanguageConfiguration()); + addELBeanInstance(EL_PARENT_LANGUAGE_ELEMENT_LANGUAGE, elementLanguage); + addELBeanInstance(EL_PARENT_ELEMENT_LANGUAGE_MODULE, elementLanguageModule); } - - public final static String PARENT_LANGUAGE_CONFIGURATION = "parentLanguageConfiguration"; - public final static String PARENT_ELEMENT_LANGUAGE_MODULE = "parentElementLanguageModule"; - public final static String PARENT_LANGUAGE_ELEMENT_LANGUAGE = "parentLanguageElementLanguage"; } diff --git a/x4o-core/src/main/java/org/x4o/xml/eld/EldParserSupport.java b/x4o-core/src/main/java/org/x4o/xml/eld/EldParserSupport.java index c2ccfc1..bdb634a 100644 --- a/x4o-core/src/main/java/org/x4o/xml/eld/EldParserSupport.java +++ b/x4o-core/src/main/java/org/x4o/xml/eld/EldParserSupport.java @@ -38,6 +38,7 @@ public class EldParserSupport implements X4OParserSupport { /** * Loads the ElementLanguage of this language parser for support. * @return The loaded ElementLanguage. + * @throws X4OParserSupportException When support language could not be loaded. * @see org.x4o.xml.core.X4OParserSupport#loadElementLanguageSupport() */ public ElementLanguage loadElementLanguageSupport() throws X4OParserSupportException { diff --git a/x4o-core/src/main/java/org/x4o/xml/eld/EldParserSupportCore.java b/x4o-core/src/main/java/org/x4o/xml/eld/EldParserSupportCore.java index 67e3347..854af7d 100644 --- a/x4o-core/src/main/java/org/x4o/xml/eld/EldParserSupportCore.java +++ b/x4o-core/src/main/java/org/x4o/xml/eld/EldParserSupportCore.java @@ -38,6 +38,7 @@ public class EldParserSupportCore implements X4OParserSupport { /** * Loads the ElementLanguage of this language parser for support. * @return The loaded ElementLanguage. + * @throws X4OParserSupportException When support language could not be loaded. * @see org.x4o.xml.core.X4OParserSupport#loadElementLanguageSupport() */ public ElementLanguage loadElementLanguageSupport() throws X4OParserSupportException { diff --git a/x4o-core/src/main/java/org/x4o/xml/eld/lang/ElementModuleBindingHandler.java b/x4o-core/src/main/java/org/x4o/xml/eld/lang/ElementModuleBindingHandler.java index 6a81b15..76648fe 100644 --- a/x4o-core/src/main/java/org/x4o/xml/eld/lang/ElementModuleBindingHandler.java +++ b/x4o-core/src/main/java/org/x4o/xml/eld/lang/ElementModuleBindingHandler.java @@ -84,7 +84,7 @@ public class ElementModuleBindingHandler extends AbstractElementBindingHandler if (m==null) { return; } - ElementLanguage x4oParsingContext = (ElementLanguage)m.get(EldParser.PARENT_LANGUAGE_ELEMENT_LANGUAGE); + ElementLanguage x4oParsingContext = (ElementLanguage)m.get(EldParser.EL_PARENT_LANGUAGE_ELEMENT_LANGUAGE); //ElementLanguageModule elementLanguageModule = (ElementLanguageModule)m.get(EldParser.PARENT_ELEMENT_LANGUAGE_MODULE); ElementLanguageModule elementLanguageModule = (ElementLanguageModule)parentObject; if (x4oParsingContext==null) { diff --git a/x4o-core/src/main/java/org/x4o/xml/eld/lang/ElementNamespaceContextBindingHandler.java b/x4o-core/src/main/java/org/x4o/xml/eld/lang/ElementNamespaceContextBindingHandler.java index bc9c07e..9058443 100644 --- a/x4o-core/src/main/java/org/x4o/xml/eld/lang/ElementNamespaceContextBindingHandler.java +++ b/x4o-core/src/main/java/org/x4o/xml/eld/lang/ElementNamespaceContextBindingHandler.java @@ -63,6 +63,5 @@ public class ElementNamespaceContextBindingHandler extends AbstractElementBindin if (childObject instanceof ElementClass) { parent.addElementClass((ElementClass)childObject); } - return; } } diff --git a/x4o-core/src/main/java/org/x4o/xml/eld/lang/ModuleElement.java b/x4o-core/src/main/java/org/x4o/xml/eld/lang/ModuleElement.java index d2a27f7..05c4941 100644 --- a/x4o-core/src/main/java/org/x4o/xml/eld/lang/ModuleElement.java +++ b/x4o-core/src/main/java/org/x4o/xml/eld/lang/ModuleElement.java @@ -42,6 +42,7 @@ public class ModuleElement extends AbstractElement { /** * @see org.x4o.xml.element.AbstractElement#doElementStart() + * @throws ElementException When module element is used and non-root element. */ @Override public void doElementStart() throws ElementException { @@ -53,7 +54,7 @@ public class ModuleElement extends AbstractElement { if (m==null) { return; } - ElementLanguageModule elementLanguageModule = (ElementLanguageModule)m.get(EldParser.PARENT_ELEMENT_LANGUAGE_MODULE); + ElementLanguageModule elementLanguageModule = (ElementLanguageModule)m.get(EldParser.EL_PARENT_ELEMENT_LANGUAGE_MODULE); setElementObject(elementLanguageModule); } } diff --git a/x4o-core/src/main/java/org/x4o/xml/eld/lang/SkipPhaseElement.java b/x4o-core/src/main/java/org/x4o/xml/eld/lang/SkipPhaseElement.java index c9c2315..a35a9b5 100644 --- a/x4o-core/src/main/java/org/x4o/xml/eld/lang/SkipPhaseElement.java +++ b/x4o-core/src/main/java/org/x4o/xml/eld/lang/SkipPhaseElement.java @@ -37,6 +37,7 @@ public class SkipPhaseElement extends AbstractElement { /** * @see org.x4o.xml.element.AbstractElement#doElementEnd() + * @throws ElementException Gets thrown when name is not set or element object is not an element class instance. */ @Override public void doElementEnd() throws ElementException { diff --git a/x4o-core/src/main/java/org/x4o/xml/eld/xsd/EldXsdXmlWriter.java b/x4o-core/src/main/java/org/x4o/xml/eld/xsd/EldXsdXmlWriter.java index 92a60da..95b6d8f 100644 --- a/x4o-core/src/main/java/org/x4o/xml/eld/xsd/EldXsdXmlWriter.java +++ b/x4o-core/src/main/java/org/x4o/xml/eld/xsd/EldXsdXmlWriter.java @@ -297,7 +297,11 @@ public class EldXsdXmlWriter { } if (ec.getAutoAttributes()!=null && ec.getAutoAttributes()==false) { - // oke + // oke, reverse this if and rm whitespace. + char[] msg; + msg = " ".toCharArray(); + xmlWriter.ignorableWhitespace(msg,0,msg.length); + } else { if (ec.getObjectClass()!=null) { @@ -362,19 +366,13 @@ public class EldXsdXmlWriter { List refElements = new ArrayList(20); for (ElementClass checkClass:ns.getElementClasses()) { List parents = checkClass.getElementParents(nsWrite.getUri()); - if (parents!=null) { - if (parents!=null) { - if (parents.contains(ec.getTag())) { - refElements.add(checkClass.getTag()); - } - } + if (parents!=null && parents.contains(ec.getTag())) { + refElements.add(checkClass.getTag()); } if (nsWrite.getUri().equals(ns.getUri())) { parents = checkClass.getElementParents(""); - if (parents!=null) { - if (parents.contains(ec.getTag())) { - refElements.add(checkClass.getTag()); - } + if (parents!=null && parents.contains(ec.getTag())) { + refElements.add(checkClass.getTag()); } } if (ec.getObjectClass()==null) { diff --git a/x4o-core/src/main/java/org/x4o/xml/element/AbstractElement.java b/x4o-core/src/main/java/org/x4o/xml/element/AbstractElement.java index 5fb1595..3c2fe32 100644 --- a/x4o-core/src/main/java/org/x4o/xml/element/AbstractElement.java +++ b/x4o-core/src/main/java/org/x4o/xml/element/AbstractElement.java @@ -36,7 +36,7 @@ import org.x4o.xml.core.config.X4OLanguageClassLoader; * @author Willem Cazander * @version 1.0 Aug 8, 2005 */ -abstract public class AbstractElement implements Element { +public abstract class AbstractElement implements Element { /** The parent Element */ private Element parent = null; diff --git a/x4o-core/src/main/java/org/x4o/xml/element/AbstractElementAttributeHandler.java b/x4o-core/src/main/java/org/x4o/xml/element/AbstractElementAttributeHandler.java index 9f65e89..f9ffb0c 100644 --- a/x4o-core/src/main/java/org/x4o/xml/element/AbstractElementAttributeHandler.java +++ b/x4o-core/src/main/java/org/x4o/xml/element/AbstractElementAttributeHandler.java @@ -32,7 +32,7 @@ import java.util.List; * @author Willem Cazander * @version 1.0 Aug 10, 2006 */ -abstract public class AbstractElementAttributeHandler extends AbstractElementConfigurator implements ElementAttributeHandler { +public abstract class AbstractElementAttributeHandler extends AbstractElementConfigurator implements ElementAttributeHandler { private String attributeName = null; private List nextAttributes = new ArrayList(2); diff --git a/x4o-core/src/main/java/org/x4o/xml/element/AbstractElementBindingHandler.java b/x4o-core/src/main/java/org/x4o/xml/element/AbstractElementBindingHandler.java index 6c091e8..d036530 100644 --- a/x4o-core/src/main/java/org/x4o/xml/element/AbstractElementBindingHandler.java +++ b/x4o-core/src/main/java/org/x4o/xml/element/AbstractElementBindingHandler.java @@ -30,6 +30,6 @@ package org.x4o.xml.element; * @author Willem Cazander * @version 1.0 Apr 16, 2006 */ -abstract public class AbstractElementBindingHandler extends AbstractElementMetaBase implements ElementBindingHandler { +public abstract class AbstractElementBindingHandler extends AbstractElementMetaBase implements ElementBindingHandler { } diff --git a/x4o-core/src/main/java/org/x4o/xml/element/AbstractElementClass.java b/x4o-core/src/main/java/org/x4o/xml/element/AbstractElementClass.java index 7716bdb..3ae66a5 100644 --- a/x4o-core/src/main/java/org/x4o/xml/element/AbstractElementClass.java +++ b/x4o-core/src/main/java/org/x4o/xml/element/AbstractElementClass.java @@ -34,7 +34,7 @@ import java.util.Map; * @author Willem Cazander * @version 1.0 Aug 11, 2005 */ -abstract public class AbstractElementClass extends AbstractElementClassBase implements ElementClass { +public abstract class AbstractElementClass extends AbstractElementClassBase implements ElementClass { private String tag = null; private Class objectClass = null; diff --git a/x4o-core/src/main/java/org/x4o/xml/element/AbstractElementClassAttribute.java b/x4o-core/src/main/java/org/x4o/xml/element/AbstractElementClassAttribute.java index 8f4220a..3febe09 100644 --- a/x4o-core/src/main/java/org/x4o/xml/element/AbstractElementClassAttribute.java +++ b/x4o-core/src/main/java/org/x4o/xml/element/AbstractElementClassAttribute.java @@ -34,7 +34,7 @@ import org.x4o.xml.conv.ObjectConverter; * @author Willem Cazander * @version 1.0 Jan 19, 2012 */ -abstract public class AbstractElementClassAttribute extends AbstractElementMetaBase implements ElementClassAttribute { +public abstract class AbstractElementClassAttribute extends AbstractElementMetaBase implements ElementClassAttribute { private String name = null; private ObjectConverter objectConverter = null; diff --git a/x4o-core/src/main/java/org/x4o/xml/element/AbstractElementClassBase.java b/x4o-core/src/main/java/org/x4o/xml/element/AbstractElementClassBase.java index 1386ab7..dc72fed 100644 --- a/x4o-core/src/main/java/org/x4o/xml/element/AbstractElementClassBase.java +++ b/x4o-core/src/main/java/org/x4o/xml/element/AbstractElementClassBase.java @@ -35,7 +35,7 @@ import java.util.Map; * @author Willem Cazander * @version 1.0 Jan 19, 2012 */ -abstract public class AbstractElementClassBase extends AbstractElementMetaBase implements ElementClassBase { +public abstract class AbstractElementClassBase extends AbstractElementMetaBase implements ElementClassBase { private Map elementClassAttributes = null; private List elementConfigurators = null; diff --git a/x4o-core/src/main/java/org/x4o/xml/element/AbstractElementConfigurator.java b/x4o-core/src/main/java/org/x4o/xml/element/AbstractElementConfigurator.java index a400e63..69ece9e 100644 --- a/x4o-core/src/main/java/org/x4o/xml/element/AbstractElementConfigurator.java +++ b/x4o-core/src/main/java/org/x4o/xml/element/AbstractElementConfigurator.java @@ -30,7 +30,7 @@ package org.x4o.xml.element; * @author Willem Cazander * @version 1.0 Jan 18, 2007 */ -abstract public class AbstractElementConfigurator extends AbstractElementMetaBase implements ElementConfigurator { +public abstract class AbstractElementConfigurator extends AbstractElementMetaBase implements ElementConfigurator { /** Flag indicating that this is an config action and should run in runPhase */ private boolean configAction = false; diff --git a/x4o-core/src/main/java/org/x4o/xml/element/AbstractElementInterface.java b/x4o-core/src/main/java/org/x4o/xml/element/AbstractElementInterface.java index 079c835..81992d1 100644 --- a/x4o-core/src/main/java/org/x4o/xml/element/AbstractElementInterface.java +++ b/x4o-core/src/main/java/org/x4o/xml/element/AbstractElementInterface.java @@ -32,7 +32,7 @@ import java.util.List; * @author Willem Cazander * @version 1.0 Apr 15, 2008 */ -abstract public class AbstractElementInterface extends AbstractElementClassBase implements ElementInterface { +public abstract class AbstractElementInterface extends AbstractElementClassBase implements ElementInterface { private Class interfaceClass = null; private List elementBindingHandlers = null; diff --git a/x4o-core/src/main/java/org/x4o/xml/element/AbstractElementLanguage.java b/x4o-core/src/main/java/org/x4o/xml/element/AbstractElementLanguage.java index 73b7e27..ae26d5e 100644 --- a/x4o-core/src/main/java/org/x4o/xml/element/AbstractElementLanguage.java +++ b/x4o-core/src/main/java/org/x4o/xml/element/AbstractElementLanguage.java @@ -34,7 +34,6 @@ import javax.el.ExpressionFactory; import org.x4o.xml.core.X4OPhase; import org.x4o.xml.core.config.X4OLanguageConfiguration; -import org.x4o.xml.element.ElementBindingHandler; /** * An AbstractElementLanguage. @@ -42,7 +41,7 @@ import org.x4o.xml.element.ElementBindingHandler; * @author Willem Cazander * @version 1.0 Aug 20, 2005 */ -abstract public class AbstractElementLanguage implements ElementLanguageLocal { +public abstract class AbstractElementLanguage implements ElementLanguageLocal { private Logger logger = null; private ExpressionFactory expressionFactory = null; diff --git a/x4o-core/src/main/java/org/x4o/xml/element/AbstractElementLanguageModule.java b/x4o-core/src/main/java/org/x4o/xml/element/AbstractElementLanguageModule.java index 69d4054..5aa229f 100644 --- a/x4o-core/src/main/java/org/x4o/xml/element/AbstractElementLanguageModule.java +++ b/x4o-core/src/main/java/org/x4o/xml/element/AbstractElementLanguageModule.java @@ -29,18 +29,13 @@ import java.util.HashMap; import java.util.ArrayList; import java.util.logging.Logger; -import org.x4o.xml.element.ElementAttributeHandler; -import org.x4o.xml.element.ElementBindingHandler; -import org.x4o.xml.element.ElementConfigurator; -import org.x4o.xml.element.ElementLanguage; - /** * An AbstractElementLanguageModule. * * @author Willem Cazander * @version 1.0 Aug 2, 2012 */ -abstract public class AbstractElementLanguageModule extends AbstractElementMetaBase implements ElementLanguageModule { +public abstract class AbstractElementLanguageModule extends AbstractElementMetaBase implements ElementLanguageModule { private Logger logger = null; diff --git a/x4o-core/src/main/java/org/x4o/xml/element/AbstractElementMetaBase.java b/x4o-core/src/main/java/org/x4o/xml/element/AbstractElementMetaBase.java index 75ad985..e0a13b2 100644 --- a/x4o-core/src/main/java/org/x4o/xml/element/AbstractElementMetaBase.java +++ b/x4o-core/src/main/java/org/x4o/xml/element/AbstractElementMetaBase.java @@ -30,7 +30,7 @@ package org.x4o.xml.element; * @author Willem Cazander * @version 1.0 Jan 18, 2009 */ -abstract public class AbstractElementMetaBase implements ElementMetaBase { +public abstract class AbstractElementMetaBase implements ElementMetaBase { /** The description */ private String id = null; diff --git a/x4o-core/src/main/java/org/x4o/xml/element/AbstractElementNamespaceContext.java b/x4o-core/src/main/java/org/x4o/xml/element/AbstractElementNamespaceContext.java index 7ee467f..176758a 100644 --- a/x4o-core/src/main/java/org/x4o/xml/element/AbstractElementNamespaceContext.java +++ b/x4o-core/src/main/java/org/x4o/xml/element/AbstractElementNamespaceContext.java @@ -33,7 +33,7 @@ import java.util.Map; * @author Willem Cazander * @version 1.0 Oct 28, 2009 */ -abstract public class AbstractElementNamespaceContext extends AbstractElementMetaBase implements ElementNamespaceContext { +public abstract class AbstractElementNamespaceContext extends AbstractElementMetaBase implements ElementNamespaceContext { private ElementNamespaceInstanceProvider elementNamespaceInstanceProvider = null; private String prefixMapping = null; diff --git a/x4o-core/src/main/java/org/x4o/xml/element/ElementAttributeValueParser.java b/x4o-core/src/main/java/org/x4o/xml/element/ElementAttributeValueParser.java index 6a9edea..d272d56 100644 --- a/x4o-core/src/main/java/org/x4o/xml/element/ElementAttributeValueParser.java +++ b/x4o-core/src/main/java/org/x4o/xml/element/ElementAttributeValueParser.java @@ -24,7 +24,6 @@ package org.x4o.xml.element; import org.x4o.xml.conv.ObjectConverterException; -import org.x4o.xml.element.Element; /** * Helper interface for setting properties. diff --git a/x4o-core/src/main/java/org/x4o/xml/element/ElementBindingHandler.java b/x4o-core/src/main/java/org/x4o/xml/element/ElementBindingHandler.java index 8beaecf..b97a51d 100644 --- a/x4o-core/src/main/java/org/x4o/xml/element/ElementBindingHandler.java +++ b/x4o-core/src/main/java/org/x4o/xml/element/ElementBindingHandler.java @@ -23,8 +23,6 @@ package org.x4o.xml.element; -import org.x4o.xml.element.Element; - /** * Bind ElementObjects together. * diff --git a/x4o-core/src/main/java/org/x4o/xml/element/ElementConfiguratorException.java b/x4o-core/src/main/java/org/x4o/xml/element/ElementConfiguratorException.java index c7bbdd7..4dcdf2c 100644 --- a/x4o-core/src/main/java/org/x4o/xml/element/ElementConfiguratorException.java +++ b/x4o-core/src/main/java/org/x4o/xml/element/ElementConfiguratorException.java @@ -33,6 +33,8 @@ package org.x4o.xml.element; @SuppressWarnings("serial") public class ElementConfiguratorException extends ElementException { + private ElementConfigurator elementConfigurator = null; + /** * Creates an configurator exception. * @param config The ElementConfigurator. @@ -40,6 +42,7 @@ public class ElementConfiguratorException extends ElementException { */ public ElementConfiguratorException(ElementConfigurator config,String message) { super(message); + this.elementConfigurator=config; } /** @@ -50,6 +53,7 @@ public class ElementConfiguratorException extends ElementException { */ public ElementConfiguratorException(ElementConfigurator config,String message,Exception exception) { super(message,exception); + this.elementConfigurator=config; } /** @@ -60,5 +64,14 @@ public class ElementConfiguratorException extends ElementException { */ public ElementConfiguratorException(ElementConfigurator config,String message,ElementException exception) { super(message,exception); + this.elementConfigurator=config; + } + + /** + * Gets the ElementConfigurator which has thrown this exception. + * @return The ElementConfigurator. + */ + public ElementConfigurator getElementConfigurator() { + return elementConfigurator; } } diff --git a/x4o-core/src/main/java/org/x4o/xml/element/ElementLanguageModule.java b/x4o-core/src/main/java/org/x4o/xml/element/ElementLanguageModule.java index 5c44c73..11f71f4 100644 --- a/x4o-core/src/main/java/org/x4o/xml/element/ElementLanguageModule.java +++ b/x4o-core/src/main/java/org/x4o/xml/element/ElementLanguageModule.java @@ -91,7 +91,7 @@ public interface ElementLanguageModule extends ElementMetaBase { List getGlobalElementConfigurators(); /** - * Adds an ElementInterface + * Adds an ElementInterface. * @param elementInterface The elementInterface to add. */ void addElementInterface(ElementInterface elementInterface); @@ -103,8 +103,8 @@ public interface ElementLanguageModule extends ElementMetaBase { List getElementInterfaces(); /** - * - * @param elementNamespaceContext + * Adds an namespace to this langauge module. + * @param elementNamespaceContext Adds an ElementNamespaceContext to this langauge module. */ void addElementNamespaceContext(ElementNamespaceContext elementNamespaceContext); diff --git a/x4o-core/src/main/java/org/x4o/xml/element/ElementLanguageModuleLoader.java b/x4o-core/src/main/java/org/x4o/xml/element/ElementLanguageModuleLoader.java index 80608d0..a7c4ac3 100644 --- a/x4o-core/src/main/java/org/x4o/xml/element/ElementLanguageModuleLoader.java +++ b/x4o-core/src/main/java/org/x4o/xml/element/ElementLanguageModuleLoader.java @@ -35,8 +35,10 @@ package org.x4o.xml.element; public interface ElementLanguageModuleLoader { /** - * Starts the ElementProvider - * @throws ElementLanguageModuleLoaderException + * Starts the ElementProvider. + * @param elementLanguage The ElementLanguage to load for. + * @param elementLanguageModule The ElementLanguageModule to load it into. + * @throws ElementLanguageModuleLoaderException Gets thrown when modules could not be correctly loaded. */ void loadLanguageModule(ElementLanguage elementLanguage,ElementLanguageModule elementLanguageModule) throws ElementLanguageModuleLoaderException; } diff --git a/x4o-core/src/main/java/org/x4o/xml/element/ElementLanguageModuleLoaderSibling.java b/x4o-core/src/main/java/org/x4o/xml/element/ElementLanguageModuleLoaderSibling.java index 3b3e368..9dfc3e4 100644 --- a/x4o-core/src/main/java/org/x4o/xml/element/ElementLanguageModuleLoaderSibling.java +++ b/x4o-core/src/main/java/org/x4o/xml/element/ElementLanguageModuleLoaderSibling.java @@ -38,7 +38,9 @@ public interface ElementLanguageModuleLoaderSibling extends ElementLanguageModul /** * Loads in the sibling language. - * @throws ElementLanguageModuleLoaderException + * @param elementLanguage The ElementLanguage for which we load an sibling. + * @param loader The loader to use to load the x4o languages. + * @throws X4OLanguageLoaderException Gets thrown when there is an error loading the sibling language. */ void loadLanguageSibling(ElementLanguage elementLanguage,X4OLanguageLoader loader) throws X4OLanguageLoaderException; } diff --git a/x4o-core/src/main/java/org/x4o/xml/element/ElementNamespaceContext.java b/x4o-core/src/main/java/org/x4o/xml/element/ElementNamespaceContext.java index 586bfcc..335df43 100644 --- a/x4o-core/src/main/java/org/x4o/xml/element/ElementNamespaceContext.java +++ b/x4o-core/src/main/java/org/x4o/xml/element/ElementNamespaceContext.java @@ -39,9 +39,22 @@ public interface ElementNamespaceContext extends ElementMetaBase { //String getNamespaceResourceFile(); //String getNamespaceLanguage(); + /** + * Sets the prefix mapping. + * @param prefixMapping The prefix mapping to set. + */ void setPrefixMapping(String prefixMapping); + + /** + * Gets the set prefix mapping of this namespace. + * @return Returns the prefix mapping. + */ String getPrefixMapping(); + /** + * Sets the elememen instance provider which creates the elements objects. + * @param elementNamespaceInstanceProvider The ElementNamespaceInstanceProvider to set. + */ void setElementNamespaceInstanceProvider(ElementNamespaceInstanceProvider elementNamespaceInstanceProvider); /** @@ -132,7 +145,7 @@ public interface ElementNamespaceContext extends ElementMetaBase { /** * @return the schemaPrefix */ - public String getSchemaPrefix(); + String getSchemaPrefix(); /** * @param schemaPrefix the schemaPrefix to set diff --git a/x4o-core/src/main/java/org/x4o/xml/element/ElementNamespaceInstanceProvider.java b/x4o-core/src/main/java/org/x4o/xml/element/ElementNamespaceInstanceProvider.java index 00cb39e..4fad033 100644 --- a/x4o-core/src/main/java/org/x4o/xml/element/ElementNamespaceInstanceProvider.java +++ b/x4o-core/src/main/java/org/x4o/xml/element/ElementNamespaceInstanceProvider.java @@ -23,9 +23,6 @@ package org.x4o.xml.element; -import org.x4o.xml.element.Element; - - /** * Provides elements from tag.
* And ElementClass from a tag.
diff --git a/x4o-core/src/main/java/org/x4o/xml/impl/DefaultElementAttributeValueParser.java b/x4o-core/src/main/java/org/x4o/xml/impl/DefaultElementAttributeValueParser.java index 081b3d2..0d39377 100644 --- a/x4o-core/src/main/java/org/x4o/xml/impl/DefaultElementAttributeValueParser.java +++ b/x4o-core/src/main/java/org/x4o/xml/impl/DefaultElementAttributeValueParser.java @@ -130,22 +130,18 @@ public class DefaultElementAttributeValueParser implements ElementAttributeValue return true; // null element disables checks } ElementClassAttribute attr = element.getElementClass().getElementClassAttributeByName(name); - if (attr!=null) { - if (attr.getRunResolveEL()!=null && attr.getRunResolveEL()==false) { - logger.finest("Skipping EL parsing for: "+name); - return false; - } + if (attr!=null && attr.getRunResolveEL()!=null && attr.getRunResolveEL()==false) { + logger.finest("Skipping EL parsing for: "+name); + return false; } for (ElementInterface ei:element.getElementLanguage().findElementInterfaces(element.getElementObject())) { logger.finest("Found interface match checking disables el parameters."); attr = ei.getElementClassAttributeByName(name); - if (attr!=null) { - if (attr.getRunResolveEL()!=null && attr.getRunResolveEL()==false) { - logger.finest("Skipping EL parsing for: "+name+" in interface element."); - return false; - } + if (attr!=null && attr.getRunResolveEL()!=null && attr.getRunResolveEL()==false) { + logger.finest("Skipping EL parsing for: "+name+" in interface element."); + return false; } } return true; diff --git a/x4o-core/src/main/java/org/x4o/xml/impl/config/DefaultX4OLanguageConfiguration.java b/x4o-core/src/main/java/org/x4o/xml/impl/config/DefaultX4OLanguageConfiguration.java index 639771a..fa31109 100644 --- a/x4o-core/src/main/java/org/x4o/xml/impl/config/DefaultX4OLanguageConfiguration.java +++ b/x4o-core/src/main/java/org/x4o/xml/impl/config/DefaultX4OLanguageConfiguration.java @@ -275,7 +275,7 @@ public class DefaultX4OLanguageConfiguration implements X4OLanguageConfiguration contextInit.setExpressionFactory(configExpressionFactory()); } if (contextInit.getELContext()==null) { - contextInit.setELContext(new X4OELContext(this)); + contextInit.setELContext(new X4OELContext()); } try { if (contextInit.getElementAttributeValueParser()==null) { @@ -300,14 +300,14 @@ public class DefaultX4OLanguageConfiguration implements X4OLanguageConfiguration ExpressionFactory expressionFactory = (ExpressionFactory) expressionFactoryClass.newInstance(); return expressionFactory; } catch (Exception e) { + try { + Class expressionFactoryClass = X4OLanguageClassLoader.loadClass("de.odysseus.el.ExpressionFactoryImpl"); + ExpressionFactory expressionFactory = (ExpressionFactory) expressionFactoryClass.newInstance(); + return expressionFactory; + } catch (Exception ee) { + throw new RuntimeException("Could not load ExpressionFactory tried: org.apache.el.ExpressionFactoryImpl and de.odysseus.el.ExpressionFactoryImpl but could not load one of them."); + } } - try { - Class expressionFactoryClass = X4OLanguageClassLoader.loadClass("de.odysseus.el.ExpressionFactoryImpl"); - ExpressionFactory expressionFactory = (ExpressionFactory) expressionFactoryClass.newInstance(); - return expressionFactory; - } catch (Exception ee) { - } - throw new RuntimeException("Could not load ExpressionFactory tried: org.apache.el.ExpressionFactoryImpl and de.odysseus.el.ExpressionFactoryImpl but could not load one of them."); } /** diff --git a/x4o-core/src/main/java/org/x4o/xml/impl/config/DefaultX4OLanguageLoader.java b/x4o-core/src/main/java/org/x4o/xml/impl/config/DefaultX4OLanguageLoader.java index c407e06..0c1cbf1 100644 --- a/x4o-core/src/main/java/org/x4o/xml/impl/config/DefaultX4OLanguageLoader.java +++ b/x4o-core/src/main/java/org/x4o/xml/impl/config/DefaultX4OLanguageLoader.java @@ -126,6 +126,7 @@ public class DefaultX4OLanguageLoader implements X4OLanguageLoader { } else if ("elb-resource".equals(key)) { // todo + logger.finer("elb-resources are not done yet."); } else if ("sibling-loader".equals(key)) { try { @@ -169,25 +170,24 @@ public class DefaultX4OLanguageLoader implements X4OLanguageLoader { while(e.hasMoreElements()) { URL u = e.nextElement(); logMessage(elementLanguage,"Loading relative modules: "+u+" for: "+language); - loadModuleXml(u.openStream(),u.toString()); + loadModuleXml(u.openStream()); } e = Thread.currentThread().getContextClassLoader().getResources("/"+buf.toString()); while(e.hasMoreElements()) { URL u = e.nextElement(); logMessage(elementLanguage,"Loading root modules: "+u+" for: "+language); - loadModuleXml(u.openStream(),u.toString()); + loadModuleXml(u.openStream()); } } /** * Parser xml inputstream to languge modules - * @param in - * @param resourceFile + * @param in The inputstream to parser. * @throws IOException * @throws SAXException */ - private void loadModuleXml(InputStream in,String resourceFile) throws IOException, SAXException { + private void loadModuleXml(InputStream in) throws IOException, SAXException { if (in==null) { throw new NullPointerException("Can't parse null input stream"); } diff --git a/x4o-core/src/main/java/org/x4o/xml/impl/el/X4OELContext.java b/x4o-core/src/main/java/org/x4o/xml/impl/el/X4OELContext.java index 3c6c8d0..2706266 100644 --- a/x4o-core/src/main/java/org/x4o/xml/impl/el/X4OELContext.java +++ b/x4o-core/src/main/java/org/x4o/xml/impl/el/X4OELContext.java @@ -35,8 +35,6 @@ import javax.el.ListELResolver; import javax.el.MapELResolver; import javax.el.VariableMapper; -import org.x4o.xml.core.config.X4OLanguageConfiguration; - /** * X4OELFunctionMapper simple EL context. * @@ -49,7 +47,7 @@ public class X4OELContext extends ELContext { private FunctionMapper functionMapper = null; private VariableMapper variableMapper = null; - public X4OELContext(X4OLanguageConfiguration x4oParserConfig) { + public X4OELContext(/* X4OLanguageConfiguration x4oParserConfig */) { CompositeELResolver compositeELResolver = new CompositeELResolver(); compositeELResolver.add(new X4OELResolver(new HashMap(100))); diff --git a/x4o-core/src/main/java/org/x4o/xml/sax/XMLWriter.java b/x4o-core/src/main/java/org/x4o/xml/sax/XMLWriter.java index 0595997..f4796ee 100644 --- a/x4o-core/src/main/java/org/x4o/xml/sax/XMLWriter.java +++ b/x4o-core/src/main/java/org/x4o/xml/sax/XMLWriter.java @@ -130,51 +130,49 @@ public class XMLWriter extends DefaultHandler2 { } - if (uri!=null & "".equals(uri)==false) { - if (printedMappings.contains(uri)==false) { - String prefix = prefixMapping.get(uri); - if (prefix==null) { - throw new SAXException("preFixUri: "+uri+" is not started."); - } - printedMappings.add(uri); - - startElement.append(' '); - startElement.append("xmlns"); - if ("".equals(prefix)==false) { - startElement.append(':'); - startElement.append(prefix); - } - startElement.append("=\""); - startElement.append(uri); - startElement.append('"'); - - boolean first = true; - for (String uri2:prefixMapping.keySet()) { - if (printedMappings.contains(uri2)==false) { - prefix = prefixMapping.get(uri2); - if (prefix==null) { - throw new SAXException("preFixUri: "+uri+" is not started."); - } - printedMappings.add(uri2); - - if (first) { - startElement.append('\n'); - first = false; - } - - startElement.append(' '); - startElement.append("xmlns"); - if ("".equals(prefix)==false) { - startElement.append(':'); - startElement.append(prefix); - } - startElement.append("=\""); - startElement.append(uri2); - startElement.append('"'); - startElement.append('\n'); + if ((uri!=null & "".equals(uri)==false) && printedMappings.contains(uri)==false) { + String prefix = prefixMapping.get(uri); + if (prefix==null) { + throw new SAXException("preFixUri: "+uri+" is not started."); + } + printedMappings.add(uri); + + startElement.append(' '); + startElement.append("xmlns"); + if ("".equals(prefix)==false) { + startElement.append(':'); + startElement.append(prefix); + } + startElement.append("=\""); + startElement.append(uri); + startElement.append('"'); + + boolean first = true; + for (String uri2:prefixMapping.keySet()) { + if (printedMappings.contains(uri2)==false) { + prefix = prefixMapping.get(uri2); + if (prefix==null) { + throw new SAXException("preFixUri: "+uri+" is not started."); } + printedMappings.add(uri2); + + if (first) { + startElement.append('\n'); + first = false; + } + + startElement.append(' '); + startElement.append("xmlns"); + if ("".equals(prefix)==false) { + startElement.append(':'); + startElement.append(prefix); + } + startElement.append("=\""); + startElement.append(uri2); + startElement.append('"'); + startElement.append('\n'); } - } + } } for (int i=0;i x4o org.x4o - 0.8.2-SNAPSHOT + 0.8.5-SNAPSHOT x4o-elddoc jar diff --git a/x4o-meta/pom.xml b/x4o-meta/pom.xml index 9a1da41..ee84f4d 100644 --- a/x4o-meta/pom.xml +++ b/x4o-meta/pom.xml @@ -3,7 +3,7 @@ x4o org.x4o - 0.8.2-SNAPSHOT + 0.8.5-SNAPSHOT .. x4o-meta diff --git a/x4o-meta/src/main/java/org/x4o/xml/meta/MetaLanguageSiblingLoader.java b/x4o-meta/src/main/java/org/x4o/xml/meta/MetaLanguageSiblingLoader.java index e8fbcbf..beb0bd4 100644 --- a/x4o-meta/src/main/java/org/x4o/xml/meta/MetaLanguageSiblingLoader.java +++ b/x4o-meta/src/main/java/org/x4o/xml/meta/MetaLanguageSiblingLoader.java @@ -39,12 +39,15 @@ import org.x4o.xml.element.ElementLanguageModuleLoaderSibling; public class MetaLanguageSiblingLoader implements ElementLanguageModuleLoaderSibling { /** Defines the identifier of the meta x4o language. */ - public final static String META_LANGUAGE = "meta"; + public static final String META_LANGUAGE = "meta"; /** Defines the version of the meta x4o language. */ - public final static String META_LANGUAGE_VERSION = "1.0"; + public static final String META_LANGUAGE_VERSION = "1.0"; /** + * Loads an ElementLanguageModule. + * @param elementLanguage The ElementLanguage to load for. + * @param elementLanguageModule The ElementLanguageModule to load into. * @see org.x4o.xml.element.ElementLanguageModuleLoader#loadLanguageModule(org.x4o.xml.element.ElementLanguage, org.x4o.xml.element.ElementLanguageModule) */ public void loadLanguageModule(ElementLanguage elementLanguage,ElementLanguageModule elementLanguageModule) throws ElementLanguageModuleLoaderException { @@ -55,6 +58,9 @@ public class MetaLanguageSiblingLoader implements ElementLanguageModuleLoaderSib } /** + * Loads an sibling language. + * @param elementLanguage The ElementLanguage to load for. + * @param loader The x4o language loader. * @throws X4OLanguageLoaderException * @see org.x4o.xml.element.ElementLanguageModuleLoaderSibling#loadLanguageSibling(org.x4o.xml.element.ElementLanguage, org.x4o.xml.core.config.X4OLanguageLoader) */ diff --git a/x4o-meta/src/main/java/org/x4o/xml/meta/lang/BeanPropertyComparator.java b/x4o-meta/src/main/java/org/x4o/xml/meta/lang/BeanPropertyComparator.java index 3d90b75..8180b3a 100644 --- a/x4o-meta/src/main/java/org/x4o/xml/meta/lang/BeanPropertyComparator.java +++ b/x4o-meta/src/main/java/org/x4o/xml/meta/lang/BeanPropertyComparator.java @@ -23,7 +23,6 @@ package org.x4o.xml.meta.lang; -import java.lang.Comparable; import java.util.Comparator; import java.util.logging.Level; import java.util.logging.Logger; diff --git a/x4o-meta/src/main/java/org/x4o/xml/meta/lang/PropertyElement.java b/x4o-meta/src/main/java/org/x4o/xml/meta/lang/PropertyElement.java index d2ff5e1..9cd58d0 100644 --- a/x4o-meta/src/main/java/org/x4o/xml/meta/lang/PropertyElement.java +++ b/x4o-meta/src/main/java/org/x4o/xml/meta/lang/PropertyElement.java @@ -95,6 +95,7 @@ public class PropertyElement extends AbstractElement { method.invoke(getParent().getElementObject(),new Object[]{name,value}); return; } catch (Exception e) { + throw new ElementException("Could not invoke setproperty of "+method.getName()+" on: "+getParent().getElementObject(),e); } } } @@ -104,7 +105,7 @@ public class PropertyElement extends AbstractElement { getElementLanguage().getElementObjectPropertyValue().setProperty(getParent().getElementObject(), name, value); return; } catch (Exception e) { - throw new ElementException("could not set property on parent element object: "+name,e); + throw new ElementException("Could not set property on parent element object: "+name,e); } } } diff --git a/x4o-plugin/pom.xml b/x4o-plugin/pom.xml index dfbdb0b..d9e1bba 100644 --- a/x4o-plugin/pom.xml +++ b/x4o-plugin/pom.xml @@ -3,7 +3,7 @@ x4o org.x4o - 0.8.2-SNAPSHOT + 0.8.5-SNAPSHOT .. x4o-plugin @@ -12,8 +12,8 @@ x4o-plugin x4o plugins for other applications - x4o-plugin-ant-schema - x4o-plugin-ant-elddoc + x4o-plugin-ant-schema + x4o-plugin-ant-elddoc diff --git a/x4o-plugin/x4o-plugin-ant-elddoc/pom.xml b/x4o-plugin/x4o-plugin-ant-elddoc/pom.xml index e5cf8c2..76d539c 100644 --- a/x4o-plugin/x4o-plugin-ant-elddoc/pom.xml +++ b/x4o-plugin/x4o-plugin-ant-elddoc/pom.xml @@ -3,7 +3,7 @@ x4o-plugin org.x4o.plugin - 0.8.2-SNAPSHOT + 0.8.5-SNAPSHOT .. x4o-plugin-ant-elddoc diff --git a/x4o-plugin/x4o-plugin-ant-schema/pom.xml b/x4o-plugin/x4o-plugin-ant-schema/pom.xml index 8680f25..6a0136f 100644 --- a/x4o-plugin/x4o-plugin-ant-schema/pom.xml +++ b/x4o-plugin/x4o-plugin-ant-schema/pom.xml @@ -3,7 +3,7 @@ x4o-plugin org.x4o.plugin - 0.8.2-SNAPSHOT + 0.8.5-SNAPSHOT .. x4o-plugin-ant-schema