# HG changeset patch # User Tim Englich # Date 1256201421 0 # Node ID 734ac082c8d1e43ab2d01085dbe40f2367943561 # Parent 226091ed3cbd8b36312de0ecd211e8bc0f336e1a Split the Configuration File in several small Documents to speed up the Artifactinstantiation and also make the administration of the Artifactdatabase easier. issue40 and issue59 gnv-artifacts/trunk@259 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r 226091ed3cbd -r 734ac082c8d1 gnv-artifacts/ChangeLog --- a/gnv-artifacts/ChangeLog Wed Oct 21 11:10:28 2009 +0000 +++ b/gnv-artifacts/ChangeLog Thu Oct 22 08:50:21 2009 +0000 @@ -1,3 +1,23 @@ +2009-10-22 Tim Englich + + * doc/conf/conf.xml, + doc/conf/products/**/conf_*.xml: + Split the Configuration of the ArtifactDatabase in several Configurationfiles. + For Each Product-Artifact one single File to make it easier to administer the System. + * src/main/java/de/intevation/gnv/transition/TransitionFactory.java (createTransition), + src/main/java/de/intevation/gnv/transition/TransitionBase.java (setup), + src/main/java/de/intevation/gnv/transition/OutputTransitionBase.java (setup), + src/main/java/de/intevation/gnv/artifacts/fis/FISArtifact.java (setup): + Lookup of XML-Attributes was changed from XPath-lookup to direct + Access on the fetched Element to speed up the Artifactinstantiation issue40 + * src/main/java/de/intevation/gnv/artifacts/GNVArtifactBase.java (getConfigurationFragment): + Read Configurationinformations for the Productartifact from a separat folder if an xlink:href + Attribute exists in tne Configurationnode of the Artifact. + This was inserted to speed up the Artifactinstantiation and to split the Configuration + in several Configurationfiles that where smallaer issue40 + Also the lookup of XML-Attributes was changed from XPath-lookup to direct + Access on the fetched Element + 2009-10-21 Tim Englich * doc/conf/conf.xml: diff -r 226091ed3cbd -r 734ac082c8d1 gnv-artifacts/doc/conf/conf.xml --- a/gnv-artifacts/doc/conf/conf.xml Wed Oct 21 11:10:28 2009 +0000 +++ b/gnv-artifacts/doc/conf/conf.xml Thu Oct 22 08:50:21 2009 +0000 @@ -250,800 +250,19 @@ - - - - - timeseries_mesh - meshid - false - - timeseries_mesh_coordinate - - - - - - - - - mesh_coordinate - false - - timeseries_meshpointv - - - - - - - - - timeseries_meshpoint - mesh_point - false - - timeseries_meshpoint_depthv - - - - - - - - - - timeseries_meshpoint_depth - depthid - true - - timeseries_meshpoint_parameterv - - - - - - - - - - timeseries_mesh_parameter - parameterid - true - - timeseries_meshpoint_interval - - - - - - - - - - - timeseries_mesh_interval - timeinterval - false - - timeseries_meshpoint_calculate_results - - - - - - - - - - - - timeseries_mesh_chart_data - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - timeseries_timeseriespoint - featureid - false - - timeseries_parameter - - - - - - - - - timeseries_parameter - parameterid - true - - timeseries_depth_height - - - - - - - - - timeseries_depth_height - measurementid - true - - timeseries_interval - - - - - - - - - - timeseries_interval - timeinterval - false - - timeseries_calculate_results - - - - - - - - - - timeseries_chart_data - - - - - - - - - - - - - - - - - - - - - - - - - - verticalprofile_point - featureid - false - - verticalprofile_parameter - - - - - - - - - verticalprofile_parameter - parameterid - true - - verticalprofile_date - - - - - - - - - verticalprofile_date - dateid - true - - verticalprofile_calculate_results - - - - - - - - - - verticalprofile_chart_data - - - - - - - - - - - - - - - - - - - - - - - - + + - - - - verticalprofile_mesh - meshid - false - - verticalprofile_mesh_coordinate - - - - - - - - - mesh_coordinate - false - - verticalprofile_mesh_pointv - - - - - - - - - verticalprofile_mesh_point - mesh_point - false - - verticalprofile_meshpoint_parameterv - - - - - - - - - - verticalprofile_mesh_parameter - parameterid - true - - verticalprofile_mesh_date - - - - - - - - - - verticalprofile_mesh_date - dateid - true - - verticalprofile_mesh_calculate_results - - - - - - - - - - - verticalprofile_mesh_chart_data - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - verticalprofile_instantaneouspoint_series - seriesid - false - - verticalprofile_instantaneouspoint_point - - - - - - - - verticalprofile_instantaneouspoint_point - instantaneouspoint_point - false - - verticalprofile_instantaneouspoint_parameterv - - - - - - - - - verticalprofile_instantaneouspoint_parameter - parameterid - true - - verticalprofile_instantaneouspoint_calculate_results - - - - - - - - - verticalprofile_instantaneouspoint_chart_data - - - - - - - - - - - - - - - - - - - - - - - - - - - - - horizontalprofile_instantaneouspoint_vehicle - vehicleid - false - - horizontalprofile_instantaneouspoint_cruise - - - - - - - - horizontalprofile_instantaneouspoint_cruise - cruiseid - false - - horizontalprofile_instantaneouspoint_track - - - - - - - - - horizontalprofile_instantaneouspoint_track - trackid - false - - horizontalprofile_instantaneouspoint_surveyinfo - Eisklimatologie - - - - - - - horizontalprofile_instantaneouspoint_surveyinfo - surveyid - false - - horizontalprofile_instantaneouspoint_parameter - - - - - - - - - horizontalprofile_instantaneouspoint_parameter - parameterid - true - - horizontalprofile_instantaneouspoint_depth - - - - - - - - - - horizontalprofile_instantaneouspoint_depth - measurementid - true - - horizontalprofile_instantaneouspoint_calculate_results - - - - - - - - - - - horizontalprofile_instantaneouspoint_chart_data - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - verticalprofile_mesh - meshid - false - - horizontalprofile_mesh_coordinate - - - - - - - - - mesh_coordinate - false - - horizontalprofile_mesh_pointv - - - - - - - - - verticalprofile_mesh_point - mesh_point - false - - horizontalprofile_mesh_axisv - - - - - - - - - axisid - false - - horizontalprofile_meshpoint_parameterv - - - - - - - - - verticalprofile_mesh_parameter - parameterid - true - - horizontalprofile_meshpoint_depth - - - - - - - - - - - - horizontalprofile_meshpoint_depth - depthid - true - - horizontalprofile_mesh_datev - - - - - - - - - - - - verticalprofile_mesh_date - dateid - true - - horizontalprofile_mesh_calculate_results - - - - - - - - - - - - - horizontalprofile_mesh_chart_data - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - verticalprofile_mesh - meshid - false - - verticalcrosssection_mesh_coordinate - - - - - - - - - mesh_coordinate - false - - verticalcrosssection_mesh_pointv - - - - - - - - - verticalprofile_mesh_point - mesh_point - false - - verticalcrosssection_mesh_axisv - - - - - - - - - axisid - false - - verticalcrosssection_mesh_parameterv - - - - - - - - - verticalprofile_mesh_parameter - parameterid - false - - verticalcrosssection_mesh_date - - - - - - - - - - - - verticalcrosssection_mesh_date - dateid - false - - verticalcrosssection_mesh_calculate_results - - - - - - - - - - - - verticalcrosssection_mesh_chart_data - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + ${artifacts.config.dir}/ehcache.xml diff -r 226091ed3cbd -r 734ac082c8d1 gnv-artifacts/doc/conf/products/horizontalprofile/conf_instantaneouspoint.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gnv-artifacts/doc/conf/products/horizontalprofile/conf_instantaneouspoint.xml Thu Oct 22 08:50:21 2009 +0000 @@ -0,0 +1,110 @@ + + + + + horizontalprofile_instantaneouspoint_vehicle + vehicleid + false + + horizontalprofile_instantaneouspoint_cruise + + + + + + + + horizontalprofile_instantaneouspoint_cruise + cruiseid + false + + horizontalprofile_instantaneouspoint_track + + + + + + + + + horizontalprofile_instantaneouspoint_track + trackid + false + + horizontalprofile_instantaneouspoint_surveyinfo + Eisklimatologie + + + + + + + horizontalprofile_instantaneouspoint_surveyinfo + surveyid + false + + horizontalprofile_instantaneouspoint_parameter + + + + + + + + + horizontalprofile_instantaneouspoint_parameter + parameterid + true + + horizontalprofile_instantaneouspoint_depth + + + + + + + + + + horizontalprofile_instantaneouspoint_depth + measurementid + true + + horizontalprofile_instantaneouspoint_calculate_results + + + + + + + + + + + horizontalprofile_instantaneouspoint_chart_data + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff -r 226091ed3cbd -r 734ac082c8d1 gnv-artifacts/doc/conf/products/horizontalprofile/conf_mesh.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gnv-artifacts/doc/conf/products/horizontalprofile/conf_mesh.xml Thu Oct 22 08:50:21 2009 +0000 @@ -0,0 +1,131 @@ + + + + + verticalprofile_mesh + meshid + false + + horizontalprofile_mesh_coordinate + + + + + + + + + mesh_coordinate + false + + horizontalprofile_mesh_pointv + + + + + + + + + verticalprofile_mesh_point + mesh_point + false + + horizontalprofile_mesh_axisv + + + + + + + + + axisid + false + + horizontalprofile_meshpoint_parameterv + + + + + + + + + verticalprofile_mesh_parameter + parameterid + true + + horizontalprofile_meshpoint_depth + + + + + + + + + + + + horizontalprofile_meshpoint_depth + depthid + true + + horizontalprofile_mesh_datev + + + + + + + + + + + + verticalprofile_mesh_date + dateid + true + + horizontalprofile_mesh_calculate_results + + + + + + + + + + + + + horizontalprofile_mesh_chart_data + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff -r 226091ed3cbd -r 734ac082c8d1 gnv-artifacts/doc/conf/products/timeseries/conf_mesh.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gnv-artifacts/doc/conf/products/timeseries/conf_mesh.xml Thu Oct 22 08:50:21 2009 +0000 @@ -0,0 +1,117 @@ + + + + + timeseries_mesh + meshid + false + + timeseries_mesh_coordinate + + + + + + + + + mesh_coordinate + false + + timeseries_meshpointv + + + + + + + + + timeseries_meshpoint + mesh_point + false + + timeseries_meshpoint_depthv + + + + + + + + + + timeseries_meshpoint_depth + depthid + true + + timeseries_meshpoint_parameterv + + + + + + + + + + timeseries_mesh_parameter + parameterid + true + + timeseries_meshpoint_interval + + + + + + + + + + + timeseries_mesh_interval + timeinterval + false + + timeseries_meshpoint_calculate_results + + + + + + + + + + + + timeseries_mesh_chart_data + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff -r 226091ed3cbd -r 734ac082c8d1 gnv-artifacts/doc/conf/products/timeseries/conf_timeseriespoint.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gnv-artifacts/doc/conf/products/timeseries/conf_timeseriespoint.xml Thu Oct 22 08:50:21 2009 +0000 @@ -0,0 +1,80 @@ + + + + + timeseries_timeseriespoint + featureid + false + + timeseries_parameter + + + + + + + + + timeseries_parameter + parameterid + true + + timeseries_depth_height + + + + + + + + + timeseries_depth_height + measurementid + true + + timeseries_interval + + + + + + + + + + timeseries_interval + timeinterval + false + + timeseries_calculate_results + + + + + + + + + + timeseries_chart_data + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff -r 226091ed3cbd -r 734ac082c8d1 gnv-artifacts/doc/conf/products/verticalcrosssection/conf_mesh.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gnv-artifacts/doc/conf/products/verticalcrosssection/conf_mesh.xml Thu Oct 22 08:50:21 2009 +0000 @@ -0,0 +1,113 @@ + + + + + verticalprofile_mesh + meshid + false + + verticalcrosssection_mesh_coordinate + + + + + + + + + mesh_coordinate + false + + verticalcrosssection_mesh_pointv + + + + + + + + + verticalprofile_mesh_point + mesh_point + false + + verticalcrosssection_mesh_axisv + + + + + + + + + axisid + false + + verticalcrosssection_mesh_parameterv + + + + + + + + + verticalprofile_mesh_parameter + parameterid + false + + verticalcrosssection_mesh_date + + + + + + + + + + + + verticalcrosssection_mesh_date + dateid + false + + verticalcrosssection_mesh_calculate_results + + + + + + + + + + + + verticalcrosssection_mesh_chart_data + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff -r 226091ed3cbd -r 734ac082c8d1 gnv-artifacts/doc/conf/products/verticalprofile/conf_instantaneouspoint.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gnv-artifacts/doc/conf/products/verticalprofile/conf_instantaneouspoint.xml Thu Oct 22 08:50:21 2009 +0000 @@ -0,0 +1,67 @@ + + + + + verticalprofile_instantaneouspoint_series + seriesid + false + + verticalprofile_instantaneouspoint_point + + + + + + + + verticalprofile_instantaneouspoint_point + instantaneouspoint_point + false + + verticalprofile_instantaneouspoint_parameterv + + + + + + + + + verticalprofile_instantaneouspoint_parameter + parameterid + true + + verticalprofile_instantaneouspoint_calculate_results + + + + + + + + + verticalprofile_instantaneouspoint_chart_data + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff -r 226091ed3cbd -r 734ac082c8d1 gnv-artifacts/doc/conf/products/verticalprofile/conf_mesh.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gnv-artifacts/doc/conf/products/verticalprofile/conf_mesh.xml Thu Oct 22 08:50:21 2009 +0000 @@ -0,0 +1,98 @@ + + + + + verticalprofile_mesh + meshid + false + + verticalprofile_mesh_coordinate + + + + + + + + + mesh_coordinate + false + + verticalprofile_mesh_pointv + + + + + + + + + verticalprofile_mesh_point + mesh_point + false + + verticalprofile_meshpoint_parameterv + + + + + + + + + + verticalprofile_mesh_parameter + parameterid + true + + verticalprofile_mesh_date + + + + + + + + + + verticalprofile_mesh_date + dateid + true + + verticalprofile_mesh_calculate_results + + + + + + + + + + + verticalprofile_mesh_chart_data + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff -r 226091ed3cbd -r 734ac082c8d1 gnv-artifacts/doc/conf/products/verticalprofile/conf_timeseriespoint.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gnv-artifacts/doc/conf/products/verticalprofile/conf_timeseriespoint.xml Thu Oct 22 08:50:21 2009 +0000 @@ -0,0 +1,69 @@ + + + + + verticalprofile_point + featureid + false + + verticalprofile_parameter + + + + + + + + + verticalprofile_parameter + parameterid + true + + verticalprofile_date + + + + + + + + + verticalprofile_date + dateid + true + + verticalprofile_calculate_results + + + + + + + + + + verticalprofile_chart_data + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff -r 226091ed3cbd -r 734ac082c8d1 gnv-artifacts/src/main/java/de/intevation/gnv/artifacts/GNVArtifactBase.java --- a/gnv-artifacts/src/main/java/de/intevation/gnv/artifacts/GNVArtifactBase.java Wed Oct 21 11:10:28 2009 +0000 +++ b/gnv-artifacts/src/main/java/de/intevation/gnv/artifacts/GNVArtifactBase.java Thu Oct 22 08:50:21 2009 +0000 @@ -10,6 +10,8 @@ import java.util.Iterator; import java.util.Map; +import javax.xml.parsers.DocumentBuilderFactory; +import javax.xml.parsers.ParserConfigurationException; import javax.xml.xpath.XPathConstants; import org.apache.log4j.Logger; @@ -17,6 +19,7 @@ import org.w3c.dom.Element; import org.w3c.dom.Node; import org.w3c.dom.NodeList; +import org.xml.sax.SAXException; import de.intevation.artifactdatabase.Config; import de.intevation.artifactdatabase.DefaultArtifact; @@ -108,7 +111,7 @@ .get(transitionName); // 2.Ergebnisse Berechnen this.current.advance(uuid, context.getMeta()); - // 3. Ergebnisse übergeben + // 3. Ergebnisse Übergeben nextStep.setDescibeData(this.current .getDescibeData()); nextStep.putInputData(this.current.getInputData(), @@ -166,7 +169,34 @@ String xpathQuery = XPATH_ARTIFACT_CONFIGURATION.replaceAll( XPATH_IDENTIFIER_REPLACE, this.name); log.debug(xpathQuery); - return Config.getNodeXPath(document, xpathQuery); + + Element configurationNode = (Element)Config.getNodeXPath(document, xpathQuery); + + String link = configurationNode.getAttribute("xlink:href"); + if (link != null ){ + String absolutFileName = Config.replaceConfigDir(link); + configurationNode = (Element)this.readConfiguration(absolutFileName); + } + + return configurationNode; + } + + + private Node readConfiguration(String fileName){ + try { + DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); + factory.setValidating(false); + return factory.newDocumentBuilder().parse(fileName).getChildNodes().item(0); + } catch (SAXException e) { + log.error(e,e); + return null; + } catch (IOException e) { + log.error(e,e); + return null; + } catch (ParserConfigurationException e) { + log.error(e,e); + return null; + } } /** @@ -226,6 +256,7 @@ GNVArtifactContext gnvContext = (GNVArtifactContext) localContext; Document doc = gnvContext.getConfig(); Node artifactNode = this.getConfigurationFragment(doc); + NodeList transitionList = Config.getNodeSetXPath(artifactNode, "transitions/transition"); this.transitions = new HashMap(transitionList @@ -403,9 +434,9 @@ returnValue = new HashMap(inputElemets .getLength()); for (int i = 0; i < inputElemets.getLength(); i++) { - Node inputDataNode = inputElemets.item(i); - String name = Config.getStringXPath(inputDataNode, "@name"); - String value = Config.getStringXPath(inputDataNode, "@value"); + Element inputDataNode = (Element)inputElemets.item(i); + String name = inputDataNode.getAttribute("name"); + String value = inputDataNode.getAttribute("value"); if (returnValue.containsKey(name)) { InputData inputData = returnValue.get(name); diff -r 226091ed3cbd -r 734ac082c8d1 gnv-artifacts/src/main/java/de/intevation/gnv/artifacts/fis/FISArtifact.java --- a/gnv-artifacts/src/main/java/de/intevation/gnv/artifacts/fis/FISArtifact.java Wed Oct 21 11:10:28 2009 +0000 +++ b/gnv-artifacts/src/main/java/de/intevation/gnv/artifacts/fis/FISArtifact.java Thu Oct 22 08:50:21 2009 +0000 @@ -276,10 +276,10 @@ if (products != null) { this.products = new HashMap(products .getLength()); + for (int i = 0; i < products.getLength(); i++) { - Node productNode = products.item(i); - String productName = Config.getStringXPath(productNode, - "@name"); + Element productNode = (Element)products.item(i); + String productName = productNode.getAttribute("name"); NodeList parameterNodes = Config.getNodeSetXPath( productNode, "parameters/parameter"); Collection parameter = null; @@ -287,11 +287,9 @@ parameter = new ArrayList(parameterNodes .getLength()); for (int j = 0; j < parameterNodes.getLength(); j++) { - Node parameterNode = parameterNodes.item(j); - String name = Config.getStringXPath(parameterNode, - "@name"); - String value = Config.getStringXPath(parameterNode, - "@value"); + Element parameterNode = (Element)parameterNodes.item(j); + String name = parameterNode.getAttribute("name"); + String value = parameterNode.getAttribute("value"); parameter.add(new DefaultInputData(name, value)); } } diff -r 226091ed3cbd -r 734ac082c8d1 gnv-artifacts/src/main/java/de/intevation/gnv/transition/OutputTransitionBase.java --- a/gnv-artifacts/src/main/java/de/intevation/gnv/transition/OutputTransitionBase.java Wed Oct 21 11:10:28 2009 +0000 +++ b/gnv-artifacts/src/main/java/de/intevation/gnv/transition/OutputTransitionBase.java Thu Oct 22 08:50:21 2009 +0000 @@ -7,9 +7,9 @@ import java.util.ArrayList; import java.util.Collection; -import net.sf.ehcache.Element; import org.apache.log4j.Logger; +import org.w3c.dom.Element; import org.w3c.dom.Node; import org.w3c.dom.NodeList; @@ -78,13 +78,10 @@ this.outputModes = new ArrayList(outputModeList .getLength()); for (int i = 0; i < outputModeList.getLength(); i++) { - Node currentNode = outputModeList.item(i); - String name = Config.getStringXPath(currentNode, "@name"); - String description = Config.getStringXPath(currentNode, - "@description"); - String mimeType = Config.getStringXPath(currentNode, - "@mime-type"); - + Element currentNode = (Element)outputModeList.item(i); + String name = currentNode.getAttribute("name"); + String description =currentNode.getAttribute("description"); + String mimeType = currentNode.getAttribute("mime-type"); NodeList inputValuesList = Config.getNodeSetXPath(currentNode, "parameters/inputvalue"); Collection inputParameters = null; @@ -92,13 +89,10 @@ inputParameters = new ArrayList(inputValuesList .getLength()); for (int j = 0; j < inputValuesList.getLength(); j++) { - Node currentInputValuesNode = inputValuesList.item(j); - String inputValueName = Config.getStringXPath( - currentInputValuesNode, "@name"); - String inputValueType = Config.getStringXPath( - currentInputValuesNode, "@type"); - String defaultValue = Config.getStringXPath( - currentInputValuesNode, "@value"); + Element currentInputValuesNode = (Element)inputValuesList.item(j); + String inputValueName = currentInputValuesNode.getAttribute("name"); + String inputValueType = currentInputValuesNode.getAttribute("type"); + String defaultValue =currentInputValuesNode.getAttribute("value"); boolean isMultiselect = false; InputValue inputValue = new DefaultInputValue( inputValueName, inputValueType, defaultValue, @@ -144,7 +138,7 @@ if (CacheFactory.getInstance().isInitialized()) { String key = uuid + super.getID(); log.debug("Hash for Queryelements: " + key); - Element value = CacheFactory.getInstance().getCache().get(key); + net.sf.ehcache.Element value = CacheFactory.getInstance().getCache().get(key); if (value != null) { return (Collection) (value.getObjectValue()); } @@ -157,7 +151,7 @@ if (CacheFactory.getInstance().isInitialized()) { String key = uuid + super.getID(); log.debug("Hash for Queryelements: " + key); - Element value = CacheFactory.getInstance().getCache().get(key); + net.sf.ehcache.Element value = CacheFactory.getInstance().getCache().get(key); if (value != null) { CacheFactory.getInstance().getCache().remove(key); } @@ -174,7 +168,7 @@ if (CacheFactory.getInstance().isInitialized()) { String key = uuid + super.getID(); log.debug("Hash for Queryelements: " + key); - CacheFactory.getInstance().getCache().put(new Element(key, result)); + CacheFactory.getInstance().getCache().put(new net.sf.ehcache.Element(key, result)); } } diff -r 226091ed3cbd -r 734ac082c8d1 gnv-artifacts/src/main/java/de/intevation/gnv/transition/TransitionBase.java --- a/gnv-artifacts/src/main/java/de/intevation/gnv/transition/TransitionBase.java Wed Oct 21 11:10:28 2009 +0000 +++ b/gnv-artifacts/src/main/java/de/intevation/gnv/transition/TransitionBase.java Thu Oct 22 08:50:21 2009 +0000 @@ -117,8 +117,8 @@ */ public void setup(Node configuration) { log.debug("TransitionBase.setup"); - this.id = Config.getStringXPath(configuration, "@id"); - this.description = Config.getStringXPath(configuration, "@description"); + this.id = ((Element)configuration).getAttribute("id"); + this.description = ((Element)configuration).getAttribute("description"); log.info("Transition-ID = " + this.id); NodeList nodes = Config.getNodeSetXPath(configuration, @@ -138,9 +138,8 @@ this.inputValueNames = new ArrayList(inputValuesNodes .getLength()); for (int i = 0; i < inputValuesNodes.getLength(); i++) { - Node inputValueNode = inputValuesNodes.item(i); - String usedinQueryValue = Config.getStringXPath(inputValueNode, - "@usedinquery"); + Element inputValueNode = (Element)inputValuesNodes.item(i); + String usedinQueryValue = inputValueNode.getAttribute("usedinquery"); int usedinQuery = 1; if (usedinQueryValue != null) { try { @@ -150,11 +149,10 @@ .warn("Used in Query Value cannot be transformed into a Number"); } } - InputValue inputValue = new DefaultInputValue(Config - .getStringXPath(inputValueNode, "@name"), Config - .getStringXPath(inputValueNode, "@type"), Boolean - .parseBoolean(Config.getStringXPath(inputValueNode, - "@multiselect")), usedinQuery); + InputValue inputValue = new DefaultInputValue(inputValueNode.getAttribute("name"), + inputValueNode.getAttribute("type"), + Boolean.parseBoolean(inputValueNode. + getAttribute("multiselect")), usedinQuery); log.debug(inputValue.toString()); this.inputValues.put(inputValue.getName(), inputValue); this.inputValueNames.add(inputValue.getName()); diff -r 226091ed3cbd -r 734ac082c8d1 gnv-artifacts/src/main/java/de/intevation/gnv/transition/TransitionFactory.java --- a/gnv-artifacts/src/main/java/de/intevation/gnv/transition/TransitionFactory.java Wed Oct 21 11:10:28 2009 +0000 +++ b/gnv-artifacts/src/main/java/de/intevation/gnv/transition/TransitionFactory.java Thu Oct 22 08:50:21 2009 +0000 @@ -6,7 +6,6 @@ import org.apache.log4j.Logger; import org.w3c.dom.Node; -import de.intevation.artifactdatabase.Config; import de.intevation.gnv.artifacts.GNVArtifactBase; /** @@ -40,8 +39,7 @@ log.debug("TransitionFactory.createTransition"); Transition transition = null; try { - String classname = Config.getStringXPath(configuration, - "@transition"); + String classname = ((org.w3c.dom.Element)configuration).getAttribute("transition"); transition = (Transition) (Class.forName(classname).newInstance()); transition.setup(configuration); } catch (InstantiationException e) {