de.fuberlin.wiwiss.d2rq.values
Class BlankNodeID

java.lang.Object
  extended by de.fuberlin.wiwiss.d2rq.values.BlankNodeID
All Implemented Interfaces:
ValueMaker

public class BlankNodeID
extends Object
implements ValueMaker

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.)

Version:
$Id: BlankNodeID.java,v 1.6 2006/11/02 13:01:16 cyganiak Exp $
Author:
Richard Cyganiak (richard@cyganiak.de)

Constructor Summary
BlankNodeID(String classMapID, List attributes)
          Constructs a new blank node identifier.
 
Method Summary
 Map attributeConditions(String anonID)
          Extracts column values from a blank node ID string.
 List attributes()
           
 void describeSelf(NodeSetFilter c)
           
 String makeValue(ResultRow row)
          Creates an identifier from a database row.
 boolean matches(String anonID)
          Checks if a given value fits this source without querying the database.
 Set projectionAttributes()
          Returns a set of all columns containing data necessary for this ValueSource.
 ValueMaker replaceColumns(ColumnRenamer renamer)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BlankNodeID

public BlankNodeID(String classMapID,
                   List attributes)
Constructs a new blank node identifier.

Parameters:
classMapID - A string that is unique for the class map whose resources are identified by this BlankNodeIdentifier
attributes - A set of Attributes that uniquely identify the nodes
Method Detail

attributes

public List attributes()

describeSelf

public void describeSelf(NodeSetFilter c)
Specified by:
describeSelf in interface ValueMaker

matches

public boolean matches(String anonID)
Description copied from interface: ValueMaker
Checks if a given value fits this source without querying the database.

Specified by:
matches in interface ValueMaker

projectionAttributes

public Set projectionAttributes()
Description copied from interface: ValueMaker
Returns a set of all columns containing data necessary for this ValueSource.

Specified by:
projectionAttributes in interface ValueMaker
Returns:
a set of {Column}s

attributeConditions

public Map attributeConditions(String anonID)
Extracts column values from a blank node ID string. The keys are Attributes, the values are strings.

Specified by:
attributeConditions in interface ValueMaker
Parameters:
anonID - value to be checked.
Returns:
a map with Column keys and string values
See Also:
ValueMaker.attributeConditions(java.lang.String)

makeValue

public String makeValue(ResultRow row)
Creates an identifier from a database row.

Specified by:
makeValue in interface ValueMaker
Parameters:
row - a database row
Returns:
this column's blank node identifier

replaceColumns

public ValueMaker replaceColumns(ColumnRenamer renamer)
Specified by:
replaceColumns in interface ValueMaker

toString

public String toString()
Overrides:
toString in class Object