Revision 9583
Added by Jing Tao about 8 years ago
ReplicationService.java | ||
---|---|---|
731 | 731 |
parserBase = DocumentImpl.EML210; |
732 | 732 |
} |
733 | 733 |
logReplication.warn("ReplicationService.handleForceReplicateRequest - The parserBase is: " + parserBase); |
734 |
|
|
734 |
|
|
735 |
String formatId = null; |
|
736 |
//get the format id from the system metadata |
|
737 |
if(sysMeta != null && sysMeta.getFormatId() != null) { |
|
738 |
logMetacat.debug("ReplicationService.handleForceReplicateRequest - the format id will be got from the system metadata for the object "+docid); |
|
739 |
formatId = sysMeta.getFormatId().getValue(); |
|
740 |
} |
|
741 |
|
|
735 | 742 |
// Get DBConnection from pool |
736 | 743 |
dbConn = DBConnectionPool |
737 | 744 |
.getDBConnection("MetacatReplication.handleForceReplicateRequest"); |
... | ... | |
742 | 749 |
try { |
743 | 750 |
wrapper.writeReplication(dbConn, xmldoc, xmlBytes, null, null, |
744 | 751 |
dbaction, docid, null, null, homeServer, server, createdDate, |
745 |
updatedDate); |
|
752 |
updatedDate, formatId);
|
|
746 | 753 |
} finally { |
747 | 754 |
if(sysMeta != null) { |
748 | 755 |
// submit for indexing. When the doc writing process fails, the index process will fail as well. But this failure |
Also available in: Unified diff
If a format id in the system metadata is registered in the xml_catalog table, we will use the schema location for the format id to validate the xml instance;
otherwise, we will use our previous way.