org.opencms.staticexport
Class CmsLinkTable

java.lang.Object
  extended by org.opencms.staticexport.CmsLinkTable

public class CmsLinkTable
extends java.lang.Object

Maintains a table of links for an element of a CmsXmlPage.

Since:
6.0.0
Version:
$Revision: 1.17 $
Author:
Carsten Weinholz

Constructor Summary
CmsLinkTable()
          Creates a new CmsLinkTable.
 
Method Summary
 CmsLink addLink(CmsLink link)
          Adds a new link with a given internal name and internal flag to the link table.
 CmsLink addLink(CmsRelationType type, java.lang.String targetUri, boolean internal)
          Adds a new link to the link table.
 CmsLink getLink(java.lang.String name)
          Returns the CmsLink Entry for a given name.
 boolean isEmpty()
          Returns if the link table is empty.
 java.util.Iterator iterator()
          Returns an iterator over the links in the table.
 int size()
          Returns the size of this link table.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CmsLinkTable

public CmsLinkTable()
Creates a new CmsLinkTable.

Method Detail

addLink

public CmsLink addLink(CmsLink link)
Adds a new link with a given internal name and internal flag to the link table.

Parameters:
link - the CmsLink to add
Returns:
the new link entry

addLink

public CmsLink addLink(CmsRelationType type,
                       java.lang.String targetUri,
                       boolean internal)
Adds a new link to the link table.

Parameters:
type - type of the link
targetUri - link destination
internal - flag to indicate if the link is a local link
Returns:
the new link entry

getLink

public CmsLink getLink(java.lang.String name)
Returns the CmsLink Entry for a given name.

Parameters:
name - the internal name of the link
Returns:
the CmsLink entry

isEmpty

public boolean isEmpty()
Returns if the link table is empty.

Returns:
true if the link table is empty, false otherwise

iterator

public java.util.Iterator iterator()
Returns an iterator over the links in the table.

The objects iterated are of type CmsLink.

Returns:
a string iterator for internal link names

size

public int size()
Returns the size of this link table.

Returns:
the size of this link table