|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openanzo.common.rdb.layout.NodeLayoutBase<T>
org.openanzo.common.rdb.layout.NodeURILayout<T>
T - type of Resource being stored in this layoutpublic class NodeURILayout<T extends org.openrdf.model.Resource>
Layout for Node_URI and Node_Blank. Based on NodeLayoutBase which enables long node support for uri types that provide a long table name.
| Constructor Summary | |
|---|---|
NodeURILayout(NodeType type,
SQLCache sqlCache,
Sequence sequence,
java.lang.String sequenceName,
java.lang.String longSequenceName,
java.lang.String tableName,
java.lang.String resourceTempTableName,
java.lang.String idTempTableName,
java.lang.String optimizationString)
Construct a layout to store Resources (URIs or BNodes) in a database |
|
NodeURILayout(NodeType type,
SQLCache sqlCache,
Sequence sequence,
java.lang.String sequenceName,
java.lang.String longSequenceName,
java.lang.String tableName,
java.lang.String longTableName,
java.lang.String resourceTempTableName,
java.lang.String idTempTableName,
int maxLength,
java.lang.String optimizationString)
Construct a layout to store Resources (URIs or BNodes) in a database |
|
| Method Summary | |
|---|---|
T |
convert(java.lang.String value,
java.lang.Long modifiedId)
Convert raw value from database into Node of appropriate type |
T |
fetchValue(java.lang.Long id)
Fetches a nodes value from the database based on its long identifier and NodeType. |
NodeType |
getType()
|
java.util.Map<java.lang.Long,T> |
resolveStoredIds(java.util.Set<java.lang.Long> ids)
This method will determine which IDs in a list of given Ids are already stored in the database. |
java.util.Map<T,java.lang.Long> |
resolveStoredNodes(java.util.Set<T> nodes,
boolean storeUnResolvedNodes)
This method will determine which nodes in a list of given nodes are already stored in the database. |
java.lang.Long |
store(T n)
Stores a node in the database |
| Methods inherited from class org.openanzo.common.rdb.layout.NodeLayoutBase |
|---|
fetchId, getLongSequenceName, getSequenceName, isLong |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public NodeURILayout(NodeType type,
SQLCache sqlCache,
Sequence sequence,
java.lang.String sequenceName,
java.lang.String longSequenceName,
java.lang.String tableName,
java.lang.String resourceTempTableName,
java.lang.String idTempTableName,
java.lang.String optimizationString)
type - Type of nodes this is storingsqlCache - The interface to the SQL prepared statement cachesequence - The sequence Object that is used to get IDssequenceName - The name of the sequence that is used to get IDslongSequenceName - The name of the sequence that is used to get IDs for long objectstableName - The name of the table where the nodes are storedresourceTempTableName - The name of the temporary table used to bulk insert nodesidTempTableName - The name of the temporary table used to bulk id resolutionoptimizationString - Extra parameters added to queries for database specific optimizations
public NodeURILayout(NodeType type,
SQLCache sqlCache,
Sequence sequence,
java.lang.String sequenceName,
java.lang.String longSequenceName,
java.lang.String tableName,
java.lang.String longTableName,
java.lang.String resourceTempTableName,
java.lang.String idTempTableName,
int maxLength,
java.lang.String optimizationString)
type - Type of nodes this is storingsqlCache - The interface to the SQL prepared statement cachesequence - The sequence Object that is used to get IDssequenceName - The name of the sequence that is used to get IDslongSequenceName - The name of the sequence that is used to get IDs for long objectstableName - The name of the table where the nodes are storedlongTableName - The name of the table where excessively long nodes are storedresourceTempTableName - The name of the temporary table used to bulk insert nodesidTempTableName - The name of the temporary table used to bulk id resolutionmaxLength - The maximum length of a node's string representation before it is considered longoptimizationString - Extra parameters added to queries for database specific optimizations| Method Detail |
|---|
public java.lang.Long store(T n)
INodeLayout
n - The node to be stored
public T fetchValue(java.lang.Long id)
INodeLayout
id - The ID of the node to be found
public T convert(java.lang.String value,
java.lang.Long modifiedId)
INodeLayout
value - raw value of node from databasemodifiedId - for literal values
public java.util.Map<T,java.lang.Long> resolveStoredNodes(java.util.Set<T> nodes,
boolean storeUnResolvedNodes)
INodeLayout
nodes - The nodes which need to be resolved to whether they are already stored or need to be stored.storeUnResolvedNodes - Store nodes that are not already stored
public NodeType getType()
public java.util.Map<java.lang.Long,T> resolveStoredIds(java.util.Set<java.lang.Long> ids)
INodeLayout
ids - The ids which need to be resolved to whether they are already stored.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||