fleXplorer.MaterializedFacetedTaxonomies
Class MFT

java.lang.Object
  extended by fleXplorer.MaterializedFacetedTaxonomies.MFT
Direct Known Subclasses:
MFT_MEM

public abstract class MFT
extends java.lang.Object


Constructor Summary
MFT()
           
 
Method Summary
 void addObjectDescription(java.lang.String facet, int termId, int objId)
          Add to the description of an object a specific term.
 void addObjectToFacet(java.lang.String facet, int objId)
          Defines that exists a term which belongs to the specific facets which describe a specific object.
 void addToLegalIds(java.util.HashSet<java.lang.Integer> legalIds)
          Adds the ids of the argument to the list of the legal ids.
 void changeFacetTaxonomy(java.lang.String facetName, Taxonomy<?> tx)
          Changes the taxonomy of a specified Facet of the faceted taxonomy.
 java.util.HashSet<java.lang.Integer> getAllObjects()
          Returns the ids of all objects that belong to the materialized faceted taxonomy.
 java.util.HashSet<java.lang.Integer> getAllObjects(java.lang.String facetName)
          Returns the ids of the objects that are described by the terms of a specific facet.
 java.lang.String getDescriptionOfFocus()
          Returns the focus.
 java.lang.String getFacetDescription(java.lang.String facet)
          Returns the focus that a user has selected for a specific facet.
 java.lang.String getFacetDescriptionWithIds(java.lang.String facet)
          Returns the focus that a user has selected for a specific facet.
 FT getFT()
          Returns the Faceted Taxonomy that will be materialized in MFT.
 java.util.HashMap<java.lang.String,java.util.HashSet<java.lang.Integer>> getGeneralDescription(java.lang.Integer objId)
          Returns the description of the object with the specific id.
 java.util.HashMap<java.lang.String,java.util.HashSet<java.lang.String>> getGeneralDescriptionWithNames(java.lang.Integer objId)
          Returns the description of the object with the specific id.
 java.util.HashSet<java.lang.Integer> getLegalIds()
          Returns a HashSet with the legal ids of documents to be displayed.
 java.lang.String getMFTName()
          Returns the name of Materialized Faceted Taxonomy.
 int getNumOfLegalIdsOfTerm(java.lang.String facet, int termId)
          Returns the number of the legal ids of a specific term.
 java.util.HashMap<java.lang.String,Taxonomy<?>> getZoomInPoints()
          Returns a HashMap that describes a faceted tree which has been created according the focus that has been selected, including the zoom-in point counters.
 java.util.HashMap<java.lang.String,Taxonomy<?>> getZoomInPointsNoCount()
          Returns a HashMap that describes a faceted tree which has been created according the focus that has been selected.
 java.util.HashMap<java.lang.String,java.util.HashMap<Term<FacetsType>,java.lang.Integer>> getZoomSidePoints()
          Returns the zoom-side points.
 boolean isCountersEnabled()
          Returns true if the counter information is enabled.
 void printDescriptions()
          Prints the descriptions off all objects.
 void printFacetedTree(java.util.HashMap<java.lang.String,Taxonomy<?>> tmp)
          Print to console a faceted tree with the counters of zoom-in points.
 void printObjectsPerFacet()
          Prints the objects per facet.
 void printZoomPoints(java.util.HashMap<java.lang.String,java.util.HashMap<Term<FacetsType>,java.lang.Integer>> zoomSidePoints)
          Prints the zoom side points.
 void removeAllOtherIndexes(java.lang.String facetName, int termId)
          Removes from a facet all indexes from the terms of the Terminology except the indexes of the term with the specified id.
 void setCounters(Counters state)
          Defines if the counter information will be enabled.
 void setFT(FT ft)
          Defines the Faceted Taxonomy that will be materialized in MFT.
 void setMFTName(java.lang.String name)
          Defines the name of Materialized Faceted Taxonomy.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MFT

public MFT()
Method Detail

