Interface RepositoryModelItemType

    • Method Detail

      • isCompatible

        default boolean isCompatible​(RepositoryData parentData,
                                     String name)
                              throws UnknownDataException
        Checks if the value in the given repository data is compatible with the item type
        Parameters:
        parentData - repository data containing the data to check
        name - the name of the data to check
        Returns:
        true if the data type matches the current type, false otherwise
        Throws:
        UnknownDataException - if there is no data in the parent repository data with this name
      • getRepositoryDataType

        String getRepositoryDataType()
        Retrieves the type of repository data used for this type
        Returns:
        the type of repository data used for this type
      • isMultiple

        default boolean isMultiple​(RepositoryData parentData,
                                   String name)
                            throws UnknownDataException
        Checks if the value in the given repository data is multiple
        Parameters:
        parentData - repository data containing the data to check
        name - the name of the data to check
        Returns:
        true if the stored data is multiple, false otherwise
        Throws:
        UnknownDataException - if there is no data in the parent repository data with this name
      • hasValue

        default boolean hasValue​(RepositoryData parentData,
                                 String name)
                          throws BadItemTypeException
        Check if there is a value, even empty, in the given repository data
        Parameters:
        parentData - repository data containing the value
        name - the name of the element to check
        Returns:
        true if there is value, false otherwise
        Throws:
        BadItemTypeException - if the reading value doesn't match this element type
      • hasNonEmptyValue

        boolean hasNonEmptyValue​(RepositoryData parentData,
                                 String name)
                          throws BadItemTypeException
        Check if there is a non empty value in the given repository data
        Parameters:
        parentData - repository data containing the value
        name - the name of the element to check
        Returns:
        true if there is a non empty value, false otherwise
        Throws:
        BadItemTypeException - if the reading value doesn't match this element type