mil.dod.th.ose.integration/src/mil/dod/th/ose/controller/integration/ObservationHelper.java
private static Observation createBaseObservation()
    {
        ArrayList<ObservationRef> relatedObservations = new ArrayList<ObservationRef>();
        relatedObservations.add(new ObservationRef(new Relationship(RelationshipTypeEnum.CHILD, "something"), 
                UUID.fromString("271d30b0-85b7-11e2-9e96-0800200c9a68")));
        relatedObservations.add(new ObservationRef(new Relationship(RelationshipTypeEnum.PARENT, "something-else"), 
                UUID.fromString("3fd8fa30-85b7-11e2-9e96-0800200c9a68")));
        
        // all complex types in xs:choice are not included
        Coordinates assetLocation = new Coordinates().withLatitude(
                new LatitudeWgsDegrees(20.0, 1.0, 1.0, 1.0, 0.0))
                .withLongitude(new LongitudeWgsDegrees(10.0, 1.0, 1.0, 1.0, 0.0))
                .withAltitude(new HaeMeters(60.0, 1.0, 1.0, 1.0, 0.0))
                .withEllipseRegion(new Ellipse(new DistanceMeters(100.0, 1.0, 1.0, 1.0, 1.0),
                        new DistanceMeters(50.0, 1.0, 1.0, 1.0, 1.0),
                        new HeadingDegrees(90.0, 5.0, 1.5, 0.8, 0.8)));
        Orientation assetOrientation = new Orientation().withHeading(new HeadingDegrees(40.0, 1.0, 2.0, 1.0, 0.0))
                .withElevation(new ElevationDegrees(75.0, 1.0, 1.0, 1.0, 0.0))
                .withBank(new BankDegrees(170.0, 1.0, 1.0, 1.0, 0.0));
        Orientation platformOrientation = new Orientation().withHeading(
                new HeadingDegrees(20.0, 1.0, 1.0, 1.0, 0.0))
                .withElevation(new ElevationDegrees(64.0, 1.0, 1.0, 1.0, 0.0))
                .withBank(new BankDegrees(88.0, 1.0, 1.0, 1.0, 0.0));
        Coordinates pointingLocation = new Coordinates().withLatitude(
                new LatitudeWgsDegrees(30.0, 1.0, 1.0, 1.0, 0.0))
                .withLongitude(new LongitudeWgsDegrees(30.0, 1.0, 1.0, 1.0, 0.0))
                .withAltitude(new HaeMeters(45.0, 1.0, 1.0, 1.0, 0.0))
                .withEllipseRegion(new Ellipse(new DistanceMeters(88.0, 1.0, 1.0, 1.0, 0.0),
                        new DistanceMeters(77.0, 1.0, 1.0, 1.0, 0.0),
                        new HeadingDegrees(65.0, 5.0, 1.5, 0.8, 0.8)));
        
        Detection detection = null;
        Status status = null;
        Weather weather = null;
        DigitalMedia digitalMedia = null;
        AudioMetadata audioMetadata = null;
        ImageMetadata imageMetadata = null;
        VideoMetadata videoMetadata = null;
        ChannelMetadata channelMetadata = null;
        WaterQuality waterQuality = null;
        CbrneTrigger cbrneTrigger = null;
        Biological biological = null;
        Chemical chemical = null;
        Power power = null;
        
        List<MapEntry> reserved = new ArrayList<MapEntry>();
        reserved.add(new MapEntry("String", "Bob"));
        reserved.add(new MapEntry("Double", 2.25));
        reserved.add(new MapEntry("Integer", 100));
        reserved.add(new MapEntry("Boolean", true));
        reserved.add(new MapEntry("Long", 12345L));
        UUID uuid = null; // must be set by individual create methods
        Long observedTimestamp = null; // set by assets if applicable
        Long createdTimestamp = 100L;
        UUID assetUuid = UUID.fromString("328da040-85bb-11e2-9e96-8888200c9a75");
        String assetName = "asset-name";
        String assetType = "asset-type";
        String sensorId = "sensor-id";
        boolean systemInTestMode = false;
        Version version = new Version(1,2);
        int systemId = 0123;
        
        List<SensingModality> sensings = new ArrayList<>();
        sensings.add(new SensingModality(SensingModalityEnum.BIOLOGICAL, "bio"));

        return new Observation(version, 
                relatedObservations, 
                assetLocation, 
                assetOrientation,
                platformOrientation,
                pointingLocation, 
                sensings,
                detection, 
                status, 
                weather, 
                waterQuality,
                cbrneTrigger,
                biological,
                chemical,
                power,
                digitalMedia, 
                audioMetadata, 
                imageMetadata, 
                videoMetadata, 
                channelMetadata,
                reserved,
                uuid, 
                observedTimestamp, 
                createdTimestamp, 
                assetUuid, 
                assetName, 
                assetType, 
                sensorId, 
                systemInTestMode, 
                systemId);
    }
