|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Source
A general interface for access to external or internal sources. This is mainly used as an abstraction for loading XQuery scripts and modules, but can also be applied to other use cases.
Field Summary | |
---|---|
static int |
INVALID
|
static int |
UNKNOWN
|
static int |
VALID
|
Method Summary | |
---|---|
long |
getCacheTimestamp()
|
String |
getContent()
|
Object |
getKey()
Returns a unique key to identify the source, usually an URI. |
Reader |
getReader()
Returns a Reader to read the contents
of the source. |
int |
isValid(DBBroker broker)
Is this source object still valid? Returns UNKNOWN if the validity of
the source cannot be determined. |
int |
isValid(Source other)
Checks if the source object is still valid by comparing it to another version of the same source. |
void |
setCacheTimestamp(long timestamp)
Set a timestamp for this source. |
Field Detail |
---|
static final int VALID
static final int INVALID
static final int UNKNOWN
Method Detail |
---|
Object getKey()
int isValid(DBBroker broker)
UNKNOWN
if the validity of
the source cannot be determined.
The DBBroker
parameter is required by
some implementations as they have to read
resources from the database.
broker
- int isValid(Source other)
isValid(DBBroker)
return UNKNOWN
.
other
- Reader getReader() throws IOException
Reader
to read the contents
of the source.
IOException
String getContent() throws IOException
IOException
void setCacheTimestamp(long timestamp)
XQueryPool
to
check if a source has timed out.
timestamp
- long getCacheTimestamp()
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |