graphServer.graph
Class RawDocument

java.lang.Object
  extended by graphServer.graph.RawDocument

public class RawDocument
extends java.lang.Object

RawDocument is created when a new document is published, it is given a key value as a way of indexing all documents that are published. The title of the document is not learned until it is a query hit so does not need to be passed in the constructor.

Version:
Date: 18/07/2011
Author:
Matthew Smith

Constructor Summary
RawDocument(java.lang.String community, java.lang.String document)
          Keys the document.
 
Method Summary
 java.lang.String getCommunity()
          Gets the community this document is in.
 java.lang.String getDocument()
          Gets the document's identifier String.
 int getKey()
          Gets the key value (index) of this Document
 java.lang.String getTitle()
          Gets the title of the document.
 void setTitle(java.lang.String title)
          Sets the title of the document.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RawDocument

public RawDocument(java.lang.String community,
                   java.lang.String document)
Keys the document.

Parameters:
community - the community this document resides in.
document - the document's identifier.
Method Detail

getKey

public int getKey()
Gets the key value (index) of this Document

Returns:
The key value of this document.

getCommunity

public java.lang.String getCommunity()
Gets the community this document is in.

Returns:
the community this document is in.

getDocument

public java.lang.String getDocument()
Gets the document's identifier String.

Returns:
the document's identifier.

setTitle

public void setTitle(java.lang.String title)
Sets the title of the document.

Parameters:
title - The title this document will be given.

getTitle

public java.lang.String getTitle()
Gets the title of the document.

Returns:
The title of the document ("unknown" if title has not been set)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object