/**
     * This will create an observation that has all fields filed out except for the complex types in the main xs:choice,
     * like status, detection, digital media, those that denote the type of observation.  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.  UUID field must be filled out still. 
     * @return 
     *      Base observation object 
     */
This will create an observation that has all fields filed out except for the complex types in the main xs:choice,
like status, detection, digital media, those that denote the type of observation.  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.  UUID field must be filled out still.
@return
Base observation object
This will create an observation that has all fields filed out except for the complex types in the main xs : choice like status detection digital media those that denote the type of observation . 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 . UUID field must be filled out still . @return Base observation object
private static Observation createBaseObservation()
    {
        ArrayList<ObservationRef> relatedObservations = new ArrayList<ObservationRef>();
        relatedObservations.add(new ObservationRef(new Relationship(RelationshipTypeEnum.CHILD, "something"), 
                UUID.fromString("271d30b0-85b7-11e2-9e96-0800200c9a68")));
        relatedObservations.add(new ObservationRef(new Relationship(RelationshipTypeEnum.PARENT, "something-else"), 
                UUID.fromString("3fd8fa30-85b7-11e2-9e96-0800200c9a68")));
        Coordinates assetLocation = new Coordinates().withLatitude(
                new LatitudeWgsDegrees(20.0, 1.0, 1.0, 1.0, 0.0))
                .withLongitude(new LongitudeWgsDegrees(10.0, 1.0, 1.0, 1.0, 0.0))
                .withAltitude(new HaeMeters(60.0, 1.0, 1.0, 1.0, 0.0))
                .withEllipseRegion(new Ellipse(new DistanceMeters(100.0, 1.0, 1.0, 1.0, 1.0),
                        new DistanceMeters(50.0, 1.0, 1.0, 1.0, 1.0),
                        new HeadingDegrees(90.0, 5.0, 1.5, 0.8, 0.8)));
        Orientation assetOrientation = new Orientation().withHeading(new HeadingDegrees(40.0, 1.0, 2.0, 1.0, 0.0))
                .withElevation(new ElevationDegrees(75.0, 1.0, 1.0, 1.0, 0.0))
                .withBank(new BankDegrees(170.0, 1.0, 1.0, 1.0, 0.0));
        Orientation platformOrientation = new Orientation().withHeading(
                new HeadingDegrees(20.0, 1.0, 1.0, 1.0, 0.0))
                .withElevation(new ElevationDegrees(64.0, 1.0, 1.0, 1.0, 0.0))
                .withBank(new BankDegrees(88.0, 1.0, 1.0, 1.0, 0.0));
        Coordinates pointingLocation = new Coordinates().withLatitude(
                new LatitudeWgsDegrees(30.0, 1.0, 1.0, 1.0, 0.0))
                .withLongitude(new LongitudeWgsDegrees(30.0, 1.0, 1.0, 1.0, 0.0))
                .withAltitude(new HaeMeters(45.0, 1.0, 1.0, 1.0, 0.0))
                .withEllipseRegion(new Ellipse(new DistanceMeters(88.0, 1.0, 1.0, 1.0, 0.0),
                        new DistanceMeters(77.0, 1.0, 1.0, 1.0, 0.0),
                        new HeadingDegrees(65.0, 5.0, 1.5, 0.8, 0.8)));
        Detection detection = null;
        Status status = null;
        Weather weather = null;
        DigitalMedia digitalMedia = null;
        AudioMetadata audioMetadata = null;
        ImageMetadata imageMetadata = null;
        VideoMetadata videoMetadata = null;
        ChannelMetadata channelMetadata = null;
        WaterQuality waterQuality = null;
        CbrneTrigger cbrneTrigger = null;
        Biological biological = null;
        Chemical chemical = null;
        Power power = null;
        List<MapEntry> reserved = new ArrayList<MapEntry>();
        reserved.add(new MapEntry("String", "Bob"));
        reserved.add(new MapEntry("Double", 2.25));
        reserved.add(new MapEntry("Integer", 100));
        reserved.add(new MapEntry("Boolean", true));
        reserved.add(new MapEntry("Long", 12345L));
        UUID uuid = null; 
        Long observedTimestamp = null; 
        Long createdTimestamp = 100L;
        UUID assetUuid = UUID.fromString("328da040-85bb-11e2-9e96-8888200c9a75");
        String assetName = "asset-name";
        String assetType = "asset-type";
        String sensorId = "sensor-id";
        boolean systemInTestMode = false;
        Version version = new Version(1,2);
        int systemId = 0123;
        List<SensingModality> sensings = new ArrayList<>();
        sensings.add(new SensingModality(SensingModalityEnum.BIOLOGICAL, "bio"));
        return new Observation(version, 
                relatedObservations, 
                assetLocation, 
                assetOrientation,
                platformOrientation,
                pointingLocation, 
                sensings,
                detection, 
                status, 
                weather, 
                waterQuality,
                cbrneTrigger,
                biological,
                chemical,
                power,
                digitalMedia, 
                audioMetadata, 
                imageMetadata, 
                videoMetadata, 
                channelMetadata,
                reserved,
                uuid, 
                observedTimestamp, 
                createdTimestamp, 
                assetUuid, 
                assetName, 
                assetType, 
                sensorId, 
                systemInTestMode, 
                systemId);
    }
