java.lang.Object
java.lang.Record
org.gcube.informationsystem.resourceregistry.queries.operators.PropertyDomain
Record Components:
kind - the shape of the declared property
valueType - the base type of the compared values: the property itself for PropertyDomain.Kind.SCALAR, the elements for PropertyDomain.Kind.COLLECTION, the values for PropertyDomain.Kind.MAP; null for the other kinds

public record PropertyDomain(PropertyDomain.Kind kind, org.gcube.informationsystem.types.PropertyTypeName.BaseType valueType) extends Record
The domain a Type definition declares for the property compared by a predicate.

A property the Type definition does not declare has no domain: it is represented by null and no property-domain check applies to it.

Author:
Luca Frosini (ISTI - CNR)
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static enum 
    The shape of a declared property.
  • Constructor Summary

    Constructors
    Constructor
    Description
    PropertyDomain(PropertyDomain.Kind kind, org.gcube.informationsystem.types.PropertyTypeName.BaseType valueType)
    Creates an instance of a PropertyDomain record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    collection(org.gcube.informationsystem.types.PropertyTypeName.BaseType elementType)
    Returns the domain of a List or Set.
    Returns the domain of an embedded Property value.
    Returns the domain of an Encrypted value.
    Returns the domain of the value of an Encrypted value.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    Returns the value of the kind record component.
    map(org.gcube.informationsystem.types.PropertyTypeName.BaseType valueType)
    Returns the domain of a Map.
    scalar(org.gcube.informationsystem.types.PropertyTypeName.BaseType valueType)
    Returns the domain of a single value.
    final String
    Returns a string representation of this record class.
    org.gcube.informationsystem.types.PropertyTypeName.BaseType
    Returns the value of the valueType record component.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • PropertyDomain

      public PropertyDomain(PropertyDomain.Kind kind, org.gcube.informationsystem.types.PropertyTypeName.BaseType valueType)
      Creates an instance of a PropertyDomain record class.
      Parameters:
      kind - the value for the kind record component
      valueType - the value for the valueType record component
  • Method Details

    • scalar

      public static PropertyDomain scalar(org.gcube.informationsystem.types.PropertyTypeName.BaseType valueType)
      Returns the domain of a single value.
      Parameters:
      valueType - the base type of the value
      Returns:
      the domain
    • collection

      public static PropertyDomain collection(org.gcube.informationsystem.types.PropertyTypeName.BaseType elementType)
      Returns the domain of a List or Set.
      Parameters:
      elementType - the base type of the elements
      Returns:
      the domain
    • map

      public static PropertyDomain map(org.gcube.informationsystem.types.PropertyTypeName.BaseType valueType)
      Returns the domain of a Map.
      Parameters:
      valueType - the base type of the values
      Returns:
      the domain
    • embedded

      public static PropertyDomain embedded()
      Returns the domain of an embedded Property value.
      Returns:
      the domain
    • encrypted

      public static PropertyDomain encrypted()
      Returns the domain of an Encrypted value.
      Returns:
      the domain
    • encryptedValue

      public static PropertyDomain encryptedValue()
      Returns the domain of the value of an Encrypted value.
      Returns:
      the domain
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • kind

      public PropertyDomain.Kind kind()
      Returns the value of the kind record component.
      Returns:
      the value of the kind record component
    • valueType

      public org.gcube.informationsystem.types.PropertyTypeName.BaseType valueType()
      Returns the value of the valueType record component.
      Returns:
      the value of the valueType record component