Class

eie.dao.instances

FileTagDao

Related Doc: package instances

Permalink

case class FileTagDao[T](rootDir: Path, maxTagLen: Int, maxTagValueLen: Int)(implicit persist: Persist[T], hasId: HasId[T], fromBytes: FromBytes[T]) extends TagDao[T] with Product with Serializable

Stores things in the format:

When a tag value is not alphanumeric, or is longer than 'maxTagValueLen':

<root dir>/tags/<tag>/<value hash>/<id>/.value = <value> <root dir>/tags/<tag>/<value hash>/<id>/.data = <data>

or, when the tag value IS alphanumber and within 'maxTagValueLen':

<root dir>/tags/<tag>/<value>/<id>/.data

It also stores:

<root dir>/ids/<id>/<tag> = <value>

for queries on just the id (e.g. list tags), or when the id and tag are known

T

the value type

rootDir

the directory to store the data

maxTagLen

the maximum allowed length of tags

persist

the ability to persist T values

hasId

the ability to determine an ID for T values

fromBytes

the ability to read T values from byte arrays

Linear Supertypes
Serializable, Serializable, Product, Equals, TagDao[T], AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. FileTagDao
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. TagDao
  7. AnyRef
  8. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new FileTagDao(rootDir: Path, maxTagLen: Int, maxTagValueLen: Int)(implicit persist: Persist[T], hasId: HasId[T], fromBytes: FromBytes[T])

    Permalink

    rootDir

    the directory to store the data

    maxTagLen

    the maximum allowed length of tags

    persist

    the ability to persist T values

    hasId

    the ability to determine an ID for T values

    fromBytes

    the ability to read T values from byte arrays

Type Members

  1. type SetResult = Path

    Permalink
    Definition Classes
    FileTagDaoTagDao

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. def +(other: String): String

    Permalink
    Implicit information
    This member is added by an implicit conversion from FileTagDao[T] to any2stringadd[FileTagDao[T]] performed by method any2stringadd in scala.Predef.
    Definition Classes
    any2stringadd
  4. def ->[B](y: B): (FileTagDao[T], B)

    Permalink
    Implicit information
    This member is added by an implicit conversion from FileTagDao[T] to ArrowAssoc[FileTagDao[T]] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  5. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  6. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  7. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. def ensuring(cond: (FileTagDao[T]) ⇒ Boolean, msg: ⇒ Any): FileTagDao[T]

    Permalink
    Implicit information
    This member is added by an implicit conversion from FileTagDao[T] to Ensuring[FileTagDao[T]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  9. def ensuring(cond: (FileTagDao[T]) ⇒ Boolean): FileTagDao[T]

    Permalink
    Implicit information
    This member is added by an implicit conversion from FileTagDao[T] to Ensuring[FileTagDao[T]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  10. def ensuring(cond: Boolean, msg: ⇒ Any): FileTagDao[T]

    Permalink
    Implicit information
    This member is added by an implicit conversion from FileTagDao[T] to Ensuring[FileTagDao[T]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  11. def ensuring(cond: Boolean): FileTagDao[T]

    Permalink
    Implicit information
    This member is added by an implicit conversion from FileTagDao[T] to Ensuring[FileTagDao[T]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  12. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  13. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  14. def findDataFilesWithTagValue(tag: String, tagValue: String): Iterator[Path]

    Permalink
  15. def findDataWithTag(tag: String): Iterator[T]

    Permalink

    tag

    the tag to check

    returns

    all values which have the given tag

    Definition Classes
    FileTagDaoTagDao
  16. def findDataWithTagValue(tag: String, tagValue: String): Iterator[T]

    Permalink

    returns

    all values which have the given tag and value

    Definition Classes
    FileTagDaoTagDao
  17. def findIdsWithTag(tag: String): Iterator[String]

    Permalink
  18. def formatted(fmtstr: String): String

    Permalink
    Implicit information
    This member is added by an implicit conversion from FileTagDao[T] to StringFormat[FileTagDao[T]] performed by method StringFormat in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  19. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  20. def hasTag(data: T, tag: String): Boolean

    Permalink
    Definition Classes
    FileTagDaoTagDao
  21. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  22. val maxTagLen: Int

    Permalink

    the maximum allowed length of tags

  23. val maxTagValueLen: Int

    Permalink
  24. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  25. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  26. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  27. def remove(data: T): Unit

    Permalink
    Definition Classes
    FileTagDaoTagDao
  28. def removeTag(data: T, tag: String): Unit

    Permalink
    Definition Classes
    TagDao
  29. def removeTags(data: T, tags: Set[String]): Unit

    Permalink
    Definition Classes
    FileTagDaoTagDao
  30. val rootDir: Path

    Permalink

    the directory to store the data

  31. def setTag(data: T, tag: String, tagValue: String): Path

    Permalink
    Definition Classes
    FileTagDaoTagDao
  32. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  33. def tagsFor(data: T): Set[String]

    Permalink
    Definition Classes
    FileTagDaoTagDao
  34. def tagsForId(id: String): Set[String]

    Permalink
  35. def useValueVerbatim(tagValue: String): Boolean

    Permalink
  36. def valueForTag(data: T, tag: String): Option[String]

    Permalink
    Definition Classes
    FileTagDaoTagDao
  37. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  38. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  39. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  40. def [B](y: B): (FileTagDao[T], B)

    Permalink
    Implicit information
    This member is added by an implicit conversion from FileTagDao[T] to ArrowAssoc[FileTagDao[T]] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from TagDao[T]

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion any2stringadd from FileTagDao[T] to any2stringadd[FileTagDao[T]]

Inherited by implicit conversion StringFormat from FileTagDao[T] to StringFormat[FileTagDao[T]]

Inherited by implicit conversion Ensuring from FileTagDao[T] to Ensuring[FileTagDao[T]]

Inherited by implicit conversion ArrowAssoc from FileTagDao[T] to ArrowAssoc[FileTagDao[T]]

Ungrouped