com.facetmap.simple
Class DynamicFacetSpaceResource
java.lang.Object
com.facetmap.simple.SimpleResource
com.facetmap.simple.DynamicFacetSpaceResource
- All Implemented Interfaces:
- Resource
public class DynamicFacetSpaceResource
- extends SimpleResource
A SimpleResource that can handle a changing FacetSpace. If a Facet
is added, this Resource will map to that Facet's root Heading. It
will correctly report all its Headings next time it's queried, and
set a Heading in the new Facet when instructed.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
headingVector
protected java.util.Vector headingVector
DynamicFacetSpaceResource
public DynamicFacetSpaceResource(FacetSpace facetSpace)
getId
public int getId()
- Description copied from interface:
Resource
- Unique identifier.
- Specified by:
getId in interface Resource- Overrides:
getId in class SimpleResource
setId
public void setId(int id)
- Overrides:
setId in class SimpleResource
grow
protected void grow(int index)
getHeading
public Heading getHeading(int index)
- Description copied from interface:
Resource
- A Heading bound to this Resource. Because Facetmap requires that each
Facet be explicitly listed in the FacetSpace, an integer
index must be provided. The index corresponds to the order of the
Facets in the FacetSpace.
- Specified by:
getHeading in interface Resource- Overrides:
getHeading in class SimpleResource
- Returns:
- The bound Heading in the specified Facet.
getHeadingCount
public int getHeadingCount()
- Description copied from interface:
Resource
- Bind this Resource to the specified Heading. If a different Heading
in the same Facet has already been bound to this
Resource, that bond may be erased.
- Specified by:
getHeadingCount in interface Resource- Overrides:
getHeadingCount in class SimpleResource
setHeading
public void setHeading(int index,
Heading heading)
- Overrides:
setHeading in class SimpleResource