Package pygar.documents
Interface SessionDoc
public interface SessionDoc
An object implementing the SessionDoc interface will contain essential annotation needed
to route documents used in a BEDM session. The document is found in a "payload" that has been
subjected to various degrees of encryption. The internal state of that payload with respect to
encryption inferred from where the document is found in the inbound or
the outbound document stream but implementations may add annotation to make this explicit.
*** This interface is incomplete, we need to specify ways to get at the payload.
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
SessionDoc.Direction
-
Method Summary
Modifier and Type Method Description java.io.OutputStream
getAppendStream(Store doc)
Return a stream to write into at the end of a document.java.lang.String
getDestinationName()
Obtain the name of the document sourcejava.io.InputStream
getReadStream(Store doc)
Return a stream to read from the document.int
getSessionid()
Obtain the session id associated with the objectjava.lang.String
getSourceName()
Obtain the name of the document sourcejava.io.OutputStream
getWriteStream(int sessionid, java.lang.String store_location)
Return a stream to write into a new, empty document.void
setDestinationName(java.lang.String destination)
Set the Destination Namevoid
setSessionid(int id)
Set the session id associated with the objectvoid
setSourceName(java.lang.String source)
Set the Source Name
-
Method Details
-
getSessionid
int getSessionid()Obtain the session id associated with the object- Returns:
- id the session id
-
setSessionid
void setSessionid(int id)Set the session id associated with the object- Parameters:
id
- The session id.
-
getSourceName
java.lang.String getSourceName()Obtain the name of the document source- Returns:
- String
-
setSourceName
void setSourceName(java.lang.String source)Set the Source Name- Parameters:
source
- the source name
-
getDestinationName
java.lang.String getDestinationName()Obtain the name of the document source- Returns:
- String
-
setDestinationName
void setDestinationName(java.lang.String destination)Set the Destination Name- Parameters:
destination
- the destination name
-
getReadStream
Return a stream to read from the document.- Parameters:
doc
- The access handle to the document
-
getWriteStream
java.io.OutputStream getWriteStream(int sessionid, java.lang.String store_location)Return a stream to write into a new, empty document. Creates an object with a Store interface.- Parameters:
sessionid
- The identity number of the session to which the data document belongs.store_location
- A string identifying where the storage should be located.- Returns:
- A stream for writing document content
-
getAppendStream
Return a stream to write into at the end of a document.- Parameters:
doc
- The access handle to the document
-