public class GPO extends Object implements IGPO
| Constructor and Description |
|---|
GPO(IObjectManager om,
org.openrdf.model.BNode id,
org.openrdf.model.Statement stmt) |
GPO(IObjectManager om,
org.openrdf.model.Resource id) |
| Modifier and Type | Method and Description |
|---|---|
void |
addValue(org.openrdf.model.URI property,
org.openrdf.model.Value value)
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.
|
IGPO |
asGeneric()
|
void |
dematerialize() |
void |
doCommit()
Called by the ObjectManager when flushing dirty objects.
|
String |
encode(org.openrdf.model.Resource v)
Encode a URL, Literal, or blank node for inclusion in a SPARQL query to
be sent to the remote service.
|
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()
getLinksIn simply filters the values for Resources and returns a wrapper.
|
ILinkSet |
getLinksIn(org.openrdf.model.URI property)
All ?y where (?y,p,self).
|
Set<IGPO> |
getLinksOut()
All ?y where (self,?,?y).
|
ILinkSet |
getLinksOut(org.openrdf.model.URI property)
All ?y where (self,p,?y).
|
IObjectManager |
getObjectManager()
Return the
IObjectManager used to materialize or create this
generic object. |
Iterator<org.openrdf.model.URI> |
getPropertyURIs() |
Map<org.openrdf.model.URI,Long> |
getReverseLinkProperties()
Return a map giving the range count for each reverse link property.
|
IGenericSkin |
getSkin(Class intf)
The getSkin method is inspired somewhat by the Microsoft Win32
getInterface that allowed an object to return multiple interfaces.
|
BigdataStatement |
getStatement()
Iff this
IGPO represents a statement (aka link), then return that
Statement. |
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.
|
void |
initLinkValue(org.openrdf.model.URI predicate,
org.openrdf.model.Resource object) |
void |
initValue(org.openrdf.model.URI predicate,
org.openrdf.model.Value object) |
boolean |
isBound(org.openrdf.model.URI property)
Exists (self,p,?y).
|
boolean |
isDirty() |
boolean |
isMemberOf(ILinkSet linkSet)
Exists (?x,linkSet.property,self).
|
IGPO |
materialize()
Basis for lazy materialization, checks materialize state and if false
requests matierialization from the ObjectManager
|
String |
pp() |
void |
prepareBatchUpdate(List<org.openrdf.model.Statement> insertList,
List<org.openrdf.model.Statement> removeList)
Adds statements to be inserted and removed to the appropriate lists based
on the
GPOs internal edit set. |
void |
remove()
FIXME This should run a query (unless it is fully materialized, including
the reverse links and forward links) and build an edit list for the
retracts.
|
void |
removeValue(org.openrdf.model.URI property,
org.openrdf.model.Value value)
Remove (self,p,oldValue) if found.
|
void |
removeValues(org.openrdf.model.URI property)
Remove all (self,p,?).
|
void |
setMaterialized(boolean b) |
void |
setValue(org.openrdf.model.URI property,
org.openrdf.model.Value newValue)
Replace (self,p,?x) with (self,p,newValue).
|
public GPO(IObjectManager om, org.openrdf.model.Resource id)
public GPO(IObjectManager om, org.openrdf.model.BNode id, org.openrdf.model.Statement stmt)
public void dematerialize()
public int hashCode()
IGPOpublic IGenericSkin asClass(Class theClassOrInterface)
IGPOIGenericSkin
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.
asClass in interface IGPOIGenericSkin,
GenericSkinRegistrypublic IObjectManager getObjectManager()
IGPOIObjectManager used to materialize or create this
generic object.getObjectManager in interface IGPOpublic BigdataResource getId()
IGPOpublic BigdataStatement getStatement()
IGPO represents a statement (aka link), then return that
Statement.Statement or null if the IGPO
does not represent a Statement.public String encode(org.openrdf.model.Resource v)
v - The resource.ObjectMgrModel.encode(Resource)public Set<IGPO> getLinksIn()
getLinksIn in interface IGPOpublic ILinkSet getLinksIn(org.openrdf.model.URI property)
getLinksIn in interface IGPOpublic Set<IGPO> getLinksOut()
getLinksOut in interface IGPOpublic ILinkSet getLinksOut(org.openrdf.model.URI property)
getLinksOut in interface IGPOpublic Map<org.openrdf.model.URI,Long> getReverseLinkProperties()
IGPO
SELECT ?p, COUNT(*) WHERE { ?o ?p } GROUP BY ?p
getReverseLinkProperties in interface IGPOpublic Set<org.openrdf.model.Statement> getStatements()
IGPOgetStatements in interface IGPOpublic org.openrdf.model.Value getValue(org.openrdf.model.URI property)
IGPOpublic Set<org.openrdf.model.Value> getValues(org.openrdf.model.URI property)
IGPOpublic boolean isBound(org.openrdf.model.URI property)
IGPOpublic boolean isMemberOf(ILinkSet linkSet)
IGPOisMemberOf in interface IGPOpublic void remove()
public void initValue(org.openrdf.model.URI predicate,
org.openrdf.model.Value object)
public void initLinkValue(org.openrdf.model.URI predicate,
org.openrdf.model.Resource object)
public void setValue(org.openrdf.model.URI property,
org.openrdf.model.Value newValue)
IGPOpublic IGPO getLink(org.openrdf.model.URI property, IGPO target)
IGPO modeling the link iff it exists.
FIXME This should be conditional, returning null if the link does not
exist. However, that conditional test needs to be efficient.public void addValue(org.openrdf.model.URI property,
org.openrdf.model.Value value)
IGPOpublic void removeValue(org.openrdf.model.URI property,
org.openrdf.model.Value value)
IGPOremoveValue in interface IGPOpublic void removeValues(org.openrdf.model.URI property)
IGPOremoveValues in interface IGPOpublic boolean isDirty()
public IGPO asGeneric()
IGenericSkinIGPO interface and is primarily used to peel off a
skin and gain access to implementation specific methods on the
IGPO implementation object. When invoked on an
object that directly implements the IGPO behavior
(vs delegating the interface to an implementation object), then
that object is returned. The return value is never
null.asGeneric in interface IGenericSkinpublic String pp()
public IGPO getType()
IGPOpublic void doCommit()
public IGPO materialize()
materialize in interface IGPOIGPO.public void setMaterialized(boolean b)
public void prepareBatchUpdate(List<org.openrdf.model.Statement> insertList, List<org.openrdf.model.Statement> removeList)
GPOs internal edit set.insertList - The list of statements to be added.removeList - The list of statements to be removed.public IGenericSkin getSkin(Class intf)
It may be worthwhile performance wise to cache a skin. I believe of more importance is to preserve identity - even of the interface/skin object.
skin - interface requiredpublic Iterator<org.openrdf.model.URI> getPropertyURIs()
Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.