Revision 5311
Added by daigle about 14 years ago
XMLSchemaService.java | ||
---|---|---|
86 | 86 |
createRegisteredNameSpaceAndLocationString(); |
87 | 87 |
|
88 | 88 |
} catch (PropertyNotFoundException pnfe) { |
89 |
logMetacat.error("Could not find property: xml.useFullSchemaValidation. " + |
|
89 |
logMetacat.error("XMLService.XMLSchemaService() - Could not find property: xml.useFullSchemaValidation. " +
|
|
90 | 90 |
"Setting to false."); |
91 | 91 |
} |
92 | 92 |
} |
... | ... | |
117 | 117 |
createRegisteredNameSpaceList(); |
118 | 118 |
createRegisteredNameSpaceAndLocationString(); |
119 | 119 |
} catch (PropertyNotFoundException pnfe) { |
120 |
logMetacat.error("Could not find property: xml.useFullSchemaValidation. " + |
|
120 |
logMetacat.error("XMLService.doRefresh - Could not find property: xml.useFullSchemaValidation. " +
|
|
121 | 121 |
"Setting to false."); |
122 | 122 |
} |
123 | 123 |
} |
... | ... | |
202 | 202 |
.getDBConnection("XMLService.populateRegisteredSchemaList"); |
203 | 203 |
serialNumber = conn.getCheckOutSerialNumber(); |
204 | 204 |
pstmt = conn.prepareStatement(sql); |
205 |
logMetacat.debug("Selecting schemas: " + pstmt.toString()); |
|
205 |
logMetacat.debug("XMLService.populateRegisteredSchemaList - Selecting schemas: " + pstmt.toString());
|
|
206 | 206 |
pstmt.execute(); |
207 | 207 |
resultSet = pstmt.getResultSet(); |
208 | 208 |
|
... | ... | |
211 | 211 |
while (resultSet.next()) { |
212 | 212 |
String fileNamespace = resultSet.getString(1); |
213 | 213 |
String fileLocation = resultSet.getString(2); |
214 |
logMetacat.debug("Registering schema: " + fileNamespace + " " + fileLocation); |
|
214 |
logMetacat.debug("XMLService.populateRegisteredSchemaList - Registering schema: " + fileNamespace + " " + fileLocation);
|
|
215 | 215 |
XMLSchema xmlSchema = new XMLSchema(fileNamespace); |
216 | 216 |
xmlSchema.setFileName(fileLocation); |
217 | 217 |
|
218 | 218 |
if (FileUtil.getFileStatus(xmlSchema.getLocalFileDir()) >= FileUtil.EXISTS_READABLE) { |
219 | 219 |
registeredSchemaList.add(xmlSchema); |
220 | 220 |
} else { |
221 |
logMetacat.warn("Schema file: " + xmlSchema.getLocalFileDir() + " is registered " |
|
221 |
logMetacat.warn("XMLService.populateRegisteredSchemaList - Schema file: " + xmlSchema.getLocalFileDir() + " is registered "
|
|
222 | 222 |
+ " in the database but does not exist on the file system."); |
223 | 223 |
} |
224 | 224 |
} |
225 | 225 |
} catch (SQLException e) { |
226 |
logMetacat.error("XMLService.populateRegisteredSchemaList(): "
|
|
226 |
logMetacat.error("XMLService.populateRegisteredSchemaList - SQL Error: "
|
|
227 | 227 |
+ e.getMessage()); |
228 | 228 |
} finally { |
229 | 229 |
try { |
230 | 230 |
pstmt.close(); |
231 | 231 |
}// try |
232 | 232 |
catch (SQLException sqlE) { |
233 |
logMetacat.error("Error in XMLService.populateRegisteredSchemaList(): " |
|
233 |
logMetacat.error("XMLSchemaService.populateRegisteredSchemaList - Error in XMLService.populateRegisteredSchemaList(): "
|
|
234 | 234 |
+ sqlE.getMessage()); |
235 | 235 |
} |
236 | 236 |
DBConnectionPool.returnDBConnection(conn, serialNumber); |
... | ... | |
317 | 317 |
|
318 | 318 |
// no xml. return empty vector |
319 | 319 |
if (xml == null) { |
320 |
logMetacat.debug("Returning empty schemaList."); |
|
320 |
logMetacat.debug("XMLSchemaService.findSchemasInXML - Returning empty schemaList.");
|
|
321 | 321 |
return schemaList; |
322 | 322 |
} |
323 | 323 |
|
... | ... | |
359 | 359 |
} |
360 | 360 |
} |
361 | 361 |
|
362 |
logMetacat.debug("Schemas for eml are " + schemaList.toString()); |
|
362 |
logMetacat.debug("XMLSchemaService.findSchemasInXML - Schemas for eml are " + schemaList.toString());
|
|
363 | 363 |
|
364 | 364 |
return schemaList; |
365 | 365 |
} |
... | ... | |
380 | 380 |
String eml2_1_0NameSpace = DocumentImpl.EML2_1_0NAMESPACE; |
381 | 381 |
|
382 | 382 |
if (xml == null) { |
383 |
logMetacat.debug("XML doc is null. There is no namespace."); |
|
383 |
logMetacat.debug("XMLSchemaService.findDocumentNamespace - XML doc is null. There is no namespace.");
|
|
384 | 384 |
return namespace; |
385 | 385 |
} |
386 | 386 |
|
... | ... | |
486 | 486 |
tmp = xml.read(); |
487 | 487 |
} |
488 | 488 |
secondLine = buffer.toString(); |
489 |
logMetacat.debug("the second line string is: " + secondLine); |
|
489 |
logMetacat.debug("XMLSchemaService.getSchemaLine - the second line string is: " + secondLine);
|
|
490 | 490 |
|
491 | 491 |
xml.reset(); |
492 | 492 |
return secondLine; |
Also available in: Unified diff
Merge 1.9.2 changes back into the trunk