fleXplorer.util.IndexesSetting
Class TXT

java.lang.Object
  extended by fleXplorer.util.IndexesSetting.Setting
      extended by fleXplorer.util.IndexesSetting.TXT

public class TXT
extends Setting


Constructor Summary
TXT(MFT mft)
          Constructs a new TXT object.
TXT(MFT mft, java.lang.String filePath)
          Constructs a new TXT object.
 
Method Summary
 int getFacetPosition(java.lang.String facet)
          Returns the position of the terms of a specified facet into the txt.
 java.lang.String getFilePath()
          Returns the path of the xml file.
 void setFacetPosition(java.lang.String facet, int position)
          Defines the column that the terms of a facet are written.
 void setFilePath(java.lang.String filePath)
          Sets the path of the xml file.
 boolean setIndexes()
          Adds to each term of a facet of the faceted taxonomy the ids of the documents that belongs to it.
 
Methods inherited from class fleXplorer.util.IndexesSetting.Setting
getFT, getLegalIds, setFT, setLegalIds
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TXT

public TXT(MFT mft)
Constructs a new TXT object.

Parameters:
mft - the materialized faceted taxonomy.

TXT

public TXT(MFT mft,
           java.lang.String filePath)
Constructs a new TXT object.

Parameters:
mft - the materialized faceted taxonomy.
filePath - the path of the txt file
Method Detail

setFilePath

public void setFilePath(java.lang.String filePath)
Sets the path of the xml file.

Parameters:
filePath - the path of the xml file.

getFilePath

public java.lang.String getFilePath()
Returns the path of the xml file.

Returns:
the path of the xml file.

setFacetPosition

public void setFacetPosition(java.lang.String facet,
                             int position)
Defines the column that the terms of a facet are written. Preconditions: The position must not be negative or zero.
Postconditions: Adds to the map of the positions of the facets the specified arguments.

Parameters:
facet - the name of the facet.
position - the column of the terms.

getFacetPosition

public int getFacetPosition(java.lang.String facet)
Returns the position of the terms of a specified facet into the txt. Preconditions: Should exist a facet with the specified name.
Postconditions: Checks if exists a facet with the specified name and returns the position from the HashMap.

Parameters:
facet - the name of the facet.
Returns:
the position of the terms of a specified facet into the txt.

setIndexes

public boolean setIndexes()
Adds to each term of a facet of the faceted taxonomy the ids of the documents that belongs to it. Preconditions: Always true.
Postconditions: Firstly checks if exists the specified terms and then adds to each term of a facet of the faceted taxonomy the ids of the documents that belongs to it.

Specified by:
setIndexes in class Setting
Returns:
true if the additions complete successfully; false otherwise.