|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openanzo.server.repository.structures.NamedGraph
public class NamedGraph
Provides read and write access to NamedGraph stored in the repository. NamedGraph are named arbitrary groupings of statements that may overlap and subsume each other. NamedGraph data is cached in memory and is not persisted to the repository until commit is called or a batch commit (via the Batchable interface) is performed.
Batchable| Nested Class Summary | |
|---|---|
static class |
NamedGraph.Factory
Factory to create NamedGraph |
| Nested classes/interfaces inherited from interface org.openanzo.jdbc.utils.batchable.Batchable |
|---|
Batchable.BatchGroup, Batchable.BatchOperation, Batchable.BatchOperationSet, Batchable.NullBatch |
| Field Summary |
|---|
| Fields inherited from interface org.openanzo.jdbc.utils.batchable.Batchable |
|---|
EMPTY_BATCH |
| Method Summary | |
|---|---|
void |
commit()
Commit changes to the database |
static NamedGraph |
createNamedGraph(java.lang.Long id,
java.lang.Long metaId,
java.lang.Long aclId,
java.lang.Long timestamp,
java.lang.Long createdBy,
long revision,
RepositoryConnection repositoryConnection,
long lastModifiedBy)
Create NamedGraph with given properties |
java.lang.Long |
getAclId()
Get the aclid for this graph |
java.lang.Long |
getCreatedBy()
Get id of user that created this NamedGraph |
java.lang.Long |
getId()
Gets the id of the data object. |
java.lang.Long |
getLastModifiedBy()
Get id of user that last modified this NamedGraph |
org.openrdf.model.URI |
getMetaDataUri()
Get the URI of the metadata graph |
java.lang.Long |
getMetaId()
Get the metadata id of namedGraph |
java.lang.Long |
getModified()
Get timestamp when NamedGraph was last modified |
long |
getRevision()
Get the revision of the graph |
org.openrdf.model.URI |
getURI()
Get the URI for this graph |
boolean |
incrementRevision()
Increment the revision of the graph if something changed during current transaction |
boolean |
isDirty()
Has namedGraph changed during current transaction |
boolean |
isStored()
Get if the namedgraph is stored in the database |
static boolean |
isStored(RepositoryConnection repositoryConnection,
java.lang.Long id)
Is this NamedGraph stored in database |
java.util.List<Batchable.BatchOperation> |
listBatchOperations()
Get the current list of batch operations for this object |
static NamedGraph |
loadNamedGraph(java.lang.Long id,
RepositoryConnection repositoryConnection)
Load a NamedGraph from database |
void |
remove()
Remove the namedgraph from the database |
void |
setAclId(java.lang.Long aclId)
Set the aclid for the graph |
void |
setCreatedBy(java.lang.Long createdBy)
Set id of user that created this NamedGraph |
void |
setLastModifiedBy(java.lang.Long lastModifiedBy)
Set id of user that last modified this NamedGraph |
void |
setMetaId(java.lang.Long metaId)
Set the metaid for the graph |
void |
setModified(java.lang.Long modified)
Set the lastModified timestamp |
void |
setRevision(long revision)
Set the revision for the graph |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static boolean isStored(RepositoryConnection repositoryConnection,
java.lang.Long id)
throws AnzoException
repositoryConnection - connection to the databaseid - id of the NamedGraph
AnzoException
public static NamedGraph loadNamedGraph(java.lang.Long id,
RepositoryConnection repositoryConnection)
throws AnzoException
id - id of the NamedGraphrepositoryConnection - connection to the database
AnzoException
public static NamedGraph createNamedGraph(java.lang.Long id,
java.lang.Long metaId,
java.lang.Long aclId,
java.lang.Long timestamp,
java.lang.Long createdBy,
long revision,
RepositoryConnection repositoryConnection,
long lastModifiedBy)
throws AnzoException
id - ID of namedGraphmetaId - MetadataId of namedGraphaclId - ACLid of namedGraphtimestamp - Timestamp when namedGraph was modifiedcreatedBy - User that created namedGraphrevision - Revision of namedGraphrepositoryConnection - RepositoryConnection to write data tolastModifiedBy -
AnzoExceptionpublic java.lang.Long getId()
CachableResource
getId in interface CachableResourcepublic java.lang.Long getMetaId()
public org.openrdf.model.URI getMetaDataUri()
public org.openrdf.model.URI getURI()
getURI in interface CachableResourcepublic java.lang.Long getAclId()
public long getRevision()
public void setAclId(java.lang.Long aclId)
aclId - the aclid for the graphpublic void setMetaId(java.lang.Long metaId)
metaId - the metaid for the graphpublic void setRevision(long revision)
revision - the revision for the graphpublic boolean incrementRevision()
public void setModified(java.lang.Long modified)
modified - the lastModified timestamppublic boolean isStored()
isStored in interface CachableResourcepublic void remove()
public void commit()
throws RdbException
RdbExceptionpublic java.util.List<Batchable.BatchOperation> listBatchOperations()
Batchable
listBatchOperations in interface Batchablepublic boolean isDirty()
public java.lang.Long getCreatedBy()
public void setCreatedBy(java.lang.Long createdBy)
createdBy - id of user that created this NamedGraphpublic java.lang.Long getLastModifiedBy()
public void setLastModifiedBy(java.lang.Long lastModifiedBy)
lastModifiedBy - id of user that last modified this NamedGraphpublic java.lang.Long getModified()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||