KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > xquark > mapper > mapping > MappingConstants


1 /*
2  * This file belongs to the XQuark distribution.
3  * Copyright (C) 2003 Universite de Versailles Saint-Quentin.
4  *
5  * This program is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this program; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307.
18  * You can also get it at http://www.gnu.org/licenses/lgpl.html
19  *
20  * For more information on this software, see http://www.xquark.org.
21  */

22
23 package org.xquark.mapper.mapping;
24
25 /**
26  * Constants for mapping feature. Mainly defining tokens for the mapping language.
27  *
28  */

29 public interface MappingConstants {
30
31   public static final String JavaDoc MAPPING_URI =
32     "http://www.xquark.org/Repository/1.0/Mapping";
33   public static final String JavaDoc BRIDGE_MAPPING_URI =
34     "http://www.xquark.org/Bridge/1.1/Mapping";
35   public static final String JavaDoc BRIDGE_MAPPING_URI_1_0 =
36     "http://www.xquark.org/Bridge/1.0/Mapping";
37   
38   // Mapping tags
39
public static final String JavaDoc MAPPING_TAG = "mapping";
40   public static final String JavaDoc MAP_TAG = "map";
41   public static final String JavaDoc ELEMENT_TAG = "element";
42   public static final String JavaDoc ATTRIBUTE_TAG = "attribute";
43   public static final String JavaDoc GENERATOR_TAG = "generator";
44   
45   // mapping attributes
46
public static final String JavaDoc VERSION_ATTR = "version";
47   public static final String JavaDoc TABLE_ATTR = "table";
48   public static final String JavaDoc TYPE_ATTR = "type";
49   public static final String JavaDoc NAME_ATTR = "name" ;
50   public static final String JavaDoc ACTION_ATTR = "action";
51   public static final String JavaDoc COLUMN_ATTR = "column";
52   public static final String JavaDoc REF_ATTR = "ref";
53   public static final String JavaDoc MAP_ATTR = "map";
54   public static final String JavaDoc UPDATE_WHEN_MISSING_ATTR = "updateColumnWhenMissing";
55   public static final String JavaDoc IN_SELECT_ATTR = "inSelect";
56   public static final String JavaDoc IN_KEY_ATTR = "inKey";
57   public static final String JavaDoc BATCH_SIZE_ATTR = "batchSize";
58   public static final String JavaDoc VAR_ATTR = "variable";
59   public static final String JavaDoc METHOD_ATTR = "method"; // NOTE: deprecated
60
public static final String JavaDoc USER_GENERATOR_ATTR = "class";
61   public static final String JavaDoc XPATH_ATTR = "xpath"; // NOTE: not yet implemented
62
public static final String JavaDoc SCHEMA_LOCATION_ATTR = "schemaLocation";
63   public static final String JavaDoc NO_NS_SCHEMA_LOCATION_ATTR = "noNamespaceSchemaLocation";
64
65   // Values
66

67   public static final String JavaDoc TRUE_VALUE = "true";
68   public static final String JavaDoc FALSE_VALUE = "false";
69   
70   public static final String JavaDoc TRUE_NUM_VALUE = "1";
71   public static final String JavaDoc FALSE_NUM_VALUE = "0";
72
73   public static final String JavaDoc INSERT_VALUE = "insert";
74   public static final String JavaDoc CHECK_VALUE = "check";
75   public static final String JavaDoc SELECT_VALUE = "select";
76   public static final String JavaDoc UPDATE_VALUE = "update";
77   
78   public static final String JavaDoc DOCID_VALUE = "$DocumentID";
79   public static final String JavaDoc DOCOID_VALUE = "$DocumentOID";
80   public static final String JavaDoc BUCKET_VALUE = "$BucketOID";
81   public static final String JavaDoc UOID_VALUE = "$UOID";
82   public static final String JavaDoc PATHID_VALUE = "$PathOID";
83   public static final String JavaDoc TAG_VALUE = "$QName";
84   public static final String JavaDoc URI_VALUE = "$NamespaceURI$";
85   public static final String JavaDoc LOCAL_VALUE = "$LocalName";
86   public static final String JavaDoc RANK_VALUE = "$NodeRank";
87   public static final String JavaDoc VALUE_VALUE = "$NodeValue";
88
89   /* System generator codes */
90   public static final short DOCID_CODE = 1;
91   public static final short DOCOID_CODE = 10;
92   public static final short BUCKET_CODE = 2;
93   public static final short UOID_CODE = 3;
94   public static final short PATHID_CODE = 4;
95   public static final short TAG_CODE = 5;
96   public static final short URI_CODE = 6;
97   public static final short LOCAL_CODE = 7;
98   public static final short RANK_CODE = 8;
99   public static final short VALUE_CODE = 9;
100   
101   public static final int INSERT = 1;
102   public static final int CHECK = 2;
103   public static final int UPDATE = 3;
104   public static final int SELECT = 4;
105
106   public static final int NO_ROLE = 0;
107   public static final int KEY_ROLE = 1;
108   public static final int SELECT_ROLE = 2;
109 }
110
Popular Tags