public abstract class ForwardingSession extends ForwardingObject implements Session
Constructor and Description |
---|
ForwardingSession() |
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the
Session instance, releasing any resource possibly
allocated. |
Operation.Count |
count(org.openrdf.model.URI type)
Creates a new
Count operation object for counting records of the type specified. |
Operation.Create |
create(org.openrdf.model.URI type)
Creates a new
Create operation object for storing new records of the type
specified. |
protected abstract Session |
delegate() |
Operation.Delete |
delete(org.openrdf.model.URI type)
Creates a new
Delete operation object for deleting records of the type specified. |
Operation.Download |
download(org.openrdf.model.URI resourceID)
Creates a new
Download operation object. |
Map<String,String> |
getNamespaces()
Returns the modifiable namespace map of this
Session . |
String |
getPassword()
Returns the user password, if any.
|
String |
getUsername()
Returns the username associated to this
Session , if any. |
boolean |
isClosed()
Tests whether this
Session instance has been closed. |
Operation.Match |
match()
Creates a new
Match operation object for matching <resource, mention, entity,
axioms> 4-tuples matching specific conditions. |
Operation.Merge |
merge(org.openrdf.model.URI type)
Creates a new
Merge operation object for merging local record description of the
type specified with descriptions stored in the KnowledgeStore. |
Operation.Retrieve |
retrieve(org.openrdf.model.URI type)
Creates a new
Retrieve operation object for retrieving records of the type
specified. |
Operation.Sparql |
sparql(String expression,
Object... arguments)
Creates a new
Sparql operation object for evaluating a SPARQL query on crystallized
axiom data. |
Operation.Update |
update(org.openrdf.model.URI type)
Creates a new
Update operation object for updating one or more properties of
records of the type specified. |
Operation.Upload |
upload(org.openrdf.model.URI resourceID)
Creates a new
Upload operation object. |
toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
sparqldelete, sparqlupdate
protected abstract Session delegate()
delegate
in class ForwardingObject
@Nullable public String getUsername() throws IllegalStateException
Session
Session
, if any.getUsername
in interface Session
Session
is anonymousIllegalStateException
- if the Session
has been closed@Nullable public String getPassword() throws IllegalStateException
Session
getPassword
in interface Session
IllegalStateException
- if the Session
has been closedpublic Map<String,String> getNamespaces() throws IllegalStateException
Session
Session
. The map is backed by the
default mappings of Data#getNamespaceMap()
. New mappings are stored in the
Session
map and may override the default mappings. Removal of mappings is performed
on the Session
map, and may reactivate the default mapping as a consequence.getNamespaces
in interface Session
Session
IllegalStateException
- if the Session
has been closedpublic Operation.Download download(org.openrdf.model.URI resourceID) throws IllegalStateException
Session
Download
operation object.download
in interface Session
resourceID
- the ID of the resource whose representation should be downloadedDownload
operation objectIllegalStateException
- if the Session
has been closedpublic Operation.Upload upload(org.openrdf.model.URI resourceID) throws IllegalStateException
Session
Upload
operation object.upload
in interface Session
resourceID
- the ID of the resource whose representation should be updatedUpload
operation objectIllegalStateException
- if the Session
has been closedpublic Operation.Count count(org.openrdf.model.URI type) throws IllegalStateException
Session
Count
operation object for counting records of the type specified.count
in interface Session
type
- the URI of the type of record to count, either KS.RESOURCE
,
KS.MENTION
, KS.ENTITY
or KS.AXIOM
Count
operation objectIllegalStateException
- if the Session
has been closedpublic Operation.Retrieve retrieve(org.openrdf.model.URI type) throws IllegalStateException
Session
Retrieve
operation object for retrieving records of the type
specified.retrieve
in interface Session
type
- the URI of the type of record to retrieve, either KS.RESOURCE
,
KS.MENTION
, KS.ENTITY
or KS.AXIOM
Retrieve
operation objectIllegalStateException
- if the Session
has been closedpublic Operation.Create create(org.openrdf.model.URI type) throws IllegalStateException
Session
Create
operation object for storing new records of the type
specified.create
in interface Session
type
- the URI of the type of record to create, either KS.RESOURCE
,
KS.MENTION
, KS.ENTITY
or KS.AXIOM
Create
operation objectIllegalStateException
- if the Session
has been closedpublic Operation.Merge merge(org.openrdf.model.URI type) throws IllegalStateException
Session
Merge
operation object for merging local record description of the
type specified with descriptions stored in the KnowledgeStore.merge
in interface Session
type
- the URI of the type of record to merge, either KS.RESOURCE
,
KS.MENTION
, KS.ENTITY
or KS.AXIOM
Merge
operation objectIllegalStateException
- if the Session
has been closedpublic Operation.Update update(org.openrdf.model.URI type) throws IllegalStateException
Session
Update
operation object for updating one or more properties of
records of the type specified.update
in interface Session
type
- the URI of the type of record to update, either KS.RESOURCE
,
KS.MENTION
, KS.ENTITY
or KS.AXIOM
Update
operation objectIllegalStateException
- if the Session
has been closedpublic Operation.Delete delete(org.openrdf.model.URI type) throws IllegalStateException
Session
Delete
operation object for deleting records of the type specified.delete
in interface Session
type
- the URI of the type of record to delete, either KS.RESOURCE
,
KS.MENTION
, KS.ENTITY
or KS.AXIOM
Delete
operation objectIllegalStateException
- if the Session
has been closedpublic Operation.Match match() throws IllegalStateException
Session
Match
operation object for matching <resource, mention, entity,
axioms> 4-tuples matching specific conditions.match
in interface Session
Match
operation objectIllegalStateException
- if the Session
has been closedpublic Operation.Sparql sparql(String expression, Object... arguments) throws IllegalStateException
Session
Sparql
operation object for evaluating a SPARQL query on crystallized
axiom data.sparql
in interface Session
expression
- the SPARQL query expression, not nullarguments
- arguments to be injected in $$
placeholders in the query expression; can
be URI
s, Literal
s or scalar values that can be converted to
Literal
s (e.g., strings, integers)Sparql
operation objectIllegalStateException
- if the Session
has been closedpublic boolean isClosed()
Session
Session
instance has been closed.public void close()
Session
Session
instance, releasing any resource possibly
allocated. Calling this method additional times has no effect. After this method is called,
calls to other method of the Session
interface will result in
IllegalStateException
s to be thrown.Copyright © 2015–2016 FBK-irst. All rights reserved.