ooc
Class SourceContextFile

java.lang.Object
  extended byooc.SourceContextAbstract
      extended byooc.SourceContextFile
All Implemented Interfaces:
SourceContext

public class SourceContextFile
extends SourceContextAbstract

This context uses the given file path to find the file which is used as the source. Depending on current directory settings this might need an absolute path.


Field Summary
static java.lang.String NAME
          The name of this context is 'file'.
 
Constructor Summary
SourceContextFile()
          Constructs a file context with the name 'file'.
 
Method Summary
 Source createSource(java.lang.String filePath)
          Returns a newly created source from which tags can be parsed.
 boolean isSourceInContext(java.lang.String filePath)
          Returns true if the given source exists in this contexts.
 
Methods inherited from class ooc.SourceContextAbstract
getName
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NAME

public static final java.lang.String NAME
The name of this context is 'file'.

See Also:
Constant Field Values
Constructor Detail

SourceContextFile

public SourceContextFile()
Constructs a file context with the name 'file'.

Method Detail

isSourceInContext

public boolean isSourceInContext(java.lang.String filePath)
Description copied from interface: SourceContext
Returns true if the given source exists in this contexts.


createSource

public Source createSource(java.lang.String filePath)
Description copied from interface: SourceContext
Returns a newly created source from which tags can be parsed.

Parameters:
filePath - is the name of the source created.
Returns:
a new created source from which tags can be parsed. If no source is found in this context, null is returned.