LUCENE-4044: few steps closer to fixing compile

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/branches/lucene2510@1364875 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Robert Muir 2012-07-24 03:12:43 +00:00
parent fe2d1194fb
commit 44fda553d6
173 changed files with 386 additions and 329 deletions

View File

@ -1,4 +1,5 @@
package org.apache.solr.analysis;
package org.apache.lucene.analysis.ar;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with

View File

@ -1,4 +1,5 @@
package org.apache.solr.analysis;
package org.apache.lucene.analysis.ar;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with

View File

@ -1,4 +1,4 @@
package org.apache.solr.analysis;
package org.apache.lucene.analysis.bg;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more

View File

@ -1,3 +1,4 @@
package org.apache.lucene.analysis.br;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@ -16,9 +17,6 @@
* limitations under the License.
*/
package org.apache.solr.analysis;
import org.apache.lucene.analysis.TokenStream;
import org.apache.lucene.analysis.br.BrazilianStemFilter;
import org.apache.lucene.analysis.util.TokenFilterFactory;

View File

@ -1,5 +1,4 @@
package org.apache.solr.analysis;
package org.apache.lucene.analysis.charfilter;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more

View File

@ -1,3 +1,5 @@
package org.apache.lucene.analysis.charfilter;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@ -15,8 +17,6 @@
* limitations under the License.
*/
package org.apache.solr.analysis;
import java.io.File;
import java.io.IOException;
import java.io.Reader;

View File

@ -1,4 +1,4 @@
package org.apache.solr.analysis;
package org.apache.lucene.analysis.cjk;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more

View File

@ -1,4 +1,4 @@
package org.apache.solr.analysis;
package org.apache.lucene.analysis.cjk;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more

View File

@ -1,3 +1,5 @@
package org.apache.lucene.analysis.commongrams;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@ -14,7 +16,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.solr.analysis;
import java.io.IOException;

View File

@ -1,3 +1,5 @@
package org.apache.lucene.analysis.commongrams;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@ -14,7 +16,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.solr.analysis;
import java.io.IOException;
import java.util.Map;

View File

@ -1,3 +1,4 @@
package org.apache.lucene.analysis.compound;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@ -16,9 +17,6 @@
* limitations under the License.
*/
package org.apache.solr.analysis;
import org.apache.lucene.analysis.compound.*;
import org.apache.lucene.analysis.util.*;
import org.apache.lucene.analysis.TokenStream;

View File

@ -1,3 +1,5 @@
package org.apache.lucene.analysis.compound;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@ -15,8 +17,6 @@
* limitations under the License.
*/
package org.apache.solr.analysis;
import org.apache.commons.io.IOUtils;
import org.apache.lucene.analysis.TokenStream;
import org.apache.lucene.analysis.compound.CompoundWordTokenFilterBase;

View File

@ -1,3 +1,5 @@
package org.apache.lucene.analysis.core;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@ -15,8 +17,6 @@
* limitations under the License.
*/
package org.apache.solr.analysis;
import org.apache.lucene.analysis.core.KeywordTokenizer;
import org.apache.lucene.analysis.util.TokenizerFactory;

View File

@ -1,3 +1,5 @@
package org.apache.lucene.analysis.core;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@ -15,8 +17,6 @@
* limitations under the License.
*/
package org.apache.solr.analysis;
import org.apache.lucene.analysis.core.LetterTokenizer;
import org.apache.lucene.analysis.util.TokenizerFactory;

View File

@ -1,3 +1,5 @@
package org.apache.lucene.analysis.core;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@ -15,8 +17,6 @@
* limitations under the License.
*/
package org.apache.solr.analysis;
import java.util.Map;
import org.apache.lucene.analysis.TokenStream;

View File

@ -1,3 +1,5 @@
package org.apache.lucene.analysis.core;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@ -15,8 +17,6 @@
* limitations under the License.
*/
package org.apache.solr.analysis;
import org.apache.lucene.analysis.core.LowerCaseTokenizer;
import org.apache.lucene.analysis.util.AbstractAnalysisFactory;
import org.apache.lucene.analysis.util.MultiTermAwareComponent;

View File

@ -1,3 +1,5 @@
package org.apache.lucene.analysis.core;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@ -15,8 +17,6 @@
* limitations under the License.
*/
package org.apache.solr.analysis;
import org.apache.lucene.analysis.util.*;
import org.apache.lucene.analysis.TokenStream;
import org.apache.lucene.analysis.core.StopAnalyzer;

