story.dbcore.links
Class LinkLabelRepository

java.lang.Object
  extended by story.dbcore.links.LinkLabelRepository

public class LinkLabelRepository
extends java.lang.Object

LinkLabelRepository allows storage of and random access to LinkLabels in a single, unstructured pool.


Constructor Summary
LinkLabelRepository(Document parentDocument)
           
 
Method Summary
 void addLabel(LinkLabel label)
          Add a LinkLabel to the repository.
 boolean containsLabel(LinkLabelAddress address)
          Returns whether the label repository contains a label for a particular address.
 LinkLabel getLabel(LinkLabelAddress address)
          Retrieve a label from the repository.
 void removeLabel(LinkLabelAddress deadLabelAddress)
          Remove a LinkLabel from the repository.
 java.lang.StringBuffer renderLabel(LinkLabelAddress address)
          Render the link label.
 java.lang.StringBuffer renderLabelForHumans(LinkLabelAddress address)
          Renders a link label in a way that is non interpretable by the command interpeter, but is easier for humans to read.
 void validateLinkInstancings()
          Go through all the links to instancings and make sure this instancings still validate.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LinkLabelRepository

public LinkLabelRepository(Document parentDocument)
Method Detail

addLabel

public void addLabel(LinkLabel label)
              throws Scheherexception
Add a LinkLabel to the repository. It must already be branded with an address.

Throws:
Scheherexception

removeLabel

public void removeLabel(LinkLabelAddress deadLabelAddress)
                 throws Scheherexception
Remove a LinkLabel from the repository.

Parameters:
deadLabelAddress - The label to remove.
Throws:
Scheherexception

getLabel

public LinkLabel getLabel(LinkLabelAddress address)
                   throws Scheherexception
Retrieve a label from the repository.

Even though this is public, LinkLabels should only be passed around within db-core, and never revealed to calling applications or users. This is because they support write operations. Users who want to read or alter LinkLabels should go through the proper DBCoreInterface channel.

Throws:
Scheherexception

renderLabel

public java.lang.StringBuffer renderLabel(LinkLabelAddress address)
                                   throws Scheherexception
Render the link label.

Throws:
Scheherexception

renderLabelForHumans

public java.lang.StringBuffer renderLabelForHumans(LinkLabelAddress address)
                                            throws Scheherexception
Renders a link label in a way that is non interpretable by the command interpeter, but is easier for humans to read.

Throws:
Scheherexception

containsLabel

public boolean containsLabel(LinkLabelAddress address)
                      throws Scheherexception
Returns whether the label repository contains a label for a particular address.

Throws:
Scheherexception

validateLinkInstancings

public void validateLinkInstancings()
                             throws Scheherexception
Go through all the links to instancings and make sure this instancings still validate.

Throws:
Scheherexception


Copyright © 2011 David K. Elson. All Rights Reserved.