Project

General

Profile

« Previous | Next » 

Revision 9956

Added by Jing Tao over 7 years ago

Add the feature to support the noNamespaceSchemalLocation and refactory the code.

View differences:

EMLVersionsTransformer.java
41 41
import edu.ucsb.nceas.metacat.database.DBConnection;
42 42
import edu.ucsb.nceas.metacat.database.DBConnectionPool;
43 43
import edu.ucsb.nceas.metacat.properties.PropertyService;
44
import edu.ucsb.nceas.metacat.service.XMLSchemaService;
44 45

  
45 46
import javax.xml.transform.TransformerFactory;
46 47
import javax.xml.transform.Transformer;
......
49 50
import javax.xml.transform.TransformerException;
50 51
import javax.xml.transform.TransformerConfigurationException;
51 52
import javax.xml.transform.URIResolver;
53

  
52 54
import org.ecoinformatics.eml.EMLParser;
53 55

  
54 56

  
......
165 167
            	 dbconn = DBConnectionPool
166 168
                 .getDBConnection("EMLVersionsTransformer.handleSingleEML200Document");
167 169
                  serialNumber = dbconn.getCheckOutSerialNumber();
170
                  String schemaLocation = XMLSchemaService.getInstance().getNameSpaceAndLocationStringWithoutFormatId();
168 171
                  documentWrapper.write(dbconn, eml210Content, pub, dtd,
169
                          doAction, newId, owner, groups, null, formatId);
172
                          doAction, newId, owner, groups, null, schemaLocation);
170 173
                  logMetacat.warn("Doc "+docidWithRev+" was transformed to eml210 with new id "+newId);
171 174
                  transformLog("Doc "+docidWithRev+" was transformed to eml210 with new id "+newId);
172 175
             }

Also available in: Unified diff