Interface Record

All Superinterfaces:
Comparable<Record>, Serializable
All Known Subinterfaces:
AggregatedRecord<A,R>
All Known Implementing Classes:
AbstractRecord

public interface Record extends Comparable<Record>, Serializable
Author:
Luca Frosini (ISTI - CNR)
  • Field Details

  • Method Details

    • getRequiredFields

      Set<String> getRequiredFields()
      Returns:
      a Set containing the keys of required fields The returned Set MUST be a copy of the internal representation. Any modification to the returned Set MUST not affect the object
    • getComputedFields

      Set<String> getComputedFields()
      Returns:
      a Set containing the keys of computed fields The returned Set MUST be a copy of the internal representation. Any modification to the returned Set MUST not affect the object
    • getQuerableKeys

      SortedSet<String> getQuerableKeys() throws Exception
      Returns:
      Querable Keys as SortedSet
      Throws:
      Exception
    • getRecordType

      String getRecordType()
      Return the Record Type
      Returns:
      Record Type
    • getId

      String getId()
      Return the unique id for this Record
      Returns:
      Record Unique ID
    • setId

      void setId(String id) throws InvalidValueException
      The ID SHOULD be automatically created by the implementation Class. Set the ID only if you really know what you are going to do. Set the unique id for this Record
      Parameters:
      id - Unique ID
      Throws:
      InvalidValueException
    • getCreationTime

      Calendar getCreationTime()
      Return the instant when this Record was created.
      Returns:
      the creation time for this Record
    • setCreationTime

      void setCreationTime(Calendar creationTime) throws InvalidValueException
      The CreationTime is automatically created by the implementation Class. Set the CreationTime only if you really know what you are going to do. Set the instant when this Record was created.
      Parameters:
      creationTime - Creation Time
      Throws:
      InvalidValueException
    • getResourceProperties

      Map<String,Serializable> getResourceProperties()
      Return all resource-specific properties. The returned Map is a copy of the internal representation. Any modification to the returned Map MUST not affect the object
      Returns:
      a Map containing the properties
    • setResourceProperties

      void setResourceProperties(Map<String,? extends Serializable> resourceSpecificProperties) throws InvalidValueException
      Set all resource-specific properties, replacing existing ones
      Throws:
      InvalidValueException
    • getResourceProperty

      Serializable getResourceProperty(String key)
      Return the value of the given resource property.
      Parameters:
      key - the key of the requested property
      Returns:
      the value of the given resource property
    • setResourceProperty

      void setResourceProperty(String key, Serializable value) throws InvalidValueException
      Set the value of the given resource property. If the key has the value of one of the predefined property, the value is validated.
      Parameters:
      key - the key of the requested property
      value - the value of the given resource property
      Throws:
      InvalidValueException
    • removeResourceProperty

      void removeResourceProperty(String key)
      Remove a property from Record. This API is intended for intern use only.
      Parameters:
      key - the key of the requested property to remove
    • validate

      void validate() throws InvalidValueException
      Validate the Resource Record. The validation check if all the Required Field are set and has valid value.
      Throws:
      InvalidValueException