KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > icl > saxon > KeyDefinition


1 package com.icl.saxon;
2 import com.icl.saxon.expr.Expression;
3 import com.icl.saxon.pattern.Pattern;
4
5 /**
6   * Corresponds to a single key definition.<P>
7   * @author <A HREF="mailto:mhkay@iclway.co.uk>Michael H. Kay</A>
8   */

9
10 public class KeyDefinition {
11
12     private int fingerprint; // the fingerprint of the name of the key definition
13
private Pattern match; // the match pattern
14
private Expression use; // the use expression
15

16     /**
17     * Constructor to create a key definition
18     */

19
20     public KeyDefinition(int fingerprint, Pattern match, Expression use) {
21         this.fingerprint = fingerprint;
22         this.match = match;
23         this.use = use;
24     }
25
26     /**
27     * Get the fingerprint of the name of the key definition
28     */

29
30     public int getFingerprint() {
31         return fingerprint;
32     }
33
34     /**
35     * Get the match pattern for the key definition
36     */

37
38     public Pattern getMatch() {
39         return match;
40     }
41
42     /**
43     * Get the use expression for the key definition
44     */

45
46     public Expression getUse() {
47         return use;
48     }
49 }
50
51 //
52
// The contents of this file are subject to the Mozilla Public License Version 1.0 (the "License");
53
// you may not use this file except in compliance with the License. You may obtain a copy of the
54
// License at http://www.mozilla.org/MPL/
55
//
56
// Software distributed under the License is distributed on an "AS IS" basis,
57
// WITHOUT WARRANTY OF ANY KIND, either express or implied.
58
// See the License for the specific language governing rights and limitations under the License.
59
//
60
// The Original Code is: all this file except PB-SYNC section.
61
//
62
// The Initial Developer of the Original Code is
63
// Michael Kay of International Computers Limited (mhkay@iclway.co.uk).
64
//
65
// Portions marked PB-SYNC are Copyright (C) Peter Bryant (pbryant@bigfoot.com). All Rights Reserved.
66
//
67
// Contributor(s): Michael Kay, Peter Bryant.
68
//
69
Popular Tags