Class Filters


  • public class Filters
    extends java.lang.Object
    Utility class for working with FilterTypes.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static org.openmuc.jeebus.spine.xsd.v1.FilterType getDeleteFilter​(org.openmuc.jeebus.spine.xsd.v1.CmdType cmd)
      Get the Delete Filter of a given command.
      static <ELEMENTS> ELEMENTS getElementsObject​(org.openmuc.jeebus.spine.xsd.v1.FilterType filter, java.lang.Class<ELEMENTS> elementsType)
      Finds the elements object of the given type for a given FilterType.
      static org.openmuc.jeebus.spine.xsd.v1.FilterType getPartialWriteFilter​(org.openmuc.jeebus.spine.xsd.v1.CmdType cmd)
      Get the Partial Write Filter of a given command.
      static <SELECTOR> java.util.List<SELECTOR> getSelectors​(org.openmuc.jeebus.spine.xsd.v1.FilterType filter, java.lang.Class<SELECTOR> selectorType)
      Finds the selectors list of the given type for a given selector type.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getDeleteFilter

        public static org.openmuc.jeebus.spine.xsd.v1.FilterType getDeleteFilter​(org.openmuc.jeebus.spine.xsd.v1.CmdType cmd)
                                                                          throws SpineException
        Get the Delete Filter of a given command. Throws Spine Exception if there is more than one Delete Filter.
        Parameters:
        cmd - given command
        Returns:
        the Partial Filter
        Throws:
        SpineException
      • getPartialWriteFilter

        public static org.openmuc.jeebus.spine.xsd.v1.FilterType getPartialWriteFilter​(org.openmuc.jeebus.spine.xsd.v1.CmdType cmd)
                                                                                throws SpineException
        Get the Partial Write Filter of a given command. Throws Spine Exception if there is more than one Partial Filter.
        Parameters:
        cmd - given command
        Returns:
        the Partial Filter
        Throws:
        SpineException - if there is more than one filter
      • getSelectors

        public static <SELECTOR> java.util.List<SELECTOR> getSelectors​(org.openmuc.jeebus.spine.xsd.v1.FilterType filter,
                                                                       java.lang.Class<SELECTOR> selectorType)
        Finds the selectors list of the given type for a given selector type.
        Type Parameters:
        SELECTOR - the type of selector to look for
        Parameters:
        filter - filter to get the selectors from
        selectorType - class object for Filters
        Returns:
        the list of selectors of the given type
      • getElementsObject

        public static <ELEMENTS> ELEMENTS getElementsObject​(org.openmuc.jeebus.spine.xsd.v1.FilterType filter,
                                                            java.lang.Class<ELEMENTS> elementsType)
        Finds the elements object of the given type for a given FilterType. Can be null.
        Type Parameters:
        ELEMENTS - the type of elements to look for
        Parameters:
        filter - the filter to search in
        elementsType - class object for Filters
        Returns:
        the elements object of the given type, can be null