Interface Information<T>

  • Type Parameters:
    T - the type of the return value

    public interface Information<T>
    Implement this interface to have your own custom information takeoff (ITO) algorithm.
    Since:
    9.10.6
    • Method Detail

      • getUniqueId

        String getUniqueId()
        The unique ID of the ITO.
        Returns:
        the ID of the ITO
        Since:
        9.10.6
      • getName

        default String getName()
        The internationalized name of the ITO. The default implementation returns value based on properties files value with key "NAME". Returns the ID of the ITO if no property is found.
        Returns:
        the name of the view
        Since:
        9.10.6
      • getInformation

        Optional<T> getInformation​(Component component)
        Calculates the information for given component. The implementation is allowed to cache values, but it also needs to be thread-safe.
        Parameters:
        component - the component
        Returns:
        the information
      • getInformationAsString

        default String getInformationAsString​(Component component)
        Show the information as a String. The default implementation just calls String.valueOf with the return value of getInformation(com.solibri.smc.api.model.Component) as the parameter. You can implement translations in this method if needed.
        Parameters:
        component - the component
        Returns:
        the information as a string
      • getType

        default PropertyType getType()
        Returns the output type of this piece of information. The default implementation returns PropertyType.STRING and the developer needs to override this method if they for example want to return numeric values. For example for area calculations this would return PropertyType.AREA.
        Returns:
        the type