eu.planets_project.services.compare
Class PropertyComparison
java.lang.Object
eu.planets_project.services.compare.PropertyComparison
public final class PropertyComparison
- extends Object
This class encapsulates a comparison property.
That is, it encapsulates a single property related to the comparison of
the content of two digital objects. The 'first' and 'second' objects.
In the 'significant property' case, this is the comparison of the values of
a particular property that has been extracted from both files.
More generally, this may be a property that encapsulates the relationship
between different subsets of properties from each object. i.e. when the same
concept is encoded differently in each.
Finally, this can be a direct comparison property, like
Peak Signal-to-Noise Ratio. These are not a simple comparisons of the
properties of objects, but direct expression of the differences between the
content or the expected performances.
- Author:
- Andrew.Jackson@bl.uk
PropertyComparison
public PropertyComparison(Property comparison,
List<Property> firstProperties,
List<Property> secondProperties,
PropertyComparison.Equivalence equivalence)
- This constructor creates general many-to-many property comparison.
- Parameters:
comparison
- firstProperties
- secondProperties
- equivalence
-
PropertyComparison
public PropertyComparison(Property comparison,
Property first,
Property second,
PropertyComparison.Equivalence equivalence)
- This constructor creates simple one-to-one property comparisons.
- Parameters:
comparison
- first
- second
- equivalence
-
PropertyComparison
public PropertyComparison(Property comparison,
PropertyComparison.Equivalence equivalence)
- This constructor creates direct comparison properties.
- Parameters:
comparison
- equivalence
-
getComparison
public Property getComparison()
- Returns:
- the comparison
getFirstProperties
public List<Property> getFirstProperties()
- Returns:
- the firstProperties
getSecondProperties
public List<Property> getSecondProperties()
- Returns:
- the secondProperties
getEquivalence
public PropertyComparison.Equivalence getEquivalence()
- Returns:
- the equivalence
isEqual
public boolean isEqual()
- Returns:
isMissing
public boolean isMissing()
- Returns:
isUnknown
public boolean isUnknown()
- Returns:
isDirectComparision
public boolean isDirectComparision()
- Returns:
isPropertyComparison
public boolean isPropertyComparison()
- Returns:
isSinglePropertyComparison
public boolean isSinglePropertyComparison()
- Returns:
getFirstProperty
public Property getFirstProperty()
- Returns:
getSecondProperty
public Property getSecondProperty()
- Returns:
toString
public String toString()
- Overrides:
toString
in class Object
Copyright © 2013 Open Planets Foundation. All Rights Reserved.