gov.nasa.pds.citool.comparator
Class CatalogComparator

java.lang.Object
  extended by gov.nasa.pds.citool.comparator.CatalogComparator

public class CatalogComparator
extends java.lang.Object

Class to compare two PDS catalog files.

Author:
mcayanan

Constructor Summary
CatalogComparator()
           
 
Method Summary
 boolean hasEqualAttributes(java.util.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.
 boolean hasEqualObjects(java.util.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.
 boolean hasEqualPointers(java.util.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.
 boolean isEqual(gov.nasa.pds.tools.label.Label source, gov.nasa.pds.tools.label.Label target)
          Determines if the two supplied catalog labels are equal.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CatalogComparator

public CatalogComparator()
Method Detail

isEqual

public boolean isEqual(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.

hasEqualAttributes

public boolean hasEqualAttributes(java.util.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.

hasEqualPointers

public boolean hasEqualPointers(java.util.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.

hasEqualObjects

public boolean hasEqualObjects(java.util.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.


Copyright © 2005-2010 Planetary Data System. All Rights Reserved.