mil.dod.th.ose.gui.integration/src/mil/dod/th/ose/gui/integration/webapp/observation/TestRelatedObservations.java
private List<ExpectedObservation> createRelatedObservations()
    {
        ExpectedObservation mainObs = new ExpectedObservation(ASSET_NAME, null,
                OperationMode.TEST_MODE, true);
        
        mainObs.withObservationData("mil.dod.th.core.types.spatial.Coordinates" , 
                "longitude", "latitude", "value", "dnDetachedState")
                .withSensingModalities(SensingModalityEnum.ACOUSTIC)
                .withSensorId("12345");
        
        RelatedObservation relations = new RelatedObservation();
        
        //parent
        ExpectedObservation weather = new ExpectedObservation(ASSET_NAME, ObservationSubTypeEnum.WEATHER, 
                OperationMode.TEST_MODE, false);
        weather.withObservationData("mil.dod.th.core.observation.types.Weather", 
                "temperature", "pressure", "visibility", "weatherCondition", "dnDetachedState")
                .withSensorId("12352");
        RelatedObservation weRelation = new RelatedObservation();
        weather.withRelatedObservation(weRelation.withChildren(new RelatedObsStruct(mainObs, "")));
        
        //children
        ExpectedObservation status = new ExpectedObservation(ASSET_NAME, ObservationSubTypeEnum.STATUS, 
                OperationMode.TEST_MODE, false);
        status.withObservationData("mil.dod.th.core.observation.types.Status", "summaryStatus",
                "batteryChargeLevel", "componentStatuses", "sensorRange", "powerConsumption", "dnDetachedState")
                .withSensorId("12346");
        RelatedObservation sRelation = new RelatedObservation();
        status.withRelatedObservation(sRelation.withParents(new RelatedObsStruct(mainObs, "")));
        
        ExpectedObservation audio = new ExpectedObservation(ASSET_NAME, ObservationSubTypeEnum.AUDIO_METADATA, 
                OperationMode.TEST_MODE, false);
        audio.withObservationData("mil.dod.th.core.observation.types.AudioMetadata", 
                "sampleOfInterest", "recorder", "value", "description", "dnDetachedState")
                .withMimeType("Mime Type: audio/mp3")
                .withSensorId("12347");
        RelatedObservation aRelation = new RelatedObservation();
        audio.withRelatedObservation(aRelation.withParents(new RelatedObsStruct(mainObs, "")));
        
        ExpectedObservation image = new ExpectedObservation(ASSET_NAME, ObservationSubTypeEnum.IMAGE_METADATA, 
                OperationMode.TEST_MODE, false);
        image.withObservationData("mil.dod.th.core.observation.types.ImageMetadata", 
                "resolution", "samplesOfInterest", "imager", "imageCaptureReason", "dnDetachedState")
                .withMimeType("Mime Type: image/jpeg")
                .withSensorId("12348");
        RelatedObservation iRelation = new RelatedObservation();
        image.withRelatedObservation(iRelation.withParents(new RelatedObsStruct(mainObs, "")));
        
        ExpectedObservation video = new ExpectedObservation(ASSET_NAME, ObservationSubTypeEnum.VIDEO_METADATA, 
                OperationMode.TEST_MODE, false);
        video.withObservationData("mil.dod.th.core.observation.types.VideoMetadata", 
                "recorder", "framesPerSecond", "startTime", "endTime", "dnDetachedState")
                .withMimeType("Mime Type: video/wav")
                .withSensorId("12349");
        RelatedObservation vRelation = new RelatedObservation();
        video.withRelatedObservation(vRelation.withParents(new RelatedObsStruct(mainObs, "")));
        
        ExpectedObservation detection = new ExpectedObservation(ASSET_NAME, ObservationSubTypeEnum.DETECTION, 
                OperationMode.TEST_MODE, false);
        detection.withObservationData()
                .withSensingModalities(SensingModalityEnum.ACOUSTIC)
                .withSensorId("12350");
        RelatedObservation dRelation = new RelatedObservation();
        detection.withRelatedObservation(dRelation.withParents(new RelatedObsStruct(mainObs, "")));
        
        ExpectedObservation orientation = new ExpectedObservation(ASSET_NAME, null, 
                OperationMode.TEST_MODE, false);
        
        GeneralObservationInformation info12351 = new GeneralObservationInformation();
        info12351.setHasAssetLocation(true);
        info12351.setHasAssetOrientation(true);
        info12351.setHasPlatformOrientation(true);
        info12351.setHasPointingLocation(true);
        
        orientation.withObservationData("mil.dod.th.core.types.spatial.Orientation", 
                "heading", "value", "elevation", "bank", "dnDetachedState")
                .withSensorId("12351").withGeneralInformation(info12351);
        
        RelatedObservation oRelation = new RelatedObservation();
        orientation.withRelatedObservation(oRelation.withParents(new RelatedObsStruct(mainObs, "")));
        
        //peers
        ExpectedObservation coordinates = new ExpectedObservation(ASSET_NAME, null, 
                OperationMode.TEST_MODE, false);
        
        GeneralObservationInformation info12353 = new GeneralObservationInformation();
        info12353.setHasAssetLocation(true);
        info12353.setHasAssetOrientation(true);
        info12353.setHasPlatformOrientation(true);
        info12353.setHasPointingLocation(true);
        
        coordinates.withObservationData("mil.dod.th.core.types.spatial.Coordinates" , 
                "longitude", "latitude", "value", "dnDetachedState")
                .withSensorId("12353").withGeneralInformation(info12353);
        
        RelatedObservation cRelation = new RelatedObservation();
        orientation.withRelatedObservation(cRelation.withParents(new RelatedObsStruct(mainObs, "")));
        
        relations.withParents(new RelatedObsStruct(weather, "parent uuid"));
        relations.withChildren(new RelatedObsStruct(status, ""),
                new RelatedObsStruct(audio, "child uuid"), new RelatedObsStruct(image, "sub image"),
                new RelatedObsStruct(video, "child uuid"), new RelatedObsStruct(detection, "child uuid"),
                new RelatedObsStruct(orientation, "child uuid"));
        
        relations.withPeers(new RelatedObsStruct(coordinates, "peer uuid"),
                new RelatedObsStruct(null, "sub image"), new RelatedObsStruct(null, ""));
        
        mainObs.withRelatedObservation(relations);
        
        return new ArrayList<ExpectedObservation>(Arrays.asList(
                mainObs, weather, status, audio, video, 
                image, detection, orientation, coordinates));
    }
