org.qbproject.schema

QBSchema

object QBSchema extends QBSchemaOps with QBSchemaDSL with JSONSchemaReads with JSONSchemaAnnotationWrites with JsValueUpdateOps

Linear Supertypes
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. QBSchema
  2. JsValueUpdateOps
  3. JSONSchemaAnnotationWrites
  4. JSONSchemaWrites
  5. JSONSchemaReads
  6. QBSchemaDSL
  7. QBSchemaOps
  8. QBBaseSchemaOps
  9. AnyRef
  10. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. case class AnnotatedQBType(qbType: QBType, annotations: List[QBAnnotation]) extends QBType with Product with Serializable

    DSL helper class

  2. case class BuildDescription(descriptions: List[(QBClass, String)]) extends Product with Serializable

    Definition Classes
    QBBaseSchemaOps
  3. implicit class QBFieldExtensionOps extends AnyRef

    Definition Classes
    QBBaseSchemaOps
  4. implicit class QBSchemaOps extends AnyRef

    Schema Ops Extensions ----------------------------------------------------------

  5. type QBStringPath = List[String]

    Definition Classes
    QBBaseSchemaOps

Value Members

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

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. object BuildDescription extends Serializable

    Definition Classes
    QBBaseSchemaOps
  7. val ExclusiveMaximum: String

    Definition Classes
    JSONSchemaWrites
  8. val ExclusiveMinimum: String

    Definition Classes
    JSONSchemaWrites
  9. val MaximumId: String

    Definition Classes
    JSONSchemaWrites
  10. val MinimumId: String

    Definition Classes
    JSONSchemaWrites
  11. val MultipleOf: String

    Definition Classes
    JSONSchemaWrites
  12. val PatternId: String

    Definition Classes
    JSONSchemaWrites
  13. object UnReadable extends Reads[QBType]

    Definition Classes
    JSONSchemaReads
  14. def adaptSchema[A](schema: QBType, path: JsPath, adapter: (JsPath, QBType) ⇒ JsResult[JsValue]): JsResult[JsValue]

    Definition Classes
    QBBaseSchemaOps
  15. def add(schema: QBClass)(path: QBStringPath, attributes: Seq[QBAttribute]): QBClass

    Adds the given fields to the object located at the path of the given object.

    Adds the given fields to the object located at the path of the given object.

    schema

    the schema to which the attributes should be added

    path

    the path within the given schema at which the attributes should be added

    attributes

    the actual attributes to be added

    Definition Classes
    QBBaseSchemaOps
  16. def allNonOptionalAttributes(fields: Seq[QBAttribute]): Seq[JsString]

    Definition Classes
    JSONSchemaAnnotationWrites
  17. def areEqual(schema: QBClass, otherSchema: QBClass): Boolean

    Compares the schema with each other

    Compares the schema with each other

    schema

    the schema to be compared

    otherSchema

    the schema to be compared against the first one

    returns

    true, if the schemas are equal, false otherwise

    Definition Classes
    QBBaseSchemaOps
  18. implicit def arrayReader: Reads[QBArray]

    Definition Classes
    JSONSchemaReads
  19. implicit def arrayWriter: Writes[QBArray]

    Definition Classes
    JSONSchemaWrites
  20. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  21. def attribute(obj: QBClass, fieldName: String): QBAttribute

    Definition Classes
    QBBaseSchemaOps
  22. implicit def booleanReader: Reads[QBBoolean]

    Definition Classes
    JSONSchemaReads
  23. implicit def booleanWriter: Writes[QBBoolean]

    Definition Classes
    JSONSchemaWrites
  24. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  25. def collapse[A <: QBType, B](obj: QBClass)(modifier: (QBAttribute) ⇒ B)(implicit arg0: ClassTag[A], arg1: Monoid[B]): B

    Definition Classes
    QBBaseSchemaOps
  26. def collapseWithPath[B](matcher: (QBType) ⇒ Boolean)(obj: QBClass)(modifier: (QBAttribute, JsPath) ⇒ B)(implicit arg0: Monoid[B]): B

    Definition Classes
    QBBaseSchemaOps
  27. def default(qbType: QBType, default: JsValue): AnnotatedQBType

    Annotations

    Annotations

    Definition Classes
    QBSchemaDSL
  28. def defaultExtension(attr: QBAttribute): JsObject

    Definition Classes
    JSONSchemaAnnotationWrites
  29. val emptyJsObject: JsObject

    Definition Classes
    JSONSchemaAnnotationWrites
  30. def emptyPath: QBStringPath

    Definition Classes
    QBBaseSchemaOps
  31. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  32. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  33. def exclusiveMax(n: Double): MaxRule

    Definition Classes
    QBSchemaDSL
  34. def exclusiveMax(n: Int): DoubleRuleWrapper

    Definition Classes
    QBSchemaDSL
  35. def exclusiveMin(n: Double): MinRule

    Definition Classes
    QBSchemaDSL
  36. def exclusiveMin(n: Int): DoubleRuleWrapper

    Definition Classes
    QBSchemaDSL
  37. def extensions: List[(QBClass) ⇒ JsObject]

    Extensions which act on a object and produce a result which contains information about multiple fields.

    Extensions which act on a object and produce a result which contains information about multiple fields. For instance, required property.

    Definition Classes
    JSONSchemaAnnotationWritesJSONSchemaWrites
  38. def extract(obj1: QBClass, obj2: QBClass): QBClass

    Removes all attributes from the first schema that are also part of the second given schema.

    Removes all attributes from the first schema that are also part of the second given schema.

    Definition Classes
    QBBaseSchemaOps
  39. def fail[A](msg: String): Nothing

    Definition Classes
    QBBaseSchemaOps
  40. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  41. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  42. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  43. implicit def integerReader: Reads[QBInteger]

    Definition Classes
    JSONSchemaReads
  44. implicit def integerWriter: Writes[QBInteger]

    Definition Classes
    JSONSchemaWrites
  45. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  46. def isSubSet(subSchema: QBClass, schema: QBClass): Boolean

    Checks whether the schema is a subset of the given schema.

    Checks whether the schema is a subset of the given schema.

    subSchema

    the schema that is supposed to be a subset

    schema

    the schema to check the sub schema against

    returns

    true, if the sub schema is a subset of the schema

    Definition Classes
    QBBaseSchemaOps
  47. def length(lower: Int, upper: Int): ValidationRule[JsString]

    Definition Classes
    QBSchemaDSL
  48. def makeOptional(root: QBClass, paths: List[QBStringPath]): QBClass

    Makes all values referenced by the given list of paths optional.

    Makes all values referenced by the given list of paths optional.

    Definition Classes
    QBBaseSchemaOps
  49. def makeReadOnly(schema: QBClass, paths: List[QBStringPath]): QBClass

    Marks all values referenced by the given list of paths as read-only.

    Marks all values referenced by the given list of paths as read-only.

    schema

    the schema that is supposed to contain the attributes that are referenced by the given paths

    returns

    the updated schema with the referenced attributes being marked as read-only

    Definition Classes
    QBBaseSchemaOps
  50. def max(n: Int): DoubleRuleWrapper

    Definition Classes
    QBSchemaDSL
  51. def max(n: Double): MaxRule

    Definition Classes
    QBSchemaDSL
  52. def maxLength(n: Int): MaxLengthRule

    Definition Classes
    QBSchemaDSL
  53. def maxProperties(max: Int): MaxPropertiesRule

    Definition Classes
    QBSchemaDSL
  54. def merge(schema: QBClass, otherSchema: QBClass): QBClass

    Merges the attributes of the second schema into the first one.

    Merges the attributes of the second schema into the first one.

    schema

    the target schema

    otherSchema

    the schema to be merged into the target schema

    Definition Classes
    QBBaseSchemaOps
  55. def min(n: Int): DoubleRuleWrapper

    Definition Classes
    QBSchemaDSL
  56. def min(n: Double): MinRule

    Definition Classes
    QBSchemaDSL
  57. def minLength(n: Int): MinLengthRule

    Definition Classes
    QBSchemaDSL
  58. def minProperties(min: Int): MinPropertiesRule

    Definition Classes
    QBSchemaDSL
  59. def multipleOf(n: Int): DoubleRuleWrapper

    Definition Classes
    QBSchemaDSL
  60. def multipleOf(n: Double): MultipleOfRule

    Definition Classes
    QBSchemaDSL
  61. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  62. final def notify(): Unit

    Definition Classes
    AnyRef
  63. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  64. implicit def numberReader: Reads[QBNumber]

    Definition Classes
    JSONSchemaReads
  65. implicit def numberWriter: Writes[QBNumber]

    Definition Classes
    JSONSchemaWrites
  66. implicit def objectReader: Reads[QBClass]

    Definition Classes
    JSONSchemaReads
  67. implicit def objectWriter: Writes[QBClass]

    Definition Classes
    JSONSchemaWrites
  68. def oneOf(values: QBClass*): QBOneOfImpl

    Object Rules

    Object Rules

    Definition Classes
    QBSchemaDSL
  69. def optional(qbType: QBType, defaultValue: JsValue): AnnotatedQBType

    Mark the attribute as optional with a default value that is used in case the attribute is not present.

    Mark the attribute as optional with a default value that is used in case the attribute is not present.

    Definition Classes
    QBSchemaDSL
  70. def optional(qbType: QBType): AnnotatedQBType

    Mark the attribute as optional.

    Mark the attribute as optional.

    Definition Classes
    QBSchemaDSL
  71. def optionalExtension(obj: QBClass): JsObject

    Definition Classes
    JSONSchemaAnnotationWrites
  72. def pathOfSubSchema(schema: QBClass, subSchema: QBClass): Option[String]

    Returns the path of the given subschema, if it is contained in the schema.

    Returns the path of the given subschema, if it is contained in the schema.

    schema

    the schema that is supposed to contain the sub-schema

    subSchema

    the sub-schema that is supposed to be contained in the first schema

    returns

    the path of sub-schema in the schema, if it is contained, None otherwise

    Definition Classes
    QBBaseSchemaOps
  73. def pattern(regex: String, errMessage: String = "qb.invalid.pattern"): RegexRule

    Definition Classes
    QBSchemaDSL
  74. def propertyExtensions: List[(QBAttribute) ⇒ JsObject]

    Extensions whose result gets merged into the written property like, for instance, the type:

    Extensions whose result gets merged into the written property like, for instance, the type:

    Definition Classes
    JSONSchemaAnnotationWritesJSONSchemaWrites
  75. def qbBoolean: QBBoolean

    Boolean Rules

    Boolean Rules

    Definition Classes
    QBSchemaDSL
  76. def qbClass(els: List[(String, QBType)], rules: ValidationRule[JsObject]*): QBClass

    Definition Classes
    QBSchemaDSL
  77. def qbClass(els: (String, QBType)*): QBClass

    Definition Classes
    QBSchemaDSL
  78. def qbClass(els: List[(String, QBType)])(): QBClass

    Classes.

    Classes.

    Definition Classes
    QBSchemaDSL
  79. def qbDateTime: QBDateTimeImpl

    Definition Classes
    QBSchemaDSL
  80. def qbEmail: QBString

    Definition Classes
    QBSchemaDSL
  81. def qbEnum(values: String*): QBString

    Definition Classes
    QBSchemaDSL
  82. def qbId: QBStringImpl

    Definition Classes
    QBSchemaDSL
  83. def qbInteger(rules: DoubleRuleWrapper*): QBIntegerImpl

    Definition Classes
    QBSchemaDSL
  84. def qbInteger: QBIntegerImpl

    Definition Classes
    QBSchemaDSL
  85. def qbList(dataType: ⇒ QBType, rules: ValidationRule[JsArray]*): QBArray

    Definition Classes
    QBSchemaDSL
  86. def qbList(dataType: ⇒ QBType): QBArray

    Array Rules

    Array Rules

    Definition Classes
    QBSchemaDSL
  87. def qbNonEmptyText: QBString

    Definition Classes
    QBSchemaDSL
  88. def qbNumber(rules: ValidationRule[JsNumber]*): QBNumber

    Definition Classes
    QBSchemaDSL
  89. def qbNumber: QBNumberImpl

    Number Rules

    Number Rules

    Definition Classes
    QBSchemaDSL
  90. def qbPosixTime: QBPosixTimeImpl

    Definition Classes
    QBSchemaDSL
  91. def qbString: QBStringImpl

    Definition Classes
    QBSchemaDSL
  92. def qbString(rules: ValidationRule[JsString]*): QBString

    String Rules

    String Rules

    Definition Classes
    QBSchemaDSL
  93. def qbText: QBStringImpl

    Definition Classes
    QBSchemaDSL
  94. implicit def qbTypeWriter: Writes[QBType]

    Definition Classes
    JSONSchemaWrites
  95. def range(lower: Int, upper: Int): DoubleRuleWrapper

    Definition Classes
    QBSchemaDSL
  96. def range(lower: Double, upper: Double): ValidationRule[JsNumber]

    Definition Classes
    QBSchemaDSL
  97. def readOnly(qbType: QBType): AnnotatedQBType

    Mark the attribute as read-only.

    Mark the attribute as read-only.

    Definition Classes
    QBSchemaDSL
  98. def readOnlyExtension(attr: QBAttribute): JsObject

    Definition Classes
    JSONSchemaAnnotationWrites
  99. def remove(schema: QBClass, paths: Seq[QBStringPath]): QBClass

    Removes all values that are referenced by the list of paths within the given object.

    Removes all values that are referenced by the list of paths within the given object.

    schema

    the schema from which to remove attributes

    paths

    the paths to the attributes that are to be removed

    Definition Classes
    QBBaseSchemaOps
  100. def renameAttribute(root: QBClass)(path: QBStringPath, newFieldName: String): QBClass

    Renames the field located at the given path.

    Renames the field located at the given path.

    Example: Given an schema obj("a" -> obj("b" -> integer)) rename(List("a","b"), "c") will change the object to obj("a" -> obj("c" -> integer)).

    Definition Classes
    QBBaseSchemaOps
  101. def resolve(path: QBStringPath, resolvable: QBClass): (BuildDescription, QBType)

    Resolves the given path starting from the given resolvable.

    Resolves the given path starting from the given resolvable.

    Definition Classes
    QBBaseSchemaOps
  102. def resolvePath[A <: QBType](obj: QBClass)(path: QBStringPath): A

    Resolves the given path.

    Resolves the given path.

    Definition Classes
    QBBaseSchemaOps
  103. def retain(root: QBClass)(path: QBStringPath, fields: Seq[String]): QBClass

    Retains all fields of the object at the given path based on the name of the fields.

    Retains all fields of the object at the given path based on the name of the fields.

    Definition Classes
    QBBaseSchemaOps
  104. implicit def string2QBPath(str: String): QBStringPath

    Definition Classes
    QBBaseSchemaOps
  105. implicit def stringReader: Reads[QBString]

    Definition Classes
    JSONSchemaReads
  106. implicit def stringWriter: Writes[QBString]

    Definition Classes
    JSONSchemaWrites
  107. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  108. val toLowerCase: PartialFunction[JsValue, JsValue]

    Definition Classes
    JsValueUpdateOps
  109. def toQBPaths(paths: List[String]): List[QBStringPath]

    Definition Classes
    QBBaseSchemaOps
  110. def toString(): String

    Definition Classes
    AnyRef → Any
  111. val toUpperCase: PartialFunction[JsValue, JsValue]

    Definition Classes
    JsValueUpdateOps
  112. val trim: PartialFunction[JsValue, JsValue]

    Definition Classes
    JsValueUpdateOps
  113. implicit def tuple2attribute(tuple: (String, QBType)): QBAttribute

    Definition Classes
    QBSchemaDSL
  114. def unique: ValidationRule[JsArray]

    Array Rules

    Array Rules

    Definition Classes
    QBSchemaDSL
  115. def update(qbType: QBType)(predicate: (QBType) ⇒ Boolean)(modifier: (QBType) ⇒ QBType): QBType

    Definition Classes
    QBBaseSchemaOps
  116. def update[A <: QBType](resolvable: QBClass, path: QBStringPath, updateFn: (A) ⇒ QBType): QBClass

    Resolves the given path on the given object, executes the modifier if the path has been resolved and returns the updated object.

    Resolves the given path on the given object, executes the modifier if the path has been resolved and returns the updated object.

    A

    the expected tyupe when the path is resolved

    resolvable

    the object which is supposed to contain an attribute path

    path

    the path that is to be followed through the object

    updateFn

    the update function

    returns

    the updated object

    Definition Classes
    QBBaseSchemaOps
  117. def updateAttributeByPath(root: QBClass)(path: QBStringPath, fn: (QBAttribute) ⇒ QBAttribute): QBClass

    Definition Classes
    QBBaseSchemaOps
  118. def updateAttributeByPredicate(qbType: QBType)(predicate: (QBAttribute) ⇒ Boolean)(modifier: (QBAttribute) ⇒ QBAttribute): QBType

    Definition Classes
    QBBaseSchemaOps
  119. implicit def valueReader: Reads[QBType]

    Definition Classes
    JSONSchemaReads
  120. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  123. implicit def wrapper2doubleRule(rule: DoubleRuleWrapper): ValidationRule[JsNumber]

    Definition Classes
    QBSchemaDSL
  124. def writeRule(rule: ValidationRule[_]): Seq[(String, JsValueWrapper)]

    Definition Classes
    JSONSchemaWrites

Inherited from JsValueUpdateOps

Inherited from JSONSchemaWrites

Inherited from JSONSchemaReads

Inherited from QBSchemaDSL

Inherited from schema.QBSchemaOps

Inherited from QBBaseSchemaOps

Inherited from AnyRef

Inherited from Any

Ungrouped