@@ -37,10 +37,12 @@ abstract class MetaData extends Iterable[MetaData] {
37
37
next.append(copy(m))
38
38
39
39
/**
40
- * @param s ...
41
- * @return ...
40
+ * Gets value of unqualified (unprefixed) attribute with given key, null if not found
41
+ *
42
+ * @param key
43
+ * @return value as Seq[Node] if key is found, null otherwise
42
44
*/
43
- def apply (s : String ): Seq [Node ]
45
+ def apply (key : String ): Seq [Node ]
44
46
45
47
/** convenience method, same as <code>apply(namespace, owner.scope, key)</code>.
46
48
*
@@ -52,6 +54,14 @@ abstract class MetaData extends Iterable[MetaData] {
52
54
final def apply (namespace : String , owner : Node , key : String ): Seq [Node ] =
53
55
apply(namespace, owner.scope, key)
54
56
57
+ /**
58
+ * Gets value of prefixed attribute with given key and namespace, null if not found
59
+ *
60
+ * @param uri namespace of key
61
+ * @param scp a namespace scp (usually of the element owning this attribute list)
62
+ * @param key to be looked fore
63
+ * @return value as Seq[Node] if key is found, null otherwise
64
+ */
55
65
def apply (uri: String , scp: NamespaceBinding , k: String ): Seq [Node ]
56
66
57
67
/**
@@ -122,25 +132,30 @@ abstract class MetaData extends Iterable[MetaData] {
122
132
/** returns Null or the next MetaData item */
123
133
def next : MetaData
124
134
125
- /** gets value of unqualified (unprefixed) attribute with given key */
135
+ /**
136
+ * Gets value of unqualified (unprefixed) attribute with given key, None if not found
137
+ *
138
+ * @param key
139
+ * @return value in Some(Seq[Node]) if key is found, None otherwise
140
+ */
126
141
final def get (key : String ): Option [Seq [Node ]] = apply(key) match {
127
142
case null => None
128
143
case x => Some (x)
129
144
}
130
145
131
- /** same as get(namespace, owner.scope, key) */
132
- final def get (namespace : String , owner : Node , key : String ): Option [Seq [Node ]] =
133
- get(namespace, owner.scope, key)
146
+ /** same as get(uri, owner.scope, key) */
147
+ final def get (uri : String , owner : Node , key : String ): Option [Seq [Node ]] =
148
+ get(uri, owner.scope, key)
149
+
134
150
135
151
/** gets value of qualified (prefixed) attribute with given key.
136
- *
137
- * @param namespace ...
138
- * @param scope ...
139
- * @param key ...
140
- * @return <code>Some(x)</code> iff ...
152
+ * @param uri namespace of key
153
+ * @param scope a namespace scp (usually of the element owning this attribute list)
154
+ * @param key to be looked fore
155
+ * @return value as Some[Seq[Node]] if key is found, None otherwise
141
156
*/
142
- final def get (namespace : String , scope : NamespaceBinding , key : String ): Option [Seq [Node ]] =
143
- apply(namespace , scope, key) match {
157
+ final def get (uri : String , scope : NamespaceBinding , key : String ): Option [Seq [Node ]] =
158
+ apply(uri , scope, key) match {
144
159
case null => None
145
160
case x => Some (x)
146
161
}
0 commit comments