Revision 9583
Added by Jing Tao over 8 years ago
MetacatHandler.java | ||
---|---|---|
1628 | 1628 |
*/ |
1629 | 1629 |
public String handleInsertOrUpdateAction(String ipAddress, String userAgent, |
1630 | 1630 |
HttpServletResponse response, PrintWriter out, Hashtable<String, String[]> params, |
1631 |
String user, String[] groups, boolean generateSystemMetadata, boolean writeAccessRules, byte[] xmlBytes) { |
|
1631 |
String user, String[] groups, boolean generateSystemMetadata, boolean writeAccessRules, byte[] xmlBytes, String formatId) {
|
|
1632 | 1632 |
Logger logMetacat = Logger.getLogger(MetacatHandler.class); |
1633 | 1633 |
DBConnection dbConn = null; |
1634 | 1634 |
int serialNumber = -1; |
... | ... | |
1805 | 1805 |
|
1806 | 1806 |
} else {*/ |
1807 | 1807 |
newdocid = documentWrapper.write(dbConn, doctext[0], pub, dtd, |
1808 |
doAction, accNumber, user, groups, xmlBytes); |
|
1808 |
doAction, accNumber, user, groups, xmlBytes, formatId);
|
|
1809 | 1809 |
|
1810 | 1810 |
EventLog.getInstance().log(ipAddress, userAgent, user, accNumber, action[0]); |
1811 | 1811 |
|
... | ... | |
3197 | 3197 |
params.put("doctext", doctextArr); |
3198 | 3198 |
boolean writeAccessRules = true; |
3199 | 3199 |
//call the insert routine |
3200 |
String formatId = null; |
|
3200 | 3201 |
handleInsertOrUpdateAction(request.getRemoteAddr(), request.getHeader("User-Agent"), response, out, |
3201 |
params, username, groupnames, true, writeAccessRules, null); |
|
3202 |
params, username, groupnames, true, writeAccessRules, null, formatId);
|
|
3202 | 3203 |
} |
3203 | 3204 |
catch(Exception e) |
3204 | 3205 |
{ |
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.