public class LocalResourceRepository extends Object implements ResourceRepository
| Constructor and Description |
|---|
LocalResourceRepository(File schemaFile)
Creates a new LocalResourceRepository
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(OpenSearchResource resource)
Adds a pre-processed OpenSearchResource to the repository
|
void |
add(String dirPath)
Retrieves all OpenSearch resources, whose XML representations are contained in a directory
with a given path and adds them to the repository
|
void |
addURL(String resourceURL)
Adds an OpenSearch resource whose XML representation is retrieved through a URL to the repository
|
OpenSearchResource |
get(String descriptionDocURL)
Retrieves an OpenSearchResource identified by the description document URL of the
OpenSearch provider associated with it
|
public LocalResourceRepository(File schemaFile)
schemaFile - The XSD of the OpenSearch resource that will be used to validate the XML
representation of the OpenSearch resources retrieved. This is an optional parameter and can
be left null if no validation is to be performed.public void add(String dirPath) throws Exception
dirPath - The path of the directory to look for OpenSearch resourcesException - In case of errorpublic void addURL(String resourceURL) throws Exception
resourceURL - The URL of the OpenSearch resourceException - In case of errorpublic void add(OpenSearchResource resource)
resource - The OpenSearch resource to be added to the repositorypublic OpenSearchResource get(String descriptionDocURL) throws Exception
get in interface ResourceRepositorydescriptionDocURL - The URL of the description document associated with the OpenSearch
provider associated with the OpenSearchResource to be retrievedExceptionResourceRepository.get(String)Copyright © 2014. All Rights Reserved.