private void initializePrefixes ( ) { if ( namespaceMap == null ) { // TODO use logger System . err . println ( "Cannot use whitespace filter without initializing the namespace-prefix map for the current Wikipedia language version. DISABLING FILTER." ) ; } else { prefixesToAllow = new HashSet < String > ( ) ; prefixesToReject = new HashSet < String > ( ) ; for ( Entry < Integer , String > namespace : namespaceMap . entrySet ( ) ) { if ( allowedNamespaces . contains ( namespace . getKey ( ) ) ) { prefixesToAllow . add ( namespace . getValue ( ) + ":" ) ; } else { prefixesToReject . add ( namespace . getValue ( ) + ":" ) ; } } } }
Initialize allowed and restricted prefixes