View File

@ -1,4 +1,4 @@
package org.apache.solr.analysis;
package org.apache.lucene.analysis.core;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more

View File

@ -1,3 +1,5 @@
package org.apache.lucene.analysis.core;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@ -15,8 +17,6 @@
* limitations under the License.
*/
package org.apache.solr.analysis;
import org.apache.lucene.analysis.core.WhitespaceTokenizer;
import org.apache.lucene.analysis.util.TokenizerFactory;

View File

@ -1,4 +1,4 @@
package org.apache.solr.analysis;
package org.apache.lucene.analysis.cz;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more

View File

@ -1,4 +1,4 @@
package org.apache.solr.analysis;
package org.apache.lucene.analysis.de;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more

View File

@ -1,4 +1,4 @@
package org.apache.solr.analysis;
package org.apache.lucene.analysis.de;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more

View File

@ -1,4 +1,4 @@
package org.apache.solr.analysis;
package org.apache.lucene.analysis.de;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more

View File

@ -1,3 +1,4 @@
package org.apache.lucene.analysis.de;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@ -16,9 +17,6 @@
* limitations under the License.
*/
package org.apache.solr.analysis;
import org.apache.lucene.analysis.de.GermanStemFilter;
import org.apache.lucene.analysis.TokenStream;
import org.apache.lucene.analysis.util.TokenFilterFactory;

View File

@ -1,3 +1,5 @@
package org.apache.lucene.analysis.el;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@ -15,9 +17,6 @@
* limitations under the License.
*/
package org.apache.solr.analysis;
import java.util.Map;
import org.apache.lucene.analysis.TokenStream;

View File

@ -1,4 +1,4 @@
package org.apache.solr.analysis;
package org.apache.lucene.analysis.el;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more

View File

@ -1,4 +1,4 @@
package org.apache.solr.analysis;
package org.apache.lucene.analysis.en;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more

View File

@ -1,4 +1,4 @@
package org.apache.solr.analysis;
package org.apache.lucene.analysis.en;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more

View File

@ -1,4 +1,4 @@
package org.apache.solr.analysis;
package org.apache.lucene.analysis.en;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more

View File

@ -1,3 +1,5 @@
package org.apache.lucene.analysis.en;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@ -15,8 +17,6 @@
* limitations under the License.
*/
package org.apache.solr.analysis;
import org.apache.lucene.analysis.TokenStream;
import org.apache.lucene.analysis.en.PorterStemFilter;
import org.apache.lucene.analysis.util.TokenFilterFactory;

View File

@ -1,4 +1,4 @@
package org.apache.solr.analysis;
package org.apache.lucene.analysis.es;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more

View File

@ -1,4 +1,4 @@
package org.apache.solr.analysis;
package org.apache.lucene.analysis.fa;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more

View File

@ -1,3 +1,4 @@
package org.apache.lucene.analysis.fa;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@ -16,9 +17,6 @@
* limitations under the License.
*/
package org.apache.solr.analysis;
import org.apache.lucene.analysis.fa.PersianNormalizationFilter;
import org.apache.lucene.analysis.TokenStream;
import org.apache.lucene.analysis.util.AbstractAnalysisFactory;

View File

@ -1,4 +1,4 @@
package org.apache.solr.analysis;
package org.apache.lucene.analysis.fi;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more

View File

@ -1,3 +1,4 @@
package org.apache.lucene.analysis.fr;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@ -16,11 +17,7 @@
* limitations under the License.
*/
package org.apache.solr.analysis;
import org.apache.lucene.analysis.util.*;
import org.apache.lucene.analysis.fr.*;
import java.io.IOException;
import org.apache.lucene.analysis.TokenStream;

View File

@ -1,4 +1,4 @@
package org.apache.solr.analysis;
package org.apache.lucene.analysis.fr;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more

View File

@ -1,4 +1,4 @@
package org.apache.solr.analysis;
package org.apache.lucene.analysis.fr;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more

View File

@ -1,4 +1,4 @@
package org.apache.solr.analysis;
package org.apache.lucene.analysis.ga;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more

View File

@ -1,4 +1,4 @@
package org.apache.solr.analysis;
package org.apache.lucene.analysis.gl;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more

