6363import com .marklogic .client .io .SourceHandle ;
6464import com .marklogic .client .io .StringHandle ;
6565
66- /**
67- * @author skottam This test is test the DocumentWriteSet function public
66+ /*
67+ * This test is test the DocumentWriteSet function public
6868 * DocumentWriteSet add(String uri, DocumentMetadataWriteHandle
6969 * metadataHandle); This test intention is to test the system default ,
7070 * request wide, and document specific update to metadata will overwrite
@@ -85,7 +85,7 @@ public class TestBulkWriteMetadata2 extends BasicJavaClientREST {
8585
8686 private DatabaseClient client ;
8787
88- /**
88+ /*
8989 * @throws java.lang.Exception
9090 */
9191 @ BeforeClass
@@ -98,7 +98,7 @@ public static void setUpBeforeClass() throws Exception {
9898 setMaintainLastModified (dbName , true );
9999 }
100100
101- /**
101+ /*
102102 * @throws java.lang.Exception
103103 */
104104 @ AfterClass
@@ -109,7 +109,7 @@ public static void tearDownAfterClass() throws Exception {
109109 deleteRESTUser ("usr1" );
110110 }
111111
112- /**
112+ /*
113113 * @throws java.lang.Exception
114114 */
115115 @ Before
@@ -118,7 +118,7 @@ public void setUp() throws KeyManagementException, NoSuchAlgorithmException, Exc
118118 client = getDatabaseClient ("usr1" , "password" , getConnType ());
119119 }
120120
121- /**
121+ /*
122122 * @throws java.lang.Exception
123123 */
124124 @ After
@@ -543,36 +543,15 @@ public void testWriteGenericDocMgrWithDefaultMetadata() throws KeyManagementExce
543543 FileInputStream fis = new FileInputStream (file1 );
544544 InputStreamHandle handle1 = new InputStreamHandle (fis );
545545 handle1 .setFormat (Format .BINARY );
546-
547- writeset .add ("/generic/Pandakarlino.jpg" , handle1 ); // This document
548- // implicitly gets the
549- // default metadata that
550- // we added in the
551- // begining
552-
546+ // This document implicitly gets the default metadata that we added in the beginning
547+ writeset .add ("/generic/Pandakarlino.jpg" , handle1 );
553548 JacksonHandle jh = new JacksonHandle ();
554549 ObjectMapper objM = new ObjectMapper ();
555550 JsonNode jn = objM .readTree (new String ("{\" animal\" :\" dog\" , \" says\" :\" woof\" }" ));
556551 jh .set (jn );
557552 jh .setFormat (Format .JSON );
558-
559- writeset .add ("/generic/dog.json" , new DocumentMetadataHandle ().withQuality (10 ), jh ); // This
560- // document
561- // suppose
562- // to
563- // get
564- // the
565- // in
566- // scope
567- // metadata
568- // quality
569- // and
570- // should
571- // set
572- // collections
573- // to
574- // system
575- // default
553+ // This document suppose to get the in scope metadata quality and should set collections to system default
554+ writeset .add ("/generic/dog.json" , new DocumentMetadataHandle ().withQuality (10 ), jh );
576555
577556 String foo1 = "This is foo1 of byte Array" ;
578557 byte [] ba = foo1 .getBytes ();
@@ -586,23 +565,8 @@ public void testWriteGenericDocMgrWithDefaultMetadata() throws KeyManagementExce
586565 sh .set (ds );
587566 sh .setFormat (Format .XML );
588567 DocumentMetadataHandle mh2 = new DocumentMetadataHandle ();
589- writeset .add ("/generic/foo.xml" , mh2 .withCollections ("genericCollection" ), sh ); // This
590- // document
591- // should
592- // over
593- // write
594- // the
595- // system
596- // default
597- // and
598- // default
599- // collection
600- // list
601- // and
602- // get
603- // document
604- // specific
605- // collection
568+ // This document should over write the system default and default collection list and get document specific collection
569+ writeset .add ("/generic/foo.xml" , mh2 .withCollections ("genericCollection" ), sh );
606570
607571 docMgr .write (writeset );
608572
0 commit comments