private static Observation createBaseObservation ( ) { ArrayList < ObservationRef > relatedObservations = new ArrayList < ObservationRef > ( ) ; relatedObservations . add ( new ObservationRef ( new Relationship ( RelationshipTypeEnum . CHILD , "something" ) , UUID . fromString ( "271d30b0-85b7-11e2-9e96-0800200c9a68" ) ) ) ; relatedObservations . add ( new ObservationRef ( new Relationship ( RelationshipTypeEnum . PARENT , "something-else" ) , UUID . fromString ( "3fd8fa30-85b7-11e2-9e96-0800200c9a68" ) ) ) ; Coordinates assetLocation = new Coordinates ( ) . withLatitude ( new LatitudeWgsDegrees ( 20.0 , 1.0 , 1.0 , 1.0 , 0.0 ) ) . withLongitude ( new LongitudeWgsDegrees ( 10.0 , 1.0 , 1.0 , 1.0 , 0.0 ) ) . withAltitude ( new HaeMeters ( 60.0 , 1.0 , 1.0 , 1.0 , 0.0 ) ) . withEllipseRegion ( new Ellipse ( new DistanceMeters ( 100.0 , 1.0 , 1.0 , 1.0 , 1.0 ) , new DistanceMeters ( 50.0 , 1.0 , 1.0 , 1.0 , 1.0 ) , new HeadingDegrees ( 90.0 , 5.0 , 1.5 , 0.8 , 0.8 ) ) ) ; Orientation assetOrientation = new Orientation ( ) . withHeading ( new HeadingDegrees ( 40.0 , 1.0 , 2.0 , 1.0 , 0.0 ) ) . withElevation ( new ElevationDegrees ( 75.0 , 1.0 , 1.0 , 1.0 , 0.0 ) ) . withBank ( new BankDegrees ( 170.0 , 1.0 , 1.0 , 1.0 , 0.0 ) ) ; Orientation platformOrientation = new Orientation ( ) . withHeading ( new HeadingDegrees ( 20.0 , 1.0 , 1.0 , 1.0 , 0.0 ) ) . withElevation ( new ElevationDegrees ( 64.0 , 1.0 , 1.0 , 1.0 , 0.0 ) ) . withBank ( new BankDegrees ( 88.0 , 1.0 , 1.0 , 1.0 , 0.0 ) ) ; Coordinates pointingLocation = new Coordinates ( ) . withLatitude ( new LatitudeWgsDegrees ( 30.0 , 1.0 , 1.0 , 1.0 , 0.0 ) ) . withLongitude ( new LongitudeWgsDegrees ( 30.0 , 1.0 , 1.0 , 1.0 , 0.0 ) ) . withAltitude ( new HaeMeters ( 45.0 , 1.0 , 1.0 , 1.0 , 0.0 ) ) . withEllipseRegion ( new Ellipse ( new DistanceMeters ( 88.0 , 1.0 , 1.0 , 1.0 , 0.0 ) , new DistanceMeters ( 77.0 , 1.0 , 1.0 , 1.0 , 0.0 ) , new HeadingDegrees ( 65.0 , 5.0 , 1.5 , 0.8 , 0.8 ) ) ) ; Detection detection = null ; Status status = null ; Weather weather = null ; DigitalMedia digitalMedia = null ; AudioMetadata audioMetadata = null ; ImageMetadata imageMetadata = null ; VideoMetadata videoMetadata = null ; ChannelMetadata channelMetadata = null ; WaterQuality waterQuality = null ; CbrneTrigger cbrneTrigger = null ; Biological biological = null ; Chemical chemical = null ; Power power = null ; List < MapEntry > reserved = new ArrayList < MapEntry > ( ) ; reserved . add ( new MapEntry ( "String" , "Bob" ) ) ; reserved . add ( new MapEntry ( "Double" , 2.25 ) ) ; reserved . add ( new MapEntry ( "Integer" , 100 ) ) ; reserved . add ( new MapEntry ( "Boolean" , true ) ) ; reserved . add ( new MapEntry ( "Long" , 12345L ) ) ; UUID uuid = null ; Long observedTimestamp = null ; Long createdTimestamp = 100L ; UUID assetUuid = UUID . fromString ( "328da040-85bb-11e2-9e96-8888200c9a75" ) ; String assetName = "asset-name" ; String assetType = "asset-type" ; String sensorId = "sensor-id" ; boolean systemInTestMode = false ; Version version = new Version ( 1 , 2 ) ; int systemId = 0123 ; List < SensingModality > sensings = new ArrayList < > ( ) ; sensings . add ( new SensingModality ( SensingModalityEnum . BIOLOGICAL , "bio" ) ) ; return new Observation ( version , relatedObservations , assetLocation , assetOrientation , platformOrientation , pointingLocation , sensings , detection , status , weather , waterQuality , cbrneTrigger , biological , chemical , power , digitalMedia , audioMetadata , imageMetadata , videoMetadata , channelMetadata , reserved , uuid , observedTimestamp , createdTimestamp , assetUuid , assetName , assetType , sensorId , systemInTestMode , systemId ) ; }
This will create an observation that has all fields filed out except for the complex types in the main xs:choice,
 like status, detection, digital media, those that denote the type of observation.
This will create an observation that has all fields filed out except for the complex types in the main xs : choice like status detection digital media those that denote the type of observation .
// all complex types in xs:choice are not included // must be set by individual create methods // set by assets if applicable