Project

General

Profile

« Previous | Next » 

Revision 5759

include shared method in superclass

View differences:

MCTestCase.java
270 270
		return accessBlock;
271 271

  
272 272
	}
273
	
274
    /**
275
     * This function returns a valid eml document with public read access
276
     */
277
    protected String getTestEmlDoc(String title, String emlVersion) {
273 278

  
279
        String testDocument = "";
280

  
281
        String header;
282
		if (emlVersion == EML2_0_1) {
283
			header = testEml_201_Header;
284
		} else if (emlVersion == EML2_1_0) {
285
			header = testEml_210_Header;
286
		} else { // if (emlVersion == EML2_1_1) {
287
			header = testEml_211_Header;
288
		}
289
        
290
        testDocument += header;
291
        
292
        // if this is an EML 2.1.0 or later document, the document level access is
293
        // before the dataset element.
294
        if (emlVersion == EML2_1_0 || emlVersion == EML2_1_1) {
295
        	testDocument += getAccessBlock("public", true, true, false, false, false);
296
        }
297
        testDocument += "<dataset scope=\"document\"><title>" + title + "</title>"
298
				+ testEmlCreatorBlock;
299

  
300
        testDocument += testEmlContactBlock;
301
        
302
        // if this is an EML 2.0.1 or earlier document, the document level access is
303
        // inside the dataset element.
304
        if (emlVersion != EML2_1_0 && emlVersion != EML2_1_1) {
305
        	testDocument += getAccessBlock("public", true, true, false, false, false);
306
        }
307
        testDocument += "</dataset>";
308
        testDocument += "</eml:eml>";
309

  
310
        return testDocument;
311
    }
312

  
274 313
	/**
275 314
	 * This function returns a valid eml document with no access rules 
276 315
	 */

Also available in: Unified diff