/**
     * Make related observation.
     * 
     * @return
     *  the main observation in question that holds the observation with related observations
     */
Make related observation.

@return
the main observation in question that holds the observation with related observations
Make related observation . @return the main observation in question that holds the observation with related observations
private List<ExpectedObservation> createRelatedObservations()
    {
        ExpectedObservation mainObs = new ExpectedObservation(ASSET_NAME, null,
                OperationMode.TEST_MODE, true);
        mainObs.withObservationData("mil.dod.th.core.types.spatial.Coordinates" , 
                "longitude", "latitude", "value", "dnDetachedState")
                .withSensingModalities(SensingModalityEnum.ACOUSTIC)
                .withSensorId("12345");
        RelatedObservation relations = new RelatedObservation();
        ExpectedObservation weather = new ExpectedObservation(ASSET_NAME, ObservationSubTypeEnum.WEATHER, 
                OperationMode.TEST_MODE, false);
        weather.withObservationData("mil.dod.th.core.observation.types.Weather", 
                "temperature", "pressure", "visibility", "weatherCondition", "dnDetachedState")
                .withSensorId("12352");
        RelatedObservation weRelation = new RelatedObservation();
        weather.withRelatedObservation(weRelation.withChildren(new RelatedObsStruct(mainObs, "")));
        ExpectedObservation status = new ExpectedObservation(ASSET_NAME, ObservationSubTypeEnum.STATUS, 
                OperationMode.TEST_MODE, false);
        status.withObservationData("mil.dod.th.core.observation.types.Status", "summaryStatus",
                "batteryChargeLevel", "componentStatuses", "sensorRange", "powerConsumption", "dnDetachedState")
                .withSensorId("12346");
        RelatedObservation sRelation = new RelatedObservation();
        status.withRelatedObservation(sRelation.withParents(new RelatedObsStruct(mainObs, "")));
        ExpectedObservation audio = new ExpectedObservation(ASSET_NAME, ObservationSubTypeEnum.AUDIO_METADATA, 
                OperationMode.TEST_MODE, false);
        audio.withObservationData("mil.dod.th.core.observation.types.AudioMetadata", 
                "sampleOfInterest", "recorder", "value", "description", "dnDetachedState")
                .withMimeType("Mime Type: audio/mp3")
                .withSensorId("12347");
        RelatedObservation aRelation = new RelatedObservation();
        audio.withRelatedObservation(aRelation.withParents(new RelatedObsStruct(mainObs, "")));
        ExpectedObservation image = new ExpectedObservation(ASSET_NAME, ObservationSubTypeEnum.IMAGE_METADATA, 
                OperationMode.TEST_MODE, false);
        image.withObservationData("mil.dod.th.core.observation.types.ImageMetadata", 
                "resolution", "samplesOfInterest", "imager", "imageCaptureReason", "dnDetachedState")
                .withMimeType("Mime Type: image/jpeg")
                .withSensorId("12348");
        RelatedObservation iRelation = new RelatedObservation();
        image.withRelatedObservation(iRelation.withParents(new RelatedObsStruct(mainObs, "")));
        ExpectedObservation video = new ExpectedObservation(ASSET_NAME, ObservationSubTypeEnum.VIDEO_METADATA, 
                OperationMode.TEST_MODE, false);
        video.withObservationData("mil.dod.th.core.observation.types.VideoMetadata", 
                "recorder", "framesPerSecond", "startTime", "endTime", "dnDetachedState")
                .withMimeType("Mime Type: video/wav")
                .withSensorId("12349");
        RelatedObservation vRelation = new RelatedObservation();
        video.withRelatedObservation(vRelation.withParents(new RelatedObsStruct(mainObs, "")));
        ExpectedObservation detection = new ExpectedObservation(ASSET_NAME, ObservationSubTypeEnum.DETECTION, 
                OperationMode.TEST_MODE, false);
        detection.withObservationData()
                .withSensingModalities(SensingModalityEnum.ACOUSTIC)
                .withSensorId("12350");
        RelatedObservation dRelation = new RelatedObservation();
        detection.withRelatedObservation(dRelation.withParents(new RelatedObsStruct(mainObs, "")));
        ExpectedObservation orientation = new ExpectedObservation(ASSET_NAME, null, 
                OperationMode.TEST_MODE, false);
        GeneralObservationInformation info12351 = new GeneralObservationInformation();
        info12351.setHasAssetLocation(true);
        info12351.setHasAssetOrientation(true);
        info12351.setHasPlatformOrientation(true);
        info12351.setHasPointingLocation(true);
        orientation.withObservationData("mil.dod.th.core.types.spatial.Orientation", 
                "heading", "value", "elevation", "bank", "dnDetachedState")
                .withSensorId("12351").withGeneralInformation(info12351);
        RelatedObservation oRelation = new RelatedObservation();
        orientation.withRelatedObservation(oRelation.withParents(new RelatedObsStruct(mainObs, "")));
        ExpectedObservation coordinates = new ExpectedObservation(ASSET_NAME, null, 
                OperationMode.TEST_MODE, false);
        GeneralObservationInformation info12353 = new GeneralObservationInformation();
        info12353.setHasAssetLocation(true);
        info12353.setHasAssetOrientation(true);
        info12353.setHasPlatformOrientation(true);
        info12353.setHasPointingLocation(true);
        coordinates.withObservationData("mil.dod.th.core.types.spatial.Coordinates" , 
                "longitude", "latitude", "value", "dnDetachedState")
                .withSensorId("12353").withGeneralInformation(info12353);
        RelatedObservation cRelation = new RelatedObservation();
        orientation.withRelatedObservation(cRelation.withParents(new RelatedObsStruct(mainObs, "")));
        relations.withParents(new RelatedObsStruct(weather, "parent uuid"));
        relations.withChildren(new RelatedObsStruct(status, ""),
                new RelatedObsStruct(audio, "child uuid"), new RelatedObsStruct(image, "sub image"),
                new RelatedObsStruct(video, "child uuid"), new RelatedObsStruct(detection, "child uuid"),
                new RelatedObsStruct(orientation, "child uuid"));
        relations.withPeers(new RelatedObsStruct(coordinates, "peer uuid"),
                new RelatedObsStruct(null, "sub image"), new RelatedObsStruct(null, ""));
        mainObs.withRelatedObservation(relations);
        return new ArrayList<ExpectedObservation>(Arrays.asList(
                mainObs, weather, status, audio, video, 
                image, detection, orientation, coordinates));
    }
