Class DataIdDescription<DATA>


  • public class DataIdDescription<DATA>
    extends java.lang.Object
    • Constructor Detail

      • DataIdDescription

        public DataIdDescription​(java.lang.Class<DATA> dataType,
                                 java.util.List<java.lang.String> idNames)
        Defines the names of the attributes that uniquely identify data objects from a Feature Function data list (SPINE protocol spec 5.3.4.6) and stores the PropertyDescriptors for each attribute.
        Parameters:
        dataType - type of the data
        idNames - list of mandatory primary and sub ids
      • DataIdDescription

        public DataIdDescription​(java.lang.Class<DATA> dataType,
                                 java.util.List<java.lang.String> idNames,
                                 java.util.List<java.lang.String> optionalSubIdNames)
        Defines the names of the attributes that uniquely identify data objects from a Feature Function data list (SPINE protocol spec 5.3.4.6) and optional sub identifiers that may be used to sub identify a FeatureFunction and stores the PropertyDescriptors for each attribute. TODO add Foreign Identifier
        Parameters:
        dataType - type of the data
        idNames - list of mandatory primary and sub ids
        optionalSubIdNames - list of sub ids that are optional
    • Method Detail

      • getIdAttributePropertyDescriptors

        public java.util.List<java.beans.PropertyDescriptor> getIdAttributePropertyDescriptors()
      • getOptionalSubIdAttributePropertyDescriptors

        public java.util.List<java.beans.PropertyDescriptor> getOptionalSubIdAttributePropertyDescriptors()
      • getAllIdPropertyDescriptors

        public java.util.List<java.beans.PropertyDescriptor> getAllIdPropertyDescriptors()
      • getDataType

        public java.lang.Class<DATA> getDataType()
      • getNoneIdentifiableDataDescription

        public static <D> DataIdDescription<D> getNoneIdentifiableDataDescription​(java.lang.Class<D> dataType)
      • dataMatchesForIdDescription

        public boolean dataMatchesForIdDescription​(DATA writable,
                                                   DATA update)
        Checks if the ids of writable match the ids of update. This also returns true in any case if all ids of update are null.
        Parameters:
        writable - the writable
        update - the update for the writable
        Returns:
        if the ids of writable match or all ids of update or ids of update are all null