Mercurial > dive4elements > framework
comparison artifacts-common/src/main/java/de/intevation/artifacts/common/utils/ClientProtocolUtils.java @ 371:831d317547eb
Added methods to extract the default value for a min and max item.
artifacts/trunk@3820 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Mon, 30 Jan 2012 10:05:40 +0000 |
parents | 203bd78def81 |
children |
comparison
equal
deleted
inserted
replaced
370:203bd78def81 | 371:831d317547eb |
---|---|
54 public static final String XPATH_MIN_NODE = "art:min/@art:value"; | 54 public static final String XPATH_MIN_NODE = "art:min/@art:value"; |
55 | 55 |
56 /** The XPath that points to the max value of a range.*/ | 56 /** The XPath that points to the max value of a range.*/ |
57 public static final String XPATH_MAX_NODE = "art:max/@art:value"; | 57 public static final String XPATH_MAX_NODE = "art:max/@art:value"; |
58 | 58 |
59 /** The XPath that points to the default min value of a range.*/ | |
60 public static final String XPATH_DEF_MIN = "art:min/@art:default"; | |
61 | |
62 /** The XPath that points to the default max value of a range.*/ | |
63 public static final String XPATH_DEF_MAX = "art:max/@art:default"; | |
64 | |
59 /** The XPath to a label in the artifact's DESCRIBE document. */ | 65 /** The XPath to a label in the artifact's DESCRIBE document. */ |
60 public static final String XPATH_LABEL = "art:label/text()"; | 66 public static final String XPATH_LABEL = "art:label/text()"; |
61 | 67 |
62 /** The XPath to a value in the artifact's DESCRIBE document. */ | 68 /** The XPath to a value in the artifact's DESCRIBE document. */ |
63 public static final String XPATH_VALUE = "art:value/text()"; | 69 public static final String XPATH_VALUE = "art:value/text()"; |
830 parent, | 836 parent, |
831 XPATH_MAX_NODE, | 837 XPATH_MAX_NODE, |
832 XPathConstants.STRING, | 838 XPathConstants.STRING, |
833 ArtifactNamespaceContext.INSTANCE); | 839 ArtifactNamespaceContext.INSTANCE); |
834 } | 840 } |
841 | |
842 | |
843 public static String getDefMin(Node parent) { | |
844 return (String) XMLUtils.xpath( | |
845 parent, | |
846 XPATH_DEF_MIN, | |
847 XPathConstants.STRING, | |
848 ArtifactNamespaceContext.INSTANCE); | |
849 } | |
850 | |
851 | |
852 public static String getDefMax(Node parent) { | |
853 return (String) XMLUtils.xpath( | |
854 parent, | |
855 XPATH_DEF_MAX, | |
856 XPathConstants.STRING, | |
857 ArtifactNamespaceContext.INSTANCE); | |
858 } | |
835 } | 859 } |
836 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : | 860 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |