|
DLESE Tools v1.6.0 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.dlese.dpc.services.dds.toolkit.RepositoryUtils
public class RepositoryUtils
Provides functions that use the DDSServicesToolkit to get information about collections, itemRecords, terms and other data from a DDS repository.
| Constructor Summary | |
|---|---|
RepositoryUtils(DDSServicesToolkit ddsServicesToolkit)
Constructor for the RepositoryUtils object |
|
RepositoryUtils(String baseUrl)
Constructor for the RepositoryUtils object |
|
| Method Summary | |
|---|---|
String[] |
checkForErrorResponse(Document doc)
|
protected CollectionInfo |
getCollectionInfo(String collection)
Gets the collectionInfo instance for the specified collection |
List |
getCollectionInfos()
Gets the collectionInfos attribute of the RepositoryUtils object |
List |
getCollectionKeys()
Returns a List of collection keys (e.g., "dcc") defined in the repository. |
protected int |
getIntAtPath(Node baseElement,
String relativePath)
Gets the integer value of the node located at relativePath from given baseElement. |
Map |
getItemRecordMap(CollectionInfo collectionInfo,
int startOffset,
int numReturns)
Returns an itemRecordMap for the specified collection, startOffset and batchSize |
Map |
getItemRecordMap(String collection)
Gets a mapping of recordIds to itemRecords (as Documents) for the specified collection |
Collection |
getItemRecords(CollectionInfo collectionInfo,
int startOffset,
int numReturns)
Gets a batch of itemRecords |
Collection |
getItemRecords(String collection)
Returns the itemRecords of the specified collection as dom4j.Documents |
TermsInfo |
getTermsInfoForFields(String[] fields)
Get terms data for one or more fields in a DDS repository index. |
DDSServicesToolkit |
getToolKit()
|
protected String |
getValueAtPath(Node baseElement,
String relativePath)
Gets the textual value of the node located at relativePath from given baseElement. |
static void |
main(String[] args)
The main program for the RepositoryUtils class |
protected String |
subElementValue(Element parent,
String childTagName)
Gets the text value of the specified child of a given parent element. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RepositoryUtils(String baseUrl)
baseUrl - DDSWebservice baseUrl (e.g., "http://www.dlese.org/dds/services/ddsws1-1")public RepositoryUtils(DDSServicesToolkit ddsServicesToolkit)
ddsServicesToolkit - A DDSServicesToolkit| Method Detail |
|---|
public DDSServicesToolkit getToolKit()
public Map getItemRecordMap(String collection)
throws Exception
collection - collection key (e.g., "dcc")
Exception - if the itemRecordMap cannot be constructed
public Map getItemRecordMap(CollectionInfo collectionInfo,
int startOffset,
int numReturns)
throws Exception
NOTE: to search over all records,
collectionInfo - NOT YET DOCUMENTEDstartOffset - NOT YET DOCUMENTEDnumReturns - NOT YET DOCUMENTED
Exception - NOT YET DOCUMENTEDpublic String[] checkForErrorResponse(Document doc)
public Collection getItemRecords(String collection)
throws Exception
collection - collection key ("dcc")
Exception - Description of the Exception
public Collection getItemRecords(CollectionInfo collectionInfo,
int startOffset,
int numReturns)
throws Exception
collectionInfo - NOT YET DOCUMENTEDstartOffset - NOT YET DOCUMENTEDnumReturns - NOT YET DOCUMENTED
Exception - NOT YET DOCUMENTED
public List getCollectionKeys()
throws Exception
Exception - NOT YET DOCUMENTED
public List getCollectionInfos()
throws Exception
Exception - Description of the Exception
protected CollectionInfo getCollectionInfo(String collection)
throws Exception
collection - collection key (e.g., "dcc")
Exception - NOT YET DOCUMENTED
protected String getValueAtPath(Node baseElement,
String relativePath)
throws Exception
baseElement - Description of the ParameterrelativePath - Description of the Parameter
Exception - if there is no node at relativePath from baseElement
protected int getIntAtPath(Node baseElement,
String relativePath)
throws Exception
baseElement - Description of the ParameterrelativePath - Description of the Parameter
Exception - if there is no node at relativePath from baseElement, or if the value found is not
an integer
protected String subElementValue(Element parent,
String childTagName)
parent - Element whose child element supplies the textchildTagName - tagName of child element
public static void main(String[] args)
throws Exception
args - The command line arguments
Exception - NOT YET DOCUMENTED
public TermsInfo getTermsInfoForFields(String[] fields)
throws DDSServiceErrorResponseException,
Exception
fields - One or more fields to get terms data for
DDSServiceErrorResponseException - If service error
Exception - If other error
|
DLESE Tools v1.6.0 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||