scala.xml

class MetaData

[source: scala/xml/MetaData.scala]

@serializable

abstract class MetaData
extends Collection[MetaData]

This class represents an attribute and at the same time a linked list of attributes. Every instance of this class is either an instance of UnprefixedAttribute key,value or an instance of PrefixedAttribute namespace_prefix,key,value or Null, the empty attribute list. Namespace URIs are obtained by using the namespace scope of the element owning this attribute (see getNamespace)

Copyright 2008 Google Inc. All Rights Reserved.
Author
Burak Emir
Direct Known Subclasses:
Null, PrefixedAttribute, UnprefixedAttribute

Method Summary
def append (updates : MetaData, scope : NamespaceBinding) : MetaData
updates this MetaData with the MetaData given as argument. All attributes that occur in updates are part of the resulting MetaData. If an attribute occurs in both this instance and updates, only the one in updates is part of the result (avoiding duplicates). For prefixed attributes, namespaces are resolved using the given scope.
def append (updates : MetaData) : MetaData
updates this MetaData with the MetaData given as argument. All attributes that occur in updates are part of the resulting MetaData. If an unprefixed attribute occurs in both this instance and updates, only the one in updates is part of the result (avoiding duplicates). However, for prefixed attributes no duplicate-detection is attempted, the method append(updates: MetaData, scope:NamespaceBinding) should be used instead.
abstract def apply (key : java.lang.String) : Seq[Node]
Gets value of unqualified (unprefixed) attribute with given key, null if not found
final def apply (namespace_uri : java.lang.String, owner : Node, key : java.lang.String) : Seq[Node]
convenience method, same as apply(namespace, owner.scope, key).
abstract def apply (namespace_uri : java.lang.String, scp : NamespaceBinding, k : java.lang.String) : Seq[Node]
Gets value of prefixed attribute with given key and namespace, null if not found
def containedIn1 (m : MetaData) : Boolean
abstract def copy (next : MetaData) : MetaData
returns a copy of this MetaData item with next field set to argument.
def elements : Iterator[MetaData]
returns an iterator on attributes
override def equals (that : Any) : Boolean
deep equals method
abstract def equals1 (that : MetaData) : Boolean
shallow equals method
override def filter (f : (MetaData) => Boolean) : MetaData
filters this sequence of meta data
final def get (uri : java.lang.String, scope : NamespaceBinding, key : java.lang.String) : Option[Seq[Node]]
gets value of qualified (prefixed) attribute with given key.
final def get (key : java.lang.String) : Option[Seq[Node]]
Gets value of unqualified (unprefixed) attribute with given key, None if not found
final def get (uri : java.lang.String, owner : Node, key : java.lang.String) : Option[Seq[Node]]
same as get(uri, owner.scope, key)
abstract def getNamespace (owner : Node) : java.lang.String
if owner is the element of this metadata item, returns namespace
def hasNext : Boolean
override abstract def hashCode : Int
Returns a hash code value for the object.
abstract def isPrefixed : Boolean
abstract def key : java.lang.String
returns key of this MetaData item
def length : Int
def length (i : Int) : Int
def map (f : (MetaData) => Text) : List[Text]
maps this sequence of meta data
abstract def next : MetaData
returns Null or the next MetaData item
abstract def remove (namespace : java.lang.String, scope : NamespaceBinding, key : java.lang.String) : MetaData
final def remove (namespace : java.lang.String, owner : Node, key : java.lang.String) : MetaData
abstract def remove (key : java.lang.String) : MetaData
def size : Int
Returns the number of elements in this collection.
override def toString : java.lang.String
Returns a string representation of the object.
def toString (sb : StringBuilder) : StringBuilder
abstract def toString1 (sb : StringBuilder) : Unit
def toString1 : java.lang.String
abstract def value : Seq[Node]
returns value of this MetaData item
abstract def wellformed (scope : NamespaceBinding) : Boolean
Methods inherited from Collection
toArray, stringPrefix
Methods inherited from Iterable
concat, ++, map, flatMap, partition, takeWhile, dropWhile, take, drop, foreach, forall, exists, find, findIndexOf, indexOf, foldLeft, foldRight, /:, :\, reduceLeft, reduceRight, copyToBuffer, sameElements, toList, toSeq, toStream, mkString, mkString, mkString, addString, addString, addString, copyToArray, isEmpty, projection, hasDefiniteSize
Methods inherited from AnyRef
getClass, clone, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized
Methods inherited from Any
==, !=, isInstanceOf, asInstanceOf
Method Details
def append(updates : MetaData) : MetaData
updates this MetaData with the MetaData given as argument. All attributes that occur in updates are part of the resulting MetaData. If an unprefixed attribute occurs in both this instance and updates, only the one in updates is part of the result (avoiding duplicates). However, for prefixed attributes no duplicate-detection is attempted, the method append(updates: MetaData, scope:NamespaceBinding) should be used instead.
Parameters
updates - MetaData with new attributes and updated attributes
Returns
a new MetaData instance that contains the combined attributes of this and updates

