Project

General

Profile

Revision 1562

Added by Jing Tao over 18 years ago

Add code to handle eml2 replciation.

View differences:

src/edu/ucsb/nceas/metacat/ReplicationHandler.java
296 296
            //docid should include rev number too
297 297
            String accnum=docid+util.getOption("accNumSeparator")+
298 298
                                              (String)docinfoHash.get("rev");
299
            String docType = (String)docinfoHash.get("doctype");
299 300
            try
300 301
            {
302
              String parserBase = null;
303
              // this for eml2 and we need user eml2 parser
304
              if (docType != null && 
305
              (docType.trim()).equals(DocumentImpl.EMLNAMESPACE))
306
              {
307
                parserBase = DocumentImpl.EML2;
308
              }
301 309
              // Write the document into local host
302
              String newDocid = DocumentImplWrapper.writeReplication(dbConn, 
310
              DocumentImplWrapper wrapper = 
311
                                     new DocumentImplWrapper(parserBase, false);
312
              String newDocid = wrapper.writeReplication(dbConn, 
303 313
                              new StringReader(newxmldoc),
304 314
                              (String)docinfoHash.get("public_access"),
305 315
                              null,  /* the dtd text */

Also available in: Unified diff