~slub.team/goobi-indexserver/3.x

« back to all changes in this revision

Viewing changes to lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/QueryNodeError.java

  • Committer: Sebastian Meyer
  • Date: 2012-08-03 09:12:40 UTC
  • Revision ID: sebastian.meyer@slub-dresden.de-20120803091240-x6861b0vabq1xror
Remove Lucene and Solr source code and add patches instead
Fix Bug #985487: Auto-suggestion for the search interface

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
package org.apache.lucene.queryParser.core;
2
 
 
3
 
/**
4
 
 * Licensed to the Apache Software Foundation (ASF) under one or more
5
 
 * contributor license agreements.  See the NOTICE file distributed with
6
 
 * this work for additional information regarding copyright ownership.
7
 
 * The ASF licenses this file to You under the Apache License, Version 2.0
8
 
 * (the "License"); you may not use this file except in compliance with
9
 
 * the License.  You may obtain a copy of the License at
10
 
 *
11
 
 *     http://www.apache.org/licenses/LICENSE-2.0
12
 
 *
13
 
 * Unless required by applicable law or agreed to in writing, software
14
 
 * distributed under the License is distributed on an "AS IS" BASIS,
15
 
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
 
 * See the License for the specific language governing permissions and
17
 
 * limitations under the License.
18
 
 */
19
 
 
20
 
import org.apache.lucene.messages.Message;
21
 
import org.apache.lucene.messages.NLSException;
22
 
 
23
 
/**
24
 
 * Error class with NLS support
25
 
 * 
26
 
 * @see org.apache.lucene.messages.NLS
27
 
 * @see org.apache.lucene.messages.Message
28
 
 */
29
 
public class QueryNodeError extends Error implements NLSException {
30
 
 
31
 
  private static final long serialVersionUID = 1804855832182710327L;
32
 
  private Message message;
33
 
 
34
 
  /**
35
 
   * @param message
36
 
   *          - NLS Message Object
37
 
   */
38
 
  public QueryNodeError(Message message) {
39
 
    super(message.getKey());
40
 
 
41
 
    this.message = message;
42
 
 
43
 
  }
44
 
 
45
 
  /**
46
 
   * @param throwable
47
 
   *          - @see java.lang.Error
48
 
   */
49
 
  public QueryNodeError(Throwable throwable) {
50
 
    super(throwable);
51
 
  }
52
 
 
53
 
  /**
54
 
   * @param message
55
 
   *          - NLS Message Object
56
 
   * @param throwable
57
 
   *          - @see java.lang.Error
58
 
   */
59
 
  public QueryNodeError(Message message, Throwable throwable) {
60
 
    super(message.getKey(), throwable);
61
 
 
62
 
    this.message = message;
63
 
 
64
 
  }
65
 
 
66
 
  /*
67
 
   * (non-Javadoc)
68
 
   * 
69
 
   * @see org.apache.lucene.messages.NLSException#getMessageObject()
70
 
   */
71
 
  public Message getMessageObject() {
72
 
    return this.message;
73
 
  }
74
 
 
75
 
}