3                            )  )    3 3             N    c> _  c   g g        c c N c ! " c#$% &' ()*+,-. /0123 c4 5 c 6 7 c89: ;  _; < _<=>  <?@ A B CD EF  GH cIJK L M< NO < PQRS TUVW ;X YZ [\ ]^ _`a bc _ d e fg _h _i _j kl m cn co cp qrsBAGIT_IDLjava/lang/String; ConstantValue8(Lorg/dataone/integration/ContextAwareTestCaseDataone;)VCodeLineNumberTableLocalVariableTablethisWLorg/dataone/integration/it/testImplementations/MNPackageFunctionalTestImplementations;catc5Lorg/dataone/integration/ContextAwareTestCaseDataone;testGetPackage_EscapeChars)(Ljava/util/Iterator;Ljava/lang/String;)V nodeIteratorLjava/util/Iterator;versionLocalVariableTypeTable9Ljava/util/Iterator; StackMapTable SignatureN(Ljava/util/Iterator;Ljava/lang/String;)VRuntimeVisibleAnnotations-Lorg/dataone/integration/webTest/WebTestName;value5getPackage - escape characters in packageType and pid4Lorg/dataone/integration/webTest/WebTestDescription;The test calls getPackage() with application/zip as the requested packageType and a pid (also created in this test) that contains a slash as well. It verifies that a valid result is returned.8(Lorg/dataone/service/types/v1/Node;Ljava/lang/String;)VformatID5Lorg/dataone/service/types/v1/ObjectFormatIdentifier;pkgPid)Lorg/dataone/service/types/v1/Identifier;resourceMapPide.Lorg/dataone/service/exceptions/BaseException;Ljava/lang/Exception;node#Lorg/dataone/service/types/v1/Node; callAdapter0Lorg/dataone/integration/adapters/MNCallAdapter;testRightsHolderCallAdapter currentUrlisLjava/io/InputStream;rtuvwtestGetPackage_ZipgetPackage - zip7The test calls getPackage() with application/zip as the requested packageType and verifies that the returned InputStream does in fact contain a zip file, then checks the zip file to make sure that it contains only one top-level directory, and that it contains a bagit.txt, a manifest file, and a data directory.g1pLjava/util/regex/Pattern;mLjava/util/regex/Matcher;matchesZ separatorLocInamezipEntryLjava/util/zip/ZipEntry;zisLjava/util/zip/ZipInputStream; bagitFound manifestFound dataDirFound nonDataDirxyzttestGetPackage_GzipgetPackage - gzip3The test calls getPackage() with application/x-gzip as the requested packageType and verifies that the returned InputStream does in fact contain a gzip filethen checks the gzip file to make sure that it contains a top-level directory, and that it contains a bagit.txt, a manifest file, and a data directory.Ljava/io/IOException;compressionTypetempDirPropertytempDir rootDirPath gzipFilePathrootDirLjava/io/File;gzFiletarFile pkgInStream gzipOutFileLjava/io/OutputStream;tempBagItContent{ testGetPackage_Bzip2getPackage - bzip25The test calls getPackage() with application/x-bzip2 as the requested packageType and verifies that the returned InputStream does in fact contain a gzip filethen checks the bzip2 file to make sure that it contains a top-level directory, and that it contains a bagit.txt, a manifest file, and a data directory. bzipFilePath bzipOutFilecheckTarC(Ljava/lang/String;Ljava/lang/String;Ljava/io/File;Ljava/io/File;)VformatIdcheckBagItContent#(Ljava/lang/String;Ljava/io/File;)V extractDir listFiles[Ljava/io/File;NcheckBagItRootDirpathremove pathFromRootfarr$len$i$testGetPackage_TargetPackage - tar0The test calls getPackage() with application/x-tar as the requested packageType and verifies that the returned InputStream does in fact contain a tar filethen checks the tar file to make sure that it contains a top-level directory, and that it contains a bagit.txt, a manifest file, and a data directory. tarFilePath tarOutFileunGzip,(Ljava/io/File;Ljava/io/File;)Ljava/io/File;inFileoutDiroutFileLjava/util/zip/GZIPInputStream;osLjava/io/FileOutputStream; Exceptions|unBzipLjava/io/FileInputStream;bzInJLorg/apache/commons/compress/compressors/bzip2/BZip2CompressorInputStream;unTar.(Ljava/io/File;Ljava/io/File;)Ljava/util/List;outFS resultFilesLjava/util/List;debISALorg/apache/commons/compress/archivers/tar/TarArchiveInputStream;entry;Lorg/apache/commons/compress/archivers/tar/TarArchiveEntry; Ljava/util/List;}DF>(Ljava/io/File;Ljava/io/File;)Ljava/util/List;testGetPackage_RargetPackage - rar;The test calls getPackage() with application/x-rar-compressed as the requested packageType and verifies that the returned InputStream does in fact contain a rar filethen checks the rar file to make sure that it contains a top-level directory, and that it contains a bagit.txt, a manifest file, and a data directory. rarFilePathrarFile rarOutFileunRar(Ljava/io/File;Ljava/io/File;)VstreamarchiveLcom/github/junrar/Archive; fileHeader&Lcom/github/junrar/rarfile/FileHeader;W~ createFileD(Lcom/github/junrar/rarfile/FileHeader;Ljava/io/File;)Ljava/io/File;fh destinationmakeFile0(Ljava/io/File;Ljava/lang/String;)Ljava/io/File;idirs[Ljava/lang/String;sizecreateDirectory7(Lcom/github/junrar/rarfile/FileHeader;Ljava/io/File;)V makeDirectory#(Ljava/io/File;Ljava/lang/String;)VdirfileName SourceFile+MNPackageFunctionalTestImplementations.java   !org/dataone/service/types/v1/Node .org/dataone/integration/adapters/MNCallAdapter   testRightsHolder java/lang/StringBuilder *testGetPackage_EscapeChars(...) vs. node:   3org/dataone/service/types/v1/ObjectFormatIdentifierapplication/bagit-097 testGetPackage/EscapeChars_     1getPackage() should return a non-null InputStream  ,org/dataone/service/exceptions/BaseException #testGetPackage_EscapeChars failed:   :  ::  java/lang/Exception    testGetPackage(...) vs. node: testGetPackage_Zip_ ,getPackage() returned a non-null InputStream java/util/zip/ZipInputStream  x zip entry:  size:    bagit.txtt found bagit.txt.*manifest.*\.txt found manifest file  .+\/(.+)\/.*y  z  data found /data directory (.+\/.+)\/.* found extra top-level directory!java/lang/AssertionErrorpGot exception while trying to extract the contents of the input stream returned from getPackage() as a zip file. qThe "application/zip" returned from getPackage() should contain only ONE top level directory "data". Also found: QThe "application/zip" returned from getPackage() should contain a bagit.txt file.PThe "application/zip" returned from getPackage() should contain a manifest file.wThe "application/zip" returned from getPackage() should contain a /data directory right inside the top-level directory.: :: .application/x-gzip java.io.tmpdir   TempGzip.gzjava/io/FileOutputStream  :testGetPackage_Gzip : Unable to write gzip stream to file! java/io/File TempTar.tar ]^java/io/IOException1testGetPackage_Gzip : Unable to un-gzip the file! GH   Bapplication/x-bzip2 TempBzip.bz2;testGetPackage_Bzip2 : Unable to write bzip stream to file! g^2testGetPackage_Bzip2 : Unable to un-bzip the file! kl6org/apache/commons/compress/archivers/ArchiveExceptionUnable to un-tar the file! JK Directory does not exist:   MThe "" returned from getPackage() ,should contain only ONE top level directory. PK \\/  /data should contain a bagit.txt file.should contain a manifest file.2should contain a /data directory right inside the top-level directory. Xapplication/x-tar9testGetPackage_Tar : Unable to write gzip stream to file!Un-gzipping %s to dir %s.java/lang/Object     java/util/zip/GZIPInputStreamjava/io/FileInputStream  Un-bzipping %s to dir %s.Horg/apache/commons/compress/compressors/bzip2/BZip2CompressorInputStreamUn-taring %s to dir %s.java/util/LinkedList:org/apache/commons/compress/archivers/ArchiveStreamFactorytar ?org/apache/commons/compress/archivers/tar/TarArchiveInputStream 9org/apache/commons/compress/archivers/tar/TarArchiveEntryWriting output directory %s.Creating output directory %s. java/lang/IllegalStateExceptionFailed to create directory! %s.Creating output file %s.{}  yx-rar-compressed TempRar.rar; : testGetPackage_Rar : Unable to write rar stream to file! 2 : testGetPackage_Rar : Unable to un-rar the file!application/x-rar-compressedcom/github/junrar/Archive$Unable to read in RAR archive file: $Unable to create Archive from file: 0RAR archive is encrypted! Can't be decompressed! RAR file header (~ &) is encrypted! Can't be decompressed! Extracting file:   Error extracting file!    Error creating new file:     Uorg/dataone/integration/it/testImplementations/MNPackageFunctionalTestImplementations.org/dataone/integration/it/ContextAwareAdapterjava/lang/Stringjava/io/InputStream'org/dataone/service/types/v1/Identifierjava/lang/Throwablejava/util/zip/ZipEntryjava/util/regex/Patternjava/util/regex/Matcherjava/io/OutputStreamjava/io/FileNotFoundExceptionjava/util/List$com/github/junrar/rarfile/FileHeaderjava/util/IteratorhasNext()Znext()Ljava/lang/Object; cnSubmitter getSessionA(Ljava/lang/String;)Lorg/dataone/client/rest/MultipartRestClient;e(Lorg/dataone/client/rest/MultipartRestClient;Lorg/dataone/service/types/v1/Node;Ljava/lang/String;)V getBaseURL()Ljava/lang/String;()Vappend-(Ljava/lang/String;)Ljava/lang/StringBuilder;toStringprintTestHeader(Ljava/lang/String;)VsetValue(org/dataone/integration/ExampleUtilitiesgenerateIdentifier)org/dataone/client/v1/types/D1TypeBuilderbuildIdentifier=(Ljava/lang/String;)Lorg/dataone/service/types/v1/Identifier;3org/dataone/integration/ContextAwareTestCaseDataoneprocureResourceMap(Lorg/dataone/integration/adapters/CommonCallAdapter;Lorg/dataone/service/types/v1/Identifier;)Lorg/dataone/service/types/v1/Identifier; getPackage(Lorg/dataone/service/types/v1/Session;Lorg/dataone/service/types/v1/ObjectFormatIdentifier;Lorg/dataone/service/types/v1/Identifier;)Ljava/io/InputStream;org/junit/Assert assertTrue(Ljava/lang/String;Z)Vorg/apache/commons/io/IOUtils closeQuietly(Ljava/io/InputStream;)VgetLatestRequestUrlgetClass()Ljava/lang/Class;java/lang/Class getSimpleNamegetDetail_codegetDescription handleFail'(Ljava/lang/String;Ljava/lang/String;)VprintStackTracegetName getMessagelog Lorg/apache/commons/logging/Log;org/apache/commons/logging/Loginfo(Ljava/lang/Object;)V getNextEntry()Ljava/util/zip/ZipEntry;getSize()J(J)Ljava/lang/StringBuilder; isDirectoryendsWith(Ljava/lang/String;)ZindexOf(I)Icompile-(Ljava/lang/String;)Ljava/util/regex/Pattern;matcher3(Ljava/lang/CharSequence;)Ljava/util/regex/Matcher;group(I)Ljava/lang/String;equals(Ljava/lang/Object;)Z*(Ljava/lang/String;Ljava/lang/Throwable;)V_(Lorg/dataone/integration/adapters/CommonCallAdapter;)Lorg/dataone/service/types/v1/Identifier;java/lang/System getProperty&(Ljava/lang/String;)Ljava/lang/String; pathSeparatorcopy.(Ljava/io/InputStream;Ljava/io/OutputStream;)I(Ljava/io/OutputStream;)Vorg/apache/commons/io/FileUtilsdeleteDirectory(Ljava/io/File;)Vexists getParent()[Ljava/io/File;getPath replaceAll8(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;#org/apache/commons/lang/StringUtils countMatches'(Ljava/lang/String;Ljava/lang/String;)IgetAbsolutePathformat9(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;length()I substring(II)Ljava/lang/String;closecreateArchiveInputStreamc(Ljava/lang/String;Ljava/io/InputStream;)Lorg/apache/commons/compress/archivers/ArchiveInputStream;6()Lorg/apache/commons/compress/archivers/ArchiveEntry;mkdirsadderror*(Ljava/lang/Object;Ljava/lang/Throwable;)V isEncryptednextFileHeader(()Lcom/github/junrar/rarfile/FileHeader;getFileNameString extractFile?(Lcom/github/junrar/rarfile/FileHeader;Ljava/io/OutputStream;)V isFileHeader isUnicode getFileNameWsplit'(Ljava/lang/String;)[Ljava/lang/String; separatormkdir createNewFile!>*+ 23}+*+,; <=  ss *Y**+, NY* +, :+ :* Y :Y: Y :*-:  ::*- Y !"#$%&'(I:** Y !"+$,( :  DD)D!bAB#C)DAFDHMITKnLzNR_`TU_`YZ[_`_)az MHn'z <2***#)D }                      E{ }+*+,-j kl  ss_Y**+, NY* +, :+ :* Y .:Y:*- Y /::012: 6 6 6 : 3Y4:  5Y:6:0 Y 789:;2<=>6 0?2@A6 0B2/C6DE:F:G6cH:IJ6 0K2<7IJ-LE:F:G H: 0M2 :NYOP:  Y Q  R S T :*- Y "#U%V'(D:** Y "+U,( : )DD])DU]Dpq#r)sAuDwMxT|v !$.1:?FOV[cru UZ]_dcXFuOlVe: !" Mvv#$ s% p& m' j( 7_-#|)vD[ V               &      ) a* P      ) * +, .       ) *GM \-      ) -      @v .}+*+,W   s/s0.UY**+, NY* +, :+ :* Y .:::Y:  X: *-Y:   :Z:  [: Y  \]: Y \^:_Y`:aW7:** Y b"+U,(cYd:cYd:cY Y ed:fW7:h* Y i"+Uj(*Xklm: : *- Y  "#U %V '(lmg: b:  ** Y  "+U ,(lm!: :lm: )CKNg)J)J).36)J;;$;GLO);=;9#)ADGJSZ^ht & C KNPU "#$ "#$$) ."3#8$;B G"L#T%2P21S; ^02 h& 3 4 56s78&h98CK:87 - UUUC#2),D; G<=J >8q       ?@        ?@  [      ?@     3=      ?@     @@@A3       ?@DJD@D      ?@       ?@B}+*+,n. /0  sCsDBUY**+, NY* +, :+ :* Y .:::Y:  o: *-Y:   :Z:  [: Y  \]: Y \p:_Y`:aW7:** Y q"+U,(cYd:cYd:cY Y ed:rW7:h* Y s"+Uj(*oklm: : *- Y  "#U %V '(lmg: b:  ** Y  "+U ,(lm!: :lm: )CKNg)J)J).36)J;;$;GLO);=;945#6)7A9D:G;J>S?Z@^BhCtGIJKLOPUQRSWX&YC\KaN]P^U_cnoqrsefnoqrsijk$n)o.q3r8s;nBoGqLrTt2P21S; ^02 h& 3 4 5Es78&h98CK:87 - UUUC#2),D; GF=J >8q       ?@        ?@  [      ?@     3=      ?@     @@@A3       ?@DJD@D      ?@       ?@GHD-tW6:**, Y v"+U,(*+-w g uy~ z {|=C> 1DDIDD78D:8J2JK^,x!NY Y y,z{,|N Y }+~-*+-2%*U]*^^I^L8*4MN0%+  @O-  @O-PK >66,|:66q2:  :  :  =>>C @A 63,:   :   >6 Y }+~ Y }+~ Y }+~V$+6@BEORUbm +ZQ b#R mS $aT8 }UNxVuWI78%&'*   @O.@ /X}+*+,   sYsZX<Y**+, NY* +, :+ :* Y .:::Y:  : *-Y:   :Z:  [: Y  \]: Y \e:_Y`:aW7:** Y "+U,(cYd:cYd:*oklm: : *- Y  "#U %V '(lmg: b:  ** Y  "+U ,(lm!: :lm: )<AD)J2I)J2))J2I)3#)ADGJSZ^ht&27<AFIK2S ^2 h 3 4 5l[78& :8K7 - #)D; G\=J>8+        ?@        ?@  [      ?@     33       ?@DJD@D      ?@       ?@ ]^e0Y*SY+S2cY+**dMYY*N_Y,:-aW-," 9 I SZ^c4e_8e`89,a8IbScdefg g^j0Y*SY+S2cY+**dMY*N_Y,:Y-:aW,& 9BLV!^#c$h&>j_8j`891a8B(hLcdVijeg kl 0Y*SY+S2YMY*NY-::Y:cY+:^0YS2xn0YS2MYYS0YS2_Y:aW,WF,V*,'-0.B/E0S1b2j34567:;<=?@ACR m=ba8 _8 `8'no0 BpqErs 'nt%E@@uvw@0 efguxy}+*+,M NO  szs{y-Y**+, NY* +, :+ :* Y .:::Y:  : *-Y:   :Z:  [: Y  \]: Y \:_Y`:aW>:*NY Y "+U,{cYd:cYd:>:*NY Y "+U,{*wm: : *- Y  "#U %V '(m]: X:  ** Y  "+U ,(m: :m: )-47))Jz)Jz) )Jz$')4ST#U)VAXDYGZJ]S^Z_^ahbtfhijknotpqrv"w-z47{9|>}rz $,999S' ^2 h 3 4 5|"X78-M}87 - ---# )D; G~=J>8k       ?@        ?@  [      ?@     :      ?@     @@:       ?@DED{D      ?@       ?@ MY*M#N0 Y *-,!NY Y ö*{,ę NYŷ{N,YN0,ę0 Y Ƕ-ȶɶͲ0 Y ˶-ȶ2-̙ -+ͧ!-+:_Y:,-:0 ))f .2PWaclsRT8 = _8`8c& @@!5,B ]MN*љ*ҙ *N*NcY+-M,x.+-M%:0 Y ն,,069g2 )069;[4; 1]]8[T8Y @ YA! \+M,N,6 cY*+p6,d2 Y -׶,2NcY*-W˻ Y -׶,,d2NcY*-:WF  $*6R_eH-8 T88 Q  71eg ZM*̙)*ҙ"cY+*ӷM,x8+*Ӹڧ-*̙&*ҚcY+*ȷM,x +*ȸڱ* $/=JQY ZZ8XT8 /@) V+M,N,:6672: Y -׶NcY*-Wȱ&   (BOUR('CU>V;WV8VOGQ#  @  :