|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.facetmap.simple.MapAdapter
Convenience superclass; provides default implementations of many Map methods. Many of the method implementations here can be made more efficient in a subclass, depending on its underlying persistence layer. Also, this class allows use of a foreign ResourceSpace module, by way of setResourceSpace().
| Nested Class Summary | |
class |
MapAdapter.Fbond
|
| Field Summary | |
protected boolean |
autoSelectOnlyChild
|
protected ResourceSpace |
resourceSpace
|
protected boolean |
showEmptySelections
|
protected java.lang.String |
title
|
| Constructor Summary | |
MapAdapter()
|
|
| Method Summary | |
int |
countAllResources(Selection sel)
Default simply calls Selection.getContainedResourceCount() . |
void |
doEndMap()
Empty implementation. |
void |
doStartMap()
Empty implementation. |
abstract Resource[] |
getAllResources(Selection sel)
this is not useful. |
boolean |
getAutoSelectOnlyChild()
Return current value of autoSelectOnlyChild. |
abstract Resource[] |
getDirectResources(Selection sel)
Returns the Resources directly contained by this selection. |
abstract FacetSpace |
getFacetSpace()
|
ResourceSpace |
getResourceSpace()
|
abstract Selection |
getRootSelection()
Produce a root Selection for the FacetSpace contained in the given facetmap. |
abstract Selection |
getSelection(java.lang.String ref)
|
boolean |
getShowEmptySelections()
Return current value of showEmptySelections. |
java.lang.String |
getTitle()
A descriptive title for this FacetMap instance. |
void |
map(Resource resource)
Maps a resource to all its headings at once. |
void |
map(Resource[] resources)
Maps headings for multiple resources. |
abstract void |
map(Resource resource,
Heading heading)
Establishes a bond between a resource and a heading. |
void |
preprocess()
Does any calculation that needs to be done before the map can be browsed. |
void |
setAutoSelectOnlyChild(boolean set)
If this parameter is set true, FacetMap will avoid the situation where there's only one possible next step in any dimension, by automatically selecting that next step and presenting the options from there. |
void |
setResourceSpace(ResourceSpace resourceSpace)
|
void |
setShowEmptySelections(boolean set)
If this parameter is set true, FacetMap may provide Selections with which no Resources can be reached. |
void |
setTitle(java.lang.String title)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.facetmap.Map |
getInfo, getSelection |
| Field Detail |
protected java.lang.String title
protected ResourceSpace resourceSpace
protected boolean autoSelectOnlyChild
protected boolean showEmptySelections
| Constructor Detail |
public MapAdapter()
| Method Detail |
public abstract FacetSpace getFacetSpace()
getFacetSpace in interface Map
public void preprocess()
throws InternalException,
DataException
Map
preprocess in interface MapInternalException
DataException
public void doStartMap()
throws InternalException
doStartMap in interface MapInternalException
public void doEndMap()
throws InternalException
doEndMap in interface MapInternalException
public abstract void map(Resource resource,
Heading heading)
throws InternalException
Map
map in interface MapInternalException
public abstract Resource[] getDirectResources(Selection sel)
throws InternalException
getDirectResources in interface MapInternalException
public abstract Resource[] getAllResources(Selection sel)
throws InternalException
Map
getAllResources in interface MapInternalException
public abstract Selection getRootSelection()
throws InternalException
Map
getRootSelection in interface MapInternalException
public abstract Selection getSelection(java.lang.String ref)
throws InternalException,
UnknownReferenceException
getSelection in interface MapInternalException
UnknownReferenceException
public void map(Resource resource)
throws InternalException,
DataException
The default implementation just calls map() separately for each heading in the array. Subclasses may want to do this in a more efficient manner.
map in interface MapInternalException
DataException
public void map(Resource[] resources)
throws InternalException,
DataException
map in interface MapInternalException
DataException
public int countAllResources(Selection sel)
throws InternalException
countAllResources in interface MapInternalExceptionpublic java.lang.String getTitle()
Map
getTitle in interface Mappublic void setTitle(java.lang.String title)
public ResourceSpace getResourceSpace()
getResourceSpace in interface Mappublic void setResourceSpace(ResourceSpace resourceSpace)
public boolean getAutoSelectOnlyChild()
Map
getAutoSelectOnlyChild in interface Mappublic boolean getShowEmptySelections()
Map
getShowEmptySelections in interface Mappublic void setAutoSelectOnlyChild(boolean set)
MapThis value is false by default.
setAutoSelectOnlyChild in interface MapSelection.getForwardSelections(int)public void setShowEmptySelections(boolean set)
MapThis value is false by default.
setShowEmptySelections in interface MapSelection.getForwardSelections(int)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||