Class PropertyMapping


  • public class PropertyMapping
    extends Object
    Class to define a mapping of the properties of 2 knowledge bases.
    Author:
    Klaus Lyko
    • Constructor Detail

      • PropertyMapping

        public PropertyMapping()
    • 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 information
        target - knowledge base information
      • containsSourceProp

        public boolean containsSourceProp​(String uri)
      • containsTargetProp

        public boolean containsTargetProp​(String uri)