|
Groovy Documentation | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.gate.yam.YamFile
class YamFile
Main interface to the YAM language and its translation. Target languages:
Nested Class Summary | |
---|---|
enum |
YamFile.FileType
The various file types involved with YAM and their filename suffixes. |
Field Summary | |
---|---|
static Map |
currentGenerateCalls
Record of generation processes that are in progress. |
boolean |
doIncludes
Should we process included files or not? |
IOHandler |
ioHandler
IOHandler to pass to the parser. |
org.springframework.core.io.FileSystemResource |
location
Location of the .yam. |
static Logger |
log
Logger |
Set |
outputTypes
What types of output to generate. |
YamParseTree |
parseTree
The parse tree (and related state) created by { |
Constructor Summary | |
YamFile(org.springframework.core.io.FileSystemResource location)
Construction. |
|
YamFile(File locationFile)
Construction. |
Method Summary | |
---|---|
YamParseTree
|
generate()
Translate to target languages. |
void
|
generateType(FileType type)
Trigger generation of the various output types. |
static YamFile
|
get(File location)
Static factory method for getting a YAM file. |
static YamFile
|
get(org.springframework.core.io.FileSystemResource location)
Static factory method for getting a YAM file. |
String
|
getCanonicalPath()
Get the canonical path of this file. |
File
|
getHtmlFile()
Get the File for HTML output. |
String
|
getHtmlPath()
Get the path for an HTML output file. |
List
|
getIncludes()
Get the list of includes from this YAM file to other local files, as a list of canonical paths of those files. |
List
|
getLinks()
Get the list of links from this YAM file to other local files, as a list of canonical paths of those files. |
org.springframework.core.io.FileSystemResource
|
getLocation()
Get the location of this file. |
File
|
getOutputFile(FileType type)
Create a file of a particular output type. |
List
|
getOutputLocations()
Get a List of those output file locations that are generated by this YamFile. |
YamParseTree
|
getParseTree()
Get the parse tree (and related state) created by { |
static String
|
getPluginPackageName()
Get the package name for YAM plugins. |
String
|
getVersion()
Get the language version number. |
static YamFile
|
needsGeneration(org.springframework.core.io.FileSystemResource location)
This method checks whether a dependent file (one that is generated from YAM) needs regeneration, and if so it returns a YamFile instance corresponding to the generated file. |
static String
|
printErrors(YamParseTree parseTree)
Print errors and warnings from parsing. |
private void
|
readObject(ObjectInputStream ois)
Allow serialization of the Spring FSR field. |
void
|
replaceInContext(String name)
Reset the location of this YamFile in the directory pointed to by 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
|
setDoIncludes(boolean b)
Should we process included files or not? |
String
|
toString()
Return a String representing this YamFile: the String representation of the underlying File. |
void
|
translate(FileType outputType, Writer outputWriter, YamParseTree parseTree)
Construct an appropriate translator for the target language and run it. |
YamFile
|
valueOf(String name)
Returns the enum constant of this type with the specified name. |
YamFile[]
|
values()
Returns an array containing the constants of this enum type, in the order they are declared. |
private void
|
writeObject(ObjectOutputStream oos)
Allow serialization of the Spring FSR field. |
Methods inherited from class Object | |
---|---|
wait, wait, wait, hashCode, getClass, equals, toString, notify, notifyAll |
Field Detail |
---|
static Map currentGenerateCalls
boolean doIncludes
IOHandler ioHandler
org.springframework.core.io.FileSystemResource location
static Logger log
Set outputTypes
YamParseTree parseTree
Constructor Detail |
---|
public YamFile(org.springframework.core.io.FileSystemResource location)
public YamFile(File locationFile)
Method Detail |
---|
public YamParseTree generate()
public void generateType(FileType type)
public static YamFile get(File location)
public static YamFile get(org.springframework.core.io.FileSystemResource location)
public String getCanonicalPath()
public File getHtmlFile()
public String getHtmlPath()
public List getIncludes()
public List getLinks()
public org.springframework.core.io.FileSystemResource getLocation()
public File getOutputFile(FileType type)
public List getOutputLocations()
public YamParseTree getParseTree()
public static final String getPluginPackageName()
public String getVersion()
public static YamFile needsGeneration(org.springframework.core.io.FileSystemResource location)
public static String printErrors(YamParseTree parseTree)
private void readObject(ObjectInputStream ois)
public void replaceInContext(String name)
public void setBibAnchorPrefix(String bibAnchorPrefix)
public void setBibPageUrl(org.springframework.core.io.UrlResource bibPageUrl)
public void setContextPath(String contextPath)
public void setCreatePageUrl(String createPageUrl)
public void setCreatePageUrl(org.springframework.core.io.UrlResource createPageUrl)
public void setDoIncludes(boolean b)
public String toString()
public void translate(FileType outputType, Writer outputWriter, YamParseTree parseTree)
YamFile valueOf(String name)
YamFile[] values()
private void writeObject(ObjectOutputStream oos)
Groovy Documentation