net.firstpartners.rp.back.struct
Class DocumStruct

java.lang.Object
  extended by net.firstpartners.rp.back.struct.DocumStruct

public class DocumStruct
extends java.lang.Object

Document structure

Version:
1.1
Author:
Firstpartners.net

Field Summary
(package private)  java.lang.String author
          Document author - OPTIONAL VALUE
(package private)  double calcScore
          Document calculated score
(package private)  java.lang.String categoryLocation
          Document category location
(package private)  java.lang.String categoryName
          Document category name
(package private)  double categoryScore
          Document category score
(package private)  NodeStruct content
          Document structure as tree structure
(package private)  java.lang.String creationDate
          Document creation
 double DEFAULT_SCORE_VALUE
          Default score value
(package private)  java.lang.String description
          Document summary
(package private)  double directScore
          Document direct score
static java.lang.String FIELD_CALCSCORE
          Calculated score field for index document
static java.lang.String FIELD_CATEGORY_LOCATION
          Category location field for index document
static java.lang.String FIELD_CATEGORY_NAME
          Category field for index document
static java.lang.String FIELD_CATEGORY_SCORE
          Category score field for index document
static java.lang.String FIELD_CONTENT
          Content field (content) for index document
static java.lang.String FIELD_DESCRIPTION
          Description field for index document
static java.lang.String FIELD_DIRECTSCORE
          Direct score field for index document
static java.lang.String FIELD_DOCUMENTID
          Document id field for index document
static java.lang.String FIELD_KEYWORDID
          Keyword field (id) for index document
static java.lang.String FIELD_LASTUPDATE
          Last update field for index document
static java.lang.String FIELD_PATH
          Path field for index document
static java.lang.String FIELD_SORT_SCORE
          General sorting score = calc_score*category_score
static java.lang.String FIELD_TITLE
          Title field for index document
(package private)  java.lang.String id
          Document id (unique id upon the information from the content)
(package private)  java.lang.String lastUpdate
          Document last update
protected  org.apache.log4j.Logger logger
          Logger for this class and subclasses
(package private)  java.lang.String path
          Document path as uri location
static java.lang.String SPACE
           
(package private)  java.lang.String title
          Document title
 
Constructor Summary
DocumStruct()
          Create an empty document structure
 
Method Summary
 void addContentTuple(java.lang.String keyword, java.lang.String value)
          Add the specified tuple value to the keyword/value
 java.lang.String getAuthor()
           
 double getCalcScore()
           
 java.lang.String getCategoryLocation()
           
 java.lang.String getCategoryName()
           
 double getCategoryScore()
           
 NodeStruct getContent()
           
private  java.lang.String getContentAsString(NodeStruct root)
          Retrun the content as string
 java.lang.String getCreationDate()
           
 java.lang.String getDescription()
           
 double getDirectScore()
           
private  long getDocumentMessageID(NodeStruct root)
          Generate the id of the node content
 java.lang.String getId()
           
 org.apache.lucene.document.Document getIndexDocument()
          Get the index document for the actual values
 java.lang.String getLastUpdate()
           
 java.lang.String getPath()
           
 java.lang.String getTitle()
           
 void setAuthor(java.lang.String author)
           
 void setCalcScore(double calcScore)
           
 void setCategoryLocation(java.lang.String categoryLocation)
           
 void setCategoryName(java.lang.String categoryName)
           
 void setCategoryScore(double categoryScore)
           
 void setContent(NodeStruct content)
           
 void setCreationDate(java.lang.String creationDate)
           
 void setDescription(java.lang.String description)
           
 void setDirectScore(float directScore)
           
 void setId(java.lang.String id)
           
 void setLastUpdate(java.lang.String lastupdate)
           
 void setPath(java.lang.String path)
           
 void setTitle(java.lang.String title)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected final org.apache.log4j.Logger logger
Logger for this class and subclasses


SPACE

public static final java.lang.String SPACE
See Also:
Constant Field Values

DEFAULT_SCORE_VALUE

public double DEFAULT_SCORE_VALUE
Default score value


FIELD_TITLE

public static final java.lang.String FIELD_TITLE
Title field for index document

See Also:
Constant Field Values

FIELD_PATH

public static final java.lang.String FIELD_PATH
Path field for index document

See Also:
Constant Field Values

FIELD_DESCRIPTION

public static final java.lang.String FIELD_DESCRIPTION
Description field for index document

See Also:
Constant Field Values

FIELD_LASTUPDATE

public static final java.lang.String FIELD_LASTUPDATE
Last update field for index document

See Also:
Constant Field Values

FIELD_DOCUMENTID

public static final java.lang.String FIELD_DOCUMENTID
Document id field for index document

See Also:
Constant Field Values

FIELD_DIRECTSCORE

public static final java.lang.String FIELD_DIRECTSCORE
Direct score field for index document

See Also:
Constant Field Values

FIELD_CALCSCORE

