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.ExternalPointer
              extended by gov.nasa.pds.tools.label.IncludePointer
All Implemented Interfaces:
PointerType, Status, java.lang.Comparable

public class IncludePointer
extends ExternalPointer
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
 
Fields inherited from class gov.nasa.pds.tools.label.PointerStatement
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
DATA_LOCATION, DESCRIPTION, DESCRIPTION_NAMES, INCLUDE, INCLUDE_NAMES, 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 statments 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.ExternalPointer
getFile, resolveURL
 
Methods inherited from class gov.nasa.pds.tools.label.PointerStatement
attachComment, getComment, getPointerType, getValue
 
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
 

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 statment
value - assigned to statment
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 statments 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-2008 NASA Jet Propulsion Laboratory, California Institute of Technology. All Rights Reserved.