disciple.core
Class Repository

java.lang.Object
  |
  +--disciple.core.Repository
All Implemented Interfaces:
Service
Direct Known Subclasses:
DefaultRepository

public abstract class Repository
extends java.lang.Object
implements Service

Copyright (c) 2002 Rutgers, The State University of New Jersey


Field Summary
protected  Controller controller_
           
 
Constructor Summary
Repository()
           
 
Method Summary
 void addAttributeListener(AttributeListener listener)
          Adds an attributer listener to listen for changes to all attributes of all nodes.
 void addAttributeListener(org.w3c.dom.Element model, AttributeListener listener)
           
 void addDocumentListener(DocumentListener listener)
           
 void addElementListener(ElementListener listener)
           
 void addNode(Path path, org.w3c.dom.Node node)
           
 Controller getController()
           
 org.w3c.dom.Document getDocument(java.lang.String name)
           
 org.w3c.dom.Node getNode(Path path)
          Returns the element pointed by path
abstract  boolean isEmpty()
           
abstract  int numOfDocs()
           
 void removeAttribute(Path path, java.lang.String attribute)
          Removes an attribute from the element pointed by path
 void removeAttributeListener(AttributeListener listener)
           
 void removeAttributeListener(org.w3c.dom.Element model, AttributeListener listener)
           
 void removeDocument(java.lang.String name)
           
 void removeDocumentListener(DocumentListener listener)
           
 void removeElementListener(ElementListener listener)
           
 void removeNode(org.w3c.dom.Node node)
          Removes an element from the repository
 void setAttribute(Path path, java.lang.String attribute, java.lang.String value)
          Sets an attribute to the element pointed by path
 void setController(Controller controller)
           
 void setDocument(java.lang.String name, org.w3c.dom.Document document)
           
abstract  void setNodeValue(org.w3c.dom.Node node, java.lang.String value)
          Sets the node value of the given node
abstract  void setNodeValue(Path path, java.lang.String value)
          Sets the node value of the element pointed by path
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

controller_

protected Controller controller_
Constructor Detail

Repository

public Repository()
Since:
Disciple v3.0
Rose:
3D04D07D03AF
Method Detail

getDocument

public org.w3c.dom.Document getDocument(java.lang.String name)
Parameters:
name -
Returns:
Document
Rose:
3CF3F17B0143

setDocument

public void setDocument(java.lang.String name,
                        org.w3c.dom.Document document)
Parameters:
name -
document -
Rose:
3CF3F29B005C

removeDocument

public void removeDocument(java.lang.String name)
Parameters:
name -
Rose:
3CF4ED3300FD

addNode

public void addNode(Path path,
                    org.w3c.dom.Node node)

removeNode

public void removeNode(org.w3c.dom.Node node)
Removes an element from the repository


setAttribute

public void setAttribute(Path path,
                         java.lang.String attribute,
                         java.lang.String value)
Sets an attribute to the element pointed by path

Parameters:
path - - path pointing to the element
attribute - - name of the attribute
value - - value of the attribute

removeAttribute

public void removeAttribute(Path path,
                            java.lang.String attribute)
Removes an attribute from the element pointed by path

Parameters:
path - - path pointing to the element
attribute - - attribute to be removed

setNodeValue

public abstract void setNodeValue(Path path,
                                  java.lang.String value)
Sets the node value of the element pointed by path

Parameters:
path - - path pointing to the element
value - - value of the node

setNodeValue

public abstract void setNodeValue(org.w3c.dom.Node node,
                                  java.lang.String value)
Sets the node value of the given node

Parameters:
node - the node
value - - value of the node

getNode

public org.w3c.dom.Node getNode(Path path)
Returns the element pointed by path

Parameters:
path - - path of the element
Returns:
Element pointed by path

addDocumentListener

public void addDocumentListener(DocumentListener listener)
Parameters:
listener -
Rose:
3CF4FAA400FB

addElementListener

public void addElementListener(ElementListener listener)
Parameters:
listener -
Rose:
3CF4FABC0145

addAttributeListener

public void addAttributeListener(AttributeListener listener)
Adds an attributer listener to listen for changes to all attributes of all nodes.

Parameters:
listener - the listener object

addAttributeListener

public void addAttributeListener(org.w3c.dom.Element model,
                                 AttributeListener listener)
Parameters:
model -
listener -
Rose:
3CF4FACD03A2

removeDocumentListener

public void removeDocumentListener(DocumentListener listener)
Parameters:
listener -
Rose:
3CF4FAEC02FD

removeElementListener

public void removeElementListener(ElementListener listener)
Parameters:
listener -
Rose:
3CF4FAFA01BC

removeAttributeListener

public void removeAttributeListener(AttributeListener listener)
Parameters:
listener -

removeAttributeListener

public void removeAttributeListener(org.w3c.dom.Element model,
                                    AttributeListener listener)
Parameters:
listener -
Rose:
3CF4FB060138

isEmpty

public abstract boolean isEmpty()
Returns:
true if this repository is empty; false otherwise.

numOfDocs

public abstract int numOfDocs()

getController

public Controller getController()
Specified by:
getController in interface Service
Returns:
Controller the controller
Since:
Disciple v3.0

setController

public void setController(Controller controller)
Specified by:
setController in interface Service
Parameters:
controller -
Since:
Disciple v3.0


Copyright (c) 2003 Rutgers, The State University of New Jersey