public class DescriptionFile
extends java.lang.Object
| Constructor and Description |
|---|
DescriptionFile(java.lang.String filename,
DescriptionFiles descFiles)
Creates a new instance by loading a description file.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Iterable<Description> |
getDesciptions()
Returns an Iterable to iterate over all descriptions of the file
|
Description |
getDescription(java.lang.String descKey)
Returns the description associated with the given key or null, if there is no such description
|
java.lang.String |
getDescription(java.lang.String descKey,
DescSourceType sourceType)
Returns the description associated with the given key in the chosen syntax
|
static java.lang.String |
getHyperRef(java.lang.String key,
DescriptionType descType)
Creates a reference to the given key
|
static java.lang.String |
toLatexKey(java.lang.String string,
DescriptionType descType)
Creates a valid latex key for example to use it as a label key in latex.
|
static java.lang.String |
toLatexKey(java.lang.String prefix,
java.lang.String string,
boolean toLowerCase)
Converts the given string to a valid latex key for example to use it as a label key in latex.
|
public DescriptionFile(java.lang.String filename,
DescriptionFiles descFiles)
throws HelpFileException
filename - the name of the file to loaddescFiles - the instance containing all description filesHelpFileException - if an error occurs while parsing the filepublic static java.lang.String toLatexKey(java.lang.String prefix,
java.lang.String string,
boolean toLowerCase)
prefix - will be attached at the beginning of the string together with an underscorestring - the string to converttoLowerCase - if true, then the result will be in lower case.public static java.lang.String toLatexKey(java.lang.String string,
DescriptionType descType)
string - the string to convertdescType - the type of the description associated with the key. This determines the prefix of the key.public static java.lang.String getHyperRef(java.lang.String key,
DescriptionType descType)
key - the key to referencedescType - the type of the description associated with the keypublic Description getDescription(java.lang.String descKey)
public java.lang.String getDescription(java.lang.String descKey,
DescSourceType sourceType)
descKey - the key associated with the description to receivesourceType - the syntax in which to receive the descriptionpublic java.lang.Iterable<Description> getDesciptions()