001    /*
002     * Copyright 2005,2009 Ivan SZKIBA
003     *
004     * Licensed under the Apache License, Version 2.0 (the "License");
005     * you may not use this file except in compliance with the License.
006     * You may obtain a copy of the License at
007     *
008     *      http://www.apache.org/licenses/LICENSE-2.0
009     *
010     * Unless required by applicable law or agreed to in writing, software
011     * distributed under the License is distributed on an "AS IS" BASIS,
012     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013     * See the License for the specific language governing permissions and
014     * limitations under the License.
015     */
016    package org.ini4j.addon;
017    
018    import org.ini4j.Config;
019    import org.ini4j.IniParser;
020    
021    @Deprecated public class FancyIniParser extends IniParser
022    {
023        public FancyIniParser()
024        {
025            Config cfg = getConfig().clone();
026    
027            cfg.setEmptyOption(true);
028            cfg.setGlobalSection(true);
029            cfg.setUnnamedSection(true);
030            cfg.setGlobalSectionName("?");
031            cfg.setInclude(true);
032            super.setConfig(cfg);
033        }
034    
035        @Deprecated public synchronized void setAllowEmptyOption(boolean flag)
036        {
037            getConfig().setEmptyOption(flag);
038        }
039    
040        @Deprecated public synchronized void setAllowInclude(boolean flag)
041        {
042            getConfig().setInclude(flag);
043        }
044    
045        @Deprecated public synchronized void setAllowMissingSection(boolean flag)
046        {
047            getConfig().setGlobalSection(flag);
048        }
049    
050        @Deprecated public synchronized void setAllowOptionCaseConversion(boolean flag)
051        {
052            getConfig().setLowerCaseOption(flag);
053        }
054    
055        @Deprecated public synchronized void setAllowSectionCaseConversion(boolean flag)
056        {
057            getConfig().setLowerCaseSection(flag);
058        }
059    
060        @Deprecated public synchronized void setAllowUnnamedSection(boolean flag)
061        {
062            getConfig().setUnnamedSection(flag);
063        }
064    
065        @Deprecated @Override public void setConfig(Config value)
066        {
067            assert true;
068        }
069    
070        @Deprecated public synchronized boolean isAllowInclude()
071        {
072            return getConfig().isInclude();
073        }
074    
075        @Deprecated public synchronized String getMissingSectionName()
076        {
077            return getConfig().getGlobalSectionName();
078        }
079    
080        @Deprecated public synchronized void setMissingSectionName(String name)
081        {
082            getConfig().setGlobalSectionName(name);
083        }
084    
085        @Deprecated public synchronized boolean isAllowEmptyOption()
086        {
087            return getConfig().isEmptyOption();
088        }
089    
090        @Deprecated public synchronized boolean isAllowMissingSection()
091        {
092            return getConfig().isGlobalSection();
093        }
094    
095        @Deprecated public synchronized boolean isAllowOptionCaseConversion()
096        {
097            return getConfig().isLowerCaseOption();
098        }
099    
100        @Deprecated public synchronized boolean isAllowSectionCaseConversion()
101        {
102            return getConfig().isLowerCaseSection();
103        }
104    
105        @Deprecated public synchronized boolean isAllowUnnamedSection()
106        {
107            return getConfig().isUnnamedSection();
108        }
109    }