fleXplorer.MaterializedFacetedTaxonomies
Class MFT_MEM

java.lang.Object
  extended by fleXplorer.MaterializedFacetedTaxonomies.MFT
      extended by fleXplorer.MaterializedFacetedTaxonomies.MFT_MEM
All Implemented Interfaces:
java.io.Serializable

public class MFT_MEM
extends MFT
implements java.io.Serializable

See Also:
Serialized Form

Constructor Summary
MFT_MEM()
          Constructs a Materialized Faceted taxonomy.
MFT_MEM(java.lang.String name, Counters computationOfZP, ObjectFacet of)
          Constructs a Materialized Faceted Taxonomy with the specified name and option for computation of zoom-in points.
MFT_MEM(java.lang.String name, FT ft, Counters computationOfZP, ObjectFacet of)
          Constructs a Materialized Faceted Taxonomy with specified name and Faceted Taxonomy.
 
Method Summary
 void computeLegalIds()
          Computes the legal ids according the focus.
 void cumputeZoomInPoints()
          Compute the new zoom-in points according the focus.
static MFT_MEM read(java.io.File file)
          Reads and returns the materialized faceted taxonomy of the specific file
 boolean setFocus(java.util.HashSet<java.lang.Integer> objIds)
          Defines the focus with respect to the objects.
 java.lang.String setFocus(java.lang.String expr)
          Sets the focus.
 java.lang.String setFocus(java.lang.String facet, java.lang.String expr)
          Sets the focus for a specific facet.
 java.lang.String setFocusWithIds(java.lang.String facet, java.lang.String exprWithIds)
          Sets the focus for a specific facet, the expression contains the ids of the terms and not the names.
 java.lang.String setPaths(java.lang.String facet, java.lang.String exprWithIds)
          Gets the id of a term and returns the path.
static void write(MFT_MEM mft, java.io.File file)
          Writes the materialized faceted taxonomy to specific file.
 
Methods inherited from class fleXplorer.MaterializedFacetedTaxonomies.MFT
addObjectDescription, addObjectToFacet, addToLegalIds, changeFacetTaxonomy, getAllObjects, getAllObjects, getDescriptionOfFocus, getFacetDescription, getFacetDescriptionWithIds, getFT, getGeneralDescription, getGeneralDescriptionWithNames, getLegalIds, getMFTName, getNumOfLegalIdsOfTerm, getZoomInPoints, getZoomInPointsNoCount, getZoomSidePoints, isCountersEnabled, printDescriptions, printFacetedTree, printObjectsPerFacet, printZoomPoints, removeAllOtherIndexes, setCounters, setFT, setMFTName
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MFT_MEM

public MFT_MEM()
Constructs a Materialized Faceted taxonomy.
Preconditions: Always true.
Postconditions: Constructs a MFT object.


MFT_MEM

public MFT_MEM(java.lang.String name,
               Counters computationOfZP,
               ObjectFacet of)
Constructs a Materialized Faceted Taxonomy with the specified name and option for computation of zoom-in points.
Preconditions: Arguments must not be null.
Postconditions: Constructs a MFT object and defines MFT's name as the value of the argument and the parameter for computation of the zoom-in points.

Parameters:
name - the name of Materialized Faceted Taxonomy.
computationOfZP - defines if it will compute the counters of zoom-in points.
of - defines if the user can interact with the facet By Objects

MFT_MEM

public MFT_MEM(java.lang.String name,
               FT ft,
               Counters computationOfZP,
               ObjectFacet of)
Constructs a Materialized Faceted Taxonomy with specified name and Faceted Taxonomy.
Preconditions: Arguments must not be null.
Postconditions: Constructs a MFT object and defines the values of private variables and the parameter for computation of the zoom-in points.

Parameters:
name - the name of Materialized Faceted Taxonomy.
ft - the Faceted Taxonomy of Materialized Faceted Taxonomy.
computationOfZP - defines if it will compute the counters of zoom-in points.
of - defines if the user can interact with the facet By Objects
Method Detail

write

public static void write(MFT_MEM mft,
                         java.io.File file)
                  throws java.io.IOException
Writes the materialized faceted taxonomy to specific file.

Parameters:
mft - the materialized faceted taxonomy.
file - the file
Throws:
java.io.IOException

read

public static MFT_MEM read(java.io.File file)
                    throws java.io.IOException,
                           java.lang.ClassNotFoundException
Reads and returns the materialized faceted taxonomy of the specific file

Parameters:
file - the file
Returns:
the materialized faceted taxonomy of the specific file
Throws:
java.io.IOException
java.lang.ClassNotFoundException

computeLegalIds

public void computeLegalIds()
Computes the legal ids according the focus. Computes the ids of the documents that belong to the extension of the facet.


setFocus

public java.lang.String setFocus(java.lang.String expr)
Sets the focus. The focus must be in the following format: {Facet : term or term} AND {Facet : term}. Between facets must exist only the AND operator.

Parameters:
expr - the focus
Returns:
"OK" if the focus is set succefully; the boolean expression error otherwise.

setPaths

public java.lang.String setPaths(java.lang.String facet,
                                 java.lang.String exprWithIds)
Gets the id of a term and returns the path.

Parameters:
exprWithIds - the id of the term
Returns:
the path of the term.

setFocus

public boolean setFocus(java.util.HashSet<java.lang.Integer> objIds)
Defines the focus with respect to the objects.

Parameters:
objIds - The ids of the objects that belong to the focus.
Returns:
true if the focus is set succefully; false otherwise;

setFocus

public java.lang.String setFocus(java.lang.String facet,
                                 java.lang.String expr)
Sets the focus for a specific facet.

Parameters:
facet - the name of the facet
expr - the focus
Returns:
"OK" if the focus is set successfully, null if the expression is not valid for the specific facets or the specific boolean expression error that expresion has.

setFocusWithIds

public java.lang.String setFocusWithIds(java.lang.String facet,
                                        java.lang.String exprWithIds)
Sets the focus for a specific facet, the expression contains the ids of the terms and not the names.

Parameters:
facet - the name of the facet
exprWithIds - the focus
Returns:
"OK" if the focus is set successfully, null if the expression is not valid for the specific facets or the specific boolean expression error that expresion has.

cumputeZoomInPoints

public void cumputeZoomInPoints()
Compute the new zoom-in points according the focus.