object DansBag
- Alphabetic
- By Inheritance
- DansBag
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
implicit
def
bagAsFile(bag: DansBag): File
Implicit conversion from a
nl.knaw.dans.bag.DansBagto abetter.files.File.Implicit conversion from a
nl.knaw.dans.bag.DansBagto abetter.files.File. TheFilepointed to will be thenl.knaw.dans.bag.DansBag#baseDirof theDansBag.- bag
the
DansBagobject representing the bag located at itsbaseDir- returns
the
Filepointing to the bag'sbaseDir
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
def
createFromData(payloadDir: File, algorithms: Set[ChecksumAlgorithm] = Set(ChecksumAlgorithm.SHA1), bagInfo: Map[String, Seq[String]] = Map.empty): Try[DansBag]
Create a bag based on the payload that is inside
payloadDir.Create a bag based on the payload that is inside
payloadDir. The payload is moved to a subdirectorydata/and from there the bag is created around it. Based on the givenalgorithms,manifest-<alg>.txtandtagmanifest-<alg>.txtfiles are created. Themanifest-<alg>.txtcontain the checksums of the payload files indata/. Thetagmanifest-<alg>.txtcontain the checksums forbagit.txt,bag-info.txtand all manifest files.The resulting bag also a
bag-info.txtfile withPayload-Oxum,Bagging-Dateand all givenbagInfokey-value(s) pairs.There are no restrictions on the amount of
bagInfoentries, apart from the limitations listed in thehttps://tools.ietf.org/html/draft-kunze-bagit-16 BagIt Spec. There must be at least one algorithm given for the checksums.- payloadDir
The directory containing the payload files and in which the bag is created
- algorithms
The algorithms with which the checksums for the (payload/tag) files are calculated
- bagInfo
The entries to be added to
bag-info.txt- returns
if successful, returns a
nl.knaw.dans.bag.DansBagobject representing the bag located atpayloadDirelse returns an exception
-
def
empty(baseDir: File, algorithms: Set[ChecksumAlgorithm] = Set(ChecksumAlgorithm.SHA1), bagInfo: Map[String, Seq[String]] = Map.empty): Try[DansBag]
Create an empty bag at the given
baseDir.Create an empty bag at the given
baseDir. Based on the givenalgorithms, (empty)manifest-<alg>.txtand (non-empty)tagmanifest-<alg>.txtfiles are created. Thetagmanifest-<alg>.txtcontain the checksums forbagit.txt,bag-info.txtand all manifest files. The resulting bag also abag-info.txtfile withPayload-Oxum,Bagging-Dateand all givenbagInfokey-value(s) pairs.There are no restrictions on the amount of
bagInfoentries, apart from the limitations listed in thehttps://tools.ietf.org/html/draft-kunze-bagit-16 BagIt Spec. There must be at least one algorithm given for the checksums.- baseDir
The directory in which the bag is created
- algorithms
The algorithms with which the checksums for the (payload/tag) files are calculated
- bagInfo
The entries to be added to
bag-info.txt- returns
if successful, returns a
nl.knaw.dans.bag.DansBagobject representing the bag located atbaseDirelse returns an exception
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
def
read(baseDir: File): Try[DansBag]
Reads a bag located at
baseDirand return anl.knaw.dans.bag.DansBagwhen successful.Reads a bag located at
baseDirand return anl.knaw.dans.bag.DansBagwhen successful.- baseDir
The directory containing the bag
- returns
if successful, returns a
nl.knaw.dans.bag.DansBagobject representing the bag located atbaseDirelse return an exception
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()