public interface IGPO extends IGenericSkin
link set
. Associations and link sets provide an uniform,
efficient and scalable API for object navigation. Link sets may be
indexed
for efficient search.
Extensible behavior is realized by wrapping up a generic object within some
application specific interface. Generic object implementations should be
considered as final
. Specific backends may support
subclassing but use of subclassing will lock an application into a specific
GOM platform. Instead applications layer additional behavior onto generic
objects using "skins" - see asClass( Class )
. A skin delegates the
management of persistent state to a backing generic object. The use of skins
provides transparent migration of application code across different GOM
implementations.
The generic object model provides transparent and scalable persistence when
using an appropriate backing store. The backing store is selected and
configured using the ObjectManagerFactory
.
Modifier and Type | Method and Description |
---|---|
void |
addValue(org.openrdf.model.URI property,
org.openrdf.model.Value newValue)
Assert (self,p,newValue).
|
IGenericSkin |
asClass(Class theClassOrInterface)
Returns an transient object that wraps the same persistent object but
exposes the behavior identified by the identified interface.
|
boolean |
equals(Object other)
Returns true iff other has the same identity as this
generic object and is in the same
IObjectManager scope (this is
just this == other since the IObjectManager
guarantees that IGPO s are canonical for a given Resource
within the scope of the IObjectManager ). |
BigdataResource |
getId()
Returns the persistent identity of the generic object.
|
IGPO |
getLink(org.openrdf.model.URI property,
IGPO target)
Return the
IGPO modeling the link iff it exists. |
Set<IGPO> |
getLinksIn()
All ?y where (?y,?p,self).
|
ILinkSet |
getLinksIn(org.openrdf.model.URI property)
All ?y where (?y,p,self).
|
Set<IGPO> |
getLinksOut()
All ?y where (self,?p,?y) and ?y is Resource.
|
ILinkSet |
getLinksOut(org.openrdf.model.URI property)
All ?y where (self,p,?y) and ?y is Resource.
|
IObjectManager |
getObjectManager()
Return the
IObjectManager used to materialize or create this
generic object. |
Map<org.openrdf.model.URI,Long> |
getReverseLinkProperties()
Return a map giving the range count for each reverse link property.
|
Set<org.openrdf.model.Statement> |
getStatements()
All (self,?p,?o).
|
IGPO |
getType()
FIXME: this method will be moved to an as yet unnamed derived class
that will become the superclass for alchemist generated subclasses.
|
org.openrdf.model.Value |
getValue(org.openrdf.model.URI property)
Return first Value for property or null if no Value for that property.
|
Set<org.openrdf.model.Value> |
getValues(org.openrdf.model.URI property)
All ?y where (self,p,?y).
|
int |
hashCode()
Return the hash code of the identity of the generic object.
|
boolean |
isBound(org.openrdf.model.URI property)
Exists (self,p,?y).
|
boolean |
isMemberOf(ILinkSet linkSet)
Exists (?x,linkSet.property,self).
|
IGPO |
materialize()
Force the full materialization of the
IGPO . |
String |
pp() |
void |
remove()
Removes the persistent object.
|
void |
removeValue(org.openrdf.model.URI property,
org.openrdf.model.Value oldValue)
Remove (self,p,oldValue) if found.
|
void |
removeValues(org.openrdf.model.URI property)
Remove all (self,p,?).
|
void |
setValue(org.openrdf.model.URI property,
org.openrdf.model.Value newValue)
Replace (self,p,?x) with (self,p,newValue).
|
asGeneric
BigdataResource getId()
boolean equals(Object other)
IObjectManager
scope (this is
just this == other
since the IObjectManager
guarantees that IGPO
s are canonical for a given Resource
within the scope of the IObjectManager
).int hashCode()
IObjectManager getObjectManager()
IObjectManager
used to materialize or create this
generic object.org.openrdf.model.Value getValue(org.openrdf.model.URI property)
void setValue(org.openrdf.model.URI property, org.openrdf.model.Value newValue)
void addValue(org.openrdf.model.URI property, org.openrdf.model.Value newValue)
IGPO getLink(org.openrdf.model.URI property, IGPO target)
IGPO
modeling the link iff it exists.void removeValue(org.openrdf.model.URI property, org.openrdf.model.Value oldValue)
void removeValues(org.openrdf.model.URI property)
Set<org.openrdf.model.Statement> getStatements()
Set<org.openrdf.model.Value> getValues(org.openrdf.model.URI property)
ILinkSet getLinksIn(org.openrdf.model.URI property)
ILinkSet getLinksOut(org.openrdf.model.URI property)
boolean isMemberOf(ILinkSet linkSet)
boolean isBound(org.openrdf.model.URI property)
Map<org.openrdf.model.URI,Long> getReverseLinkProperties()
SELECT ?p, COUNT(*) WHERE { ?o ?p} GROUP BY ?p
void remove()
While this clears all link sets held by the generic object, the members of those link sets are NOT explicitly removed since they may participate in other associations.
The IGPO
interface may no longer be used for this object if this
operation is successful.
IGenericSkin asClass(Class theClassOrInterface)
IGenericSkin
has already been minted for this generic object, then it is simply
returned. Otherwise an implementation class for the interface MUST have
been registered with the runtime and MUST implement a constructor
accepting a single IGenericSkin
argument.
The life cycle of a skin object returned by this method MUST be no less than the in-memory life cycle of the generic object for which the skin was minted. This constraint makes it possible to have transient yet expensive initialization, such as caches, on skin objects.
UnsupportedOperationException
- If the runtime is unable to identify an implementation
class for the specified interface.IGenericSkin
,
GenericSkinRegistry
String pp()
IGPO getType()
Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.