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

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

public class PropertyMatchingDescriptionImpl
extends java.lang.Object
implements PropertyMatchingDescription

Version:
1.0 last modified 29.11.2006
Author:
Radoslaw Oldakowski

Field Summary
private  boolean isReversed
          flags if the matching of this property should be reversed (=> switch query and resource properties)
private  java.lang.String label
          Label of this property
 Matcher matcher
          A Matcher which will be used to calculate the similarity of the query and resource properties.
 java.lang.String queryPropertyURI
          URI of the property of the query node
 java.lang.String resPropertyURI
          URI of the property of the resource node
private  float weight
          Weight of this property
 
Constructor Summary
PropertyMatchingDescriptionImpl(java.lang.String label, float weight)
          Constructor.
PropertyMatchingDescriptionImpl(java.lang.String label, float weight, boolean reversedMatching)
          Constructor.
 
Method Summary
 java.lang.String getLabel()
           
 Matcher getMatcher()
           
 java.lang.String getQueryPropertyURI()
           
 java.lang.String getResPropertyURI()
           
 float getWeight()
           
 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 property 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 property


weight

private float weight
Weight of this property


queryPropertyURI

public java.lang.String queryPropertyURI
URI of the property of the query node


resPropertyURI

public java.lang.String resPropertyURI
URI of the property of the resource node


matcher

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


isReversed

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

Constructor Detail

PropertyMatchingDescriptionImpl

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

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

PropertyMatchingDescriptionImpl

public PropertyMatchingDescriptionImpl(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

setReversed

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

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

getLabel

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

getWeight

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

getQueryPropertyURI

public java.lang.String getQueryPropertyURI()
Specified by:
getQueryPropertyURI in interface PropertyMatchingDescription
Returns:
URI of the property of the query node

getResPropertyURI

public java.lang.String getResPropertyURI()
Specified by:
getResPropertyURI in interface PropertyMatchingDescription
Returns:
URI of the property of the resource node

getMatcher

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

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 PropertyMatchingDescription
Returns:
true if the matching should be reversed