|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface IDataProvider
Objects that implement this interface manage access to data source objects.
Before the provider can be used, a client must call setSource(URL)
(or call the appropriate constructor) followed by IHasLifecycle.open(). Otherwise,
the provider will throw an exception.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface edu.mit.jwi.data.IHasLifecycle |
|---|
IHasLifecycle.ObjectClosedException |
| Method Summary | ||
|---|---|---|
java.net.URL |
getSource()
Returns the URL that points to the resource location; should
never return null. |
|
|
getSource(IContentType<T> type)
Returns a data source object for the specified content type, if one is available; otherwise returns null. |
|
java.util.Set<? extends IContentType<?>> |
getTypes()
Returns a set containing all the content types this provider looks for at the resource location. |
|
void |
setSource(java.net.URL url)
This method is used to set the source URL from which the provider accesses the data from which it instantiates data sources. |
|
| Methods inherited from interface edu.mit.jwi.item.IHasVersion |
|---|
getVersion |
| Methods inherited from interface edu.mit.jwi.data.IHasLifecycle |
|---|
isOpen, open |
| Methods inherited from interface edu.mit.jwi.data.IClosable |
|---|
close |
| Method Detail |
|---|
void setSource(java.net.URL url)
IllegalStateException.
url - the location of the data, may not be null
java.lang.IllegalStateException - if the provider is currently open
java.lang.NullPointerException - if the specified URL is null.java.net.URL getSource()
URL that points to the resource location; should
never return null.
URL that points to the resource location; must
not be nulljava.util.Set<? extends IContentType<?>> getTypes()
null, non-empty set of content types for this
provider<T> IDataSource<T> getSource(IContentType<T> type)
null.
T - the content type of the data sourcetype - the content type of the data source to be retrieved
null if this provider has no such data source
java.lang.NullPointerException - if the type is null
ObjectClosedException - if the provider is not open when this call is made
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||