gov.nasa.pds.tools.label
Class ExternalPointer

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
All Implemented Interfaces:
PointerType, java.lang.Comparable
Direct Known Subclasses:
IncludePointer

public class ExternalPointer
extends PointerStatement

This class represents a pointer statement that references an external file.

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
 
Constructor Summary
ExternalPointer(int pointerType, int lineNumber, java.lang.String identifier, Value value)
          Constructs a pointer statment that references an external file.
 
Method Summary
 java.lang.String getFile()
           
 java.net.URL resolveURL(java.util.List includePaths)
          This method resolves the URL to the file pointed to by looking in the given include paths.
 
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

ExternalPointer

public ExternalPointer(int pointerType,
                       int lineNumber,
                       java.lang.String identifier,
                       Value value)
Constructs a pointer statment that references an external file.

Parameters:
lineNumber - of statement
identifier - of statement
value - of the assignment
Method Detail

resolveURL

public java.net.URL resolveURL(java.util.List includePaths)
                        throws java.io.IOException
This method resolves the URL to the file pointed to by looking in the given include paths. Will throw an error if it can not resolve an URL. Otherwise the URL is returned.

Parameters:
includePaths - are the directories in which to look for the file
Returns:
URL to the pointed to file
Throws:
java.io.IOException - Thrown if pointed to file can not be resolved

getFile

public java.lang.String getFile()


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