/[drupal]/contributions/modules/semantic_search/tests/sonia.test.config.php
ViewVC logotype

Contents of /contributions/modules/semantic_search/tests/sonia.test.config.php

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download) (as text)
Tue Jun 5 06:37:07 2007 UTC (2 years, 5 months ago) by hendler
Branch: MAIN
CVS Tags: HEAD
Branch point for: DRUPAL-5
File MIME type: text/x-php
adding files from our SVN
1 <?php
2 //DEFINES
3 /**
4 * configuration file mirring the main apps sonia.conf.inc
5 *
6 * @package SONIA
7 * */
8
9 define('CONFIG_FILE_LOADED', true);
10
11 /**
12 * which tests will be run
13 * all new tests must be registered here
14 * */
15 global $tests;
16 $tests = array();
17 //ORDER MATTERS
18 $tests[] = 'create_classes';
19 $tests[] = 'create_superclasses';
20 $tests[] = 'delete_subclasses';
21 $tests[] = 'update_classes';
22 $tests[] = 'class_properties';
23 $tests[] = 'crud_objects';
24 //$tests[] = 'search_classes';
25 //$tests[] = 'add_properties_to_superclass';
26 //$tests[] = 'test_subclass_properties';
27 //$tests[] = '';
28
29 //define('SONIA_DEBUG',true);
30 /**
31 * remove the database and perform other cleanups at the end of the test
32 * set to false if you want to see the state of the database at a certain point
33 * */
34 define('SONIA_TEST_CLEANUP',true);
35
36 define('SONIA_LOCATION','/var/biz/sonia_civic/trunk/');
37
38 /**
39 * the printing function name for messages
40 * */
41 define('SONIA_PRINT_MESSAGE_METHOD','sprintf');
42
43 /**
44 * this file!
45 * */
46 define('SONIA_CONFIG_FILE',SONIA_LOCATION.'tests/sonia.test.config.php');
47 /**
48 * Choose how
49 * */
50 define('SONIA_BACKEND_TYPE','sonia_arc_local');
51
52 define('APP_DIRECTORY',SONIA_LOCATION.'/');
53
54 define('SEMANTIC_SEARCH_CRUD_REQUEST_SIGNAL',20905982);
55 define('CACHE_TEMPORARY',1);
56
57
58 /////////////////////////////////////////////////////////////////
59
60 /***
61 * should be "edit" for Drupal
62 * change name for semantic_search
63 * @todo move out of SONIA into SEMANTIC_SEARCH and depricate
64 * */
65 define('SONIA_FORM_ARRAY_PREFIX','edit');
66
67 //INCLUDES
68 //ORDER MATTERS!
69 define('SONIA_DEFAULT_MODEL_PREFIX','sonia_test');
70 define('SONIA_DEFAULT_MODEL_IRI','http://soniatest.org/ns/'.SONIA_DEFAULT_MODEL_PREFIX.'');
71 //Todo Refactor
72 define('SONIA_DEBUG', true);
73 define('SONIA_ERROR_LOG','/Temp/SONIAERROR.txt');
74
75 require APP_DIRECTORY.'conf/sonia.const.inc';
76 require APP_DIRECTORY.'conf/sonia.includes.inc';
77
78
79
80 define('SONIA_DEFAULT_TOP_RESOURCE_ID', 0);
81
82 /**
83 * IN functions that need a starting point with the data, what is the default
84 * value for a starting category
85 * */
86 define('SONIA_DEFAULT_CATEGORY_START_ID', 'rdfs:Class');
87 define('SONIA_DEFAULT_FACET_START_ID',2);
88
89
90
91 /**
92 * @package SONIA
93 * */
94 function set_sonia_configs($config, $env='drupal')
95 {
96 switch ($env)
97 {
98 case 'standalone':
99 break;
100 case 'drupal':
101 default:
102 require TOOLS_DIRECTORY.'io/drupal/drupal.io.sonia.php';
103 break;
104 }
105
106 switch ($config)
107 {
108 case 'sonia_native_local':
109 // // GLOBALS
110 // global $db_conn;
111 //
112 // require TOOLS_DIRECTORY.'db.class.php';
113 // require TOOLS_DIRECTORY.'stores/native/sonia.native.store.php';
114 //
115 // // DEFINES
116 // define('SONIA_RUN_INIT_TESTS', true);
117 //
118 // // DATABASE
119 // // TODO change these from defines to private member variables
120 // define('SONIA_DB', 'sonia');
121 // define('SONIA_DB_USER', 'root');
122 // define('SONIA_DB_PASSWORD', '');
123 // define('SONIA_DB_HOST', '127.0.0.1:3306');
124 // define('SONIA_DB_PREFIX_NAME','semantic_search1');
125 //
126 // define('LITTLE_LITERAL_MAX',510);
127 //
128 // define('SONIA_INSTANCE','InstanceOf');
129 //
130 // if (!function_exists('xmlTreeMaker'))
131 // {
132 // require TOOLS_DIRECTORY.'xml2hash.php';
133 // }
134 //
135 // $db_conn = new SONIADB(SONIA_DB,SONIA_DB_PASSWORD,SONIA_DB_USER,SONIA_DB_HOST);
136
137 break;
138 case 'sonia_arc_local':
139
140 define('SONIA_DB_PREFIX_NAME','semantic_search1');
141 define('SONIA_LOCAL_ARC_TOOLS', TOOLS_DIRECTORY.'/stores/arc_local');
142 define('SONIA_ARC', SONIA_LOCATION.'/contrib/arc');
143
144 require SONIA_LOCAL_ARC_TOOLS.'/semantic_search_get_arc_config.php';
145 require SONIA_ARC.'/ARC_api.php';
146 require SONIA_LOCAL_ARC_TOOLS.'/sonia.arc_local.store.php';
147
148 define('SONIA_WRITE_ARC_LOG', true);
149 define('SONIA_ARC_LOG_PATH', SONIA_LOCAL_ARC_TOOLS.'/logs/');
150
151 define('SONIA_RUN_INIT_TESTS', true);
152 //some forms, like in drupal add an array to the form request params
153 //VERY IMPORTANT
154 define('SONIA_FORM_REQUEST_PREFIX','edit');
155
156 define('SONIA_COMMENCE_SEARCH','1980');
157
158 //for host
159 /**
160 * datatabase that ARC uses
161 * */
162 define('ARC_DB_NAME','stest');
163
164 /**
165 * ARC DB username
166 * */
167 define('ARC_DB_USER','root');
168
169 /**
170 * ARC DB password
171 * */
172 define('ARC_DB_PW','');
173
174 /**
175 * ARC DB host
176 * */
177 define('ARC_DB_HOST','localhost');
178
179 /**
180 * ARC DB port... should be 3306 in most cases
181 * */
182 define('ARC_DB_PORT',3306);
183
184 /**
185 * table name prefix to use in case using the same DB which has non - arc tables
186 * */
187 define('ARC_DB_PREFIX_NAME','semantic_search1');
188
189 /**
190 * ARC can return multiple ways. Rows refers to a PHP array which
191 * SONIA depends - this should not have to change
192 * */
193 define('ARC_DEFAULT_RESULT_TYPE','rows');
194
195
196 //// MOVE
197 define('SONIA_INSTANCE','type');
198
199 /**
200 * Location of RDF files to import and export
201 * */
202 define ('ARC_RDF_FILE_LOCATION',APP_DIRECTORY.'/data/');
203
204
205
206 /**
207 * URI of the model name. As you collect RDF data you will want
208 * to refer to that set of data with a URI... a collection
209 * */
210 define ('ARC_MAIN_DATA_IRI',SONIA_DEFAULT_MODEL_IRI);
211 //if (defined('SONIA_DEFAULT_CATEGORY_START_ID'))
212 //define ('SONIA_DEFAULT_CATEGORY_START_ID', 'Space');
213 define ('ARC_DEFAULT_NS_PREFIX', 'semantic_search');
214 define ('ARC_DEFAULT_PREFIXES',
215 'PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
216 PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
217 PREFIX owl: <http://www.w3.org/2002/07/owl#>
218 PREFIX foaf: <http://xmlns.com/foaf/0.1/>
219 PREFIX semantic_search: <http://semantic_search.civicactions.net/ns/semantic_search#>
220 PREFIX sonia: <'.SONIA_BASE_IRI.'#>
221 PREFIX soniap: <'.SONIA_PROPERTY_ID_URI.'>
222 PREFIX carsf: <http://semantic_search.civicactions.net/ns/car-spacefinder#>');
223 break;
224 default:
225 die('Incorrect conifg option in sonia.conf.inc -> '.$config);
226 }
227
228 }
229
230
231
232 ?>

  ViewVC Help
Powered by ViewVC 1.1.2