Enum FieldsSourceUtil

    • Method Detail

      • values

        public static FieldsSourceUtil[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (FieldsSourceUtil c : FieldsSourceUtil.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static FieldsSourceUtil valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • getFields

        public Collection<Field> getFields​(Object inputElement,
                                           com.google.common.base.Predicate<Field> predicate)
        For inputElement that is a FieldSource returns its fields filtered by predicate. For others returns an empty collection.
        Parameters:
        inputElement - the field source
        predicate - a filter
      • getTypeFields

        public Collection<Field> getTypeFields​(org.eclipse.emf.ecore.EObject eObject)
        Gets field source type fields.
        Parameters:
        context - the field source
        Returns:
        type fields
      • getDefaultTypeField

        public Field getDefaultTypeField​(MdObject characteristicValues,
                                         Field field)
        Returns characteristic description type field default value for selected field types.
        Parameters:
        characteristicValues - the characteristic description characteristic values, can be null
        field - the field, can be null
        Returns:
        the field availaible values, cannot be null
      • getDefaultKeyField

        public Field getDefaultKeyField​(MdObject characteristicTypes)
        Returns characteristic description key field default value.
        Parameters:
        characteristicTypes - the characteristic description characteristic types, can be null
        Returns:
        the field default value or null
      • getDefaultObjectField

        public Field getDefaultObjectField​(MdObject characteristicValues,
                                           MdObject mdObject)
        Returns characteristic description object field default value for selected md-object.
        Parameters:
        characteristicValues - the characteristic description characteristic values, can be null
        mdObject - the md-object, cannot be null
        Returns:
        the field default value or null
      • getValueFields

        public List<Field> getValueFields​(MdObject characteristicValues)
        Returns characteristic description value field availaible values.
        Parameters:
        characteristicValues - the characteristic description characteristic values, can be null
        Returns:
        the field availaible values, cannot be null
      • getTypeFields

        public List<Field> getTypeFields​(MdObject characteristicValues,
                                         Field field)
        Returns characteristic description type field availaible values for selected field types.
        Parameters:
        characteristicValues - the characteristic description characteristic values, can be null
        field - the field, can be null
        Returns:
        the field availaible values, cannot be null
      • getCharacteristicsTypesFields

        public List<Field> getCharacteristicsTypesFields​(Field field,
                                                         List<Field> characteristicFields)
        Returns fields from characteristic fields those type contains catalog or characteristic types ref type from selected field.
        Parameters:
        field - the selected field, cannot be null
        characteristicFields - , the characteristic fields collection, cannot be null
        Returns:
        true if has
      • getObjectFields

        public List<Field> getObjectFields​(MdObject characteristicValues,
                                           MdObject mdObject)
        Returns characteristic description object field availaible values for selected md-object.
        Parameters:
        characteristicValues - the characteristic description characteristic values, can be null
        mdObject - the md-object, cannot be null
        Returns:
        the field availaible values, cannot be null
      • getTypesFilterFields

        public List<Field> getTypesFilterFields​(MdObject characteristicTypes)
        Returns characteristic description types filter field availaible values.
        Parameters:
        characteristicTypes - the characteristic description characteristic types, can be null
        Returns:
        the field availaible values, cannot be null
      • getKeyFields

        public List<Field> getKeyFields​(MdObject characteristicTypes)
        Returns characteristic description key field availaible values.
        Parameters:
        characteristicTypes - the characteristic description characteristic types, can be null
        Returns:
        the field availaible values, cannot be null
      • hasFieldForCharacteristicsTypes

        public boolean hasFieldForCharacteristicsTypes​(Field field,
                                                       List<Field> characteristicFields)
        Checks is characteristic fields has field those type contains catalog or characteristic types ref type from selected field.
        Parameters:
        field - the selected field, cannot be null
        characteristicFields - , the characteristic fields collection, cannot be null
        Returns:
        true if has
      • isCharacteristicKindRefefenceField

        public boolean isCharacteristicKindRefefenceField​(Field field)
        Checks, if field source types contains SourceType.CHARACTERISTIC_KIND and field type contains Catalog, ChartOfCharacteristicTypes, Table reference type.
        Parameters:
        field - the field, cannot be null
        Returns:
        true if is
      • isFieldContainsTypeNameType

        public boolean isFieldContainsTypeNameType​(String typeName,
                                                   Field field)
        Checks, if field availables for md-object.
        Parameters:
        typeName - the type name, cannot be null
        field - the field, cannot be null
        Returns:
        true if contains
      • isFieldContainsMdObjectRefType

        public boolean isFieldContainsMdObjectRefType​(MdObject mdObject,
                                                      Field field)
        Checks, if field availables for md-object.
        Parameters:
        mdObject - the md-object, cannot be null
        field - the field, cannot be null
        Returns:
        true is available