gov.nasa.pds.tools.label
Class IncludePointer

java.lang.Object
  extended by gov.nasa.pds.tools.label.Statement
      extended by gov.nasa.pds.tools.label.PointerStatement
          extended by gov.nasa.pds.tools.label.IncludePointer
All Implemented Interfaces:
PointerType, Status, java.lang.Comparable
Direct Known Subclasses:
CatalogPointer

public class IncludePointer
extends PointerStatement
implements PointerType, Status

This class represents a pointer that is a set of external statements that can and should be included in label containing this statement when performing validation.

Version:
$Revision$
Author:
pramirez

Field Summary
protected  boolean loaded
           
protected  java.lang.String loadStatus
           
protected  int numErrors
           
protected  int numWarnings
           
protected  java.util.List statements
           
 
Fields inherited from class gov.nasa.pds.tools.label.PointerStatement
externalReference, value
 
Fields inherited from class gov.nasa.pds.tools.label.Statement
context, filename, identifier, lineNumber
 
Fields inherited from interface gov.nasa.pds.tools.label.PointerType
CATALOG, CATALOG_NAMES, DATA_LOCATION, DESCRIPTION, DESCRIPTION_NAMES, INCLUDE, INCLUDE_NAMES, MAP_PROJECTION, UNDEFINED
 
Fields inherited from interface gov.nasa.pds.tools.label.validate.Status
FAIL, PASS, SKIP, UNKNOWN
 
Constructor Summary
IncludePointer(int lineNumber, java.lang.String identifier, Value value)
          Constructs a pointer that can be resolved to a set of statements.
 
Method Summary
 java.lang.String getLoadStatus()
           
 int getNumErrors()
           
 int getNumWarnings()
           
 java.util.List getStatements()
          Retrieves the list of statements pointed to by this structure pointer
 boolean isLoaded()
          Indicates whether or not the statements pointed to have been loaded.
 void loadReferencedStatements(java.util.List includePaths)
          This method attempts to load the referenced statements.
 
Methods inherited from class gov.nasa.pds.tools.label.PointerStatement
attachComment, getComment, getExternalFileReference, getExternalFileReferences, getPointerType, getValue, hasExternalReference, hasMultipleReferences
 
Methods inherited from class gov.nasa.pds.tools.label.Statement
compareTo, getContext, getFilename, getIdentifier, getLineNumber, setContext, setFilename
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

statements

protected java.util.List statements

loaded

protected boolean loaded

loadStatus

protected java.lang.String loadStatus

numErrors

protected int numErrors

numWarnings

protected int numWarnings
Constructor Detail

IncludePointer

public IncludePointer(int lineNumber,
                      java.lang.String identifier,
                      Value value)
Constructs a pointer that can be resolved to a set of statements.

Parameters:
lineNumber - of statement
identifier - of statement
value - assigned to statement
Method Detail

loadReferencedStatements

public void loadReferencedStatements(java.util.List includePaths)
                              throws ParseException,
                                     java.io.IOException
This method attempts to load the referenced statements. If unsuccessful will throw an error. Once loaded the statements are held in the class so they may be accessed at a later time.

Parameters:
includePaths - An list of URL in which to search for the referenced file
Throws:
ParseException - thrown if the file can not be properly loaded
java.io.IOException - thrown if file can not be accessed

getStatements

public java.util.List getStatements()
Retrieves the list of statements pointed to by this structure pointer

Returns:
external list of statements

isLoaded

public boolean isLoaded()
Indicates whether or not the statements pointed to have been loaded.

Returns:
flag indicating load status

getLoadStatus

public java.lang.String getLoadStatus()

getNumErrors

public int getNumErrors()

getNumWarnings

public int getNumWarnings()


Copyright © 2005-2009 NASA Jet Propulsion Laboratory, California Institute of Technology. All Rights Reserved.