gate.yam
Interface IOHandler


public interface IOHandler

This interface is used by the YAM parser to initialise IO streams. It is provided in order to allow API users to supply IO management if needed.

Author:
Hamish Cunningham

Method Summary
 boolean exists(String path)
          Check a path for existence.
 boolean existsInContext(String path)
          Check a path for existence relative to the context path.
 String getBibAnchorPrefix()
          Get the prefix added to citation keys, when forming a reference to a bibiography file entry
 org.springframework.core.io.UrlResource getBibPageUrl()
          Get the URL within which citation keys will be resolved.
 String getContextPath()
          Get the path in which to check for existence of relative links.
 String getCreatePageUrl()
          Get the URL which non-existent links will be pointed at (which presumably is the "create new page" URL for the parent wiki).
 Reader getReader(String path)
          Get a reader from a path.
 Reader getReaderInContext(String path)
          Get a reader from a path relative to the context path.
 void setBibAnchorPrefix(String bibAnchorPrefix)
          Set the prefix added to citation keys, when forming a reference to a bibiography file entry
 void setBibPageUrl(org.springframework.core.io.UrlResource bibPageUrl)
          Set the URL within which citation keys will be resolved.
 void setContextPath(String contextPath)
          Set the path in which to check for existence of relative links.
 void setCreatePageUrl(String createPageUrl)
          Set the URL which non-existent links will be pointed at (which presumably is the "create new page" URL for the parent wiki).
 void setCreatePageUrl(org.springframework.core.io.UrlResource createPageUrl)
          Set the URL which non-existent links will be pointed at (which presumably is the "create new page" URL for the parent wiki).
 void setSourceDir(File sourceDir)
          Set the source directory file.
 

Method Detail

getReader

Reader getReader(String path)
                 throws IOException
Get a reader from a path.

Throws:
IOException

exists

boolean exists(String path)
Check a path for existence. Relative paths adjusted with sourceDir.


getReaderInContext

Reader getReaderInContext(String path)
                          throws IOException
Get a reader from a path relative to the context path.

Throws:
IOException

existsInContext

boolean existsInContext(String path)
Check a path for existence relative to the context path.


setSourceDir

void setSourceDir(File sourceDir)
Set the source directory file.


getContextPath

String getContextPath()
Get the path in which to check for existence of relative links.


setContextPath

void setContextPath(String contextPath)
Set the path in which to check for existence of relative links.

Parameters:
contextPath - the path to search in.

getCreatePageUrl

String getCreatePageUrl()
Get the URL which non-existent links will be pointed at (which presumably is the "create new page" URL for the parent wiki).


setCreatePageUrl

void setCreatePageUrl(String createPageUrl)
Set the URL which non-existent links will be pointed at (which presumably is the "create new page" URL for the parent wiki).

Parameters:
createPageUrl - the link to point to.

setCreatePageUrl

void setCreatePageUrl(org.springframework.core.io.UrlResource createPageUrl)
Set the URL which non-existent links will be pointed at (which presumably is the "create new page" URL for the parent wiki).

Parameters:
createPageUrl - the link to point to.

getBibPageUrl

org.springframework.core.io.UrlResource getBibPageUrl()
Get the URL within which citation keys will be resolved.

See Also:
setBibPageUrl(UrlResource)

setBibPageUrl

void setBibPageUrl(org.springframework.core.io.UrlResource bibPageUrl)
Set the URL within which citation keys will be resolved. The URL will be for a bibliography. Citation keys reference a part of this URL, an individual bibliographic entry. Citation keys will form the final fragment of this URL, and will be prefixed, as defined by the setBibAnchorPrefix method

Parameters:
bibPageUrl - the URL of the bibliogrpahy.

setBibAnchorPrefix

void setBibAnchorPrefix(String bibAnchorPrefix)
Set the prefix added to citation keys, when forming a reference to a bibiography file entry

Parameters:
bibAnchorPrefix - The prefix added to citation keys.
See Also:
setBibPageUrl(UrlResource)

getBibAnchorPrefix

String getBibAnchorPrefix()
Get the prefix added to citation keys, when forming a reference to a bibiography file entry

See Also:
setBibPageUrl(UrlResource)