Revision 5340
Added by berkley about 14 years ago
SchemaLocationResolver.java | ||
---|---|---|
98 | 98 |
|
99 | 99 |
// if name space is not in table |
100 | 100 |
if (nameSpace !=null && schemaLocation != null && |
101 |
!XMLSchemaService.getNameSpaceList().contains(nameSpace)) |
|
101 |
!XMLSchemaService.getInstance().getNameSpaceList().contains(nameSpace))
|
|
102 | 102 |
{ |
103 | 103 |
try |
104 | 104 |
{ |
... | ... | |
113 | 113 |
// because the schema was in the db but there was no file on disk. If that's |
114 | 114 |
// the case, it will show up in the name space list now. If it doesn't we need |
115 | 115 |
// to register the schema in the database. |
116 |
if (!XMLSchemaService.getNameSpaceList().contains(nameSpace)) { |
|
116 |
if (!XMLSchemaService.getInstance().getNameSpaceList().contains(nameSpace)) {
|
|
117 | 117 |
registerSchema(newURLInMetacat); |
118 | 118 |
ServiceService.refreshService("XMLSchemaService"); |
119 | 119 |
} |
... | ... | |
259 | 259 |
DBConnectionPool.returnDBConnection(conn, serialNumber); |
260 | 260 |
|
261 | 261 |
}//finally |
262 |
XMLSchemaService.populateRegisteredSchemaList(); |
|
262 |
XMLSchemaService.getInstance().populateRegisteredSchemaList();
|
|
263 | 263 |
} |
264 | 264 |
|
265 | 265 |
/* |
... | ... | |
295 | 295 |
// Print out a empty schema list |
296 | 296 |
SchemaLocationResolver schema = new SchemaLocationResolver(); |
297 | 297 |
logMetacat.warn("Namespace and Location String: "+ |
298 |
XMLSchemaService.getNameSpaceAndLocationString()); |
|
298 |
XMLSchemaService.getInstance().getNameSpaceAndLocationString());
|
|
299 | 299 |
// input a schemalocation |
300 | 300 |
SchemaLocationResolver schema2 = new SchemaLocationResolver( |
301 | 301 |
"eml://ecoinformatics.org/eml-2.0.0 " + |
... | ... | |
309 | 309 |
// print out new schema list in db |
310 | 310 |
SchemaLocationResolver schema4 = new SchemaLocationResolver(); |
311 | 311 |
logMetacat.warn("Namespace and Location String: "+ |
312 |
XMLSchemaService.getNameSpaceAndLocationString()); |
|
312 |
XMLSchemaService.getInstance().getNameSpaceAndLocationString());
|
|
313 | 313 |
} |
314 | 314 |
catch(Exception e) |
315 | 315 |
{ |
Also available in: Unified diff
refactored XMLSchemaService to not have static methods. made the CrudServiceTest more robust.