Class PdcFieldPositionsManager


  • public class PdcFieldPositionsManager
    extends Object
    Manages the positions of a PDC field.
    Author:
    ahedin
    • Constructor Detail

      • PdcFieldPositionsManager

        protected PdcFieldPositionsManager()
        Constructor
    • Method Detail

      • isEnabled

        public boolean isEnabled()
      • getFieldName

        public String getFieldName()
      • init

        public void init​(String fieldName,
                         String pattern,
                         String axis)
        Initializes and enables the manager.
        Parameters:
        fieldName - The field name.
        pattern - The description of positions, following the pattern : axisId1_1,valueId1_1;axisId1_2,valueId1_2.axisId2_1,valueId2_1... where axisIdi_j and valueIdi_j correspond to the value #j of the position #i.
        axis -
      • reset

        public void reset()
        Resets and disables the manager.
      • addPosition

        public void addPosition​(ClassifyPosition position)
        Add the position to the positions list.
        Parameters:
        position - The new position to add.
      • updatePosition

        public int updatePosition​(ClassifyPosition position)
        Update the position.
        Parameters:
        position - The position to update.
        Returns:
        the status of the update.
      • deletePosition

        public void deletePosition​(int positionId)
        Deletes the position which id corresponds to the one given as parameter.
        Parameters:
        positionId - The id of the position to delete.
      • getPositionsToString

        public String getPositionsToString()
        Returns:
        A pattern describing the positions : axisId1_1,valueId1_1;axisId1_2,valueId1_2.axisId2_1,valueId2_1... where axisIdi_j and valueIdi_j correspond to the value #j of the position #i.