Class DetectorWrapper


  • public class DetectorWrapper
    extends java.lang.Object
    The wrapper that manages database detectors
    • Constructor Detail

      • DetectorWrapper

        public DetectorWrapper()
        Empty initialiser
      • DetectorWrapper

        public DetectorWrapper​(TDetector tDetector,
                               boolean isOwner)
        Initialise the wrapper with a template that has already been loaded
        Parameters:
        tDetector - the detector to manage
        isOwner - whether the account owns the detector
      • DetectorWrapper

        public DetectorWrapper​(long id,
                               Account account,
                               TDetectorRepository tDetectorRepository)
                        throws DetectorNotFound
        Initialise the wrapper by trying to find a detector that is either owned by the account or is public
        Parameters:
        id - the template id to find
        account - the account of the current user
        tDetectorRepository - the detector database repository
        Throws:
        DetectorNotFound - if the detector wasn't found
    • Method Detail

      • isOwner

        public boolean isOwner()
        Whether or not the template is owned by the current user
        Returns:
        the result
      • getDetector

        public TDetector getDetector()
        Get the detector
        Returns:
        the detector
      • setDetector

        public void setDetector​(TDetector tDetector)
        Set the detector
        Parameters:
        tDetector - the new detector
      • getEngineParameters

        public java.util.List<AdjustableParameterObj> getEngineParameters()
                                                                   throws DetectorNotFound
        Get the list of adjustable parameters for this detector
        Returns:
        the list of adjustable parameters
        Throws:
        DetectorNotFound - if the detector no longer exists
      • getEnginePostProcessingParameters

        public java.util.List<AdjustableParameterObj> getEnginePostProcessingParameters()
                                                                                 throws DetectorNotFound
        Get the list of adjustable postprocessing parameters for this detector
        Returns:
        the list of adjustable postprocessing parameters
        Throws:
        DetectorNotFound - if the detector no longer exists
      • getEngineParametersMap

        public java.util.Map<java.lang.String,​AdjustableParameterObj> getEngineParametersMap()
                                                                                            throws DetectorNotFound
        Get the adjustable parameters for this detector as a map
        Returns:
        the map of adjustable parameters
        Throws:
        DetectorNotFound - if the detector no longer exists
      • getId

        public long getId()
        Get the id of the detector
        Returns:
        the id
      • getEngineDetector

        public java.lang.Class<? extends IDetector> getEngineDetector()
                                                               throws DetectorNotFound
        Get the engine object for this detector
        Returns:
        the IDetector
        Throws:
        DetectorNotFound - if the engine detector no longer exists