<commit_before>/*
 * Copyright (c) 2016 by <NAME>
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package eu.hansolo.tilesfx;

import eu.hansolo.tilesfx.tools.Helper;
import javafx.scene.control.Tooltip;
import javafx.scene.shape.SVGPath;

import java.util.Locale;


/**
 * Created by hansolo on 21.12.16.
 */
public class CountryPath extends SVGPath {
    private String  name;
    private Locale  locale;
    private Tooltip tooltip;


    // ******************** Constructors **************************************
    public CountryPath() {
        this ("", null);
    }
    public CountryPath(final String NAME) {
        this(NAME, null);
    }
    public CountryPath(final String NAME, final String CONTENT) {
        super();
        name    = NAME;
        locale  = new Locale("", NAME);
        tooltip = new Tooltip(locale.getDisplayCountry());
        Tooltip.install(CountryPath.this, tooltip);
        if (null == CONTENT) return;
        setContent(CONTENT);
    }


    // ******************** Methods *******************************************
    public String getName() { return name; }
    public void setName(final String NAME) { this.name = NAME; }

    public Locale getLocale() { return locale; }
    public void setLocale(final Locale LOCALE) { locale = LOCALE; }

    public Tooltip getTooltip() { return tooltip; }
    public void setTooltip(final Tooltip TOOLTIP) {
        tooltip = TOOLTIP;
        Tooltip.install(CountryPath.this, tooltip);
    }
}<commit_msg>Added json toString() output<commit_after>/*
 * Copyright (c) 2016 by <NAME>
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package eu.hansolo.tilesfx;

import eu.hansolo.tilesfx.tools.Helper;
import javafx.scene.control.Tooltip;
import javafx.scene.shape.SVGPath;

import java.util.Locale;


/**
 * Created by hansolo on 21.12.16.
 */
public class CountryPath extends SVGPath {
    private String  name;
    private Locale  locale;
    private Tooltip tooltip;


    // ******************** Constructors **************************************
    public CountryPath() {
        this ("", null);
    }
    public CountryPath(final String NAME) {
        this(NAME, null);
    }
    public CountryPath(final String NAME, final String CONTENT) {
        super();
        name    = NAME;
        locale  = new Locale("", NAME);
        tooltip = new Tooltip(locale.getDisplayCountry());
        Tooltip.install(CountryPath.this, tooltip);
        if (null == CONTENT) return;
        setContent(CONTENT);
    }


    // ******************** Methods *******************************************
    public String getName() { return name; }
    public void setName(final String NAME) { this.name = NAME; }

    public Locale getLocale() { return locale; }
    public void setLocale(final Locale LOCALE) { locale = LOCALE; }

    public Tooltip getTooltip() { return tooltip; }
    public void setTooltip(final Tooltip TOOLTIP) {
        tooltip = TOOLTIP;
        Tooltip.install(CountryPath.this, tooltip);
    }

    @Override public String toString() {
        return new StringBuilder("{\n").append("  name   :\"").append(name).append("\"\n")
                                       .append("  locale :\"").append(locale).append("\"\n")
                                       .append("  tooltip:\"").append(tooltip.getText()).append("\"\n")
                                       .append("  content:\"").append(getContent()).append("\"\n")
                                       .append("}\n")
                                       .toString();
    }
}
{'fraction_non_alphanumeric': 0.1549388111888112, 'fraction_numerical': 0.006118881118881119, 'mean_word_length': 2.736326530612245, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 5, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4115494', 'n_tokens_mistral': 1278, 'n_tokens_neox': 1215, 'n_words': 395}