fleXplorer.FacetedTaxonomy
Interface IFT
- All Known Implementing Classes:
- FT
public interface IFT
- Version:
- 1.1
- Author:
- Nikos Armenatzoglou
Method Summary |
boolean |
add(Facet<?> facet)
Adds a Facet into the list of Facets of Faceted Taxonomy. |
boolean |
add(Facet<?> facet,
int index)
Adds a Facet into the list of Facets of Faceted Taxonomy at the specified position. |
boolean |
addAll(java.util.Collection<Facet<?>> list)
Adds a Collection of Facets into the Faceted Taxonomy's list of Facets. |
Facet<?> |
getFacet(int index)
Returns the Facet at the specified position in Faceted Taxonomy's list of Facets. |
Facet<?> |
getFacet(java.lang.String facetName)
Returns the Facet with the specified name that included in Faceted Taxonomy's list of Facets. |
java.util.Collection<Facet<?>> |
getFacetsList()
Returns a Collection with all Facets that included into Faceted Taxonomy's list of Facets. |
java.lang.String |
getFTName()
Returns the name of Faceted Taxonomy. |
boolean |
isOrdered()
Checks if the Facets of Faceted Taxonomy are in order. |
int |
numOfFacets()
Returns the number of facets of the specified faceted taxonomy. |
boolean |
removeFacet(int index)
Removes the Facet at the specified position in Faceted Taxonomy's list of Facets. |
boolean |
removeFacet(java.lang.String facetName)
Removes the Facet with specified name from the Faceted Taxonomy's list. |
void |
setFTName(java.lang.String name)
Defines the name of Faceted Taxonomy. |
java.lang.String |
toString()
Returns the string representation of the specified faceted taxonomy. |
add
boolean add(Facet<?> facet)
- Adds a Facet into the list of Facets of Faceted Taxonomy.
Preconditions: The argument must not be null. The list of facets must be unordered.
Postconditions: Checks if facet already exists in facetslist, if not add
it to the list of facets and return true; false otherwise;
- Parameters:
facet
- the facet that will be added to the list of Facets.
- Returns:
- true if facet adds it successfully; false otherwise.
add
boolean add(Facet<?> facet,
int index)
- Adds a Facet into the list of Facets of Faceted Taxonomy at the specified position.
Preconditions:The facet must not be null and the index must be into the bounds of the list.
FT must keep the list of Facets in order.
Postconditions: Checks if facet already exists in facetslist, if not add
it to the facets list at the specified position and return true; false otherwise;
- Parameters:
facet
- the facet that will be added to the list of Facets.index
- the specified position that facet will be added.
- Returns:
- true if facet adds it successfully; false otherwise.
removeFacet
boolean removeFacet(java.lang.String facetName)
- Removes the Facet with specified name from the Faceted Taxonomy's list.
Preconditions: FT, FT.facetsList and argument facetName must not be null.
Postconditions: Checks if FT.facetsList contains a Facet with the specified facetName.
If yes removes it from facetsList and returns true; false otherwise.
- Parameters:
the
- name of Facet to be removed.
- Returns:
- true if removes it successfully; false otherwise.
removeFacet
boolean removeFacet(int index)
- Removes the Facet at the specified position in Faceted Taxonomy's list of Facets.
Returns the Facet that was removed from the list of Facets.
Preconditions: FT and FT.facetsList must not be null. The value of index
must be 0<=index<=size of facetsList.
Postconditions: Checks if index is correct, if yes returns the Facet at the specified position
of facetsList and remove it from list, null otherwise.
- Parameters:
index
- the index of Facet to removed.
- Returns:
- Facet that was removed.
getFacet
Facet<?> getFacet(java.lang.String facetName)
- Returns the Facet with the specified name that included in Faceted Taxonomy's list of Facets.
Checks if list of Facets include Facet with specified name and if yes then return it.
Preconditions: FT, FT.facetsList and argument must not be null.
Postconditions: Checks if FT.facetsList contains a Facet with the specified facetName.
If yes returns it; false otherwise.
- Parameters:
facetName
- the name of Facet to return.
- Returns:
- the Facet with specified name if included in list of Facets; null otherwise.
getFacet
Facet<?> getFacet(int index)
- Returns the Facet at the specified position in Faceted Taxonomy's list of Facets.
Preconditions: FT and FT.facetsList must not be null. The value of index
must be 0<=index<=size of facetsList.
Postconditions: Checks if index is correct, if yes returns the Facet at the specified position
of facetsList, null otherwise.
- Parameters:
index
- index of Facet to return.
- Returns:
- Facet at the specified index.
setFTName
void setFTName(java.lang.String name)
- Defines the name of Faceted Taxonomy.
Preconditions: Always true.
Postconditions: Defines FT's name as the value of the argument name.
- Parameters:
name
- the new name of Faceted Taxonomy.
getFTName
java.lang.String getFTName()
- Returns the name of Faceted Taxonomy.
Preconditions: Always true.
Postconditions: Returns the value of private variable name.
- Returns:
- the name of Faceted Taxonomy.
addAll
boolean addAll(java.util.Collection<Facet<?>> list)
- Adds a Collection of Facets into the Faceted Taxonomy's list of Facets.
Preconditions: The argument must not be null.
Postconditions: Add all Facets from the argument Collection to FT.facetsList. If any Facet
already exists doesn't add it to the list. If all Facets that contained in
argument Collection added successfully returns true; false otherwise.
- Parameters:
Collection
- of Facets to be added.
- Returns:
- true if all Facets added successfully;false otherwise.
getFacetsList
java.util.Collection<Facet<?>> getFacetsList()
- Returns a Collection with all Facets that included into Faceted Taxonomy's list of Facets.
Preconditions: Always true.
Postconditions: Returns the value of private variable facetsList.
- Returns:
- a Collection with all Facets that included into Faceted Taxonomy's list of Facets.
toString
java.lang.String toString()
- Returns the string representation of the specified faceted taxonomy.
Preconditions: Always true.
Postconditions: Returns the string representation of the specified faceted taxonomy.
- Overrides:
toString
in class java.lang.Object
- Returns:
- the string representation of the specified faceted taxonomy.
numOfFacets
int numOfFacets()
- Returns the number of facets of the specified faceted taxonomy.
Preconditions: Always true.
Postconditions: Calls the method size for the collection that keeps the facets.
- Returns:
- the number of facets of the specified faceted taxonomy.
isOrdered
boolean isOrdered()
- Checks if the Facets of Faceted Taxonomy are in order.
Preconditions: Always true.
Postconditions: Returns true if Facets of Faceted Taxonomy are in order.
- Returns:
- true if Facets of Faceted Taxonomy are in order; false otherwise.