|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.fuberlin.wiwiss.d2rq.map.BlankNodeIdentifier
A blank node identifier that uniquely identifies all resources generated from a specific ClassMap.
(Note: The implementation makes some assumptions about the Column class to keep the code simple and fast. This means BlankNodeIdentifier might not work with some hypothetical subclasses of Column.) TODO: Write tests for matches, extractColumnValues, getValue
History:
08-03-2004: Initial version of this class.
Field Summary | |
private java.lang.String |
classMapID
|
private java.util.Set |
identifierColumns
|
Constructor Summary | |
BlankNodeIdentifier(java.lang.String columns,
java.lang.String classMapID)
Constructs a new blank node identifier. |
Method Summary | |
java.lang.Object |
clone()
Make a shallow copy of this . |
boolean |
couldFit(java.lang.String anonID)
Checks if a given value fits this source without querying the database. |
java.util.Set |
getColumns()
Returns a set of all columns containing data necessary for this ValueSource. |
java.util.Map |
getColumnValues(java.lang.String anonID)
Extracts column values from a blank node ID string. |
java.lang.String |
getValue(java.lang.String[] row,
java.util.Map columnNameNumberMap)
Creates an identifier from a database row. |
void |
prefixTables(TablePrefixer prefixer)
Changes the fields in a newly created clone that are to be modified when making aliasses. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private java.lang.String classMapID
private java.util.Set identifierColumns
Constructor Detail |
public BlankNodeIdentifier(java.lang.String columns, java.lang.String classMapID)
columns
- a comma-seperated list of column names uniquely
identifying the nodesclassMapID
- a string that is unique for the class map
whose resources are identified by this BlankNodeIdentifierMethod Detail |
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
Prefixable
this
.
General advice: Do not overwrite clone().
prefixTables() works best with shallow copy which Object implements.
Issues: I have not found a (preferred) static equivalent of clone().
Since Objects clone() method is protected, we cannot just declare
Cloneable
, if we want to call clone() from outside of that
class hierarchy. Instead it must be public and implemented in each
Prefixable class by a call to super.clone().
clone
in interface Prefixable
java.lang.CloneNotSupportedException
public void prefixTables(TablePrefixer prefixer)
Prefixable
prefixTables
in interface Prefixable
prefixer
- does the actual prefixing of simple and complex types.public boolean couldFit(java.lang.String anonID)
ValueSource
couldFit
in interface ValueSource
public java.util.Set getColumns()
ValueSource
getColumns
in interface ValueSource
public java.util.Map getColumnValues(java.lang.String anonID)
Column
s, the values are strings.
getColumnValues
in interface ValueSource
anonID
- value to be checked.
ValueSource.getColumnValues(java.lang.String)
public java.lang.String getValue(java.lang.String[] row, java.util.Map columnNameNumberMap)
getValue
in interface ValueSource
row
- a database rowcolumnNameNumberMap
- a map from qualified column names to indices
into the row array
public java.lang.String toString()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |