Project

General

Profile

« Previous | Next » 

Revision 9918

Added by Jing Tao about 8 years ago

Disable the feature of downloading external schemas.

View differences:

src/edu/ucsb/nceas/metacat/DBSAXHandler.java
270 270
		
271 271
		// If we get here, the document and schema parsed okay.  If there are
272 272
		// any schemas in the schema list, they are new and need to be registered.
273
    	for (XMLSchema xmlSchema : schemaList) {
273
    	/*for (XMLSchema xmlSchema : schemaList) {
274 274
    		String externalFileUri = xmlSchema.getExternalFileUri();
275 275
    		String fileNamespace = xmlSchema.getFileNamespace();
276 276
    		SchemaLocationResolver resolver = 
277 277
    			new SchemaLocationResolver(fileNamespace, externalFileUri);
278 278
    		resolver.resolveNameSpace();
279
    	}
279
    	}*/
280 280
	}
281 281

  
282 282
    /** SAX Handler that is called at the start of Namespace */
src/edu/ucsb/nceas/metacat/Eml200SAXHandler.java
826 826
              if (attributeName != null
827 827
                      && attributeName
828 828
                              .indexOf(MetaCatServlet.SCHEMALOCATIONKEYWORD) != -1) {
829
                  SchemaLocationResolver resolver = new SchemaLocationResolver(
829
                  /*SchemaLocationResolver resolver = new SchemaLocationResolver(
830 830
                          attributeValue);
831
                  resolver.resolveNameSpace();
831
                  resolver.resolveNameSpace();*/
832 832

  
833 833
              }
834 834
              else if (attributeName != null && attributeName.equals(ID) &&
src/edu/ucsb/nceas/metacat/Eml210SAXHandler.java
471 471
				// in catalog table it will be registered.
472 472
				if (attributeName != null
473 473
						&& attributeName.indexOf(MetaCatServlet.SCHEMALOCATIONKEYWORD) != -1) {
474
					SchemaLocationResolver resolver = new SchemaLocationResolver(
474
					/*SchemaLocationResolver resolver = new SchemaLocationResolver(
475 475
							attributeValue);
476
					resolver.resolveNameSpace();
476
					resolver.resolveNameSpace();*/
477 477

  
478 478
				} else if (attributeName != null && attributeName.equals(ID)) {
479 479

  
src/edu/ucsb/nceas/metacat/replication/ReplicationHandler.java
1035 1035
            //logMetacat.debug("publicID: " + publicId.toString());
1036 1036
            logReplication.info
1037 1037
                              ("ReplicationHandler.updateCatalog - v.elementAt(3): " + (String)v.elementAt(3));
1038
           if(!publicId.contains(v.elementAt(3)))
1038
           /*if(!publicId.contains(v.elementAt(3)))
1039 1039
           { //so we don't have this public id in our local table so we need to
1040 1040
             //add it.
1041 1041
        	   
......
1072 1072
             pstmt.close();
1073 1073
             logReplication.info("ReplicationHandler.updateCatalog - Success fully to insert new publicid "+
1074 1074
                               (String)v.elementAt(3) + " from server"+server);
1075
           }
1075
           }*/
1076 1076
        }
1077 1077
        catch(Exception e)
1078 1078
        {
src/edu/ucsb/nceas/metacat/service/XMLSchemaService.java
241 241
				XMLSchema xmlSchema = new XMLSchema(fileNamespace, fileLocation, formatId);
242 242
				if(fileLocation.startsWith("http://") || fileLocation.startsWith("https://"))
243 243
				{
244
				    //System.out.println("processing an http schemal location");
244
				    continue;//skip the external schemas.
245
				    /*//System.out.println("processing an http schemal location");
245 246
				    logMetacat.debug("XMLService.populateRegisteredSchemaList - Processing http schema location: " + fileLocation);
246 247
				    xmlSchema.setExternalFileUri(fileLocation);
247 248
				    //cache the file
......
293 294
                                " because the property 'application.tempDir' could not be found.");
294 295
                    }
295 296
				    
296
				    xmlSchema.setFileName(fileLocation);
297
				    xmlSchema.setFileName(fileLocation);*/
297 298
				}
298 299
				else
299 300
				{
......
306 307
				}
307 308
				else if(fileLocation.startsWith("http://") || fileLocation.startsWith("https://"))
308 309
                {  //the schema resides on a different server, to validate, we need to go get it 
309
                    registeredSchemaList.add(xmlSchema);
310
                    //registeredSchemaList.add(xmlSchema);
310 311
                }
311 312
				else 
312 313
				{

Also available in: Unified diff