View File

@ -1,4 +1,4 @@
package org.apache.solr.analysis;
package org.apache.lucene.analysis.gl;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more

View File

@ -1,4 +1,4 @@
package org.apache.solr.analysis;
package org.apache.lucene.analysis.hi;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more

View File

@ -1,4 +1,4 @@
package org.apache.solr.analysis;
package org.apache.lucene.analysis.hi;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more

View File

@ -1,4 +1,4 @@
package org.apache.solr.analysis;
package org.apache.lucene.analysis.hu;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more

View File

@ -1,4 +1,4 @@
package org.apache.solr.analysis;
package org.apache.lucene.analysis.hunspell;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more

View File

@ -1,4 +1,4 @@
package org.apache.solr.analysis;
package org.apache.lucene.analysis.id;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more

View File

@ -1,4 +1,4 @@
package org.apache.solr.analysis;
package org.apache.lucene.analysis.in;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more

View File

@ -1,4 +1,4 @@
package org.apache.solr.analysis;
package org.apache.lucene.analysis.it;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more

View File

@ -1,4 +1,4 @@
package org.apache.solr.analysis;
package org.apache.lucene.analysis.lv;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more

View File

@ -1,3 +1,4 @@
package org.apache.lucene.analysis.miscellaneous;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@ -16,9 +17,6 @@
* limitations under the License.
*/
package org.apache.solr.analysis;
import org.apache.lucene.analysis.util.AbstractAnalysisFactory;
import org.apache.lucene.analysis.util.MultiTermAwareComponent;
import org.apache.lucene.analysis.util.TokenFilterFactory;

View File

@ -1,3 +1,5 @@
package org.apache.lucene.analysis.miscellaneous;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@ -15,8 +17,6 @@
* limitations under the License.
*/
package org.apache.solr.analysis;
import org.apache.lucene.analysis.TokenStream;
import org.apache.lucene.analysis.miscellaneous.CapitalizationFilter;
import org.apache.lucene.analysis.util.CharArraySet;

View File

@ -1,4 +1,4 @@
package org.apache.solr.analysis;
package org.apache.lucene.analysis.miscellaneous;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more

View File

@ -1,3 +1,5 @@
package org.apache.lucene.analysis.miscellaneous;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@ -15,8 +17,6 @@
* limitations under the License.
*/
package org.apache.solr.analysis;
import org.apache.lucene.analysis.util.*;
import org.apache.lucene.analysis.TokenStream;
import org.apache.lucene.analysis.miscellaneous.KeepWordFilter;

View File

@ -1,10 +1,4 @@
package org.apache.solr.analysis;
import java.io.IOException;
import org.apache.lucene.analysis.miscellaneous.KeywordMarkerFilter;
import org.apache.lucene.analysis.util.*;
import org.apache.lucene.analysis.TokenStream;
package org.apache.lucene.analysis.miscellaneous;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@ -23,6 +17,12 @@ import org.apache.lucene.analysis.TokenStream;
* limitations under the License.
*/
import java.io.IOException;
import org.apache.lucene.analysis.miscellaneous.KeywordMarkerFilter;
import org.apache.lucene.analysis.util.*;
import org.apache.lucene.analysis.TokenStream;
/**
* Factory for {@link KeywordMarkerFilter}.
* <pre class="prettyprint" >

View File

@ -1,3 +1,5 @@
package org.apache.lucene.analysis.miscellaneous;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@ -15,8 +17,6 @@
* limitations under the License.
*/
package org.apache.solr.analysis;
import org.apache.lucene.analysis.TokenStream;
import org.apache.lucene.analysis.miscellaneous.LengthFilter;
import org.apache.lucene.analysis.util.TokenFilterFactory;

View File

@ -1,3 +1,5 @@
package org.apache.lucene.analysis.miscellaneous;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@ -15,8 +17,6 @@
* limitations under the License.
*/
package org.apache.solr.analysis;
import java.util.Map;
import org.apache.lucene.analysis.TokenStream;

View File

@ -1,3 +1,5 @@
package org.apache.lucene.analysis.miscellaneous;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@ -15,8 +17,6 @@
* limitations under the License.
*/
package org.apache.solr.analysis;
import org.apache.lucene.analysis.TokenStream;
import org.apache.lucene.analysis.miscellaneous.RemoveDuplicatesTokenFilter;
import org.apache.lucene.analysis.util.TokenFilterFactory;

