Mercurial > dive4elements > framework
comparison artifacts/src/main/java/de/intevation/artifacts/ArtifactNamespaceContext.java @ 301:b0a949d3fe09
Moved StringUtils to common package. Added some Override annotations.
artifacts/trunk@2394 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Fri, 22 Jul 2011 09:36:04 +0000 |
parents | a5e6d1923c95 |
children | c40729bfe06d |
comparison
equal
deleted
inserted
replaced
300:0035e2511342 | 301:b0a949d3fe09 |
---|---|
66 /** | 66 /** |
67 * @see javax.xml.namespace.NamespaceContext#getNamespaceURI(String) | 67 * @see javax.xml.namespace.NamespaceContext#getNamespaceURI(String) |
68 * @param prefix The prefix | 68 * @param prefix The prefix |
69 * @return The corresponing URI | 69 * @return The corresponing URI |
70 */ | 70 */ |
71 @Override | |
71 public String getNamespaceURI(String prefix) { | 72 public String getNamespaceURI(String prefix) { |
72 | 73 |
73 if (prefix == null) { | 74 if (prefix == null) { |
74 throw new IllegalArgumentException("Null prefix"); | 75 throw new IllegalArgumentException("Null prefix"); |
75 } | 76 } |
81 | 82 |
82 /** | 83 /** |
83 * @see javax.xml.namespace.NamespaceContext#getPrefix(String) | 84 * @see javax.xml.namespace.NamespaceContext#getPrefix(String) |
84 * @param uri The URI | 85 * @param uri The URI |
85 */ | 86 */ |
87 @Override | |
86 public String getPrefix(String uri) { | 88 public String getPrefix(String uri) { |
87 | 89 |
88 if (uri == null) { | 90 if (uri == null) { |
89 throw new IllegalArgumentException("Null uri"); | 91 throw new IllegalArgumentException("Null uri"); |
90 } | 92 } |
100 | 102 |
101 /** | 103 /** |
102 * @see javax.xml.namespace.NamespaceContext#getPrefixes(java.lang.String) | 104 * @see javax.xml.namespace.NamespaceContext#getPrefixes(java.lang.String) |
103 * @param uri The URI | 105 * @param uri The URI |
104 */ | 106 */ |
107 @Override | |
105 public Iterator getPrefixes(String uri) { | 108 public Iterator getPrefixes(String uri) { |
106 ArrayList<String> results = new ArrayList<String>(); | 109 ArrayList<String> results = new ArrayList<String>(); |
107 for (Map.Entry<String, String> entry: map.entrySet()) { | 110 for (Map.Entry<String, String> entry: map.entrySet()) { |
108 if (entry.getValue().equals(uri)) { | 111 if (entry.getValue().equals(uri)) { |
109 results.add(entry.getKey()); | 112 results.add(entry.getKey()); |