Class ObjectStatementComparator


  • public class ObjectStatementComparator
    extends Object
    Class to compare two objects of a PDS label.
    Author:
    mcayanan
    • 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.ObjectStatement target)
      Checks if the list of attributes are equal to the attributes in the "target" object.
      List<gov.nasa.pds.tools.LabelParserException> checkEquality​(gov.nasa.pds.tools.label.ObjectStatement source, gov.nasa.pds.tools.label.ObjectStatement target)
      Determines if the two supplied objects are equal.
      List<gov.nasa.pds.tools.LabelParserException> checkObjectEquality​(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.
      List<gov.nasa.pds.tools.LabelParserException> checkPointerEquality​(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.
    • Constructor Detail

      • ObjectStatementComparator

        public ObjectStatementComparator()
    • Method Detail

      • checkEquality

        public List<gov.nasa.pds.tools.LabelParserException> checkEquality​(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.
      • checkAttributeEquality

        public List<gov.nasa.pds.tools.LabelParserException> checkAttributeEquality​(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.
      • checkPointerEquality

        public List<gov.nasa.pds.tools.LabelParserException> checkPointerEquality​(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.
      • checkObjectEquality

        public List<gov.nasa.pds.tools.LabelParserException> checkObjectEquality​(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.