mil.dod.th.ose.integration/src/mil/dod/th/ose/controller/integration/ObservationHelper.java
public static Observation createCompleteImageObservation()
    {
        PixelResolution resolution = new PixelResolution(200, 300);
        
        List<PixelRegion> samplesOfInterest = new ArrayList<PixelRegion>();
        samplesOfInterest.add(new PixelRegion(new PixelCircle(new PixelPosition(1, 2), 20), null, 
                new Direction(DirectionEnum.FN, "test")));
        samplesOfInterest.add(new PixelRegion(null, 
                new PixelRectangle(new PixelPosition(3, 5), new PixelPosition(8, 9)), 
                new Direction(DirectionEnum.LR_NF, "b")));
          
        List<DigitalMedia> maskSamplesOfInterest = new ArrayList<>();
        maskSamplesOfInterest.add(createCompleteDigitalMedia());
        maskSamplesOfInterest.add(createCompleteDigitalMedia());
        maskSamplesOfInterest.add(createCompleteDigitalMedia());

        Camera camera = new Camera(3, "test", CameraTypeEnum.VISIBLE);
        ExposureSettings exposureSettings = new ExposureSettings(ExposureModeEnum.APERTURE_PRIORITY, 3, 0.5, 1);
        CameraScene motionDetectionWindow = new CameraScene(1.0f, 0.5f, 2.3f, 2.9f);
        ImageCaptureReason imageCaptureReason = new ImageCaptureReason(ImageCaptureReasonEnum.MANUAL, "something");
        Compression compressionRatio = new Compression(2, null);
        ImageGeoBoundingBox imageGeographicRegion = new ImageGeoBoundingBox(createCoordinateObject(), 
                createCoordinateObject(), createCoordinateObject(), createCoordinateObject());
        Long captureTime = 20L;
        PictureTypeEnum pictureType = PictureTypeEnum.AREA_OF_INTEREST;
        Float focus = 0.5f;
        Float zoom = 1f;
        Boolean color = true;
        Double changedPixels = 0.5;
        WhiteBalanceEnum whiteBalance = WhiteBalanceEnum.AUTO;
        ImageMetadata imageMetaData = new ImageMetadata(resolution, 
                samplesOfInterest, 
                maskSamplesOfInterest, 
                camera, 
                exposureSettings, 
                motionDetectionWindow, 
                imageCaptureReason, 
                compressionRatio, 
                imageGeographicRegion,
                captureTime, 
                pictureType, 
                focus, 
                zoom, 
                color, 
                changedPixels, 
                whiteBalance);
        
        return ObservationHelper.createBaseObservation()
                   .withUuid(UUID.fromString("326da040-85bb-11e2-9e96-0800200c9a68"))
                   .withImageMetadata(imageMetaData)
                   .withDigitalMedia(ObservationHelper.createCompleteDigitalMedia());
    }
/**
     * This will create a complete observation for an image.  The {@link ImageMetadata} and {@link DigitalMedia} object
     * will have all fields filled out as much as possible.  This can be used to compare with something pull from the 
     * database to prove that it is actually persisted.  Fields will always contain the same info so this method if 
     * called multiple times will create a different object, but will be equal to the previous one.
     * @return 
     *      Observation of a complete image
     */