View File

@ -1,4 +1,4 @@
package org.apache.solr.analysis;
package org.apache.lucene.analysis.miscellaneous;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more

View File

@ -1,3 +1,5 @@
package org.apache.lucene.analysis.miscellaneous;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@ -15,8 +17,6 @@
* limitations under the License.
*/
package org.apache.solr.analysis;
import java.util.Map;
import org.apache.lucene.analysis.TokenStream;

View File

@ -1,3 +1,5 @@
package org.apache.lucene.analysis.miscellaneous;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@ -15,8 +17,6 @@
* limitations under the License.
*/
package org.apache.solr.analysis;
import org.apache.lucene.analysis.TokenStream;
import org.apache.lucene.analysis.miscellaneous.WordDelimiterFilter;
import org.apache.lucene.analysis.miscellaneous.WordDelimiterIterator;

View File

@ -1,4 +1,4 @@
package org.apache.solr.analysis;
package org.apache.lucene.analysis.ngram;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more

View File

@ -1,4 +1,4 @@
package org.apache.solr.analysis;
package org.apache.lucene.analysis.ngram;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@ -34,28 +34,28 @@ import java.util.Map;
*
*/
public class EdgeNGramTokenizerFactory extends TokenizerFactory {
private int maxGramSize = 0;
private int minGramSize = 0;
private String side;
@Override
public void init(Map<String, String> args) {
super.init(args);
String maxArg = args.get("maxGramSize");
maxGramSize = (maxArg != null ? Integer.parseInt(maxArg) : EdgeNGramTokenizer.DEFAULT_MAX_GRAM_SIZE);
String minArg = args.get("minGramSize");
minGramSize = (minArg != null ? Integer.parseInt(minArg) : EdgeNGramTokenizer.DEFAULT_MIN_GRAM_SIZE);
side = args.get("side");
if (side == null) {
side = EdgeNGramTokenizer.Side.FRONT.getLabel();
}
}
public EdgeNGramTokenizer create(Reader input) {
return new EdgeNGramTokenizer(input, side, minGramSize, maxGramSize);
private int maxGramSize = 0;
private int minGramSize = 0;
private String side;
@Override
public void init(Map<String, String> args) {
super.init(args);
String maxArg = args.get("maxGramSize");
maxGramSize = (maxArg != null ? Integer.parseInt(maxArg) : EdgeNGramTokenizer.DEFAULT_MAX_GRAM_SIZE);
String minArg = args.get("minGramSize");
minGramSize = (minArg != null ? Integer.parseInt(minArg) : EdgeNGramTokenizer.DEFAULT_MIN_GRAM_SIZE);
side = args.get("side");
if (side == null) {
side = EdgeNGramTokenizer.Side.FRONT.getLabel();
}
}
public EdgeNGramTokenizer create(Reader input) {
return new EdgeNGramTokenizer(input, side, minGramSize, maxGramSize);
}
}

View File

@ -1,4 +1,4 @@
package org.apache.solr.analysis;
package org.apache.lucene.analysis.ngram;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more

View File

@ -1,4 +1,4 @@
package org.apache.solr.analysis;
package org.apache.lucene.analysis.ngram;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@ -35,22 +35,22 @@ import java.util.Map;
*
*/
public class NGramTokenizerFactory extends TokenizerFactory {
private int maxGramSize = 0;
private int minGramSize = 0;
private int maxGramSize = 0;
private int minGramSize = 0;
/** Initializes the n-gram min and max sizes and the side from which one should start tokenizing. */
@Override
public void init(Map<String, String> args) {
super.init(args);
String maxArg = args.get("maxGramSize");
maxGramSize = (maxArg != null ? Integer.parseInt(maxArg) : NGramTokenizer.DEFAULT_MAX_NGRAM_SIZE);
/** Initializes the n-gram min and max sizes and the side from which one should start tokenizing. */
@Override
public void init(Map<String, String> args) {
super.init(args);
String maxArg = args.get("maxGramSize");
maxGramSize = (maxArg != null ? Integer.parseInt(maxArg) : NGramTokenizer.DEFAULT_MAX_NGRAM_SIZE);
String minArg = args.get("minGramSize");
minGramSize = (minArg != null ? Integer.parseInt(minArg) : NGramTokenizer.DEFAULT_MIN_NGRAM_SIZE);
}
/** Creates the {@link TokenStream} of n-grams from the given {@link Reader}. */
public NGramTokenizer create(Reader input) {
return new NGramTokenizer(input, minGramSize, maxGramSize);
}
String minArg = args.get("minGramSize");
minGramSize = (minArg != null ? Integer.parseInt(minArg) : NGramTokenizer.DEFAULT_MIN_NGRAM_SIZE);
}
/** Creates the {@link TokenStream} of n-grams from the given {@link Reader}. */
public NGramTokenizer create(Reader input) {
return new NGramTokenizer(input, minGramSize, maxGramSize);
}
}

View File

@ -1,4 +1,4 @@
package org.apache.solr.analysis;
package org.apache.lucene.analysis.no;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more

View File

@ -1,4 +1,4 @@
package org.apache.solr.analysis;
package org.apache.lucene.analysis.no;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more

View File

@ -1,4 +1,5 @@
package org.apache.solr.analysis;
package org.apache.lucene.analysis.path;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@ -25,7 +26,6 @@ import org.apache.lucene.analysis.path.ReversePathHierarchyTokenizer;
import org.apache.lucene.analysis.util.InitializationException;
import org.apache.lucene.analysis.util.TokenizerFactory;
/**
* Factory for {@link PathHierarchyTokenizer}.
* <pre class="prettyprint" >

View File

@ -1,3 +1,5 @@
package org.apache.lucene.analysis.pattern;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@ -15,8 +17,6 @@
* limitations under the License.
*/
package org.apache.solr.analysis;
import java.io.Reader;
import java.util.Map;
import java.util.regex.Pattern;

View File

@ -1,3 +1,5 @@
package org.apache.lucene.analysis.pattern;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@ -15,7 +17,6 @@
* limitations under the License.
*/
package org.apache.solr.analysis;
import org.apache.lucene.analysis.TokenStream;
import org.apache.lucene.analysis.pattern.PatternReplaceFilter;
import org.apache.lucene.analysis.util.InitializationException;

View File

@ -1,3 +1,5 @@
package org.apache.lucene.analysis.pattern;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@ -15,8 +17,6 @@
* limitations under the License.
*/
package org.apache.solr.analysis;
import java.io.IOException;
import java.io.Reader;
import java.util.Map;
@ -27,7 +27,6 @@ import org.apache.lucene.analysis.pattern.PatternTokenizer;
import org.apache.lucene.analysis.util.InitializationException;
import org.apache.lucene.analysis.util.TokenizerFactory;
/**
* Factory for {@link PatternTokenizer}.
* This tokenizer uses regex pattern matching to construct distinct tokens

View File

@ -1,4 +1,5 @@
package org.apache.solr.analysis;
package org.apache.lucene.analysis.payloads;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@ -29,7 +30,6 @@ import org.apache.lucene.analysis.util.TokenFilterFactory;
import java.util.Map;
/**
*
* Factory for {@link DelimitedPayloadTokenFilter}.

View File

@ -1,3 +1,4 @@
package org.apache.lucene.analysis.payloads;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@ -16,9 +17,6 @@
* limitations under the License.
*/
package org.apache.solr.analysis;
import org.apache.lucene.analysis.payloads.NumericPayloadTokenFilter;
import org.apache.lucene.analysis.TokenStream;
import org.apache.lucene.analysis.util.TokenFilterFactory;

View File

@ -1,3 +1,4 @@
package org.apache.lucene.analysis.payloads;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@ -16,9 +17,6 @@
* limitations under the License.
*/
package org.apache.solr.analysis;
import org.apache.lucene.analysis.payloads.TokenOffsetPayloadTokenFilter;
import org.apache.lucene.analysis.TokenStream;
import org.apache.lucene.analysis.util.TokenFilterFactory;

View File

@ -1,3 +1,4 @@
package org.apache.lucene.analysis.payloads;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@ -16,9 +17,6 @@
* limitations under the License.
*/
package org.apache.solr.analysis;
import org.apache.lucene.analysis.payloads.TypeAsPayloadTokenFilter;
import org.apache.lucene.analysis.TokenStream;
import org.apache.lucene.analysis.util.TokenFilterFactory;

View File

@ -1,3 +1,5 @@
package org.apache.lucene.analysis.position;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@ -15,8 +17,6 @@
* limitations under the License.
*/
package org.apache.solr.analysis;
import org.apache.lucene.analysis.TokenStream;
import org.apache.lucene.analysis.position.PositionFilter;
import org.apache.lucene.analysis.util.TokenFilterFactory;

View File

@ -1,4 +1,4 @@
package org.apache.solr.analysis;
package org.apache.lucene.analysis.pt;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more

View File

@ -1,4 +1,4 @@
package org.apache.solr.analysis;
package org.apache.lucene.analysis.pt;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more

View File

@ -1,4 +1,4 @@
package org.apache.solr.analysis;
package org.apache.lucene.analysis.pt;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more

View File

@ -1,3 +1,5 @@
package org.apache.lucene.analysis.reverse;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@ -15,8 +17,6 @@
* limitations under the License.
*/
package org.apache.solr.analysis;
import org.apache.lucene.analysis.TokenStream;
import org.apache.lucene.analysis.reverse.ReverseStringFilter;
import org.apache.lucene.analysis.util.TokenFilterFactory;

View File

@ -1,4 +1,4 @@
package org.apache.solr.analysis;
package org.apache.lucene.analysis.ru;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more

View File

@ -1,3 +1,4 @@
package org.apache.lucene.analysis.shingle;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@ -16,9 +17,6 @@
* limitations under the License.
*/
package org.apache.solr.analysis;
import org.apache.lucene.analysis.shingle.ShingleFilter;
import org.apache.lucene.analysis.TokenStream;
import org.apache.lucene.analysis.util.InitializationException;

View File

@ -1,3 +1,5 @@
package org.apache.lucene.analysis.snowball;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@ -14,7 +16,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.solr.analysis;
import java.util.Map;
import java.io.IOException;

View File

@ -1,3 +1,5 @@
package org.apache.lucene.analysis.standard;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@ -15,8 +17,6 @@
* limitations under the License.
*/
package org.apache.solr.analysis;
import org.apache.lucene.analysis.TokenFilter;
import org.apache.lucene.analysis.TokenStream;
import org.apache.lucene.analysis.util.TokenFilterFactory;

View File

@ -1,3 +1,5 @@
package org.apache.lucene.analysis.standard;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@ -15,8 +17,6 @@
* limitations under the License.
*/
package org.apache.solr.analysis;
import org.apache.lucene.analysis.Tokenizer;
import org.apache.lucene.analysis.standard.ClassicTokenizer;
import org.apache.lucene.analysis.standard.StandardAnalyzer;

View File

@ -1,3 +1,5 @@
package org.apache.lucene.analysis.standard;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@ -15,8 +17,6 @@
* limitations under the License.
*/
package org.apache.solr.analysis;
import java.util.Map;
import org.apache.lucene.analysis.TokenStream;

View File

@ -1,3 +1,5 @@
package org.apache.lucene.analysis.standard;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@ -15,8 +17,6 @@
* limitations under the License.
*/
package org.apache.solr.analysis;
import org.apache.lucene.analysis.standard.StandardAnalyzer;
import org.apache.lucene.analysis.standard.StandardTokenizer;
import org.apache.lucene.analysis.util.TokenizerFactory;

View File

@ -1,5 +1,4 @@
package org.apache.solr.analysis;
package org.apache.lucene.analysis.standard;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@ -18,8 +17,6 @@ package org.apache.solr.analysis;
* limitations under the License.
*/
import org.apache.lucene.analysis.standard.StandardAnalyzer;
import org.apache.lucene.analysis.standard.UAX29URLEmailTokenizer;
import org.apache.lucene.analysis.util.TokenizerFactory;

View File

@ -1,4 +1,4 @@
package org.apache.solr.analysis;
package org.apache.lucene.analysis.sv;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more

View File

@ -1,3 +1,4 @@
package org.apache.lucene.analysis.th;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@ -16,8 +17,6 @@
* limitations under the License.
*/
package org.apache.solr.analysis;
import org.apache.lucene.analysis.th.ThaiWordFilter;
import org.apache.lucene.analysis.TokenStream;

View File

@ -1,4 +1,4 @@
package org.apache.solr.analysis;
package org.apache.lucene.analysis.tr;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more

View File

@ -40,15 +40,24 @@ public final class AnalysisSPILoader<S extends AbstractAnalysisFactory> {
private final Map<String,Class<S>> modifiableServices;
private final Class<S> clazz;
public AnalysisSPILoader(Class<S> clazz) {
this(clazz, new String[] { clazz.getSimpleName() });
}
public AnalysisSPILoader(Class<S> clazz, String[] suffixes) {
this.clazz = clazz;
final ServiceLoader<S> loader = ServiceLoader.load(clazz);
final LinkedHashMap<String,Class<S>> services = new LinkedHashMap<String,Class<S>>();
final String suffix = clazz.getSimpleName();
for (final S service : loader) {
final String clazzName = service.getClass().getSimpleName();
final int suffixIndex = clazzName.lastIndexOf(suffix);
int suffixIndex = -1;
for (String suffix : suffixes) {
suffixIndex = clazzName.lastIndexOf(suffix);
if (suffixIndex != -1) {
break;
}
}
final String name = clazzName.substring(0, suffixIndex).toLowerCase(Locale.ROOT);
// only add the first one for each name, later services will be ignored
// this allows to place services before others in classpath to make

View File

@ -28,7 +28,8 @@ import org.apache.lucene.analysis.TokenStream;
public abstract class TokenFilterFactory extends AbstractAnalysisFactory {
private static final AnalysisSPILoader<TokenFilterFactory> loader =
new AnalysisSPILoader<TokenFilterFactory>(TokenFilterFactory.class);
new AnalysisSPILoader<TokenFilterFactory>(TokenFilterFactory.class,
new String[] { "TokenFilterFactory", "FilterFactory" });
/** looks up a tokenfilter by name */
public static TokenFilterFactory forName(String name) {

View File

@ -1,4 +1,4 @@
package org.apache.solr.analysis;
package org.apache.lucene.analysis.wikipedia;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more

View File

@ -0,0 +1,17 @@
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You 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.
org.apache.lucene.analysis.charfilter.HTMLStripCharFilterFactory
org.apache.lucene.analysis.charfilter.MappingCharFilterFactory

View File

@ -0,0 +1,26 @@
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You 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.
org.apache.lucene.analysis.ar.ArabicNormalizationFilterFactory
org.apache.lucene.analysis.ar.ArabicStemFilterFactory
org.apache.lucene.analysis.bg.BulgarianStemFilterFactory
org.apache.lucene.analysis.br.BrazilianStemFilterFactory
org.apache.lucene.analysis.cjk.CJKBigramFilterFactory
org.apache.lucene.analysis.cjk.CJKWidthFilterFactory
org.apache.lucene.analysis.commongrams.CommonGramsFilterFactory
org.apache.lucene.analysis.commongrams.CommonGramsQueryFilterFactory
org.apache.lucene.analysis.compound.DictionaryCompoundWordTokenFilterFactory
org.apache.lucene.analysis.compound.HyphenationCompoundWordTokenFilterFactory
org.apache.lucene.analysis.core.LowerCaseFilterFactory

View File

@ -0,0 +1,18 @@
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You 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.
org.apache.lucene.analysis.core.KeywordTokenizerFactory
org.apache.lucene.analysis.core.LetterTokenizerFactory
org.apache.lucene.analysis.core.LowerCaseTokenizerFactory

View File

@ -1,4 +1,4 @@
package org.apache.solr.analysis;
package org.apache.lucene.analysis.bg;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more

View File

@ -1,4 +1,4 @@
package org.apache.solr.analysis;
package org.apache.lucene.analysis.br;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more

View File

@ -1,3 +1,5 @@
package org.apache.lucene.analysis.charfilter;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@ -15,8 +17,6 @@
* limitations under the License.
*/
package org.apache.solr.analysis;
import java.io.IOException;
import java.io.StringReader;
import java.util.HashMap;

View File

@ -1,3 +1,5 @@
package org.apache.lucene.analysis.charfilter;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@ -15,8 +17,6 @@
* limitations under the License.
*/
package org.apache.solr.analysis;
import org.apache.lucene.analysis.util.InitializationException;
import org.apache.lucene.util.LuceneTestCase;

View File

@ -1,4 +1,4 @@
package org.apache.solr.analysis;
package org.apache.lucene.analysis.cjk;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more

Some files were not shown because too many files have changed in this diff Show More