org.apache.muse.ws.notification.topics.impl
Class SimpleTopicNamespace

java.lang.Object
  extended by org.apache.muse.ws.notification.topics.impl.SimpleTopicNamespace
All Implemented Interfaces:
XmlSerializable, TopicNamespace

public class SimpleTopicNamespace
extends Object
implements TopicNamespace

SimpleTopicNamespace is Muse's default implementation of the wsnt:TopicNamespace data structure defined in WS-Notification v1.3 and WS-Topics v1.3.

Author:
Dan Jemiolo (danj)

Constructor Summary
SimpleTopicNamespace(Element root)
           
SimpleTopicNamespace(String targetNamespace)
           
 
Method Summary
 void addTopic(Topic topic)
          Adds a root topic to the namespace.
 boolean equals(Object obj)
           
 String getName()
           
 Collection getRootTopics()
           
 String getTargetNamespace()
           
 Topic getTopic(String topicName)
           
 int hashCode()
           
 boolean hasTopic(String topicName)
           
 void removeTopic(String topicName)
           
 void setName(String name)
           
 String toString()
           
 Element toXML()
          Converts this object into an XML representation, as defined by its related schema or specification.
 Element toXML(Document doc)
          Converts this object into an XML representation, as defined by its related schema or specification.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SimpleTopicNamespace

public SimpleTopicNamespace(Element root)
                     throws BaseFault
Throws:
BaseFault

SimpleTopicNamespace

public SimpleTopicNamespace(String targetNamespace)
Method Detail

addTopic

public final void addTopic(Topic topic)
                    throws BaseFault
Description copied from interface: TopicNamespace
Adds a root topic to the namespace.

Specified by:
addTopic in interface TopicNamespace
Throws:
BaseFault

equals

public boolean equals(Object obj)
Overrides:
equals in class Object
Returns:
True if the two topic namespaces have the same target namespace.

getName

public final String getName()
Specified by:
getName in interface TopicNamespace
Returns:
The local name of the topic namespace.

getRootTopics

public final Collection getRootTopics()
Specified by:
getRootTopics in interface TopicNamespace
Returns:
All of the topics in the namespace that don't have a parent topic.

getTargetNamespace

public final String getTargetNamespace()
Specified by:
getTargetNamespace in interface TopicNamespace
Returns:
The namespace URI that represents the topic namespace.

getTopic

public final Topic getTopic(String topicName)
Specified by:
getTopic in interface TopicNamespace
Returns:
The root topic with the given name, or null if no such topic exists.

hashCode

public int hashCode()
Overrides:
hashCode in class Object
Returns:
A hash code based on the same values used for testing equality.
See Also:
equals(Object)

hasTopic

public final boolean hasTopic(String topicName)
Specified by:
hasTopic in interface TopicNamespace
Returns:
True if the namespace has a topic with the given name.

removeTopic

public final void removeTopic(String topicName)
Specified by:
removeTopic in interface TopicNamespace

setName

public final void setName(String name)
Specified by:
setName in interface TopicNamespace

toString

public String toString()
Overrides:
toString in class Object

toXML

public Element toXML()
Description copied from interface: XmlSerializable
Converts this object into an XML representation, as defined by its related schema or specification. The format of the XML is dependent on the concrete type.

Specified by:
toXML in interface XmlSerializable
Returns:
An XML representation of this object.

toXML

public Element toXML(Document doc)
Description copied from interface: XmlSerializable
Converts this object into an XML representation, as defined by its related schema or specification. The format of the XML is dependent on the concrete type.

Specified by:
toXML in interface XmlSerializable
Parameters:
doc - The DOM Document that will be used to create all of the nodes in the resulting XML fragment.
Returns:
An XML representation of this object.


Copyright © 2005-2011 Apache Web Services - Muse. All Rights Reserved.