All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.orgzly.org.OrgFile Maven / Gradle / Ivy

There is a newer version: 1.2.3
Show newest version
package com.orgzly.org;

/**
 * Org file with its preface (text before the first heading) and settings.
 */
public class OrgFile {

    /** In-buffer settings. */
    private OrgFileSettings settings;

    /** Text before the first heading. */
    private String preface;

    public OrgFile() {
	}

    public OrgFileSettings getSettings() {
        if (settings == null) {
            settings = new OrgFileSettings();
        }
        return settings;
    }

    /**
     * @return Text before first {@link OrgHead} in the file.
     */
    public String getPreface() {
        return preface != null ? preface : "";
    }

    public void setPreface(String str) {
        preface = str;
    }

    public String toString() {
		return OrgFile.class.getSimpleName() + "[" + preface.length() + "]";
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy