Example usage for org.jdom2 Element getText

List of usage examples for org.jdom2 Element getText

Introduction

In this page you can find the example usage for org.jdom2 Element getText.

Prototype

public String getText() 

Source Link

Document

Returns the textual content directly held under this element as a string.

Usage

From source file:de.danielluedecke.zettelkasten.database.Settings.java

License:Open Source License

public boolean getUseCustomCSS(int what) {
    String ch;/*w  ww  . jav a  2 s .  co  m*/
    switch (what) {
    case CUSTOM_CSS_ENTRY:
        ch = SETTING_USECUSTOMCSSENTRY;
        break;
    case CUSTOM_CSS_DESKTOP:
        ch = SETTING_USECUSTOMCSSDESKTOP;
        break;
    default:
        ch = SETTING_USECUSTOMCSSENTRY;
        break;
    }
    Element el = settingsFile.getRootElement().getChild(ch);
    boolean retval = false;
    if (el != null)
        retval = el.getText().equals("1");
    return retval;
}

From source file:de.danielluedecke.zettelkasten.database.Settings.java

License:Open Source License

/**
 * @return returns the currently used icon theme. following constants are used:<br>
 * 0: standard<br>/*from w  w  w.  j a va  2 s  .  co m*/
 * 1: Tango<br>
 */
public int getIconTheme() {
    Element el = settingsFile.getRootElement().getChild(SETTING_ICONTHEME);
    int retval = 0;
    if (el != null) {
        try {
            retval = Integer.parseInt(el.getText());
        } catch (NumberFormatException e) {
            retval = 0;
        }
    }
    return retval;
}

From source file:de.danielluedecke.zettelkasten.database.Settings.java

License:Open Source License

/**
 * /*  ww w  .  j  a  v a 2  s . c o m*/
 * @return 
 */
public boolean getLatexExportCreateFormTags() {
    Element el = settingsFile.getRootElement().getChild(SETTING_LATEXEXPORTFORMTAG);
    if (el != null)
        return el.getText().equals("1");
    return false;
}

From source file:de.danielluedecke.zettelkasten.database.Settings.java

License:Open Source License

/**
 * {@code true} when author-references should be references in a footnote, when
 * exporting to LaTex. If {@code false}, references are directly in the text.
 * //from  w w  w  .j  a  v a  2s  . c  om
 * @return
 */
public boolean getLatexExportFootnoteRef() {
    Element el = settingsFile.getRootElement().getChild(SETTING_LATEXEXPORTFOOTNOTE);
    if (el != null)
        return el.getText().equals("1");
    return false;
}

From source file:de.danielluedecke.zettelkasten.database.Settings.java

License:Open Source License

/**
 * /*from ww w .  jav a2s .  com*/
 * @return 
 */
public int getLastUsedLatexBibStyle() {
    Element el = settingsFile.getRootElement().getChild(SETTING_LATEXEXPORTLASTUSEDBIBSTYLE);
    int retval = 0;
    if (el != null) {
        try {
            retval = Integer.parseInt(el.getText());
        } catch (NumberFormatException e) {
            retval = 0;
        }
    }
    return retval;
}

From source file:de.danielluedecke.zettelkasten.database.Settings.java

License:Open Source License

/**
 * //from w w w  .j av a 2s  . c  om
 * @return 
 */
public int getLastUsedLatexDocClass() {
    Element el = settingsFile.getRootElement().getChild(SETTING_LATEXEXPORTDOCUMENTCLASS);
    int retval = 0;
    if (el != null) {
        try {
            retval = Integer.parseInt(el.getText());
        } catch (NumberFormatException e) {
            retval = 0;
        }
    }
    return retval;
}

From source file:de.danielluedecke.zettelkasten.database.Settings.java

License:Open Source License

/**
 * /*from  ww  w .  ja va  2  s  . c o  m*/
 * @return 
 */
public boolean getLatexExportShowAuthor() {
    Element el = settingsFile.getRootElement().getChild(SETTING_LATEXEXPORTSHOWAUTHOR);
    if (el != null)
        return el.getText().equals("1");
    return false;
}

From source file:de.danielluedecke.zettelkasten.database.Settings.java

License:Open Source License

/**
 * /*from w  w  w. ja  va  2  s  . c o m*/
 * @return 
 */
public boolean getLatexExportShowMail() {
    Element el = settingsFile.getRootElement().getChild(SETTING_LATEXEXPORTSHOWMAIL);
    if (el != null)
        return el.getText().equals("1");
    return false;
}

From source file:de.danielluedecke.zettelkasten.database.Settings.java

License:Open Source License

/**
 * // w w w  .j av  a  2s  .co m
 * @return 
 */
public boolean getLatexExportConvertQuotes() {
    Element el = settingsFile.getRootElement().getChild(SETTING_LATEXEXPORTCONVERTQUOTES);
    if (el != null)
        return el.getText().equals("1");
    return false;
}

From source file:de.danielluedecke.zettelkasten.database.Settings.java

License:Open Source License

/**
 * //  w w  w .  j a  va 2s. c om
 * @return 
 */
public boolean getLatexExportCenterForm() {
    Element el = settingsFile.getRootElement().getChild(SETTING_LATEXEXPORTCENTERFORM);
    if (el != null)
        return el.getText().equals("1");
    return false;
}