public abstract class DatasetSource
extends java.lang.Object
Currently an abstract class, three abstract methods must be implemented to make a concrete subclass. These methods are getTopLevelDataset():InvDataset, isCollection():boolean, and expandThisLevel(InvDataset):List. (In previous versions, expandThisType():void was the only abstract method.)
Modifier and Type | Field and Description |
---|---|
protected InvDataset |
accessPointDataset
Top-level dataset of the catalog generated by this DatasetSource.
|
protected boolean |
addDatasetSize |
protected java.util.List |
catalogRefInfoList
Information on the catalogRefs in the resulting catalog.
|
protected boolean |
createCatalogRefs |
protected java.util.List |
datasetEnhancerList |
protected java.util.List |
datasetFilterList |
protected java.util.List |
datasetNamerList |
protected DatasetSorter |
datasetSorter |
protected boolean |
isValid |
protected java.lang.StringBuffer |
msgLog |
protected InvCatalog |
resultingCatalog
The catalog that results from expanding this DatasetSource.
|
protected DatasetSourceType |
type |
Modifier | Constructor and Description |
---|---|
protected |
DatasetSource()
Default Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
addDatasetEnhancer(DatasetEnhancer1 dsEnhancer) |
void |
addDatasetFilter(DatasetFilter datasetFilter) |
void |
addDatasetNamer(DatasetNamer datasetNamer) |
protected abstract InvDataset |
createDataset(java.lang.String datasetLocation,
java.lang.String prefixUrlPath)
Creates an InvDataset to represent the dataset at the given location
on this DatasetSource.
|
protected abstract InvCatalog |
createSkeletonCatalog(java.lang.String prefixUrlPath)
Return a skeleton InvCatalog for this DatasetSource.
|
boolean |
equals(java.lang.Object o) |
InvDataset |
expand()
Crawl this DatasetSource and generate a new InvCatalog, return the
top-level InvDataset.
|
InvDataset |
expand(java.util.List accessPoints) |
protected abstract java.util.List |
expandThisLevel(InvDataset collectionDataset,
java.lang.String prefixUrlPath)
Return a list of the InvDatasets contained in the given collection dataset
on this DatasetSource.
|
InvCatalog |
fullExpand()
Crawl this DatasetSource and generate a new InvCatalog with all datasets
named, sorted, and organized as defined by this DatasetSource, return the
newly generated InvCatalog.
|
java.lang.String |
getAccessPoint() |
java.util.List |
getCatalogRefInfoList() |
java.util.List |
getDatasetEnhancerList() |
java.util.List |
getDatasetFilterList() |
java.util.List |
getDatasetNamerList() |
DatasetSorter |
getDatasetSorter() |
java.lang.String |
getName() |
java.lang.String |
getPrefixUrlPath() |
InvCatalog |
getResultingCatalog() |
ResultService |
getResultService() |
DatasetSourceStructure |
getStructure() |
DatasetSourceType |
getType() |
int |
hashCode() |
boolean |
isAddDatasetSize() |
protected abstract boolean |
isCollection(InvDataset dataset)
Return true if the given dataset is a collection dataset, false otherwise.
|
boolean |
isCreateCatalogRefs() |
boolean |
isFlatten() |
static DatasetSource |
newDatasetSource(java.lang.String name,
DatasetSourceType type,
DatasetSourceStructure structure,
java.lang.String accessPoint,
ResultService resultService)
Factory method for this abstract class.
|
void |
setAccessPoint(java.lang.String accessPoint) |
void |
setAddDatasetSize(boolean addDatasetSize) |
void |
setCreateCatalogRefs(boolean createCatalogRefs) |
void |
setDatasetSorter(DatasetSorter datasetSorter) |
void |
setName(java.lang.String name) |
void |
setPrefixUrlPath(java.lang.String prefixUrlPath) |
void |
setResultService(ResultService resultService) |
void |
setStructure(DatasetSourceStructure structure) |
java.lang.String |
toString()
string representation
|
boolean |
validate(java.lang.StringBuilder out) |
protected InvCatalog resultingCatalog
protected InvDataset accessPointDataset
protected java.util.List catalogRefInfoList
protected DatasetSourceType type
protected boolean createCatalogRefs
protected java.util.List datasetNamerList
protected java.util.List datasetFilterList
protected DatasetSorter datasetSorter
protected java.util.List datasetEnhancerList
protected boolean addDatasetSize
protected boolean isValid
protected java.lang.StringBuffer msgLog
public static final DatasetSource newDatasetSource(java.lang.String name, DatasetSourceType type, DatasetSourceStructure structure, java.lang.String accessPoint, ResultService resultService)
name
- type
- structure
- accessPoint
- java.lang.IllegalArgumentException
- if DatasetSource type is null or unsupported.public InvCatalog getResultingCatalog()
public java.util.List getCatalogRefInfoList()
public java.lang.String getName()
public void setName(java.lang.String name)
public DatasetSourceType getType()
public DatasetSourceStructure getStructure()
public void setStructure(DatasetSourceStructure structure)
public boolean isFlatten()
public java.lang.String getAccessPoint()
public void setAccessPoint(java.lang.String accessPoint)
public java.lang.String getPrefixUrlPath()
public void setPrefixUrlPath(java.lang.String prefixUrlPath)
public ResultService getResultService()
public void setResultService(ResultService resultService)
public boolean isCreateCatalogRefs()
public void setCreateCatalogRefs(boolean createCatalogRefs)
public java.util.List getDatasetNamerList()
public void addDatasetNamer(DatasetNamer datasetNamer)
public java.util.List getDatasetFilterList()
public void addDatasetFilter(DatasetFilter datasetFilter)
public DatasetSorter getDatasetSorter()
public void setDatasetSorter(DatasetSorter datasetSorter)
public java.util.List getDatasetEnhancerList()
public void addDatasetEnhancer(DatasetEnhancer1 dsEnhancer)
public boolean isAddDatasetSize()
public void setAddDatasetSize(boolean addDatasetSize)
public boolean validate(java.lang.StringBuilder out)
public java.lang.String toString()
toString
in class java.lang.Object
public InvDataset expand() throws java.io.IOException
java.io.IOException
- if the accessPoint for this DatasetSource is not a container dataset.public InvDataset expand(java.util.List accessPoints) throws java.io.IOException
accessPoints
- java.io.IOException
- if the main access point for this DatasetSource is not a container dataset or any of the given access points do not exist or are not under the main access point.public InvCatalog fullExpand() throws java.io.IOException
java.io.IOException
- if DatasetSource does not reference a container dataset.protected abstract InvDataset createDataset(java.lang.String datasetLocation, java.lang.String prefixUrlPath) throws java.io.IOException
datasetLocation
- a String indicating the location of a dataset.prefixUrlPath
- a path name to be prefixed on the urlPathjava.io.IOException
- if the dataset location does not correspond to an actual dataset or is not below the accessPointHeader directory.java.lang.NullPointerException
- if the given dataset location is null.protected abstract boolean isCollection(InvDataset dataset)
dataset
- - the InvDataset to test for being a collection dataset.java.lang.NullPointerException
- if the given InvDataset is null.java.lang.ClassCastException
- if the given InvDataset is not a LocalInvDataset.protected abstract InvCatalog createSkeletonCatalog(java.lang.String prefixUrlPath) throws java.io.IOException
prefixUrlPath
- java.io.IOException
- if top-level dataset does not exist or is not a collection dataset.protected abstract java.util.List expandThisLevel(InvDataset collectionDataset, java.lang.String prefixUrlPath)
collectionDataset
- - the collection dataset to be expanded.prefixUrlPath
- java.lang.IllegalArgumentException
- when given dataset is not a collection dataset.java.lang.NullPointerException
- if given dataset is null.java.lang.ClassCastException
- if the given InvDataset is not a LocalInvDataset.public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object