Changeset 7882 for mauRepo/newmoon
- Timestamp:
- 09/02/11 13:24:38 (10 years ago)
- Location:
- mauRepo/newmoon
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
mauRepo/newmoon/pom.xml
r7831 r7882 4 4 <groupId>ndg.services.newmoon</groupId> 5 5 <artifactId>core</artifactId> 6 <version> 0.0.1-SNAPSHOT</version>6 <version>1.0.0</version> 7 7 8 8 <organization> … … 35 35 <version>1.4.0</version> 36 36 </dependency> 37 <!-- 38 <dependency> 39 <groupId>exist</groupId> 40 <artifactId>exist-optional</artifactId> 41 <version>1.4.0</version> 42 </dependency> 43 <dependency> 44 <groupId>exist</groupId> 45 <artifactId>exist-ngram-module</artifactId> 46 <version>1.4.0</version> 47 </dependency> 48 <dependency> 49 <groupId>exist</groupId> 50 <artifactId>exist-lucene-module</artifactId> 51 <version>1.4.0</version> 52 </dependency> 53 <dependency> 54 <groupId>org.apache.lucene</groupId> 55 <artifactId>lucene-regex</artifactId> 56 <version>2.4.1</version> 57 </dependency> 58 <dependency> 59 <groupId>org.apache.lucene</groupId> 60 <artifactId>lucene-core</artifactId> 61 <version>2.4.1</version> 62 </dependency> 63 <dependency> 64 <groupId>xml-apis</groupId> 65 <artifactId>xml-apis</artifactId> 66 <version>1.3.04</version> 67 </dependency> 68 <dependency> 69 <groupId>xerces</groupId> 70 <artifactId>xercesImpl</artifactId> 71 <version>2.9.1</version> 72 </dependency> 73 <dependency> 74 <groupId>xalan</groupId> 75 <artifactId>xalan</artifactId> 76 <version>2.7.1</version> 77 </dependency> 78 <dependency> 79 <groupId>xalan</groupId> 80 <artifactId>serializer</artifactId> 81 <version>2.7.1</version> 82 </dependency> 83 <dependency> 84 <groupId>quartz</groupId> 85 <artifactId>quartz</artifactId> 86 <version>1.5.2</version> 87 </dependency> 88 <dependency> 89 <groupId>com.sun</groupId> 90 <artifactId>xacml</artifactId> 91 <version>1.2</version> 92 </dependency> 93 <dependency> 94 <groupId>org.apache.xmlrpc</groupId> 95 <artifactId>xmlrpc-common</artifactId> 96 <version>3.0</version> 97 </dependency> 98 <dependency> 99 <groupId>org.apache.xmlrpc</groupId> 100 <artifactId>xmlrpc-server</artifactId> 101 <version>3.0</version> 102 </dependency> 103 --> 104 37 <!-- <dependency> <groupId>exist</groupId> <artifactId>exist-optional</artifactId> 38 <version>1.4.0</version> </dependency> <dependency> <groupId>exist</groupId> 39 <artifactId>exist-ngram-module</artifactId> <version>1.4.0</version> </dependency> 40 <dependency> <groupId>exist</groupId> <artifactId>exist-lucene-module</artifactId> 41 <version>1.4.0</version> </dependency> <dependency> <groupId>org.apache.lucene</groupId> 42 <artifactId>lucene-regex</artifactId> <version>2.4.1</version> </dependency> 43 <dependency> <groupId>org.apache.lucene</groupId> <artifactId>lucene-core</artifactId> 44 <version>2.4.1</version> </dependency> <dependency> <groupId>xml-apis</groupId> 45 <artifactId>xml-apis</artifactId> <version>1.3.04</version> </dependency> 46 <dependency> <groupId>xerces</groupId> <artifactId>xercesImpl</artifactId> 47 <version>2.9.1</version> </dependency> <dependency> <groupId>xalan</groupId> 48 <artifactId>xalan</artifactId> <version>2.7.1</version> </dependency> <dependency> 49 <groupId>xalan</groupId> <artifactId>serializer</artifactId> <version>2.7.1</version> 50 </dependency> <dependency> <groupId>quartz</groupId> <artifactId>quartz</artifactId> 51 <version>1.5.2</version> </dependency> <dependency> <groupId>com.sun</groupId> 52 <artifactId>xacml</artifactId> <version>1.2</version> </dependency> <dependency> 53 <groupId>org.apache.xmlrpc</groupId> <artifactId>xmlrpc-common</artifactId> 54 <version>3.0</version> </dependency> <dependency> <groupId>org.apache.xmlrpc</groupId> 55 <artifactId>xmlrpc-server</artifactId> <version>3.0</version> </dependency> --> 56 105 57 <dependency> 106 58 <groupId>exist</groupId> … … 151 103 <version>3.2.1</version> 152 104 </dependency> 153 <!-- 154 <dependency> <groupId>commons-logging</groupId> 155 <artifactId>commons-logging</artifactId> <version>1.1.1</version> 156 </dependency> 157 --> 105 <!-- <dependency> <groupId>commons-logging</groupId> <artifactId>commons-logging</artifactId> 106 <version>1.1.1</version> </dependency> --> 158 107 <dependency> 159 108 <groupId>commons-io</groupId> … … 221 170 222 171 <distributionManagement> 223 < snapshotRepository>172 <repository> 224 173 <id>triton.badc.rl.ac.uk</id> 225 <name>triton.badc.rl.ac.uk- snapshots</name>226 <url>http://triton.badc.rl.ac.uk:8180/artifactory/libs- snapshots-local</url>227 </ snapshotRepository>174 <name>triton.badc.rl.ac.uk-releases</name> 175 <url>http://triton.badc.rl.ac.uk:8180/artifactory/libs-releases-local</url> 176 </repository> 228 177 </distributionManagement> 229 178 </project> -
mauRepo/newmoon/src/main/java/ndg/services/newmoon/DBManager.java
r7848 r7882 129 129 rootCollectionPath = newRootCollectionPath; 130 130 isInitialized(); 131 try { 132 initialiseDBase(); 133 } catch (XMLDBException e) { 134 LOG.error("Error", e); 135 } 131 136 } 132 137 … … 251 256 * if there is an database initialisation error. 252 257 */ 253 public void initialiseDBase() throws XMLDBException { 254 Collection root = getRootCollection(); 258 private static void initialiseDBase() throws XMLDBException { 259 /*-- 260 * Temporarily disable to avoid concurrent conflicts 261 * In future each transformation should access the default 262 * collections and create/delete the custom ones! 263 * --*/ 264 /* 265 if(!isInitialized()) { 266 throw new XMLDBException(); 267 } 268 269 Collection root = DatabaseManager.getCollection(rootCollectionPath, DBManager.user, DBManager.psw); 255 270 256 271 CollectionManagementService mgtService = (CollectionManagementService) root.getService( 257 272 COLLECTION_MGMT_SERVICE_NAME, COLLECTION_MGMT_SERVICE_VERSION); 258 273 259 for (NewmoonManager.MODULE_NAME def_coll : NewmoonManager.MODULE_NAME.values()) { 274 for (NewmoonManager.MODULE_NAME def_coll : NewmoonManager.MODULE_NAME.values()) { 275 try{ 260 276 mgtService.removeCollection(def_coll.getCollectionName()); 261 } 262 263 for (NewmoonManager.MODULE_NAME def_coll : NewmoonManager.MODULE_NAME.values()) { 277 } catch (Exception e) { 278 279 } 280 } 281 282 for (NewmoonManager.MODULE_NAME def_coll : NewmoonManager.MODULE_NAME.values()) { 283 try{ 264 284 mgtService.createCollection(def_coll.getCollectionName()); 265 } 285 } catch (Exception e) { 286 287 } 288 289 } 266 290 LOG.info("Successfully created default collections."); 291 */ 267 292 } 268 293 -
mauRepo/newmoon/src/main/java/ndg/services/newmoon/XMIEncoder.java
r7848 r7882 49 49 NewmoonManager nm = new NewmoonManager(); 50 50 nm.setVariables(params); 51 52 //Prepare the outputDir 53 File outputDir = new File(nm.getVariables(NM_PARAM.WORKING_DIRECTORY), nm.getVariables(NM_PARAM.OUTPUT_DIR)); 54 outputDir.mkdir(); 55 outputdirPath = outputDir.getPath(); 56 51 57 DBManager.setDBAccess(nm.getVariables(NM_PARAM.XMLDB_USER), 52 58 nm.getVariables(NM_PARAM.XMLDB_PASSWORD), … … 65 71 Resource xmiResource = DBManager.getInstance().getResource(xmiCol, resourceName); 66 72 InputStream is = null; 67 68 //Prepare the outputDir69 File outputDir = new File(nm.getVariables(NM_PARAM.WORKING_DIRECTORY), nm.getVariables(NM_PARAM.OUTPUT_DIR));70 outputDir.mkdir();71 outputdirPath = outputDir.getPath();72 73 73 74 // Test the XMI File
Note: See TracChangeset
for help on using the changeset viewer.