001    // Copyright 2007 The Apache Software Foundation
002    //
003    // Licensed under the Apache License, Version 2.0 (the "License");
004    // you may not use this file except in compliance with the License.
005    // You may obtain a copy of the License at
006    //
007    //     http://www.apache.org/licenses/LICENSE-2.0
008    //
009    // Unless required by applicable law or agreed to in writing, software
010    // distributed under the License is distributed on an "AS IS" BASIS,
011    // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
012    // See the License for the specific language governing permissions and
013    // limitations under the License.
014    
015    package org.apache.hivemind.definition.impl;
016    
017    import org.apache.hivemind.Location;
018    import org.apache.hivemind.definition.ConfigurationParserConstructor;
019    import org.apache.hivemind.definition.ConfigurationParserDefinition;
020    import org.apache.hivemind.definition.ModuleDefinition;
021    
022    /**
023     * Default implementation of {@link ConfigurationParserDefinition}.
024     * 
025     * @author Achim Huegen
026     */
027    public class ConfigurationParserDefinitionImpl extends ExtensionDefinitionImpl implements ConfigurationParserDefinition
028    {
029        private String _inputFormat;
030        private ConfigurationParserConstructor _parserConstructor;
031    
032        public ConfigurationParserDefinitionImpl(ModuleDefinition module)
033        {
034            super(module);
035        }
036        
037        public ConfigurationParserDefinitionImpl(ModuleDefinition module, Location location,
038                String inputFormat, ConfigurationParserConstructor parserConstructor)
039        {
040            super(module, location);
041            _inputFormat = inputFormat;
042            _parserConstructor = parserConstructor;
043        }
044        
045        /**
046         * @see org.apache.hivemind.definition.ConfigurationParserDefinition#getInputFormat()
047         */
048        public String getInputFormat()
049        {
050            return _inputFormat;
051        }
052    
053        /**
054         * @see org.apache.hivemind.definition.ConfigurationParserDefinition#getParserConstructor()
055         */
056        public ConfigurationParserConstructor getParserConstructor()
057        {
058            return _parserConstructor;
059        }
060    }