public static final java.lang.String FIELD_CALCSCORE
Calculated score field for index document

See Also:
Constant Field Values

FIELD_SORT_SCORE

public static final java.lang.String FIELD_SORT_SCORE
General sorting score = calc_score*category_score

See Also:
Constant Field Values

FIELD_KEYWORDID

public static final java.lang.String FIELD_KEYWORDID
Keyword field (id) for index document

See Also:
Constant Field Values

FIELD_CONTENT

public static final java.lang.String FIELD_CONTENT
Content field (content) for index document

See Also:
Constant Field Values

FIELD_CATEGORY_NAME

public static final java.lang.String FIELD_CATEGORY_NAME
Category field for index document

See Also:
Constant Field Values

FIELD_CATEGORY_SCORE

public static final java.lang.String FIELD_CATEGORY_SCORE
Category score field for index document

See Also:
Constant Field Values

FIELD_CATEGORY_LOCATION

public static final java.lang.String FIELD_CATEGORY_LOCATION
Category location field for index document

See Also:
Constant Field Values

title

java.lang.String title
Document title


path

java.lang.String path
Document path as uri location


description

java.lang.String description
Document summary


lastUpdate

java.lang.String lastUpdate
Document last update


content

NodeStruct content
Document structure as tree structure


author

java.lang.String author
Document author - OPTIONAL VALUE


creationDate

java.lang.String creationDate
Document creation


id

java.lang.String id
Document id (unique id upon the information from the content)


directScore

double directScore
Document direct score


calcScore

double calcScore
Document calculated score


categoryName

java.lang.String categoryName
Document category name


categoryScore

double categoryScore
Document category score


categoryLocation

java.lang.String categoryLocation
Document category location

Constructor Detail

DocumStruct

public DocumStruct()
Create an empty document structure

Method Detail

getIndexDocument

public org.apache.lucene.document.Document getIndexDocument()
Get the index document for the actual values

Returns:
Index document (lucene document) upon the current values

getId

public java.lang.String getId()
Returns:
Returns the id.

getContentAsString

private java.lang.String getContentAsString(NodeStruct root)
Retrun the content as string

Parameters:
root - The content node
Returns:
The content node as string

getDocumentMessageID

private long getDocumentMessageID(NodeStruct root)
Generate the id of the node content

Parameters:
node - Content node
Returns:
A string representing the unique id

addContentTuple

public void addContentTuple(java.lang.String keyword,
                            java.lang.String value)
Add the specified tuple value to the keyword/value

Parameters:
keyword - Keyword to be added
value - Value to be added

getAuthor

public java.lang.String getAuthor()
Returns:
Returns the author.

setAuthor

public void setAuthor(java.lang.String author)
Parameters:
author - The author to set.

getContent

public NodeStruct getContent()
Returns:
Returns the content.

setContent

public void setContent(NodeStruct content)
Parameters:
content - The content to set.

getCreationDate

public java.lang.String getCreationDate()
Returns:
Returns the creationDate.

setCreationDate

public void setCreationDate(java.lang.String creationDate)
Parameters:
creationDate - The creationDate to set.

getDescription

public java.lang.String getDescription()
Returns:
Returns the description.

setDescription

public void setDescription(java.lang.String description)
Parameters:
description - The description to set.

getLastUpdate

public java.lang.String getLastUpdate()
Returns:
Returns the lastUpdate.

setLastUpdate

public void setLastUpdate(java.lang.String lastupdate)
Parameters:
lastupdate - The lastupdate of document to set

getPath

public java.lang.String getPath()
Returns:
Returns the path.

setPath

public void setPath(java.lang.String path)
Parameters:
path - The path to set.

getTitle

public java.lang.String getTitle()
Returns:
Returns the title.

setTitle

public void setTitle(java.lang.String title)
Parameters:
title - The title to set.

getCategoryLocation

public java.lang.String getCategoryLocation()
Returns:
Returns the category location.

setCategoryLocation

public void setCategoryLocation(java.lang.String categoryLocation)
Parameters:
categoryLocation - The category lcoation to set.

getCategoryName

public java.lang.String getCategoryName()
Returns:
Returns the category name

setCategoryName

public void setCategoryName(java.lang.String categoryName)
Parameters:
categoryName - The category name to set

getCalcScore

public double getCalcScore()
Returns:
Returns the calcScore.

setCalcScore

public void setCalcScore(double calcScore)
Parameters:
calcScore - The calcScore to set.

getCategoryScore

public double getCategoryScore()
Returns:
Returns the categoryScore.

setCategoryScore

public void setCategoryScore(double categoryScore)
Parameters:
categoryScore - The categoryScore to set.

setId

public void setId(java.lang.String id)
Parameters:
id - The id to set.

setDirectScore

public void setDirectScore(float directScore)
Parameters:
directScore - The directScore to set.

getDirectScore

public double getDirectScore()
Returns:
Returns the directScore.