Class PropertyMapping
- java.lang.Object
-
- org.aksw.limes.core.ml.algorithm.eagle.util.PropertyMapping
-
public class PropertyMapping extends Object
Class to define a mapping of the properties of 2 knowledge bases.- Author:
- Klaus Lyko
-
-
Field Summary
Fields Modifier and Type Field Description List<PairSimilar<String>>datePropPairsList<PairSimilar<String>>numberPropPairsList<PairSimilar<String>>pointsetPropPairsHashSet<String>sourceDatePropsHashSet<String>sourceNumberPropsHashSet<String>sourcePointsetPropsHashSet<String>sourceStringPropsList<PairSimilar<String>>stringPropPairsHashSet<String>targetDatePropsHashSet<String>targetNumberPropsHashSet<String>targetPointsetPropsHashSet<String>targetStringProps
-
Constructor Summary
Constructors Constructor Description PropertyMapping()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddDatePropertyMatch(String sourceProp, String targetProp)Add a match between two date properties.voidaddNumberPropertyMatch(String sourceProp, String targetProp)Add a match between two number properties.voidaddPointsetPropertyMatch(String sourceProp, String targetProp)Add a match between two pointset properties.propertiesvoidaddStringPropertyMatch(String sourceProp, String targetProp)properties Add a match between two String properties.booleancontainsSourceProp(String uri)booleancontainsTargetProp(String uri)AMappinggetCompletePropMapping()AMappinggetDatePropMapping()AMappinggetNumberPropMapping()AMappinggetPointsetPropMapping()AMappinggetStringPropMapping()booleanisDateProp(String name)Is the given property specified as a number PropertybooleanisMatch(String sourceProp, String targetProp)Are two properties part of the Property Mapping.booleanisNumberProp(String name)Is the given property specified as a number PropertybooleanisPointsetProp(String name)Is the given property specified as a pointset PropertyvoidsetDefault(KBInfo source, KBInfo target)Just a littler help function to set default property mapping.StringtoString()booleanwasSet()
-
-
-
Field Detail
-
stringPropPairs
public List<PairSimilar<String>> stringPropPairs
-
pointsetPropPairs
public List<PairSimilar<String>> pointsetPropPairs
-
numberPropPairs
public List<PairSimilar<String>> numberPropPairs
-
datePropPairs
public List<PairSimilar<String>> datePropPairs
-
-
Method Detail
-
addStringPropertyMatch
public void addStringPropertyMatch(String sourceProp, String targetProp)
properties Add a match between two String properties.- Parameters:
sourceProp- Name of the property of the source knowledge base.targetProp- Name of the property of the target knowledge base.
-
addNumberPropertyMatch
public void addNumberPropertyMatch(String sourceProp, String targetProp)
Add a match between two number properties.- Parameters:
sourceProp- Name of the property of the source knowledge base.targetProp- Name of the property of the target knowledge base.
-
addDatePropertyMatch
public void addDatePropertyMatch(String sourceProp, String targetProp)
Add a match between two date properties.- Parameters:
sourceProp- Name of the property of the source knowledge base.targetProp- Name of the property of the target knowledge base.
-
addPointsetPropertyMatch
public void addPointsetPropertyMatch(String sourceProp, String targetProp)
Add a match between two pointset properties.properties- Parameters:
sourceProp- Name of the property of the source knowledge base.targetProp- Name of the property of the target knowledge base.
-
isMatch
public boolean isMatch(String sourceProp, String targetProp)
Are two properties part of the Property Mapping.- Parameters:
sourceProp- Name of the property of the source knowledge base.targetProp- Name of the property of the target knowledge base.- Returns:
- true if the given property match, false otherwise.
-
isNumberProp
public boolean isNumberProp(String name)
Is the given property specified as a number Property- Parameters:
name- Name of the property.- Returns:
- True in case it was specified as a number, false otherwise.
-
isDateProp
public boolean isDateProp(String name)
Is the given property specified as a number Property- Parameters:
name- Name of the property.- Returns:
- True in case it was specified as a number, false otherwise.
-
isPointsetProp
public boolean isPointsetProp(String name)
Is the given property specified as a pointset Property- Parameters:
name- Name of the property.- Returns:
- True in case it was specified as a pointset, false otherwise.
-
getCompletePropMapping
public AMapping getCompletePropMapping()
-
getStringPropMapping
public AMapping getStringPropMapping()
-
getNumberPropMapping
public AMapping getNumberPropMapping()
-
getDatePropMapping
public AMapping getDatePropMapping()
-
getPointsetPropMapping
public AMapping getPointsetPropMapping()
-
wasSet
public boolean wasSet()
-
setDefault
public void setDefault(KBInfo source, KBInfo target)
Just a littler help function to set default property mapping.- Parameters:
source- knowledge base informationtarget- knowledge base information
-
containsSourceProp
public boolean containsSourceProp(String uri)
-
containsTargetProp
public boolean containsTargetProp(String uri)
-
-