getGeneralDescription

public java.util.HashMap<java.lang.String,java.util.HashSet<java.lang.Integer>> getGeneralDescription(java.lang.Integer objId)
Returns the description of the object with the specific id.

Parameters:
objId - the id of the object
Returns:
a HashMap that contains the ids of the terms that describe the object for each facet.

getGeneralDescriptionWithNames

public java.util.HashMap<java.lang.String,java.util.HashSet<java.lang.String>> getGeneralDescriptionWithNames(java.lang.Integer objId)
Returns the description of the object with the specific id.

Parameters:
objId - the id of the object
Returns:
a HashMap that contains the names of the terms that describe the object for each facet.

addObjectDescription

public void addObjectDescription(java.lang.String facet,
                                 int termId,
                                 int objId)
Add to the description of an object a specific term.

Parameters:
facet - the facet that term belongs.
termId - the id of the term
objId - the id of the object

addObjectToFacet

public void addObjectToFacet(java.lang.String facet,
                             int objId)
Defines that exists a term which belongs to the specific facets which describe a specific object. Add the id of the object to the facet's list of the object that are described by a term of the specific facet.

Parameters:
facet - the facet
objId - the id of the object

printObjectsPerFacet

public void printObjectsPerFacet()
Prints the objects per facet.


printDescriptions

public void printDescriptions()
Prints the descriptions off all objects.


getFacetDescription

public java.lang.String getFacetDescription(java.lang.String facet)
Returns the focus that a user has selected for a specific facet.

Parameters:
facet - the facet
Returns:
the focus that a user has selected for a specific facet.

getFacetDescriptionWithIds

public java.lang.String getFacetDescriptionWithIds(java.lang.String facet)
Returns the focus that a user has selected for a specific facet. The focus contains the id of each term and not the name.

Parameters:
facet - the facet
Returns:
the focus that a user has selected for a specific facet.

getAllObjects

public java.util.HashSet<java.lang.Integer> getAllObjects(java.lang.String facetName)
Returns the ids of the objects that are described by the terms of a specific facet.

Parameters:
facetName - the facet
Returns:
the ids of the objects that are described by the terms of a specific facet.

getAllObjects

public java.util.HashSet<java.lang.Integer> getAllObjects()
Returns the ids of all objects that belong to the materialized faceted taxonomy.

Returns:
the ids of all objects that belong to the materialized faceted taxonomy.

getDescriptionOfFocus

public java.lang.String getDescriptionOfFocus()
Returns the focus.

Returns:
the focus

changeFacetTaxonomy

public void changeFacetTaxonomy(java.lang.String facetName,
                                Taxonomy<?> tx)
Changes the taxonomy of a specified Facet of the faceted taxonomy. Preconditions: Taxonomy must not be null and must be exist a facet with the specified name.
Postconditions: Checks if there is a facet with the specified name and calls the suitable method that changes the taxonomy of a facet.

Parameters:
facetName - the name of facet.
tx - the new taxonomy of the facet.

setMFTName

public void setMFTName(java.lang.String name)
Defines the name of Materialized Faceted Taxonomy.
Preconditions: The argument must not be null.
Postconditions: Defines the value of private variable name as the value of argument.

Parameters:
name - The name of MFT.

getMFTName

public java.lang.String getMFTName()
Returns the name of Materialized Faceted Taxonomy.
Preconditions: Always true.
Postconditions: Returns the value of private variable name.

Returns:
The name of Materialized Faceted Taxonomy

setCounters

public void setCounters(Counters state)
Defines if the counter information will be enabled. Preconditions: Always true.
Postconditions: Defines the value of private variable computation.

Parameters:
state - TRUE for enable; FALSE otherwise.

isCountersEnabled

public boolean isCountersEnabled()
Returns true if the counter information is enabled. Preconditions: Always true.
Postconditions: Returns true if the counter information is enabled; false otherwise.

Returns:
true if the counter information is enabled; false otherwise.

