|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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()
|
java.lang.String |
getContent()
|
java.lang.Object |
getKey()
Returns a unique key to identify the source, usually an URI. |
java.io.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 |
public static final int VALID
public static final int INVALID
public static final int UNKNOWN
Method Detail |
public java.lang.Object getKey()
public 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
- public int isValid(Source other)
isValid(DBBroker)
return UNKNOWN
.
other
- public java.io.Reader getReader() throws java.io.IOException
Reader
to read the contents
of the source.
java.io.IOException
public java.lang.String getContent() throws java.io.IOException
java.io.IOException
public void setCacheTimestamp(long timestamp)
XQueryPool
to
check if a source has timed out.
timestamp
- public long getCacheTimestamp()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |