X-Git-Url: https://git.mdrn.pl/pylucene.git/blobdiff_plain/a2e61f0c04805cfcb8706176758d1283c7e3a55c..aaeed5504b982cf3545252ab528713250aa33eed:/lucene-java-3.4.0/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/ext/Extensions.java?ds=inline diff --git a/lucene-java-3.4.0/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/ext/Extensions.java b/lucene-java-3.4.0/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/ext/Extensions.java deleted file mode 100644 index edf763d..0000000 --- a/lucene-java-3.4.0/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/ext/Extensions.java +++ /dev/null @@ -1,217 +0,0 @@ -package org.apache.lucene.queryParser.ext; - -/** - * 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. - */ -import java.util.HashMap; -import java.util.Map; - -import org.apache.lucene.queryParser.QueryParser; - -/** - * The {@link Extensions} class represents an extension mapping to associate - * {@link ParserExtension} instances with extension keys. An extension key is a - * string encoded into a Lucene standard query parser field symbol recognized by - * {@link ExtendableQueryParser}. The query parser passes each extension field - * token to {@link #splitExtensionField(String, String)} to separate the - * extension key from the field identifier. - *
- * In addition to the key to extension mapping this class also defines the field
- * name overloading scheme. {@link ExtendableQueryParser} uses the given
- * extension to split the actual field name and extension key by calling
- * {@link #splitExtensionField(String, String)}. To change the order or the key
- * / field name encoding scheme users can subclass {@link Extensions} to
- * implement their own.
- *
- * @see ExtendableQueryParser
- * @see ParserExtension
- */
-public class Extensions {
- private final Map
- * Note: {@link Extensions} subclasses must maintain the contract between
- * {@link #buildExtensionField(String)} and
- * {@link #splitExtensionField(String, String)} where the latter inverts the
- * former.
- *
- * Note: {@link Extensions} subclasses must maintain the contract between
- * {@link #buildExtensionField(String, String)} and
- * {@link #splitExtensionField(String, String)} where the latter inverts the
- * former.
- * null
if no extension can be found for the key.
- *
- * @param key
- * the extension key
- * @return the {@link ParserExtension} instance for the given key or
- * null
if no extension can be found for the key.
- */
- public final ParserExtension getExtension(String key) {
- return this.extensions.get(key);
- }
-
- /**
- * Returns the extension field delimiter
- *
- * @return the extension field delimiter
- */
- public char getExtensionFieldDelimiter() {
- return extensionFieldDelimiter;
- }
-
- /**
- * Splits a extension field and returns the field / extension part as a
- * {@link Pair}. This method tries to split on the first occurrence of the
- * extension field delimiter, if the delimiter is not present in the string
- * the result will contain a null
value for the extension key and
- * the given field string as the field value. If the given extension field
- * string contains no field identifier the result pair will carry the given
- * default field as the field value.
- *
- * @param defaultField
- * the default query field
- * @param field
- * the extension field string
- * @return a {@link Pair} with the field name as the {@link Pair#cur} and the
- * extension key as the {@link Pair#cud}
- */
- public Pair