setFT

public void setFT(FT ft)
Defines the Faceted Taxonomy that will be materialized in MFT.
Preconditions: The faceted taxonomy must not be null.
Postconditions: Set the value of private variable ft as the value of argument.

Parameters:
ft - the Faceted Taxonomy that will be materialized

getFT

public FT getFT()
Returns the Faceted Taxonomy that will be materialized in MFT.
Preconditions: Always true.
Postconditions: Returns the value of private variable ft.

Returns:
the Faceted Taxonomy that will be materialized in MFT.

printFacetedTree

public void printFacetedTree(java.util.HashMap<java.lang.String,Taxonomy<?>> tmp)
Print to console a faceted tree with the counters of zoom-in points. Preconditions: The faceted tree must not be null and the counters information must be enabled.
Postconditions: Computation of zoom-in points counters must be enabled.

Parameters:
tmp - The faceted tree to be printed.

getLegalIds

public java.util.HashSet<java.lang.Integer> getLegalIds()
Returns a HashSet with the legal ids of documents to be displayed. Preconditions: Always true.
Postconditions: Returns the legal ids.

Returns:
a HashSet with the legal ids of documents to be displayed.

getNumOfLegalIdsOfTerm

public int getNumOfLegalIdsOfTerm(java.lang.String facet,
                                  int termId)
Returns the number of the legal ids of a specific term.

Parameters:
facet - the facet that term belongs
termId - the id of the term
Returns:
the number of the legal ids of a specific term.

getZoomInPoints

public java.util.HashMap<java.lang.String,Taxonomy<?>> getZoomInPoints()
Returns a HashMap that describes a faceted tree which has been created according the focus that has been selected, including the zoom-in point counters. Preconditions: Computation of zoom-in points counters must be enabled. Postconditions: Returns the HashMap of zoom in points that keeps the count information.

Returns:
the faceted tree that have been created according the focus that has been selected, including the zoom-in point counters.

getZoomInPointsNoCount

public java.util.HashMap<java.lang.String,Taxonomy<?>> getZoomInPointsNoCount()
Returns a HashMap that describes a faceted tree which has been created according the focus that has been selected. Preconditions: Computation of zoom-in points counters must be disabled. Postconditions: Returns the HashMap of zoom in points without counter information.

Returns:
the faceted tree that have been created according the focus that has been selected, it doesn't include the zoom-in point counters.

getZoomSidePoints

public java.util.HashMap<java.lang.String,java.util.HashMap<Term<FacetsType>,java.lang.Integer>> getZoomSidePoints()
Returns the zoom-side points. The key of the HashMap is the name of the facet. Preconditions: Computation of zoom-in points counters must be disabled. Postconditions: Returns the HashMap that includes the zoom side points.

Returns:
a HashMap that includes the zoom side points.

removeAllOtherIndexes

public void removeAllOtherIndexes(java.lang.String facetName,
                                  int termId)
Removes from a facet all indexes from the terms of the Terminology except the indexes of the term with the specified id. Preconditions: Must exists a facet with the specified name and the term id must not be negative. Postconditions: Checks if there is a facet with the specified name and calls from the taxonomy the specific method.

Parameters:
facetName - the name of the facet.
termId - the id of the term

printZoomPoints

public void printZoomPoints(java.util.HashMap<java.lang.String,java.util.HashMap<Term<FacetsType>,java.lang.Integer>> zoomSidePoints)
Prints the zoom side points. Preconditions: For now: always true. Postconditions: Prints the argument if it is not null, else prints the private variable with the zoom side points.

Parameters:
zoomSidePoints - a HashMap that includes the zoom side points

addToLegalIds

public void addToLegalIds(java.util.HashSet<java.lang.Integer> legalIds)
Adds the ids of the argument to the list of the legal ids. Preconditions: Always true. Postconditions: Adds to the HashSet of the legal ids the ids that included in the HashSet of the argument.

Parameters:
legalIds -