This will create a complete observation for an image.  The  ImageMetadata and  DigitalMedia object
will have all fields filled out as much as possible.  This can be used to compare with something pull from the
database to prove that it is actually persisted.  Fields will always contain the same info so this method if
called multiple times will create a different object, but will be equal to the previous one.
@return
Observation of a complete image
This will create a complete observation for an image . The ImageMetadata and DigitalMedia object will have all fields filled out as much as possible . This can be used to compare with something pull from the database to prove that it is actually persisted . Fields will always contain the same info so this method if called multiple times will create a different object but will be equal to the previous one . @return Observation of a complete image
public static Observation createCompleteImageObservation()
    {
        PixelResolution resolution = new PixelResolution(200, 300);
        List<PixelRegion> samplesOfInterest = new ArrayList<PixelRegion>();
        samplesOfInterest.add(new PixelRegion(new PixelCircle(new PixelPosition(1, 2), 20), null, 
                new Direction(DirectionEnum.FN, "test")));
        samplesOfInterest.add(new PixelRegion(null, 
                new PixelRectangle(new PixelPosition(3, 5), new PixelPosition(8, 9)), 
                new Direction(DirectionEnum.LR_NF, "b")));
        List<DigitalMedia> maskSamplesOfInterest = new ArrayList<>();
        maskSamplesOfInterest.add(createCompleteDigitalMedia());
        maskSamplesOfInterest.add(createCompleteDigitalMedia());
        maskSamplesOfInterest.add(createCompleteDigitalMedia());
        Camera camera = new Camera(3, "test", CameraTypeEnum.VISIBLE);
        ExposureSettings exposureSettings = new ExposureSettings(ExposureModeEnum.APERTURE_PRIORITY, 3, 0.5, 1);
        CameraScene motionDetectionWindow = new CameraScene(1.0f, 0.5f, 2.3f, 2.9f);
        ImageCaptureReason imageCaptureReason = new ImageCaptureReason(ImageCaptureReasonEnum.MANUAL, "something");
        Compression compressionRatio = new Compression(2, null);
        ImageGeoBoundingBox imageGeographicRegion = new ImageGeoBoundingBox(createCoordinateObject(), 
                createCoordinateObject(), createCoordinateObject(), createCoordinateObject());
        Long captureTime = 20L;
        PictureTypeEnum pictureType = PictureTypeEnum.AREA_OF_INTEREST;
        Float focus = 0.5f;
        Float zoom = 1f;
        Boolean color = true;
        Double changedPixels = 0.5;
        WhiteBalanceEnum whiteBalance = WhiteBalanceEnum.AUTO;
        ImageMetadata imageMetaData = new ImageMetadata(resolution, 
                samplesOfInterest, 
                maskSamplesOfInterest, 
                camera, 
                exposureSettings, 
                motionDetectionWindow, 
                imageCaptureReason, 
                compressionRatio, 
                imageGeographicRegion,
                captureTime, 
                pictureType, 
                focus, 
                zoom, 
                color, 
                changedPixels, 
                whiteBalance);
        return ObservationHelper.createBaseObservation()
                   .withUuid(UUID.fromString("326da040-85bb-11e2-9e96-0800200c9a68"))
                   .withImageMetadata(imageMetaData)
                   .withDigitalMedia(ObservationHelper.createCompleteDigitalMedia());
    }
public static Observation createCompleteImageObservation ( ) { PixelResolution resolution = new PixelResolution ( 200 , 300 ) ; List < PixelRegion > samplesOfInterest = new ArrayList < PixelRegion > ( ) ; samplesOfInterest . add ( new PixelRegion ( new PixelCircle ( new PixelPosition ( 1 , 2 ) , 20 ) , null , new Direction ( DirectionEnum . FN , "test" ) ) ) ; samplesOfInterest . add ( new PixelRegion ( null , new PixelRectangle ( new PixelPosition ( 3 , 5 ) , new PixelPosition ( 8 , 9 ) ) , new Direction ( DirectionEnum . LR_NF , "b" ) ) ) ; List < DigitalMedia > maskSamplesOfInterest = new ArrayList < > ( ) ; maskSamplesOfInterest . add ( createCompleteDigitalMedia ( ) ) ; maskSamplesOfInterest . add ( createCompleteDigitalMedia ( ) ) ; maskSamplesOfInterest . add ( createCompleteDigitalMedia ( ) ) ; Camera camera = new Camera ( 3 , "test" , CameraTypeEnum . VISIBLE ) ; ExposureSettings exposureSettings = new ExposureSettings ( ExposureModeEnum . APERTURE_PRIORITY , 3 , 0.5 , 1 ) ; CameraScene motionDetectionWindow = new CameraScene ( 1.0f , 0.5f , 2.3f , 2.9f ) ; ImageCaptureReason imageCaptureReason = new ImageCaptureReason ( ImageCaptureReasonEnum . MANUAL , "something" ) ; Compression compressionRatio = new Compression ( 2 , null ) ; ImageGeoBoundingBox imageGeographicRegion = new ImageGeoBoundingBox ( createCoordinateObject ( ) , createCoordinateObject ( ) , createCoordinateObject ( ) , createCoordinateObject ( ) ) ; Long captureTime = 20L ; PictureTypeEnum pictureType = PictureTypeEnum . AREA_OF_INTEREST ; Float focus = 0.5f ; Float zoom = 1f ; Boolean color = true ; Double changedPixels = 0.5 ; WhiteBalanceEnum whiteBalance = WhiteBalanceEnum . AUTO ; ImageMetadata imageMetaData = new ImageMetadata ( resolution , samplesOfInterest , maskSamplesOfInterest , camera , exposureSettings , motionDetectionWindow , imageCaptureReason , compressionRatio , imageGeographicRegion , captureTime , pictureType , focus , zoom , color , changedPixels , whiteBalance ) ; return ObservationHelper . createBaseObservation ( ) . withUuid ( UUID . fromString ( "326da040-85bb-11e2-9e96-0800200c9a68" ) ) . withImageMetadata ( imageMetaData ) . withDigitalMedia ( ObservationHelper . createCompleteDigitalMedia ( ) ) ; }
This will create a complete observation for an image.
This will create a complete observation for an image .