|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.facetmap.simple.MapAdapter
com.facetmap.simple.SimpleFacetmap
| Nested Class Summary | |
static class |
SimpleFacetmap.SimpleXmlConverter
|
| Nested classes inherited from class com.facetmap.simple.MapAdapter |
MapAdapter.Fbond |
| Field Summary | |
protected FacetSpace |
facetSpace
|
static java.lang.String |
INFO
|
protected static InternalException |
NO_PREPROCESS
|
| Fields inherited from class com.facetmap.simple.MapAdapter |
autoSelectOnlyChild, resourceSpace, showEmptySelections, title |
| Constructor Summary | |
SimpleFacetmap()
|
|
| Method Summary | |
static Map |
createFromXml(java.io.InputStream inputStream,
java.net.URL docsUrl,
java.io.File workDir)
|
static Map |
createFromXml(java.lang.String xmlFile,
java.net.URL docsUrl,
java.io.File workDir)
|
void |
fillSubset(SelectionData selectionData,
int facetIndex)
Populates a subset (containing all subselections) for a single facet. |
void |
fillSuperset(SelectionData selectionData,
int facetIndex)
Populates a subset (containing all subselections) for a single facet. |
Resource[] |
getAllResources(Selection sel)
this is not useful. |
Resource[] |
getDirectResources(Selection sel)
Returns the Resources directly contained by this selection. |
FacetSpace |
getFacetSpace()
|
java.lang.String |
getInfo()
Implementation-specific string for this FacetMap class. |
int |
getResultLimit()
|
Selection |
getRootSelection()
Generates the Selection with ref "" (the empty string). |
Selection |
getSelection(Heading[] headingList)
|
Selection |
getSelection(java.lang.String ref)
|
SelectionData |
getSubselectionContainingHeading(SelectionData parentSelection,
Heading heading,
int facetIndex)
Find the forward Selection of parentSelection that contains heading. |
boolean |
isSelected(TaxonomicHeading heading,
SelectionData selection,
SelectionData[] subselection)
Determines whether the Heading is selected (either matched or contained) in the specified Selection. |
void |
map(Resource[] resources)
Maps headings for multiple resources. |
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. |
| Methods inherited from class com.facetmap.simple.MapAdapter |
countAllResources, doEndMap, doStartMap, getAutoSelectOnlyChild, getResourceSpace, getShowEmptySelections, getTitle, map, setAutoSelectOnlyChild, setResourceSpace, setShowEmptySelections, setTitle |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static java.lang.String INFO
protected static InternalException NO_PREPROCESS
protected FacetSpace facetSpace
| Constructor Detail |
public SimpleFacetmap()
| Method Detail |
public static Map createFromXml(java.lang.String xmlFile,
java.net.URL docsUrl,
java.io.File workDir)
throws java.io.IOException,
DataException,
InternalException
java.io.IOException
DataException
InternalException
public static Map createFromXml(java.io.InputStream inputStream,
java.net.URL docsUrl,
java.io.File workDir)
throws java.io.IOException,
DataException,
InternalException
java.io.IOException
DataException
InternalException
public void fillSuperset(SelectionData selectionData,
int facetIndex)
public void fillSubset(SelectionData selectionData,
int facetIndex)
public boolean isSelected(TaxonomicHeading heading,
SelectionData selection,
SelectionData[] subselection)
throws InternalException
subselection[0] will be set to that
subselection; otherwise it will be set to null. It will not be
set at all if this function returns false. (Be sure to
allocate subselection.
The restriction to TaxonomicHeading is done for performance reasons. It makes sense to accept any Heading and then refer to heading.getBackwardHeadings().nextElement() instead of to heading.getParentHeading() , but that causes too much construction within SimpleTaxHeading. FIXME so that SimpleTaxHeading provides it backward headings more efficiently, and then reclass the heading argument.
Recursion would be cute but heavier. REVISIT anyway.
InternalException
public SelectionData getSubselectionContainingHeading(SelectionData parentSelection,
Heading heading,
int facetIndex)
throws InternalException
facetIndex param could be determined from heading, but is passed in for performance reasons. Unknown behavior if facetIndex != this.facetSpace.indexOf(heading.getFacet());
Would be nice to relocate this to SelectionData, but too much information is in this class, e.g. facetIndex of the specified Heading.
InternalExceptionpublic FacetSpace getFacetSpace()
getFacetSpace in interface MapgetFacetSpace in class MapAdapterpublic int getResultLimit()
public Selection getRootSelection()
throws InternalException
getRootSelection in interface MapgetRootSelection in class MapAdapterInternalException
public Selection getSelection(java.lang.String ref)
throws InternalException,
UnknownReferenceException
getSelection in interface MapgetSelection in class MapAdapterInternalException
UnknownReferenceException
public Selection getSelection(Heading[] headingList)
throws DataException
DataException
public Resource[] getDirectResources(Selection sel)
throws InternalException
MapAdapter
getDirectResources in interface MapgetDirectResources in class MapAdapterInternalException
public Resource[] getAllResources(Selection sel)
throws InternalException
Map
getAllResources in interface MapgetAllResources in class MapAdapterInternalException
public void map(Resource resource,
Heading heading)
throws InternalException
Map
map in interface Mapmap in class MapAdapterInternalException
public void map(Resource[] resources)
throws InternalException,
DataException
MapAdapter
map in interface Mapmap in class MapAdapterInternalException
DataException
public void preprocess()
throws InternalException,
DataException
Map
preprocess in interface Mappreprocess in class MapAdapterInternalException
DataExceptionpublic java.lang.String getInfo()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||