gov.nasa.pds.citool.comparator
Class ObjectStatementComparator

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

public class ObjectStatementComparator
extends java.lang.Object

Class to compare two objects of a PDS label.

Author:
mcayanan

Constructor Summary
ObjectStatementComparator()
           
 
Method Summary
 boolean hasEqualAttributes(java.util.List<gov.nasa.pds.tools.label.AttributeStatement> sources, gov.nasa.pds.tools.label.ObjectStatement target)
          Checks if the list of attributes are equal to the attributes in the "target" object.
 boolean hasEqualObjects(java.util.List<gov.nasa.pds.tools.label.ObjectStatement> sources, gov.nasa.pds.tools.label.ObjectStatement target)
          Checks if the list of nested object statements are equal to the nested objects found in the "target" PDS object.
 boolean hasEqualPointers(java.util.List<gov.nasa.pds.tools.label.PointerStatement> sources, gov.nasa.pds.tools.label.ObjectStatement target)
          Checks if the list of pointer statements are equal to the pointers found in the "target" object.
 boolean isEqual(gov.nasa.pds.tools.label.ObjectStatement source, gov.nasa.pds.tools.label.ObjectStatement target)
          Determines if the two supplied objects are equal.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ObjectStatementComparator

public ObjectStatementComparator()
Method Detail

isEqual

public boolean isEqual(gov.nasa.pds.tools.label.ObjectStatement source,
                       gov.nasa.pds.tools.label.ObjectStatement target)
Determines if the two supplied objects are equal.

Parameters:
source - Class representation of the "source" PDS object.
target - Class representation of the "target" PDS object.
Returns:
true if the objects are the same, false otherwise.

hasEqualAttributes

public boolean hasEqualAttributes(java.util.List<gov.nasa.pds.tools.label.AttributeStatement> sources,
                                  gov.nasa.pds.tools.label.ObjectStatement target)
Checks if the list of attributes are equal to the attributes in the "target" object.

Parameters:
sources - A list of attribute statements.
target - Class representation of the "target" PDS object.
Returns:
true if the attributes are the same as the attributes in the "target" PDS object.

hasEqualPointers

public boolean hasEqualPointers(java.util.List<gov.nasa.pds.tools.label.PointerStatement> sources,
                                gov.nasa.pds.tools.label.ObjectStatement target)
Checks if the list of pointer statements are equal to the pointers found in the "target" object.

Parameters:
sources - A list of pointer statements.
target - Class representation of the "target" PDS object.
Returns:
true if the pointers are the same as the pointers in the PDS object.

hasEqualObjects

public boolean hasEqualObjects(java.util.List<gov.nasa.pds.tools.label.ObjectStatement> sources,
                               gov.nasa.pds.tools.label.ObjectStatement target)
Checks if the list of nested object statements are equal to the nested objects found in the "target" PDS object.

Parameters:
sources - A list of nested objects from the "source" PDS object.
target - Class representation of the "target" PDS object.
Returns:
true if the objects in the list are equal to the objects in the "target" PDS object.


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