def append(updates : MetaData, scope : NamespaceBinding) : MetaData
updates this MetaData with the MetaData given as argument. All attributes that occur in updates are part of the resulting MetaData. If an attribute occurs in both this instance and updates, only the one in updates is part of the result (avoiding duplicates). For prefixed attributes, namespaces are resolved using the given scope.
Parameters
updates - MetaData with new and updated attributes
Returns
a new MetaData instance that contains old, new and updated attributes

abstract def apply(key : java.lang.String) : Seq[Node]
Gets value of unqualified (unprefixed) attribute with given key, null if not found
Parameters
key -
Returns
value as Seq[Node] if key is found, null otherwise

final def apply(namespace_uri : java.lang.String, owner : Node, key : java.lang.String) : Seq[Node]
convenience method, same as apply(namespace, owner.scope, key).
Parameters
namespace_uri - namespace uri of key
owner - the element owning this attribute list
key - the attribute key
Returns
...

abstract def apply(namespace_uri : java.lang.String, scp : NamespaceBinding, k : java.lang.String) : Seq[Node]
Gets value of prefixed attribute with given key and namespace, null if not found
Parameters
namespace_uri - namespace uri of key
scp - a namespace scp (usually of the element owning this attribute list)
key - to be looked fore
Returns
value as Seq[Node] if key is found, null otherwise

def containedIn1(m : MetaData) : Boolean
Parameters
m - ...
Returns
true iff ...

abstract def copy(next : MetaData) : MetaData
returns a copy of this MetaData item with next field set to argument.
Parameters
next - ...
Returns
...

abstract def getNamespace(owner : Node) : java.lang.String
if owner is the element of this metadata item, returns namespace

def hasNext : Boolean

def length : Int

def length(i : Int) : Int

abstract def isPrefixed : Boolean

override def equals(that : Any) : Boolean
deep equals method

def elements : Iterator[MetaData]
returns an iterator on attributes

def size : Int
Returns the number of elements in this collection.
Returns
number of collection elements.
Overrides
Collection.size

abstract def equals1(that : MetaData) : Boolean
shallow equals method

override def filter(f : (MetaData) => Boolean) : MetaData
filters this sequence of meta data

abstract def key : java.lang.String
returns key of this MetaData item

abstract def value : Seq[Node]
returns value of this MetaData item

def map(f : (MetaData) => Text) : List[Text]
maps this sequence of meta data

abstract def next : MetaData
returns Null or the next MetaData item

final def get(key : java.lang.String) : Option[Seq[Node]]
Gets value of unqualified (unprefixed) attribute with given key, None if not found
Parameters
key -
Returns
value in Some(Seq[Node]) if key is found, None otherwise

final def get(uri : java.lang.String, owner : Node, key : java.lang.String) : Option[Seq[Node]]
same as get(uri, owner.scope, key)

final def get(uri : java.lang.String, scope : NamespaceBinding, key : java.lang.String) : Option[Seq[Node]]
gets value of qualified (prefixed) attribute with given key.
Parameters
uri - namespace of key
scope - a namespace scp (usually of the element owning this attribute list)
key - to be looked fore
Returns
value as Some[Seq[Node]] if key is found, None otherwise

override abstract def hashCode : Int
Returns a hash code value for the object.

The default hashing algorithm is platform dependent. Note that it is allowed for two objects to have identical hash codes (o1.hashCode.equals(o2.hashCode)) yet not be equal (o1.equals(o2) returns false). A degenerate implementation could always return 0. However, it is required that if two objects are equal (o1.equals(o2) returns true) that they have identical hash codes (o1.hashCode.equals(o2.hashCode)). Therefore, when overriding this method, be sure to verify that the behavior is consistent with the equals method.

Returns
the hash code value for the object.


def toString1 : java.lang.String

abstract def toString1(sb : StringBuilder) : Unit

override def toString : java.lang.String
Returns a string representation of the object.

The default representation is platform dependent.

Returns
a string representation of the object.

Overrides
Collection.toString

def toString(sb : StringBuilder) : StringBuilder

abstract def wellformed(scope : NamespaceBinding) : Boolean
Parameters
scope - ...
Returns
true iff ...

abstract def remove(key : java.lang.String) : MetaData
Parameters
key - ...
Returns
...

abstract def remove(namespace : java.lang.String, scope : NamespaceBinding, key : java.lang.String) : MetaData
Parameters
namespace - ...
scope - ...
key - ...
Returns
...

final def remove(namespace : java.lang.String, owner : Node, key : java.lang.String) : MetaData
Parameters
namespace - ...
owner - ...
key - ...
Returns
...