|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--edu.UCL.xmiddle.host.XPathLinkTable
XPathLinkTable.java
A linktable implemented using hashtables, vectors and a lot of
sweat! It basically uses three hashtables (with the application ID
of the local application as key) to represent the exports, linked
From and linkedBy tables.
The hashtables hold Vectors of LinkTableItem.
Created: Mon Jul 30 14:07:09 2001
| Constructor Summary | |
XPathLinkTable()
Constructs a new XPathLinkTable for the local host |
|
XPathLinkTable(boolean local)
Constructs a new LinkTable |
|
XPathLinkTable(java.lang.String links)
Constructs a new XPathLinkTable with the given data |
|
XPathLinkTable(java.lang.String links,
boolean local)
Constructs a new XPathLinkTable with the given data |
|
| Method Summary | |
void |
addExport(org.w3c.dom.Element element,
java.lang.Integer appID)
Adds a new export. |
void |
addExport(java.lang.String path,
java.lang.Integer appID)
Adds a new export. |
void |
addLinkedBy(java.lang.Object primaryID,
org.w3c.dom.Element element,
java.lang.Integer localAppID)
Adds a new entry to the link table to signify that a given element was linked by a given host |
void |
addLinkedBy(java.lang.Object primaryID,
java.lang.String path,
java.lang.Integer localAppID)
Adds a new entry to the link table to signify that a given element was linked by a given host |
void |
addLinkedFrom(java.lang.Object primaryID,
java.lang.String src,
org.w3c.dom.Element dest,
java.lang.Integer remoteAppID,
java.lang.Integer localAppID)
Signifies that the local host has linked an element from a remote host, and adds that to the linktable. |
void |
addLinkedFrom(java.lang.Object primaryID,
java.lang.String src,
java.lang.String dest,
java.lang.Integer remoteAppID,
java.lang.Integer localAppID)
Signifies that the local host has linked an element from a remote host, and adds that to the linktable. |
java.util.Enumeration |
getExportsList()
Returns the exports |
java.util.Enumeration |
getLinkedByHostList(java.lang.Object primaryID)
Returns data on all elements linked by the given host. |
java.util.Enumeration |
getLinkedByList()
Returns the linked by table |
java.util.Enumeration |
getLinkedFromHostList(java.lang.Object primaryID)
Returns data on all elements linked from the given host. |
java.util.Enumeration |
getLinkedFromList()
Returns the linked From table |
java.lang.String |
getLinkTableMessage()
Returns an XML representation of the linktable message |
boolean |
isExported(org.w3c.dom.Element element,
java.lang.Integer appID)
Determines whether the given element is exported |
boolean |
isExported(java.lang.String path,
java.lang.Integer appID)
Determines whether the given element is exported |
boolean |
isLinkedBy(org.w3c.dom.Element element,
java.lang.Integer appID)
Determines whether the given element is linked by another host. |
boolean |
isLinkedBy(java.lang.Object primaryID,
org.w3c.dom.Element element,
java.lang.Integer appID)
Determines whether the given element is linked by a particular host. |
boolean |
isLinkedBy(java.lang.Object primaryID,
java.lang.String path,
java.lang.Integer appID)
Determines whether the given element is linked by a particular host. |
boolean |
isLinkedBy(java.lang.String path,
java.lang.Integer appID)
Determines whether the given element is linked by another host. |
boolean |
isLinkedFrom(org.w3c.dom.Element element,
java.lang.Integer appID)
Determines whether the given element is linked from another host. |
boolean |
isLinkedFrom(java.lang.Object primaryID,
org.w3c.dom.Element element,
java.lang.Integer appID)
Determines whether the given element is linked from a particular host. |
boolean |
isLinkedFrom(java.lang.Object primaryID,
java.lang.String path,
java.lang.Integer appID)
Determines whether the given element is linked from a particular host. |
boolean |
isLinkedFrom(java.lang.String path,
java.lang.Integer appID)
Determines whether the given element is linked from another host. |
boolean |
isShared(org.w3c.dom.Element element,
java.lang.Integer appID)
Determines whether the given element is shared with another host. |
boolean |
isShared(java.lang.String path,
java.lang.Integer appID)
Determines whether the given element is shared with another host. |
void |
removeExport(org.w3c.dom.Element element,
java.lang.Integer appID)
Signifies that the local host has stopped exporting the given element |
void |
removeExport(java.lang.String path,
java.lang.Integer appID)
Signifies that the local host has stopped exporting the given element |
void |
removeLinkedBy(java.lang.Object primaryID,
org.w3c.dom.Element element,
java.lang.Integer localAppID)
Signifies that the given element is not linked from the given host, and removes any such references from the linktable |
void |
removeLinkedBy(java.lang.Object primaryID,
java.lang.String path,
java.lang.Integer localAppID)
Signifies that the given element is not linked from the given host, and removes any such references from the linktable |
void |
removeLinkedFrom(org.w3c.dom.Element element,
java.lang.Integer appID)
Signifies that the given element is not linked from any other host, and removes any such references from the linktable |
void |
removeLinkedFrom(java.lang.String path,
java.lang.Integer appID)
Signifies that the given element is not linked from any other host, and removes any such references from the linktable |
void |
setLinks(java.lang.Object links)
Parses an XML string containing the linktable (of a remote host) |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public XPathLinkTable()
public XPathLinkTable(java.lang.String links)
links - The XPathLinkTable in XML formatpublic XPathLinkTable(boolean local)
local - If true, then the link table is destined for the
local host.
public XPathLinkTable(java.lang.String links,
boolean local)
links - The XPathLinkTable in XML formatlocal - if true, then the link table is destine for the local host| Method Detail |
public java.lang.String getLinkTableMessage()
getLinkTableMessage in interface LinkTableString value
public boolean isShared(java.lang.String path,
java.lang.Integer appID)
isShared in interface LinkTablepath - the element (as an XPath expression)appID - the ID of the application under the tree of which this element
resides
public boolean isShared(org.w3c.dom.Element element,
java.lang.Integer appID)
isShared in interface LinkTableelement - the elementappID - the ID of the application under the tree of which this element
resides
public boolean isLinkedFrom(java.lang.String path,
java.lang.Integer appID)
isLinkedFrom in interface LinkTablepath - The element (encoded as an XPath expression)appID - The ID of the application under the tree of which
this element resides.
public boolean isLinkedFrom(org.w3c.dom.Element element,
java.lang.Integer appID)
isLinkedFrom in interface LinkTableelement - The elementappID - The ID of the application under the tree of which
this element resides.
public boolean isLinkedFrom(java.lang.Object primaryID,
java.lang.String path,
java.lang.Integer appID)
isLinkedFrom in interface LinkTableprimaryID - the primary ID of the remote hostpath - The element (encoded as an XPath expression)appID - The ID of the application under the tree of which
this element resides.
public boolean isLinkedFrom(java.lang.Object primaryID,
org.w3c.dom.Element element,
java.lang.Integer appID)
isLinkedFrom in interface LinkTableprimaryID - the primary ID of the remote hostelement - The elementappID - The ID of the application under the tree of which
this element resides.
public boolean isExported(java.lang.String path,
java.lang.Integer appID)
isExported in interface LinkTablepath - the element encoded as an XPath expressionappID - the id of the application under the tree of which
this element resides
public boolean isExported(org.w3c.dom.Element element,
java.lang.Integer appID)
isExported in interface LinkTableelement - the elementappID - the id of the application under the tree of which
this element resides
public boolean isLinkedBy(java.lang.Object primaryID,
java.lang.String path,
java.lang.Integer appID)
isLinkedBy in interface LinkTableprimaryID - the primary ID of the remote hostpath - The element encoded as an XPath expressionappID - The ID of the application under the tree of which
this element resides.
public boolean isLinkedBy(java.lang.Object primaryID,
org.w3c.dom.Element element,
java.lang.Integer appID)
isLinkedBy in interface LinkTableprimaryID - the primary ID of the remote hostelement - The elementappID - The ID of the application under the tree of which
this element resides.
public boolean isLinkedBy(java.lang.String path,
java.lang.Integer appID)
isLinkedBy in interface LinkTablepath - element (encoded as an XPath expression)appID - The ID of the application under the tree of which
this element resides.
public boolean isLinkedBy(org.w3c.dom.Element element,
java.lang.Integer appID)
isLinkedBy in interface LinkTableelement - The elementappID - The ID of the application under the tree of which
this element resides.
public void addLinkedFrom(java.lang.Object primaryID,
java.lang.String src,
java.lang.String dest,
java.lang.Integer remoteAppID,
java.lang.Integer localAppID)
addLinkedFrom in interface LinkTableprimaryID - The primary ID of the remote hostsrc - The remote element which the local host linked from
(encoded as XPath)dest - The local element under which the linked element
was placed at (encoded as XPath)remoteAppID - The id of the remote application that
exported the elementlocalAppID - The id of the local application on the data
structure of which the remote element was linked
public void addLinkedFrom(java.lang.Object primaryID,
java.lang.String src,
org.w3c.dom.Element dest,
java.lang.Integer remoteAppID,
java.lang.Integer localAppID)
addLinkedFrom in interface LinkTableprimaryID - The primary ID of the remote hostsrc - The remote element which the local host linked from
(encoded as XPath)dest - The local element under which the linked element
was placedremoteAppID - The id of the remote application that
exported the elementlocalAppID - The id of the local application on the data
structure of which the remote element was linked
public void removeLinkedFrom(java.lang.String path,
java.lang.Integer appID)
path - The given element (encoded as XPath)appID - The ID of the application under which this element
resides
public void removeLinkedFrom(org.w3c.dom.Element element,
java.lang.Integer appID)
removeLinkedFrom in interface LinkTableelement - The given elementappID - The ID of the application under which this element
resides
public void addLinkedBy(java.lang.Object primaryID,
java.lang.String path,
java.lang.Integer localAppID)
addLinkedBy in interface LinkTableprimaryID - The primaryID of the remote hostpath - The element that was linked By the remote host
(encoded as XPath)localAppID - The ID of the application under the tree of
which the element that was linked by resides
public void addLinkedBy(java.lang.Object primaryID,
org.w3c.dom.Element element,
java.lang.Integer localAppID)
addLinkedBy in interface LinkTableprimaryID - The primaryID of the remote hostelement - The element that was linked By the remote hostlocalAppID - The ID of the application under the tree of
which the element that was linked by resides
public void removeLinkedBy(java.lang.Object primaryID,
java.lang.String path,
java.lang.Integer localAppID)
removeLinkedBy in interface LinkTableprimaryID - The primaryID of the remote hostpath - The given element (encoded as XPath)localAppID - The ID of the local application to which the
element belonged
public void removeLinkedBy(java.lang.Object primaryID,
org.w3c.dom.Element element,
java.lang.Integer localAppID)
removeLinkedBy in interface LinkTableprimaryID - The primaryID of the remote hostelement - The given elementlocalAppID - The ID of the local application to which the
element belonged
public void addExport(java.lang.String path,
java.lang.Integer appID)
addExport in interface LinkTablepath - The element to export (encoded as XPath)appID - The ID of the application under the tree of which
the element resides
public void addExport(org.w3c.dom.Element element,
java.lang.Integer appID)
addExport in interface LinkTableelement - The element to exportappID - The ID of the application under the tree of which
the element resides
public void removeExport(java.lang.String path,
java.lang.Integer appID)
removeExport in interface LinkTablepath - The element to stop exporting (Encoded as XPath)appID - The ID of the application under which the element resides
public void removeExport(org.w3c.dom.Element element,
java.lang.Integer appID)
removeExport in interface LinkTableappID - The ID of the application under which the element resideselement - The Elementpublic void setLinks(java.lang.Object links)
setLinks in interface LinkTablelinks - a String representation of the
XML-formated version of a linktable. Warning: this method
includes no checks. links must be formatted
exactly according to the guidelines of
getLinkTableMessage() above.public java.util.Enumeration getLinkedFromHostList(java.lang.Object primaryID)
getLinkedFromHostList in interface LinkTableprimaryID - The primaryID of the host to be checked.
LinkTableItems.
If no elements are linked, then null is returned.public java.util.Enumeration getLinkedByHostList(java.lang.Object primaryID)
getLinkedByHostList in interface LinkTableprimaryID - The primaryID of the host to be checked.
LinkTableItems.
If no elements are linked, or no linkedBy table is present,
then null is returnedpublic java.util.Enumeration getLinkedFromList()
getLinkedFromList in interface LinkTableLinkTableItem objects of type LINKED_FROMLinkTableItempublic java.util.Enumeration getLinkedByList()
getLinkedByList in interface LinkTableLinkTableItem objects of type LINKED_BYLinkTableItempublic java.util.Enumeration getExportsList()
getExportsList in interface LinkTableLinkTableItem objects of type EXPORTLinkTableItem
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||