anl.aida.client.net
Class DefaultCGEdge

java.lang.Object
  extended by anl.aida.client.net.DefaultCGEdge
All Implemented Interfaces:
DocumentContainer, CGEdge

public class DefaultCGEdge
extends java.lang.Object
implements CGEdge

Default implementation of CGEdge.


Field Summary
private  java.util.Set<anl.aida.core.DocumentID> docs
           
private  java.lang.String label
           
 
Constructor Summary
DefaultCGEdge(java.lang.String label, java.util.Set<anl.aida.core.DocumentID> docs)
           
 
Method Summary
 java.lang.Iterable<anl.aida.core.DocumentID> documents()
          Gets an iterable over the docs associated with this edge.
 int getDocumentCount()
          Gets the number of documents associated with this edge.
 void getDocuments(java.util.Collection<anl.aida.core.DocumentID> docs)
          Gets the documents contained by this container and puts them in the specified collection.
 java.lang.String getLabel()
          Gets a label for this edge.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

label

private java.lang.String label

docs

private java.util.Set<anl.aida.core.DocumentID> docs
Constructor Detail

DefaultCGEdge

public DefaultCGEdge(java.lang.String label,
                     java.util.Set<anl.aida.core.DocumentID> docs)
Method Detail

documents

public java.lang.Iterable<anl.aida.core.DocumentID> documents()
Gets an iterable over the docs associated with this edge.

Specified by:
documents in interface DocumentContainer
Specified by:
documents in interface CGEdge
Returns:
an iterable over the docs associated with this edge.

getDocumentCount

public int getDocumentCount()
Gets the number of documents associated with this edge.

Specified by:
getDocumentCount in interface DocumentContainer
Specified by:
getDocumentCount in interface CGEdge
Returns:
the number of documents associated with this edge.

getDocuments

public void getDocuments(java.util.Collection<anl.aida.core.DocumentID> docs)
Gets the documents contained by this container and puts them in the specified collection.

Specified by:
getDocuments in interface DocumentContainer
Parameters:
docs - the collection to add the documents to

getLabel

public java.lang.String getLabel()
Gets a label for this edge.

Specified by:
getLabel in interface CGEdge
Returns:
a label for this edge.