de.fuberlin.wiwiss.semmf.descr.impl
Class NodeMatchingDescriptionImpl

java.lang.Object
  extended by de.fuberlin.wiwiss.semmf.descr.impl.NodeMatchingDescriptionImpl
All Implemented Interfaces:
NodeMatchingDescription

public class NodeMatchingDescriptionImpl
extends java.lang.Object
implements NodeMatchingDescription

Version:
1.0 last modified 29.11.2006
Author:
Radoslaw Oldakowski

Field Summary
private  boolean isReversed
          flags if the matching of this node should be reversed (=> switch query and resource nodes)
private  java.lang.String label
          Label of this node
 Matcher matcher
          A Matcher which will be used to calculate the similarity of the query and resource nodes.
private  java.util.List propertyMatchingDescriptionList
          List of objects implementing the PropertyMatchingDescription interface.
 java.lang.String queryNodePath
          RDQL path expression leading to the query node
 java.lang.String resNodePath
          RDQL path expression leading to the resource node of a ceartain resource graph
private  float weight
          Weight of this node
 
Constructor Summary
NodeMatchingDescriptionImpl(java.lang.String label, float weight)
          Constructor.
NodeMatchingDescriptionImpl(java.lang.String label, float weight, boolean reversedMatching)
          Constructor.
 
Method Summary
 void addPropertyMatchingDescription(PropertyMatchingDescription pmd)
          Adds a new PropertyMatchingDescription to the class interanal List of pmd's
 java.lang.String getLabel()
           
 Matcher getMatcher()
           
 java.util.List getPropertyMatchingDescriptionList()
           
 java.lang.String getQueryNodePath()
           
 java.lang.String getResourceNodePath()
           
 float getWeight()
           
 boolean hasProperties()
           
 boolean reverseMatching()
          In most cases the matching engine compares a value from a resource graph with the semantically corresponding value from a query graph (= the "required" value).
 void setReversed(boolean reversed)
          Specifies if the matching of this node should be reversed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

label

private java.lang.String label
Label of this node


weight

private float weight
Weight of this node


queryNodePath

public java.lang.String queryNodePath
RDQL path expression leading to the query node


resNodePath

public java.lang.String resNodePath
RDQL path expression leading to the resource node of a ceartain resource graph


matcher

public Matcher matcher
A Matcher which will be used to calculate the similarity of the query and resource nodes.


isReversed

private boolean isReversed
flags if the matching of this node should be reversed (=> switch query and resource nodes)


propertyMatchingDescriptionList

private java.util.List propertyMatchingDescriptionList
List of objects implementing the PropertyMatchingDescription interface. These objects hold information about the matching of Property hanging from blank nodes in resource and query graphs

Constructor Detail

NodeMatchingDescriptionImpl

public NodeMatchingDescriptionImpl(java.lang.String label,
                                   float weight)
Constructor. In a vast majority of cases the node matching is not reversed if otherwise use the other constructor.

Parameters:
label - label of this node
weight - weight of this node

NodeMatchingDescriptionImpl

public NodeMatchingDescriptionImpl(java.lang.String label,
                                   float weight,
                                   boolean reversedMatching)
Constructor.

Parameters:
label - label of this node
weight - weight of this node
reversedMatching - flags whether the matching of this node should be reversed
Method Detail

addPropertyMatchingDescription

public void addPropertyMatchingDescription(PropertyMatchingDescription pmd)
Adds a new PropertyMatchingDescription to the class interanal List of pmd's


setReversed

public void setReversed(boolean reversed)
Specifies if the matching of this node should be reversed

Parameters:
reversed - true if the matching of this node should be reversed

getLabel

public java.lang.String getLabel()
Specified by:
getLabel in interface NodeMatchingDescription
Returns:
label of this node.

getWeight

public float getWeight()
Specified by:
getWeight in interface NodeMatchingDescription
Returns:
the weight which represents the importance of this node among other nodes in a particular ClusterMatchingDescription The weight is a float number [0..1]. The sum of all node weights equals 1.

getQueryNodePath

public java.lang.String getQueryNodePath()
Specified by:
getQueryNodePath in interface NodeMatchingDescription
Returns:
RDQL path expression which will be evaluated by the matching engine in order to find the queryNode.

getResourceNodePath

public java.lang.String getResourceNodePath()
Specified by:
getResourceNodePath in interface NodeMatchingDescription
Returns:
RDQL path expression which will be evaluated by the matching engine in order to find a particualr resourceNode.

getMatcher

public Matcher getMatcher()
Specified by:
getMatcher in interface NodeMatchingDescription
Returns:
a Matcher which is associated with this NodeMatchingDescriptionImpl and which will be used to calcualte the similarity between the query and resource nodes.

reverseMatching

public boolean reverseMatching()
In most cases the matching engine compares a value from a resource graph with the semantically corresponding value from a query graph (= the "required" value). But for some nodes it is reasonable to reverse the matching. A good example is comparing job requirements with applicant's profile. If a person (query graph) looks for a job (resource graph) then while comparing his skills with skills required for a certain position the required skills from a resource graph (job description) become the "should be" values, thus the matching has to be reversed.

Specified by:
reverseMatching in interface NodeMatchingDescription
Returns:
true if the matching should be reversed

hasProperties

public boolean hasProperties()
Specified by:
hasProperties in interface NodeMatchingDescription
Returns:
true if this node has properties which should be matched

getPropertyMatchingDescriptionList

public java.util.List getPropertyMatchingDescriptionList()
Specified by:
getPropertyMatchingDescriptionList in interface NodeMatchingDescription
Returns:
list of objects implementing the PropertyMatchingDescription interface. These objects hold information about the matching of Property values hanging from a blank node.