3                            *  *    4 4             N    c: _  c  g g            c c N c  c   !"#$% &'()* c+ , c - . c/01 2  _2 3 _345  367 8 9 :; <=  >? c@AB C D3 EF 3 GHIJ KLMN 2O PQ RS TU VWX YZ V [ \ ]^ V_ V` Va bc d ce cf cg hiBAGIT_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;jklmtestGetPackage_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 nonDataDirnoptestGetPackage_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;tempBagItContentqtestGetPackage_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;JcheckBagItRootDirpathremove pathFromRootftestGetPackage_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; ExceptionsrunBzipLjava/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;s;=>(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;Nt 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 u vw xy!org/dataone/service/types/v1/Node .org/dataone/integration/adapters/MNCallAdapter z {| }testRightsHolder ~java/lang/StringBuilder *testGetPackage_EscapeChars(...) vs. node:   3org/dataone/service/types/v1/ObjectFormatIdentifierUorg/dataone/integration/it/testImplementations/MNPackageFunctionalTestImplementationsapplication/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  n zip entry:  size:   w bagit.txtj found bagit.txt.*manifest.*\.txt found manifest file  .+\/(.+)\/.*o  p w 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 VWjava/io/IOException1testGetPackage_Gzip : Unable to un-gzip the file! CD   >application/x-bzip2 TempBzip.bz2;testGetPackage_Bzip2 : Unable to write bzip stream to file! `W2testGetPackage_Bzip2 : Unable to un-bzip the file! de6org/apache/commons/compress/archivers/ArchiveExceptionUnable to un-tar the file! FG wDirectory does not exist:   IThe "I" returned from getPackage() should contain only ONE top level directory. LG \\/  /data=" returned from getPackage() should contain a bagit.txt file.<" returned from getPackage() should contain a manifest file.c" returned from getPackage() should contain a /data directory right inside the top-level directory. Qapplication/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. wjava/lang/IllegalStateExceptionFailed to create directory! %s.Creating output file %s.qs  rx-rar-compressed TempRar.rar; : testGetPackage_Rar : Unable to write rar stream to file! xy2 : 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: w0RAR archive is encrypted! Can't be decompressed! RAR file header (t &) is encrypted! Can't be decompressed! Extracting file:   Error extracting file! w w  Error creating new file:   w w .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 "#,%-) :  D D*D!vAB#C)DAFDHMITKnLzNR_`TUVWU_`YZ[ \[_`_)az MHn'z <2***#)D}                         E{ }+*+,.j kl  ssjY**+, NY* +, :+ :* Y /:Y:*- Y 0::123: 6 6 6 : 4Y5:  6Y:7:1 Y 89:;3<=>6 1?3@A6 1B3/C6DE:F:G6cH:IJ6 1K3<7IJ-LE:F:G H: 1M3 :NYOP:  Y Q  R S T :*-! Y #$U&V()D:+* Y #,U-) : *D DX*DPX"Hpq#r)sAuDwMxT|e}q|v),5:AJQV^mp}7MPUXZ_^XAuJlQe5 Mvq ! n" k# h$ e% 7Z-#w)qDVV                 &       & \' P       & ' () .        & 'GM \        &       @v *}+*+,W   s+s,**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*;=;?#)ADGJSZ^ht  & C KNPUf "#$ "#$$) ."3#8$;B G"L#T%2P2-S; ^0. h& / 0 12s34&h54CK647 - UUUC#2),D7G89J :4q      ;<         ;<    [     ;<       3=     ;<       <<<=3      ;<DJD@D     ;<      ;<>}+*+,n. /0  s?s@>*UY**+, 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*;=;?45#6)7A9D:G;J>S?Z@^BhCtGIJKLOPUQRST SWX&YC\KaN]P^U_f`_cnoqrsefgfnoqrsijk$n)o.q3r8s;nBoGqLrTt2P2-S; ^0. h& / 0 1As34&h54CK647 - UUUC#2),D7GB9J :4q      ;<         ;<    [     ;<       3=     ;<       <<<=3      ;<DJD@D     ;<      ;<CDD-tW6:+*, Y v#,U-)*+-w g u& y~ z {|!}:|=C> 1DDEDD34D64J2FGY,x!NY Y y,z{,|N Y }+~-*+-2%*PX*YYEYH4*/IJ0%& <K  <K LG >66,|:66q2:  :  :  =>>C @A 63,:   :   >6 Y }+ Y }+ Y }+Z$+6@BEORUbm|f +ZM b#N mO $aP4 E34"#$*  <K.< /Q}+*+,   sRsSQLY**+, 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*7#)ADGJSZ^ht &27<AFIKi2S ^. h / 0 1lT34& 64K7 - #)D7GU9J:4+       ;<         ;<    [     ;<       33      ;<DJD@D     ;<      ;< VWe1Y*SY+S3cY+**dMYY*N_Y,:-aW-," 9 I SZ^c4eX4eY49,Z4I[S\]^_g `Wj1Y*SY+S3cY+**dMY*N_Y,:Y-:aW,& 9BLV!^#c$h&>jX4jY491Z4B(aL\]Vbc^g de 1Y*SY+S3YMY*NY-::Y:cY+:^1YS3xn1YS3MYYS1YS3_Y:aW,WF,V*,'-0.B/E0S1b2j34567:;<=?@ACR f9bZ4 X4 Y4'gh0BijEkl 'gm%E<<n op<0 ^_guqr}+*+,M NO  ssstr-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$'*8ST#U)VAXDYGZJ]S^Z_^ahbtfhijknotpqrsv"w-z47{9|>}U~rz $,999S' ^. h / 0 1u"X34-Mv47 - ---# )D7Gw9J:4k      ;<         ;<    [     ;<       :     ;<       <<:      ;<DED{D     ;<      ;< xyMY*M#N1 Y *-,!NY Y *{,™ NY÷{N,YN0,™1 Y Ŷ-ƶǶͲ1 Y ɶ-ƶ3-ʙ -+˧!-+:_Y:,-:1 **f .2PWaclsRP4 z9 X4Y4{|c}~& <<!5,B ]MN*ϙ*Й *N*NcY+-M,x.+-M%:1 Y Ӷ,,069g2 )069;[4; -]~]4[P4Y< Y=! \+M,N,6 cY*+p6,d2 Y -ն,2NcY*-W˻ Y -ն,,d2NcY*-:WF  $*6R_eH-8 P44M  71^g ZM*ʙ)*Й"cY+*ѷM,x8+*Ѹا-*ʙ&*КcY+*ƷM,x +*Ƹر* $/=JQY Z~Z4XP4 /<) V+M,N,:6672: Y -նNcY*-Wȱ&   (BOU4('V4VOGM#  <  :