<commit_before>/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Gemstone;

/**
 *
 * @author jusjoken
 * Holds all the settings for displaying the Gemstone Info box
 */
public class InfoSettings {
    private Boolean EpisodeLevel = Boolean.FALSE;
    private String FlowID = "";
    private String FlowType = "";
    
    private static enum Modes{Off,Auto,AlwaysOn};
    private String ModeList = "Off:&&:Auto:&&:AlwaysOn";
    private static enum Styles{Background,Poster,Split,Simple};
    private String StyleList = "Background:&&:Poster:&&:Split:&&:Simple";
    private String StyleListNoSplit = "Background:&&:Poster:&&:Simple";
    //TODO: InfoSettings Mode - default based on FlowType
    
    public InfoSettings(String FlowID, Boolean EpisodeLevel) {
        this(FlowID);
        this.EpisodeLevel = EpisodeLevel;
    }
    public InfoSettings(String FlowID) {
        this.FlowID = FlowID;
        this.FlowType = Flow.GetFlowType(this.FlowID);
    }
    
    public Boolean IsEpisodeLevel(){
        return this.EpisodeLevel;
    }
    
    public String PropBase(String PropName){
        if (EpisodeLevel){
            return Const.FlowInfoEpisodeSimpleList + Const.PropDivider + PropName;
        }else{
            return Const.FlowInfo + Const.PropDivider + PropName;
        }
    }
    
    //return the full property string including the Flow Base
    public String PropBaseFull(String PropName){
        if (EpisodeLevel){
            return Flow.GetFlowBaseProp(FlowID) + Const.PropDivider + Const.FlowInfoEpisodeSimpleList + Const.PropDivider + PropName;
        }else{
            return Flow.GetFlowBaseProp(FlowID) + Const.PropDivider + Const.FlowInfo + Const.PropDivider + PropName;
        }
    }
    
    public String Mode(){
        String tValue = Flow.GetOptionName(FlowID, PropBase("Mode"), util.OptionNotFound);
        if (tValue.equals(util.OptionNotFound)){
            //return the default dependent on the FlowType
            if (this.EpisodeLevel){
                return Modes.AlwaysOn.toString();
            }else if (this.FlowType.equals("Sage Flow")){
                return Modes.AlwaysOn.toString();<commit_msg>Small change to handle some InfoSetting options - version 1.013<commit_after>/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Gemstone;

/**
 *
 * @author jusjoken
 * Holds all the settings for displaying the Gemstone Info box
 */
public class InfoSettings {
    private Boolean EpisodeLevel = Boolean.FALSE;
    private String FlowID = "";
    private String FlowType = "";
    
    private static enum Modes{Off,Auto,AlwaysOn};
    private String ModeList = "Off:&&:Auto:&&:AlwaysOn";
    private static enum Styles{Background,Poster,Split,Simple};
    private String StyleList = "Background:&&:Poster:&&:Split:&&:Simple";
    private String StyleListNoSplit = "Background:&&:Poster:&&:Simple";
    //TODO: InfoSettings Mode - default based on FlowType
    
    public InfoSettings(String FlowID, Boolean EpisodeLevel) {
        this(FlowID);
        this.EpisodeLevel = EpisodeLevel;
    }
    public InfoSettings(String FlowID) {
        this.FlowID = FlowID;
        this.FlowType = Flow.GetFlowType(this.FlowID);
    }
    
    public Boolean IsEpisodeLevel(){
        return this.EpisodeLevel;
    }
    
    public String PropBase(String PropName){
        if (EpisodeLevel){
            return Const.FlowInfoEpisodeSimpleList + Const.PropDivider + PropName;
        }else{
            return Const.FlowInfo + Const.PropDivider + PropName;
        }
    }
    
    //return the full property string including the Flow Base
    public String PropBaseFull(String PropName){
        if (EpisodeLevel){
            return Flow.GetFlowBaseProp(FlowID) + Const.PropDivider + Const.FlowInfoEpisodeSimpleList + Const.PropDivider + PropName;
        }else{
            return Flow.GetFlowBaseProp(FlowID) + Const.PropDivider + Const.FlowInfo + Const.PropDivider + PropName;
        }
    }
    
    public boolean IsInfoShowing(boolean AutoInfoShowing){
        if (Mode().equals(Modes.AlwaysOn.toString())){
            return true;
        }else if (Mode().equals(Modes.Auto.toString())){
            return AutoInfoShowing;
        }else{
            return false;
        }
    }
    
    public String Mode(){
        String tValue = Flow.GetOptionName(FlowID, PropBase("Mode"), util.OptionNotFound);
        if (tValue.equals(util.OptionNotFound)){
            //return the default dependent on the FlowType
            if (this.EpisodeLevel){
                return Modes.AlwaysOn.toString();
            }else if (this.FlowType.equals("Sage Flow")){
                return Modes.AlwaysOn.toString();
{'fraction_non_alphanumeric': 0.1005014625992478, 'fraction_numerical': 0.0008357709987463436, 'mean_word_length': 2.713731574864236, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 22, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6256608', 'n_tokens_mistral': 1332, 'n_tokens_neox': 1311, 'n_words': 341}