fleXplorer.util
Class DateTaxonomy

java.lang.Object
  extended by fleXplorer.util.DateTaxonomy

public class DateTaxonomy
extends java.lang.Object


Constructor Summary
DateTaxonomy()
           
 
Method Summary
 java.util.HashMap<java.lang.Integer,java.lang.Long> createDateList(java.lang.String fileName)
          Returns a HashMap that contains the pairs of id and date that exists into the specified file.
 Taxonomy<IntegerType> createDateTaxonomy(java.util.HashMap<java.lang.Integer,java.lang.Long> dates, MFT mft, java.lang.String facet)
          Returns a Taxonomy object that have been created according the specified dates.
 Taxonomy<IntegerType> createDateTaxonomy(java.lang.String name, int startYear, int endYear)
          Creates a new Taxonomy that includes all the dates between the specified years.
 java.util.HashSet<java.lang.Integer> createDateTaxonomy(Taxonomy<IntegerType> datesTaxonomy, java.util.HashMap<java.lang.Integer,java.lang.Long> dates)
          Returns a Taxonomy object that have been created according the specified dates.
 Taxonomy<IntegerType> createDateTaxonomy(Taxonomy<IntegerType> datesTaxonomy, int startYear, int endYear)
          Creates the year, month, day relations for a taxonomy between two specific years.
 java.lang.String getMonthName(int month)
          Returns the name of the specified month
 Taxonomy<IntegerType> indexDates(Taxonomy<IntegerType> tx, java.util.HashMap<java.lang.Integer,java.lang.Long> dates)
          Indexes each document's id from the HashMap to the appropriate term of the taxonomy according the date.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DateTaxonomy

public DateTaxonomy()
Method Detail

createDateTaxonomy

public java.util.HashSet<java.lang.Integer> createDateTaxonomy(Taxonomy<IntegerType> datesTaxonomy,
                                                               java.util.HashMap<java.lang.Integer,java.lang.Long> dates)
Returns a Taxonomy object that have been created according the specified dates.

Parameters:
datesTaxonomy - the taxonomy that will be added the dates.
dates - a HashMap that has as key the id of a document and as value the last modified date of the document.
Returns:
a Taxonomy object that have been created according the specified dates.

createDateTaxonomy

public Taxonomy<IntegerType> createDateTaxonomy(java.util.HashMap<java.lang.Integer,java.lang.Long> dates,
                                                MFT mft,
                                                java.lang.String facet)
Returns a Taxonomy object that have been created according the specified dates.

Parameters:
dates - a HashMap that has as key the id of a document and as value the last modified date of the document.
Returns:
a Taxonomy object that have been created according the specified dates.

getMonthName

public java.lang.String getMonthName(int month)
Returns the name of the specified month

Parameters:
month - the number of month
Returns:
the name of the specified month

createDateList

public java.util.HashMap<java.lang.Integer,java.lang.Long> createDateList(java.lang.String fileName)
                                                                   throws java.io.IOException
Returns a HashMap that contains the pairs of id and date that exists into the specified file.

Parameters:
fileName - the path of the file
Returns:
a HashMap that contains the pairs of id and date that exists into the specified file.
Throws:
java.io.IOException

createDateTaxonomy

public Taxonomy<IntegerType> createDateTaxonomy(java.lang.String name,
                                                int startYear,
                                                int endYear)
Creates a new Taxonomy that includes all the dates between the specified years.

Parameters:
startYear - the year that the taxonomy will begin.
endYear - the year that the taxonomy will finish.
Returns:
the created Taxonomy.

createDateTaxonomy

public Taxonomy<IntegerType> createDateTaxonomy(Taxonomy<IntegerType> datesTaxonomy,
                                                int startYear,
                                                int endYear)
Creates the year, month, day relations for a taxonomy between two specific years.

Parameters:
datesTaxonomy - the taxonomy.
startYear - the start year.
endYear - the end year.
Returns:
the taxonomy which includes the specific relations.

indexDates

public Taxonomy<IntegerType> indexDates(Taxonomy<IntegerType> tx,
                                        java.util.HashMap<java.lang.Integer,java.lang.Long> dates)
Indexes each document's id from the HashMap to the appropriate term of the taxonomy according the date.

Parameters:
tx - the taxonomy
dates - a HashMap that has as key the id of a document and as value the last modified date of the document.
Returns:
the updated taxonomy.