Package gov.nasa.pds.citool.comparator
Class CatalogComparator
- java.lang.Object
-
- gov.nasa.pds.citool.comparator.CatalogComparator
-
public class CatalogComparator extends Object
Class to compare two PDS catalog files.- Author:
- mcayanan
-
-
Constructor Summary
Constructors Constructor Description CatalogComparator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<gov.nasa.pds.tools.LabelParserException>checkAttributeEquality(List<gov.nasa.pds.tools.label.AttributeStatement> sources, gov.nasa.pds.tools.label.Label target)Checks if the list of attributes are equal to the attributes in the target PDS catalog file.gov.nasa.pds.tools.label.LabelcheckEquality(gov.nasa.pds.tools.label.Label source, gov.nasa.pds.tools.label.Label target)Determines if the two supplied catalog labels are equal.List<gov.nasa.pds.tools.LabelParserException>checkObjectEquality(List<gov.nasa.pds.tools.label.ObjectStatement> sources, gov.nasa.pds.tools.label.Label target)Checks if the list of object statements are equal to the objects found in the target PDS catalog file.List<gov.nasa.pds.tools.LabelParserException>checkPointerEquality(List<gov.nasa.pds.tools.label.PointerStatement> sources, gov.nasa.pds.tools.label.Label target)Checks if the list of pointer statements are equal to the pointers found in the target PDS catalog file.
-
-
-
Method Detail
-
checkEquality
public gov.nasa.pds.tools.label.Label checkEquality(gov.nasa.pds.tools.label.Label source, gov.nasa.pds.tools.label.Label target)Determines if the two supplied catalog labels are equal.- Parameters:
source- A label representation of the "source" PDS Catalog file.target- A label representation of the "target" PDS Catalog file.- Returns:
- true if the catalog files are the same, false otherwise.
-
checkAttributeEquality
public List<gov.nasa.pds.tools.LabelParserException> checkAttributeEquality(List<gov.nasa.pds.tools.label.AttributeStatement> sources, gov.nasa.pds.tools.label.Label target)
Checks if the list of attributes are equal to the attributes in the target PDS catalog file.- Parameters:
sources- A list of attribute statements.target- A label representation of the "target" PDS catalog file.- Returns:
- true if the attributes are the same as the attributes in the target PDS catalog file.
-
checkPointerEquality
public List<gov.nasa.pds.tools.LabelParserException> checkPointerEquality(List<gov.nasa.pds.tools.label.PointerStatement> sources, gov.nasa.pds.tools.label.Label target)
Checks if the list of pointer statements are equal to the pointers found in the target PDS catalog file.- Parameters:
sources- A list of pointer statements.target- A label representation of the "target" PDS catalog file.- Returns:
- true if the pointers are the same as the pointers in the PDS catalog file.
-
checkObjectEquality
public List<gov.nasa.pds.tools.LabelParserException> checkObjectEquality(List<gov.nasa.pds.tools.label.ObjectStatement> sources, gov.nasa.pds.tools.label.Label target)
Checks if the list of object statements are equal to the objects found in the target PDS catalog file.- Parameters:
sources- A list of object statements.target- A label representation of the "target" PDS catalog file.- Returns:
- true if all the objects in the list are equal to the objects in the "target" PDS catalog file.
-
-