@Override
    public void init(ServletConfig servletConfig) throws ServletException {
        try {
            // load the configuration
            File configFile = getConfigFile(servletConfig);
            config = new ConfigReader(new FileReader(configFile));

            // register data source types
            for ( Entry<String,IDataSourceType> typeEntry : config.getDataSourceTypes().entrySet() ) {
                DataSourceTypesRegistry.register( typeEntry.getKey(),
                                                  typeEntry.getValue() );
            }

            // register data sources
            for (Entry<String, JsonObject> dataSource : config.getDataSources().entrySet()) {
                dataSources.put(dataSource.getKey(), DataSourceFactory.create(dataSource.getValue()));
            }

            // register content types
            MIMEParse.register("text/html");
            MIMEParse.register(Lang.RDFXML.getHeaderString());
            MIMEParse.register(Lang.NTRIPLES.getHeaderString());
            MIMEParse.register(Lang.JSONLD.getHeaderString());
            MIMEParse.register(Lang.TTL.getHeaderString());
        } catch (Exception e) {
            throw new ServletException(e);
        }
    }
@ Override public void init ( ServletConfig servletConfig ) throws ServletException { try { File configFile = getConfigFile ( servletConfig ) ; config = new ConfigReader ( new FileReader ( configFile ) ) ; for ( Entry < String , IDataSourceType > typeEntry : config . getDataSourceTypes ( ) . entrySet ( ) ) { DataSourceTypesRegistry . register ( typeEntry . getKey ( ) , typeEntry . getValue ( ) ) ; } for ( Entry < String , JsonObject > dataSource : config . getDataSources ( ) . entrySet ( ) ) { dataSources . put ( dataSource . getKey ( ) , DataSourceFactory . create ( dataSource . getValue ( ) ) ) ; } MIMEParse . register ( "text/html" ) ; MIMEParse . register ( Lang . RDFXML . getHeaderString ( ) ) ; MIMEParse . register ( Lang . NTRIPLES . getHeaderString ( ) ) ; MIMEParse . register ( Lang . JSONLD . getHeaderString ( ) ) ; MIMEParse . register ( Lang . TTL . getHeaderString ( ) ) ; } catch ( Exception e ) { throw new ServletException ( e ) ; } }
@param servletConfig
@throws ServletException