private List < ExpectedObservation > createRelatedObservations ( ) { ExpectedObservation mainObs = new ExpectedObservation ( ASSET_NAME , null , OperationMode . TEST_MODE , true ) ; mainObs . withObservationData ( "mil.dod.th.core.types.spatial.Coordinates" , "longitude" , "latitude" , "value" , "dnDetachedState" ) . withSensingModalities ( SensingModalityEnum . ACOUSTIC ) . withSensorId ( "12345" ) ; RelatedObservation relations = new RelatedObservation ( ) ; ExpectedObservation weather = new ExpectedObservation ( ASSET_NAME , ObservationSubTypeEnum . WEATHER , OperationMode . TEST_MODE , false ) ; weather . withObservationData ( "mil.dod.th.core.observation.types.Weather" , "temperature" , "pressure" , "visibility" , "weatherCondition" , "dnDetachedState" ) . withSensorId ( "12352" ) ; RelatedObservation weRelation = new RelatedObservation ( ) ; weather . withRelatedObservation ( weRelation . withChildren ( new RelatedObsStruct ( mainObs , "" ) ) ) ; ExpectedObservation status = new ExpectedObservation ( ASSET_NAME , ObservationSubTypeEnum . STATUS , OperationMode . TEST_MODE , false ) ; status . withObservationData ( "mil.dod.th.core.observation.types.Status" , "summaryStatus" , "batteryChargeLevel" , "componentStatuses" , "sensorRange" , "powerConsumption" , "dnDetachedState" ) . withSensorId ( "12346" ) ; RelatedObservation sRelation = new RelatedObservation ( ) ; status . withRelatedObservation ( sRelation . withParents ( new RelatedObsStruct ( mainObs , "" ) ) ) ; ExpectedObservation audio = new ExpectedObservation ( ASSET_NAME , ObservationSubTypeEnum . AUDIO_METADATA , OperationMode . TEST_MODE , false ) ; audio . withObservationData ( "mil.dod.th.core.observation.types.AudioMetadata" , "sampleOfInterest" , "recorder" , "value" , "description" , "dnDetachedState" ) . withMimeType ( "Mime Type: audio/mp3" ) . withSensorId ( "12347" ) ; RelatedObservation aRelation = new RelatedObservation ( ) ; audio . withRelatedObservation ( aRelation . withParents ( new RelatedObsStruct ( mainObs , "" ) ) ) ; ExpectedObservation image = new ExpectedObservation ( ASSET_NAME , ObservationSubTypeEnum . IMAGE_METADATA , OperationMode . TEST_MODE , false ) ; image . withObservationData ( "mil.dod.th.core.observation.types.ImageMetadata" , "resolution" , "samplesOfInterest" , "imager" , "imageCaptureReason" , "dnDetachedState" ) . withMimeType ( "Mime Type: image/jpeg" ) . withSensorId ( "12348" ) ; RelatedObservation iRelation = new RelatedObservation ( ) ; image . withRelatedObservation ( iRelation . withParents ( new RelatedObsStruct ( mainObs , "" ) ) ) ; ExpectedObservation video = new ExpectedObservation ( ASSET_NAME , ObservationSubTypeEnum . VIDEO_METADATA , OperationMode . TEST_MODE , false ) ; video . withObservationData ( "mil.dod.th.core.observation.types.VideoMetadata" , "recorder" , "framesPerSecond" , "startTime" , "endTime" , "dnDetachedState" ) . withMimeType ( "Mime Type: video/wav" ) . withSensorId ( "12349" ) ; RelatedObservation vRelation = new RelatedObservation ( ) ; video . withRelatedObservation ( vRelation . withParents ( new RelatedObsStruct ( mainObs , "" ) ) ) ; ExpectedObservation detection = new ExpectedObservation ( ASSET_NAME , ObservationSubTypeEnum . DETECTION , OperationMode . TEST_MODE , false ) ; detection . withObservationData ( ) . withSensingModalities ( SensingModalityEnum . ACOUSTIC ) . withSensorId ( "12350" ) ; RelatedObservation dRelation = new RelatedObservation ( ) ; detection . withRelatedObservation ( dRelation . withParents ( new RelatedObsStruct ( mainObs , "" ) ) ) ; ExpectedObservation orientation = new ExpectedObservation ( ASSET_NAME , null , OperationMode . TEST_MODE , false ) ; GeneralObservationInformation info12351 = new GeneralObservationInformation ( ) ; info12351 . setHasAssetLocation ( true ) ; info12351 . setHasAssetOrientation ( true ) ; info12351 . setHasPlatformOrientation ( true ) ; info12351 . setHasPointingLocation ( true ) ; orientation . withObservationData ( "mil.dod.th.core.types.spatial.Orientation" , "heading" , "value" , "elevation" , "bank" , "dnDetachedState" ) . withSensorId ( "12351" ) . withGeneralInformation ( info12351 ) ; RelatedObservation oRelation = new RelatedObservation ( ) ; orientation . withRelatedObservation ( oRelation . withParents ( new RelatedObsStruct ( mainObs , "" ) ) ) ; ExpectedObservation coordinates = new ExpectedObservation ( ASSET_NAME , null , OperationMode . TEST_MODE , false ) ; GeneralObservationInformation info12353 = new GeneralObservationInformation ( ) ; info12353 . setHasAssetLocation ( true ) ; info12353 . setHasAssetOrientation ( true ) ; info12353 . setHasPlatformOrientation ( true ) ; info12353 . setHasPointingLocation ( true ) ; coordinates . withObservationData ( "mil.dod.th.core.types.spatial.Coordinates" , "longitude" , "latitude" , "value" , "dnDetachedState" ) . withSensorId ( "12353" ) . withGeneralInformation ( info12353 ) ; RelatedObservation cRelation = new RelatedObservation ( ) ; orientation . withRelatedObservation ( cRelation . withParents ( new RelatedObsStruct ( mainObs , "" ) ) ) ; relations . withParents ( new RelatedObsStruct ( weather , "parent uuid" ) ) ; relations . withChildren ( new RelatedObsStruct ( status , "" ) , new RelatedObsStruct ( audio , "child uuid" ) , new RelatedObsStruct ( image , "sub image" ) , new RelatedObsStruct ( video , "child uuid" ) , new RelatedObsStruct ( detection , "child uuid" ) , new RelatedObsStruct ( orientation , "child uuid" ) ) ; relations . withPeers ( new RelatedObsStruct ( coordinates , "peer uuid" ) , new RelatedObsStruct ( null , "sub image" ) , new RelatedObsStruct ( null , "" ) ) ; mainObs . withRelatedObservation ( relations ) ; return new ArrayList < ExpectedObservation > ( Arrays . asList ( mainObs , weather , status , audio , video , image , detection , orientation , coordinates ) ) ; }
Make related observation.
Make related observation .
//parent //children //peers