gov.nasa.pds.citool.ri
Class RIChecker

java.lang.Object
  extended by gov.nasa.pds.citool.ri.RIChecker
Direct Known Subclasses:
DataSetRIChecker, InstrumentHostRIChecker, InstrumentRIChecker, MissionRIChecker, PersonnelRIChecker, ReferenceRIChecker, TargetRIChecker, VolumeRIChecker

public abstract class RIChecker
extends java.lang.Object

Base class for Referential Integrity checking.

Author:
mcayanan

Constructor Summary
RIChecker()
           
 
Method Summary
 java.util.List<gov.nasa.pds.tools.label.AttributeStatement> getMissingStatements(java.util.List<gov.nasa.pds.tools.label.AttributeStatement> parents, java.util.List<gov.nasa.pds.tools.label.AttributeStatement> children)
           
 java.util.List<gov.nasa.pds.tools.label.AttributeStatement> getMissingStatements(java.util.Map<java.lang.String,java.util.List<gov.nasa.pds.tools.label.AttributeStatement>> parents, java.util.List<gov.nasa.pds.tools.label.AttributeStatement> children)
           
abstract  RIRecord hasRI(java.util.List<gov.nasa.pds.tools.label.Label> catalogs)
          Determine if the supplied list of catalog files have referential integrity.
abstract  RIRecord hasRI(java.util.List<gov.nasa.pds.tools.label.Label> catalogs, java.net.URL supportFile)
          Determine if the supplied list of catalog files have referential integrity.
 java.util.Map<gov.nasa.pds.tools.label.AttributeStatement,java.lang.Boolean> hasSameValues(java.util.Map<java.lang.String,java.util.List<gov.nasa.pds.tools.label.AttributeStatement>> parents, gov.nasa.pds.tools.label.Label child)
          Determines whether the statements in the child have the same values as the statements in the parent.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RIChecker

public RIChecker()
Method Detail

hasSameValues

public java.util.Map<gov.nasa.pds.tools.label.AttributeStatement,java.lang.Boolean> hasSameValues(java.util.Map<java.lang.String,java.util.List<gov.nasa.pds.tools.label.AttributeStatement>> parents,
                                                                                                  gov.nasa.pds.tools.label.Label child)
Determines whether the statements in the child have the same values as the statements in the parent.

Parameters:
parents - A mapping of identifiers to the statements.
child - An object representation of a child catalog file.
Returns:
A mapping of statements and a boolean value of 'true' or 'false' to indicate whether the statement matches one of the parents.

getMissingStatements

public java.util.List<gov.nasa.pds.tools.label.AttributeStatement> getMissingStatements(java.util.Map<java.lang.String,java.util.List<gov.nasa.pds.tools.label.AttributeStatement>> parents,
                                                                                        java.util.List<gov.nasa.pds.tools.label.AttributeStatement> children)

getMissingStatements

public java.util.List<gov.nasa.pds.tools.label.AttributeStatement> getMissingStatements(java.util.List<gov.nasa.pds.tools.label.AttributeStatement> parents,
                                                                                        java.util.List<gov.nasa.pds.tools.label.AttributeStatement> children)

hasRI

public abstract RIRecord hasRI(java.util.List<gov.nasa.pds.tools.label.Label> catalogs)
Determine if the supplied list of catalog files have referential integrity.

Parameters:
catalogs - A list of catalog files.
Returns:
'true' if the files have referential integrity, 'false' otherwise.

hasRI

public abstract RIRecord hasRI(java.util.List<gov.nasa.pds.tools.label.Label> catalogs,
                               java.net.URL supportFile)
Determine if the supplied list of catalog files have referential integrity.

Parameters:
catalogs - A list of catalog files.
supportFile - A URL of a supporting file for further referential integrity checking.
Returns:
'true' if the files have referential integrity, 'false' otherwise.


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