コード例 #1
0
        /// <summary>
        /// Generates and saves the artifact files for the extensions assemblies at the path mentioned in
        /// application configuration file.
        /// </summary>
        /// <param name="nameSpace">Namespace of the consolidated artifacts.</param>
        /// <param name="assemblyNames">Array of assembly names. The assemblies must be available
        /// to the application.</param>
        internal static void GenerateConsolidatedArtifacts(string nameSpace, string[] assemblyNames)
        {
            using (ZentityContext context
                       = new ZentityContext(ConfigurationManager.ConnectionStrings[Resources.ZentityContext].ToString()))
            {
                DataModel       model  = context.DataModel;
                DataModelModule module = new DataModelModule();
                module.NameSpace = nameSpace;
                model.Modules.Add(module);

                model.Synchronize();

                EFArtifactGenerationResults results = context.DataModel.GenerateEFArtifacts(assemblyNames);

                results.Csdls.Where(tuple => tuple.Key == Resources.ZentityCore).First().
                Value.Save(Resources.ExtendedCoreCsdl);

                for (int i = 0; i < assemblyNames.Length; i++)
                {
                    results.Csdls.Where(tuple => tuple.Key == assemblyNames[i]).
                    First().Value.Save(assemblyNames[i] + Resources.FileExtensionCsdl);
                }

                results.Msl.Save(Resources.ConsolidatedMsl);
                results.Ssdl.Save(Resources.ConsolidatedSsdl);
            }
        }
コード例 #2
0
 /// <summary>
 /// Remvoes the module from the system.
 /// </summary>
 /// <param name="nameSpace">Namespace to be removed.</param>
 internal static void RemoveModule(string nameSpace)
 {
     using (ZentityContext context
                = new ZentityContext(ConfigurationManager.ConnectionStrings[Resources.ZentityContext].ToString()))
     {
         if (context.DataModel.Modules.Where(tuple => tuple.NameSpace == nameSpace)
             .FirstOrDefault() != null)
         {
             DataModelModule module = context.DataModel.Modules[nameSpace];
             context.DataModel.Modules.Remove(module);
             context.DataModel.Synchronize();
         }
     }
 }
コード例 #3
0
ファイル: DMCreator.cs プロジェクト: saaperezru/Zentity
        public void createDM()
        {
            ZentityContext context = new ZentityContext(connectionString);

            // Create a new module.
            DataModelModule module = new DataModelModule { NameSpace = "Zentity.Flickr" };
            // Sent to line   36         context.DataModel.Modules.Add(module);

            // Create the ScholarlyWork type.
            ResourceType resourceTypeResource = context.DataModel.Modules["Zentity.Core"].ResourceTypes["Resource"];
            ResourceType resourceTypeImage = new ResourceType { Name = "ImageResource", BaseType = resourceTypeResource };
            module.ResourceTypes.Add(resourceTypeImage);

            // Create some Scalar Properties.
            ScalarProperty TagFamilia = new ScalarProperty { Name = "TagFamilia", DataType = DataTypes.Boolean };
            resourceTypeImage.ScalarProperties.Add(TagFamilia);

            // Create some Scalar Properties.
            ScalarProperty TagRumba = new ScalarProperty { Name = "TagRumba", DataType = DataTypes.Boolean };
            resourceTypeImage.ScalarProperties.Add(TagRumba);

            // Synchronize to alter the database schema.
            context.DataModel.Modules.Add(module);
            context.DataModel.Synchronize();

            // Generate Extensions Assembly.
            using (FileStream fout = new FileStream(@"C:\Zentity\Zentity.Flickr.dll", FileMode.Create, FileAccess.Write))
            {
                byte[] rawAssembly = context.DataModel.GenerateExtensionsAssembly(
                    "Zentity.Flickr", false, null, new string[] { "Zentity.Flickr" }, null);
                fout.Write(rawAssembly, 0, rawAssembly.Length);
            }

            // Generate Entity Framework artifacts.
            EFArtifactGenerationResults results = context.DataModel.GenerateEFArtifacts("Zentity.Flickr");
            results.Csdls.Where(tuple => tuple.Key == "Zentity.Core").First().Value.Save(@"C:\Zentity\Zentity.Flickr.ExtendedCore.csdl");
            results.Csdls.Where(tuple => tuple.Key == "Zentity.Flickr").First().Value.Save(@"C:\Zentity\Zentity.Flickr.csdl");
            results.Msl.Save(@"C:\Zentity\Zentity.Flickr.Consolidated.msl");
            results.Ssdl.Save(@"C:\Zentity\Zentity.Flickr.Consolidated.ssdl");
        }
コード例 #4
0
ファイル: ModelCreator.cs プロジェクト: saaperezru/Zentity
        public void CreateDM()
        {
            ZentityContext context = new ZentityContext(connectionString);
             	 	   //Create a new module.
             	    DataModelModule module = new DataModelModule { NameSpace = "Zentity.Corel52" };
             	   // Create the Resources type.
             	    ResourceType resourceTypeResource = context.DataModel.Modules["Zentity.Core"].ResourceTypes["Resource"];
             	    ResourceType Corel5Image2 = new ResourceType { Name = "Corel5Image2", BaseType = resourceTypeResource };
             	    module.ResourceTypes.Add(Corel5Image2);
             	    // Create some Scalar Properties.
             	    ScalarProperty Main_Textual_Category = new ScalarProperty { Name = "Main_Textual_Category", DataType =DataTypes.String };
             	    Corel5Image2.ScalarProperties.Add(Main_Textual_Category);
             	    ScalarProperty Main_Visual_Category = new ScalarProperty { Name = "Main_Visual_Category", DataType =DataTypes.String };
             	    Corel5Image2.ScalarProperties.Add(Main_Visual_Category);
             	    ScalarProperty ImageID = new ScalarProperty { Name = "ImageID", DataType =DataTypes.String };
             	    Corel5Image2.ScalarProperties.Add(ImageID);
             	    ScalarProperty LTT_hills_dunes_road_canyon_antelope_caribou_palace = new ScalarProperty { Name = "LTT_hills_dunes_road_canyon_antelope_caribou_palace", DataType =DataTypes.Double };
             	    Corel5Image2.ScalarProperties.Add(LTT_hills_dunes_road_canyon_antelope_caribou_palace);
             	    ScalarProperty LTT_sunset_horizon_desert_valley_landscape_sunrise_palm = new ScalarProperty { Name = "LTT_sunset_horizon_desert_valley_landscape_sunrise_palm", DataType =DataTypes.Double };
             	    Corel5Image2.ScalarProperties.Add(LTT_sunset_horizon_desert_valley_landscape_sunrise_palm);
             	    ScalarProperty LTT_water_reflection_shore_zebra_park_restaurant_herd = new ScalarProperty { Name = "LTT_water_reflection_shore_zebra_park_restaurant_herd", DataType =DataTypes.Double };
             	    Corel5Image2.ScalarProperties.Add(LTT_water_reflection_shore_zebra_park_restaurant_herd);
             	    ScalarProperty LTT_plane_jet_runway_smoke_f__16_prop_zebra = new ScalarProperty { Name = "LTT_plane_jet_runway_smoke_f__16_prop_zebra", DataType =DataTypes.Double };
             	    Corel5Image2.ScalarProperties.Add(LTT_plane_jet_runway_smoke_f__16_prop_zebra);
             	    ScalarProperty LTT_harbor_tower_water_sky_ships_windmills_town = new ScalarProperty { Name = "LTT_harbor_tower_water_sky_ships_windmills_town", DataType =DataTypes.Double };
             	    Corel5Image2.ScalarProperties.Add(LTT_harbor_tower_water_sky_ships_windmills_town);
             	    ScalarProperty LTT_window_door_castle_courtyard_farms_tables_palace = new ScalarProperty { Name = "LTT_window_door_castle_courtyard_farms_tables_palace", DataType =DataTypes.Double };
             	    Corel5Image2.ScalarProperties.Add(LTT_window_door_castle_courtyard_farms_tables_palace);
             	    ScalarProperty LTT_field_tulip_bulls_elk_row_farms_vineyard = new ScalarProperty { Name = "LTT_field_tulip_bulls_elk_row_farms_vineyard", DataType =DataTypes.Double };
             	    Corel5Image2.ScalarProperties.Add(LTT_field_tulip_bulls_elk_row_farms_vineyard);
             	    ScalarProperty LTT_coast_waves_water_town_lighthouse_park_fog = new ScalarProperty { Name = "LTT_coast_waves_water_town_lighthouse_park_fog", DataType =DataTypes.Double };
             	    Corel5Image2.ScalarProperties.Add(LTT_coast_waves_water_town_lighthouse_park_fog);
             	    ScalarProperty LTT_swimmers_people_athlete_pool_interior_wings_chairs = new ScalarProperty { Name = "LTT_swimmers_people_athlete_pool_interior_wings_chairs", DataType =DataTypes.Double };
             	    Corel5Image2.ScalarProperties.Add(LTT_swimmers_people_athlete_pool_interior_wings_chairs);
             	    ScalarProperty LTT_cat_tiger_forest_bengal_head_ground_lynx = new ScalarProperty { Name = "LTT_cat_tiger_forest_bengal_head_ground_lynx", DataType =DataTypes.Double };
             	    Corel5Image2.ScalarProperties.Add(LTT_cat_tiger_forest_bengal_head_ground_lynx);
             	    ScalarProperty LTT_bear_polar_tundra_black_grizzly_cubs_ice = new ScalarProperty { Name = "LTT_bear_polar_tundra_black_grizzly_cubs_ice", DataType =DataTypes.Double };
             	    Corel5Image2.ScalarProperties.Add(LTT_bear_polar_tundra_black_grizzly_cubs_ice);
             	    ScalarProperty LTT_sun_sea_waves_land_bay_lake_sunrise = new ScalarProperty { Name = "LTT_sun_sea_waves_land_bay_lake_sunrise", DataType =DataTypes.Double };
             	    Corel5Image2.ScalarProperties.Add(LTT_sun_sea_waves_land_bay_lake_sunrise);
             	    ScalarProperty LTT_tree_forest_park_frost_elk_palace_deer = new ScalarProperty { Name = "LTT_tree_forest_park_frost_elk_palace_deer", DataType =DataTypes.Double };
             	    Corel5Image2.ScalarProperties.Add(LTT_tree_forest_park_frost_elk_palace_deer);
             	    ScalarProperty LTT_island_village_water_face_formation_farms_ships = new ScalarProperty { Name = "LTT_island_village_water_face_formation_farms_ships", DataType =DataTypes.Double };
             	    Corel5Image2.ScalarProperties.Add(LTT_island_village_water_face_formation_farms_ships);
             	    ScalarProperty LTT_temple_pillar_roofs_buddha_buddhist_mosque_road = new ScalarProperty { Name = "LTT_temple_pillar_roofs_buddha_buddhist_mosque_road", DataType =DataTypes.Double };
             	    Corel5Image2.ScalarProperties.Add(LTT_temple_pillar_roofs_buddha_buddhist_mosque_road);
             	    ScalarProperty LTT_house_roofs_hut_village_fence_lawn_town = new ScalarProperty { Name = "LTT_house_roofs_hut_village_fence_lawn_town", DataType =DataTypes.Double };
             	    Corel5Image2.ScalarProperties.Add(LTT_house_roofs_hut_village_fence_lawn_town);
             	    ScalarProperty LTT_beach_palm_sand_oahu_kauai_sunset_hawaii = new ScalarProperty { Name = "LTT_beach_palm_sand_oahu_kauai_sunset_hawaii", DataType =DataTypes.Double };
             	    Corel5Image2.ScalarProperties.Add(LTT_beach_palm_sand_oahu_kauai_sunset_hawaii);
             	    ScalarProperty LTT_snow_fox_polar_coyote_head_arctic_deer = new ScalarProperty { Name = "LTT_snow_fox_polar_coyote_head_arctic_deer", DataType =DataTypes.Double };
             	    Corel5Image2.ScalarProperties.Add(LTT_snow_fox_polar_coyote_head_arctic_deer);
             	    ScalarProperty LTT_river_water_fox_elk_autumn_coyote_antlers = new ScalarProperty { Name = "LTT_river_water_fox_elk_autumn_coyote_antlers", DataType =DataTypes.Double };
             	    Corel5Image2.ScalarProperties.Add(LTT_river_water_fox_elk_autumn_coyote_antlers);
             	    ScalarProperty LTT_pool_hotel_town_water_swimmers_maui_people = new ScalarProperty { Name = "LTT_pool_hotel_town_water_swimmers_maui_people", DataType =DataTypes.Double };
             	    Corel5Image2.ScalarProperties.Add(LTT_pool_hotel_town_water_swimmers_maui_people);
             	    ScalarProperty LTT_bridge_arch_steel_stone_train_courtyard_architecture = new ScalarProperty { Name = "LTT_bridge_arch_steel_stone_train_courtyard_architecture", DataType =DataTypes.Double };
             	    Corel5Image2.ScalarProperties.Add(LTT_bridge_arch_steel_stone_train_courtyard_architecture);
             	    ScalarProperty LTT_sand_valley_desert_dunes_pyramid_canyon_sailboats = new ScalarProperty { Name = "LTT_sand_valley_desert_dunes_pyramid_canyon_sailboats", DataType =DataTypes.Double };
             	    Corel5Image2.ScalarProperties.Add(LTT_sand_valley_desert_dunes_pyramid_canyon_sailboats);
             	    ScalarProperty LTT_train_railroad_locomotive_smoke_tracks_close__up_bridge = new ScalarProperty { Name = "LTT_train_railroad_locomotive_smoke_tracks_close__up_bridge", DataType =DataTypes.Double };
             	    Corel5Image2.ScalarProperties.Add(LTT_train_railroad_locomotive_smoke_tracks_close__up_bridge);
             	    ScalarProperty LTT_clouds_palace_ruins_tower_park_buddhist_pyramid = new ScalarProperty { Name = "LTT_clouds_palace_ruins_tower_park_buddhist_pyramid", DataType =DataTypes.Double };
             	    Corel5Image2.ScalarProperties.Add(LTT_clouds_palace_ruins_tower_park_buddhist_pyramid);
             	    ScalarProperty LTT_ice_frost_frozen_crystals_fruit_glass_stick = new ScalarProperty { Name = "LTT_ice_frost_frozen_crystals_fruit_glass_stick", DataType =DataTypes.Double };
             	    Corel5Image2.ScalarProperties.Add(LTT_ice_frost_frozen_crystals_fruit_glass_stick);
             	    ScalarProperty LTT_sky_flight_roofs_prop_castle_church_park = new ScalarProperty { Name = "LTT_sky_flight_roofs_prop_castle_church_park", DataType =DataTypes.Double };
             	    Corel5Image2.ScalarProperties.Add(LTT_sky_flight_roofs_prop_castle_church_park);
             	    ScalarProperty LTT_mountain_valley_desert_park_ruins_road_goat = new ScalarProperty { Name = "LTT_mountain_valley_desert_park_ruins_road_goat", DataType =DataTypes.Double };
             	    Corel5Image2.ScalarProperties.Add(LTT_mountain_valley_desert_park_ruins_road_goat);
             	    ScalarProperty LTT_city_skyline_night_light_landscape_tower_church = new ScalarProperty { Name = "LTT_city_skyline_night_light_landscape_tower_church", DataType =DataTypes.Double };
             	    Corel5Image2.ScalarProperties.Add(LTT_city_skyline_night_light_landscape_tower_church);
             	    ScalarProperty LTT_rocks_fox_canyon_valley_rodent_tortoise_giant = new ScalarProperty { Name = "LTT_rocks_fox_canyon_valley_rodent_tortoise_giant", DataType =DataTypes.Double };
             	    Corel5Image2.ScalarProperties.Add(LTT_rocks_fox_canyon_valley_rodent_tortoise_giant);
             	    ScalarProperty LTT_stone_ruins_sculpture_pyramid_pillar_road_relief = new ScalarProperty { Name = "LTT_stone_ruins_sculpture_pyramid_pillar_road_relief", DataType =DataTypes.Double };
             	    Corel5Image2.ScalarProperties.Add(LTT_stone_ruins_sculpture_pyramid_pillar_road_relief);
             	    ScalarProperty LTT_water_grizzly_tusks_horizon_ground_bear_canal = new ScalarProperty { Name = "LTT_water_grizzly_tusks_horizon_ground_bear_canal", DataType =DataTypes.Double };
             	    Corel5Image2.ScalarProperties.Add(LTT_water_grizzly_tusks_horizon_ground_bear_canal);
             	    ScalarProperty LTT_boats_water_skyline_market_maui_restaurant_paintings = new ScalarProperty { Name = "LTT_boats_water_skyline_market_maui_restaurant_paintings", DataType =DataTypes.Double };
             	    Corel5Image2.ScalarProperties.Add(LTT_boats_water_skyline_market_maui_restaurant_paintings);
             	    ScalarProperty LTT_cars_tracks_turn_prototype_formula_straightaway_close__up = new ScalarProperty { Name = "LTT_cars_tracks_turn_prototype_formula_straightaway_close__up", DataType =DataTypes.Double };
             	    Corel5Image2.ScalarProperties.Add(LTT_cars_tracks_turn_prototype_formula_straightaway_close__up);
             	    ScalarProperty LTT_scotland_town_castle_village_cottage_church_mountain = new ScalarProperty { Name = "LTT_scotland_town_castle_village_cottage_church_mountain", DataType =DataTypes.Double };
             	    Corel5Image2.ScalarProperties.Add(LTT_scotland_town_castle_village_cottage_church_mountain);
             	    ScalarProperty LTT_grass_zebra_fox_herd_ground_antlers_caribou = new ScalarProperty { Name = "LTT_grass_zebra_fox_herd_ground_antlers_caribou", DataType =DataTypes.Double };
             	    Corel5Image2.ScalarProperties.Add(LTT_grass_zebra_fox_herd_ground_antlers_caribou);
             	    ScalarProperty LTT_wall_formula_church_castle_sign_writing_facade = new ScalarProperty { Name = "LTT_wall_formula_church_castle_sign_writing_facade", DataType =DataTypes.Double };
             	    Corel5Image2.ScalarProperties.Add(LTT_wall_formula_church_castle_sign_writing_facade);
             	    ScalarProperty LTT_people_woman_indian_hats_costume_girl_monks = new ScalarProperty { Name = "LTT_people_woman_indian_hats_costume_girl_monks", DataType =DataTypes.Double };
             	    Corel5Image2.ScalarProperties.Add(LTT_people_woman_indian_hats_costume_girl_monks);
             	    ScalarProperty LTT_ocean_coral_reefs_fish_sea_anemone_fan = new ScalarProperty { Name = "LTT_ocean_coral_reefs_fish_sea_anemone_fan", DataType =DataTypes.Double };
             	    Corel5Image2.ScalarProperties.Add(LTT_ocean_coral_reefs_fish_sea_anemone_fan);
             	    ScalarProperty LTT_buildings_skyline_village_hotel_flag_roofs_light = new ScalarProperty { Name = "LTT_buildings_skyline_village_hotel_flag_roofs_light", DataType =DataTypes.Double };
             	    Corel5Image2.ScalarProperties.Add(LTT_buildings_skyline_village_hotel_flag_roofs_light);
             	    ScalarProperty LTT_shops_market_display_food_sign_restaurant_writing = new ScalarProperty { Name = "LTT_shops_market_display_food_sign_restaurant_writing", DataType =DataTypes.Double };
             	    Corel5Image2.ScalarProperties.Add(LTT_shops_market_display_food_sign_restaurant_writing);
             	    ScalarProperty LTT_branch_tree_sign_shrubs_leopard_elephant_blossoms = new ScalarProperty { Name = "LTT_branch_tree_sign_shrubs_leopard_elephant_blossoms", DataType =DataTypes.Double };
             	    Corel5Image2.ScalarProperties.Add(LTT_branch_tree_sign_shrubs_leopard_elephant_blossoms);
             	    ScalarProperty LTT_plants_leaf_close__up_stems_head_palm_lily = new ScalarProperty { Name = "LTT_plants_leaf_close__up_stems_head_palm_lily", DataType =DataTypes.Double };
             	    Corel5Image2.ScalarProperties.Add(LTT_plants_leaf_close__up_stems_head_palm_lily);
             	    ScalarProperty LTT_statue_sculpture_palace_sphinx_figures_buddha_castle = new ScalarProperty { Name = "LTT_statue_sculpture_palace_sphinx_figures_buddha_castle", DataType =DataTypes.Double };
             	    Corel5Image2.ScalarProperties.Add(LTT_statue_sculpture_palace_sphinx_figures_buddha_castle);
             	    ScalarProperty LTT_water_cliff_white__tailed_deer_fountain_people_marine = new ScalarProperty { Name = "LTT_water_cliff_white__tailed_deer_fountain_people_marine", DataType =DataTypes.Double };
             	    Corel5Image2.ScalarProperties.Add(LTT_water_cliff_white__tailed_deer_fountain_people_marine);
             	    ScalarProperty LTT_garden_lawn_landscape_flowers_path_bench_palace = new ScalarProperty { Name = "LTT_garden_lawn_landscape_flowers_path_bench_palace", DataType =DataTypes.Double };
             	    Corel5Image2.ScalarProperties.Add(LTT_garden_lawn_landscape_flowers_path_bench_palace);
             	    ScalarProperty LTT_horses_foals_mare_fence_field_town_guard = new ScalarProperty { Name = "LTT_horses_foals_mare_fence_field_town_guard", DataType =DataTypes.Double };
             	    Corel5Image2.ScalarProperties.Add(LTT_horses_foals_mare_fence_field_town_guard);
             	    ScalarProperty LTT_people_man_pillar_ceremony_courtyard_umbrella_kauai = new ScalarProperty { Name = "LTT_people_man_pillar_ceremony_courtyard_umbrella_kauai", DataType =DataTypes.Double };
             	    Corel5Image2.ScalarProperties.Add(LTT_people_man_pillar_ceremony_courtyard_umbrella_kauai);
             	    ScalarProperty LTT_street_town_cars_skyline_guard_sign_buildings = new ScalarProperty { Name = "LTT_street_town_cars_skyline_guard_sign_buildings", DataType =DataTypes.Double };
             	    Corel5Image2.ScalarProperties.Add(LTT_street_town_cars_skyline_guard_sign_buildings);
             	    ScalarProperty LTT_birds_nest_flight_booby_fly_albatross_wood = new ScalarProperty { Name = "LTT_birds_nest_flight_booby_fly_albatross_wood", DataType =DataTypes.Double };
             	    Corel5Image2.ScalarProperties.Add(LTT_birds_nest_flight_booby_fly_albatross_wood);
             	    ScalarProperty LTT_flowers_petals_leaf_tulip_stems_poppies_blooms = new ScalarProperty { Name = "LTT_flowers_petals_leaf_tulip_stems_poppies_blooms", DataType =DataTypes.Double };
             	    Corel5Image2.ScalarProperties.Add(LTT_flowers_petals_leaf_tulip_stems_poppies_blooms);
             	    ScalarProperty LTV_water_sky_people_mountain_beach_waves_rocks = new ScalarProperty { Name = "LTV_water_sky_people_mountain_beach_waves_rocks", DataType =DataTypes.Double };
             	    Corel5Image2.ScalarProperties.Add(LTV_water_sky_people_mountain_beach_waves_rocks);
             	    ScalarProperty LTV_tree_grass_field_horses_foals_mare_train = new ScalarProperty { Name = "LTV_tree_grass_field_horses_foals_mare_train", DataType =DataTypes.Double };
             	    Corel5Image2.ScalarProperties.Add(LTV_tree_grass_field_horses_foals_mare_train);
             	    ScalarProperty LTV_snow_cars_tracks_wall_tree_formula_frost = new ScalarProperty { Name = "LTV_snow_cars_tracks_wall_tree_formula_frost", DataType =DataTypes.Double };
             	    Corel5Image2.ScalarProperties.Add(LTV_snow_cars_tracks_wall_tree_formula_frost);
             	    ScalarProperty LTV_water_snow_polar_bear_stone_tracks_cars = new ScalarProperty { Name = "LTV_water_snow_polar_bear_stone_tracks_cars", DataType =DataTypes.Double };
             	    Corel5Image2.ScalarProperties.Add(LTV_water_snow_polar_bear_stone_tracks_cars);
             	    ScalarProperty LTV_ruins_stone_tree_water_snow_scotland_mountain = new ScalarProperty { Name = "LTV_ruins_stone_tree_water_snow_scotland_mountain", DataType =DataTypes.Double };
             	    Corel5Image2.ScalarProperties.Add(LTV_ruins_stone_tree_water_snow_scotland_mountain);
             	    ScalarProperty LTV_tusks_ground_water_sand_valley_sky_dunes = new ScalarProperty { Name = "LTV_tusks_ground_water_sand_valley_sky_dunes", DataType =DataTypes.Double };
             	    Corel5Image2.ScalarProperties.Add(LTV_tusks_ground_water_sand_valley_sky_dunes);
             	    ScalarProperty LTV_people_buildings_sky_sunset_tree_night_city = new ScalarProperty { Name = "LTV_people_buildings_sky_sunset_tree_night_city", DataType =DataTypes.Double };
             	    Corel5Image2.ScalarProperties.Add(LTV_people_buildings_sky_sunset_tree_night_city);
             	    ScalarProperty LTV_garden_ruins_tree_people_stone_sky_wall = new ScalarProperty { Name = "LTV_garden_ruins_tree_people_stone_sky_wall", DataType =DataTypes.Double };
             	    Corel5Image2.ScalarProperties.Add(LTV_garden_ruins_tree_people_stone_sky_wall);
             	    ScalarProperty LTV_sky_flowers_mountain_people_clouds_water_leaf = new ScalarProperty { Name = "LTV_sky_flowers_mountain_people_clouds_water_leaf", DataType =DataTypes.Double };
             	    Corel5Image2.ScalarProperties.Add(LTV_sky_flowers_mountain_people_clouds_water_leaf);
             	    ScalarProperty LTV_sky_jet_plane_train_railroad_tree_pool = new ScalarProperty { Name = "LTV_sky_jet_plane_train_railroad_tree_pool", DataType =DataTypes.Double };
             	    Corel5Image2.ScalarProperties.Add(LTV_sky_jet_plane_train_railroad_tree_pool);
             	    ScalarProperty LTV_water_grass_bear_polar_mist_dunes_cubs = new ScalarProperty { Name = "LTV_water_grass_bear_polar_mist_dunes_cubs", DataType =DataTypes.Double };
             	    Corel5Image2.ScalarProperties.Add(LTV_water_grass_bear_polar_mist_dunes_cubs);
             	    ScalarProperty LTV_sky_jet_plane_mountain_sand_snow_valley = new ScalarProperty { Name = "LTV_sky_jet_plane_mountain_sand_snow_valley", DataType =DataTypes.Double };
             	    Corel5Image2.ScalarProperties.Add(LTV_sky_jet_plane_mountain_sand_snow_valley);
             	    ScalarProperty LTV_sky_jet_plane_water_tree_bridge_pool = new ScalarProperty { Name = "LTV_sky_jet_plane_water_tree_bridge_pool", DataType =DataTypes.Double };
             	    Corel5Image2.ScalarProperties.Add(LTV_sky_jet_plane_water_tree_bridge_pool);
             	    ScalarProperty LTV_sky_plane_jet_eagle_flight_mountain_birds = new ScalarProperty { Name = "LTV_sky_plane_jet_eagle_flight_mountain_birds", DataType =DataTypes.Double };
             	    Corel5Image2.ScalarProperties.Add(LTV_sky_plane_jet_eagle_flight_mountain_birds);
             	    ScalarProperty LTV_sky_plane_jet_tree_mountain_bridge_castle = new ScalarProperty { Name = "LTV_sky_plane_jet_tree_mountain_bridge_castle", DataType =DataTypes.Double };
             	    Corel5Image2.ScalarProperties.Add(LTV_sky_plane_jet_tree_mountain_bridge_castle);
             	    ScalarProperty LTV_plane_jet_sky_clouds_sand_valley_beach = new ScalarProperty { Name = "LTV_plane_jet_sky_clouds_sand_valley_beach", DataType =DataTypes.Double };
             	    Corel5Image2.ScalarProperties.Add(LTV_plane_jet_sky_clouds_sand_valley_beach);
             	    ScalarProperty LTV_grass_sky_tree_water_rocks_rodent_bear = new ScalarProperty { Name = "LTV_grass_sky_tree_water_rocks_rodent_bear", DataType =DataTypes.Double };
             	    Corel5Image2.ScalarProperties.Add(LTV_grass_sky_tree_water_rocks_rodent_bear);
             	    ScalarProperty LTV_sky_jet_plane_mountain_water_park_buildings = new ScalarProperty { Name = "LTV_sky_jet_plane_mountain_water_park_buildings", DataType =DataTypes.Double };
             	    Corel5Image2.ScalarProperties.Add(LTV_sky_jet_plane_mountain_water_park_buildings);
             	    ScalarProperty LTV_sky_plane_mountain_prop_tree_palace_water = new ScalarProperty { Name = "LTV_sky_plane_mountain_prop_tree_palace_water", DataType =DataTypes.Double };
             	    Corel5Image2.ScalarProperties.Add(LTV_sky_plane_mountain_prop_tree_palace_water);
             	    ScalarProperty LTV_sky_clouds_plane_jet_train_railroad_locomotive = new ScalarProperty { Name = "LTV_sky_clouds_plane_jet_train_railroad_locomotive", DataType =DataTypes.Double };
             	    Corel5Image2.ScalarProperties.Add(LTV_sky_clouds_plane_jet_train_railroad_locomotive);
             	    ScalarProperty LTV_sky_jet_plane_water_valley_desert_sand = new ScalarProperty { Name = "LTV_sky_jet_plane_water_valley_desert_sand", DataType =DataTypes.Double };
             	    Corel5Image2.ScalarProperties.Add(LTV_sky_jet_plane_water_valley_desert_sand);
             	    ScalarProperty LTV_bear_snow_polar_ice_people_water_tracks = new ScalarProperty { Name = "LTV_bear_snow_polar_ice_people_water_tracks", DataType =DataTypes.Double };
             	    Corel5Image2.ScalarProperties.Add(LTV_bear_snow_polar_ice_people_water_tracks);
             	    ScalarProperty LTV_sky_plane_jet_tree_mountain_clouds_valley = new ScalarProperty { Name = "LTV_sky_plane_jet_tree_mountain_clouds_valley", DataType =DataTypes.Double };
             	    Corel5Image2.ScalarProperties.Add(LTV_sky_plane_jet_tree_mountain_clouds_valley);
             	    ScalarProperty LTV_water_sunset_coast_horizon_sun_tree_clouds = new ScalarProperty { Name = "LTV_water_sunset_coast_horizon_sun_tree_clouds", DataType =DataTypes.Double };
             	    Corel5Image2.ScalarProperties.Add(LTV_water_sunset_coast_horizon_sun_tree_clouds);
             	    ScalarProperty LTV_tree_people_sky_buildings_water_rocks_mountain = new ScalarProperty { Name = "LTV_tree_people_sky_buildings_water_rocks_mountain", DataType =DataTypes.Double };
             	    Corel5Image2.ScalarProperties.Add(LTV_tree_people_sky_buildings_water_rocks_mountain);
             	    ScalarProperty LTV_snow_water_sky_bear_stone_polar_sand = new ScalarProperty { Name = "LTV_snow_water_sky_bear_stone_polar_sand", DataType =DataTypes.Double };
             	    Corel5Image2.ScalarProperties.Add(LTV_snow_water_sky_bear_stone_polar_sand);
             	    ScalarProperty LTV_water_people_swimmers_pool_tree_plants_leaf = new ScalarProperty { Name = "LTV_water_people_swimmers_pool_tree_plants_leaf", DataType =DataTypes.Double };
             	    Corel5Image2.ScalarProperties.Add(LTV_water_people_swimmers_pool_tree_plants_leaf);
             	    ScalarProperty LTV_tree_water_sky_mountain_buildings_people_rocks = new ScalarProperty { Name = "LTV_tree_water_sky_mountain_buildings_people_rocks", DataType =DataTypes.Double };
             	    Corel5Image2.ScalarProperties.Add(LTV_tree_water_sky_mountain_buildings_people_rocks);
             	    ScalarProperty LTV_tree_flowers_rose_frost_ice_plants_mountain = new ScalarProperty { Name = "LTV_tree_flowers_rose_frost_ice_plants_mountain", DataType =DataTypes.Double };
             	    Corel5Image2.ScalarProperties.Add(LTV_tree_flowers_rose_frost_ice_plants_mountain);
             	    ScalarProperty LTV_sky_birds_flight_eagle_mountain_snow_clouds = new ScalarProperty { Name = "LTV_sky_birds_flight_eagle_mountain_snow_clouds", DataType =DataTypes.Double };
             	    Corel5Image2.ScalarProperties.Add(LTV_sky_birds_flight_eagle_mountain_snow_clouds);
             	    ScalarProperty LTV_sky_jet_plane_branch_birds_sand_tree = new ScalarProperty { Name = "LTV_sky_jet_plane_branch_birds_sand_tree", DataType =DataTypes.Double };
             	    Corel5Image2.ScalarProperties.Add(LTV_sky_jet_plane_branch_birds_sand_tree);
             	    ScalarProperty LTV_cars_tracks_ice_water_formula_wall_turn = new ScalarProperty { Name = "LTV_cars_tracks_ice_water_formula_wall_turn", DataType =DataTypes.Double };
             	    Corel5Image2.ScalarProperties.Add(LTV_cars_tracks_ice_water_formula_wall_turn);
             	    ScalarProperty LTV_mountain_tree_bridge_sky_water_clouds_arch = new ScalarProperty { Name = "LTV_mountain_tree_bridge_sky_water_clouds_arch", DataType =DataTypes.Double };
             	    Corel5Image2.ScalarProperties.Add(LTV_mountain_tree_bridge_sky_water_clouds_arch);
             	    ScalarProperty LTV_people_temple_scotland_stone_grass_water_pillar = new ScalarProperty { Name = "LTV_people_temple_scotland_stone_grass_water_pillar", DataType =DataTypes.Double };
             	    Corel5Image2.ScalarProperties.Add(LTV_people_temple_scotland_stone_grass_water_pillar);
             	    ScalarProperty LTV_sand_people_close__up_lizard_grass_tree_field = new ScalarProperty { Name = "LTV_sand_people_close__up_lizard_grass_tree_field", DataType =DataTypes.Double };
             	    Corel5Image2.ScalarProperties.Add(LTV_sand_people_close__up_lizard_grass_tree_field);
             	    ScalarProperty LTV_sand_stone_rocks_polar_bear_sky_snow = new ScalarProperty { Name = "LTV_sand_stone_rocks_polar_bear_sky_snow", DataType =DataTypes.Double };
             	    Corel5Image2.ScalarProperties.Add(LTV_sand_stone_rocks_polar_bear_sky_snow);
             	    ScalarProperty LTV_water_sky_jet_mountain_plane_train_buildings = new ScalarProperty { Name = "LTV_water_sky_jet_mountain_plane_train_buildings", DataType =DataTypes.Double };
             	    Corel5Image2.ScalarProperties.Add(LTV_water_sky_jet_mountain_plane_train_buildings);
             	    ScalarProperty LTV_flowers_tree_birds_grass_leaf_plants_nest = new ScalarProperty { Name = "LTV_flowers_tree_birds_grass_leaf_plants_nest", DataType =DataTypes.Double };
             	    Corel5Image2.ScalarProperties.Add(LTV_flowers_tree_birds_grass_leaf_plants_nest);
             	    ScalarProperty LTV_water_sky_grass_people_tree_mountain_snow = new ScalarProperty { Name = "LTV_water_sky_grass_people_tree_mountain_snow", DataType =DataTypes.Double };
             	    Corel5Image2.ScalarProperties.Add(LTV_water_sky_grass_people_tree_mountain_snow);
             	    ScalarProperty LTV_people_polar_bear_face_water_snow_buildings = new ScalarProperty { Name = "LTV_people_polar_bear_face_water_snow_buildings", DataType =DataTypes.Double };
             	    Corel5Image2.ScalarProperties.Add(LTV_people_polar_bear_face_water_snow_buildings);
             	    ScalarProperty LTV_leaf_plants_flowers_garden_birds_tree_nest = new ScalarProperty { Name = "LTV_leaf_plants_flowers_garden_birds_tree_nest", DataType =DataTypes.Double };
             	    Corel5Image2.ScalarProperties.Add(LTV_leaf_plants_flowers_garden_birds_tree_nest);
             	    ScalarProperty LTV_buildings_people_city_water_sky_statue_night = new ScalarProperty { Name = "LTV_buildings_people_city_water_sky_statue_night", DataType =DataTypes.Double };
             	    Corel5Image2.ScalarProperties.Add(LTV_buildings_people_city_water_sky_statue_night);
             	    ScalarProperty LTV_stone_pillar_sculpture_people_statue_tree_road = new ScalarProperty { Name = "LTV_stone_pillar_sculpture_people_statue_tree_road", DataType =DataTypes.Double };
             	    Corel5Image2.ScalarProperties.Add(LTV_stone_pillar_sculpture_people_statue_tree_road);
             	    ScalarProperty LTV_sky_water_sand_beach_people_hills_tree = new ScalarProperty { Name = "LTV_sky_water_sand_beach_people_hills_tree", DataType =DataTypes.Double };
             	    Corel5Image2.ScalarProperties.Add(LTV_sky_water_sand_beach_people_hills_tree);
             	    ScalarProperty LTV_sky_jet_plane_train_railroad_locomotive_pagoda = new ScalarProperty { Name = "LTV_sky_jet_plane_train_railroad_locomotive_pagoda", DataType =DataTypes.Double };
             	    Corel5Image2.ScalarProperties.Add(LTV_sky_jet_plane_train_railroad_locomotive_pagoda);
             	    ScalarProperty LTV_jet_plane_sky_beach_boats_steel_courtyard = new ScalarProperty { Name = "LTV_jet_plane_sky_beach_boats_steel_courtyard", DataType =DataTypes.Double };
             	    Corel5Image2.ScalarProperties.Add(LTV_jet_plane_sky_beach_boats_steel_courtyard);
             	    ScalarProperty LTV_plane_sky_prop_bridge_valley_boats_sand = new ScalarProperty { Name = "LTV_plane_sky_prop_bridge_valley_boats_sand", DataType =DataTypes.Double };
             	    Corel5Image2.ScalarProperties.Add(LTV_plane_sky_prop_bridge_valley_boats_sand);
             	    ScalarProperty LTV_plane_clouds_jet_sky_mountain_water_snow = new ScalarProperty { Name = "LTV_plane_clouds_jet_sky_mountain_water_snow", DataType =DataTypes.Double };
             	    Corel5Image2.ScalarProperties.Add(LTV_plane_clouds_jet_sky_mountain_water_snow);
             	    ScalarProperty LTV_snow_bear_polar_water_rocks_fox_sand = new ScalarProperty { Name = "LTV_snow_bear_polar_water_rocks_fox_sand", DataType =DataTypes.Double };
             	    Corel5Image2.ScalarProperties.Add(LTV_snow_bear_polar_water_rocks_fox_sand);
             	    ScalarProperty LTV_sky_water_people_tree_sand_swimmers_clouds = new ScalarProperty { Name = "LTV_sky_water_people_tree_sand_swimmers_clouds", DataType =DataTypes.Double };
             	    Corel5Image2.ScalarProperties.Add(LTV_sky_water_people_tree_sand_swimmers_clouds);
             	    ScalarProperty Tag_reefs = new ScalarProperty { Name = "Tag_reefs", DataType =DataTypes.Boolean };
             	    Corel5Image2.ScalarProperties.Add(Tag_reefs);
             	    ScalarProperty Tag_birds = new ScalarProperty { Name = "Tag_birds", DataType =DataTypes.Boolean };
             	    Corel5Image2.ScalarProperties.Add(Tag_birds);
             	    ScalarProperty Tag_ground = new ScalarProperty { Name = "Tag_ground", DataType =DataTypes.Boolean };
             	    Corel5Image2.ScalarProperties.Add(Tag_ground);
             	    ScalarProperty Tag_hills = new ScalarProperty { Name = "Tag_hills", DataType =DataTypes.Boolean };
             	    Corel5Image2.ScalarProperties.Add(Tag_hills);
             	    ScalarProperty Tag_rose = new ScalarProperty { Name = "Tag_rose", DataType =DataTypes.Boolean };
             	    Corel5Image2.ScalarProperties.Add(Tag_rose);
             	    ScalarProperty Tag_sky = new ScalarProperty { Name = "Tag_sky", DataType =DataTypes.Boolean };
             	    Corel5Image2.ScalarProperties.Add(Tag_sky);
             	    ScalarProperty Tag_window = new ScalarProperty { Name = "Tag_window", DataType =DataTypes.Boolean };
             	    Corel5Image2.ScalarProperties.Add(Tag_window);
             	    ScalarProperty Tag_town = new ScalarProperty { Name = "Tag_town", DataType =DataTypes.Boolean };
             	    Corel5Image2.ScalarProperties.Add(Tag_town);
             	    ScalarProperty Tag_woman = new ScalarProperty { Name = "Tag_woman", DataType =DataTypes.Boolean };
             	    Corel5Image2.ScalarProperties.Add(Tag_woman);
             	    ScalarProperty Tag_garden = new ScalarProperty { Name = "Tag_garden", DataType =DataTypes.Boolean };
             	    Corel5Image2.ScalarProperties.Add(Tag_garden);
             	    ScalarProperty Tag_bear = new ScalarProperty { Name = "Tag_bear", DataType =DataTypes.Boolean };
             	    Corel5Image2.ScalarProperties.Add(Tag_bear);
             	    ScalarProperty Tag_coast = new ScalarProperty { Name = "Tag_coast", DataType =DataTypes.Boolean };
             	    Corel5Image2.ScalarProperties.Add(Tag_coast);
             	    ScalarProperty Tag_railroad = new ScalarProperty { Name = "Tag_railroad", DataType =DataTypes.Boolean };
             	    Corel5Image2.ScalarProperties.Add(Tag_railroad);
             	    ScalarProperty Tag_clouds = new ScalarProperty { Name = "Tag_clouds", DataType =DataTypes.Boolean };
             	    Corel5Image2.ScalarProperties.Add(Tag_clouds);
             	    ScalarProperty Tag_harbor = new ScalarProperty { Name = "Tag_harbor", DataType =DataTypes.Boolean };
             	    Corel5Image2.ScalarProperties.Add(Tag_harbor);
             	    ScalarProperty Tag_pillar = new ScalarProperty { Name = "Tag_pillar", DataType =DataTypes.Boolean };
             	    Corel5Image2.ScalarProperties.Add(Tag_pillar);
             	    ScalarProperty Tag_white__tailed = new ScalarProperty { Name = "Tag_white__tailed", DataType =DataTypes.Boolean };
             	    Corel5Image2.ScalarProperties.Add(Tag_white__tailed);
             	    ScalarProperty Tag_rocks = new ScalarProperty { Name = "Tag_rocks", DataType =DataTypes.Boolean };
             	    Corel5Image2.ScalarProperties.Add(Tag_rocks);
             	    ScalarProperty Tag_sand = new ScalarProperty { Name = "Tag_sand", DataType =DataTypes.Boolean };
             	    Corel5Image2.ScalarProperties.Add(Tag_sand);
             	    ScalarProperty Tag_man = new ScalarProperty { Name = "Tag_man", DataType =DataTypes.Boolean };
             	    Corel5Image2.ScalarProperties.Add(Tag_man);
             	    ScalarProperty Tag_night = new ScalarProperty { Name = "Tag_night", DataType =DataTypes.Boolean };
             	    Corel5Image2.ScalarProperties.Add(Tag_night);
             	    ScalarProperty Tag_tower = new ScalarProperty { Name = "Tag_tower", DataType =DataTypes.Boolean };
             	    Corel5Image2.ScalarProperties.Add(Tag_tower);
             	    ScalarProperty Tag_river = new ScalarProperty { Name = "Tag_river", DataType =DataTypes.Boolean };
             	    Corel5Image2.ScalarProperties.Add(Tag_river);
             	    ScalarProperty Tag_ruins = new ScalarProperty { Name = "Tag_ruins", DataType =DataTypes.Boolean };
             	    Corel5Image2.ScalarProperties.Add(Tag_ruins);
             	    ScalarProperty Tag_grizzly = new ScalarProperty { Name = "Tag_grizzly", DataType =DataTypes.Boolean };
             	    Corel5Image2.ScalarProperties.Add(Tag_grizzly);
             	    ScalarProperty Tag_people = new ScalarProperty { Name = "Tag_people", DataType =DataTypes.Boolean };
             	    Corel5Image2.ScalarProperties.Add(Tag_people);
             	    ScalarProperty Tag_house = new ScalarProperty { Name = "Tag_house", DataType =DataTypes.Boolean };
             	    Corel5Image2.ScalarProperties.Add(Tag_house);
             	    ScalarProperty Tag_village = new ScalarProperty { Name = "Tag_village", DataType =DataTypes.Boolean };
             	    Corel5Image2.ScalarProperties.Add(Tag_village);
             	    ScalarProperty Tag_sign = new ScalarProperty { Name = "Tag_sign", DataType =DataTypes.Boolean };
             	    Corel5Image2.ScalarProperties.Add(Tag_sign);
             	    ScalarProperty Tag_street = new ScalarProperty { Name = "Tag_street", DataType =DataTypes.Boolean };
             	    Corel5Image2.ScalarProperties.Add(Tag_street);
             	    ScalarProperty Tag_palm = new ScalarProperty { Name = "Tag_palm", DataType =DataTypes.Boolean };
             	    Corel5Image2.ScalarProperties.Add(Tag_palm);
             	    ScalarProperty Tag_zebra = new ScalarProperty { Name = "Tag_zebra", DataType =DataTypes.Boolean };
             	    Corel5Image2.ScalarProperties.Add(Tag_zebra);
             	    ScalarProperty Tag_sea = new ScalarProperty { Name = "Tag_sea", DataType =DataTypes.Boolean };
             	    Corel5Image2.ScalarProperties.Add(Tag_sea);
             	    ScalarProperty Tag_foals = new ScalarProperty { Name = "Tag_foals", DataType =DataTypes.Boolean };
             	    Corel5Image2.ScalarProperties.Add(Tag_foals);
             	    ScalarProperty Tag_leaf = new ScalarProperty { Name = "Tag_leaf", DataType =DataTypes.Boolean };
             	    Corel5Image2.ScalarProperties.Add(Tag_leaf);
             	    ScalarProperty Tag_dunes = new ScalarProperty { Name = "Tag_dunes", DataType =DataTypes.Boolean };
             	    Corel5Image2.ScalarProperties.Add(Tag_dunes);
             	    ScalarProperty Tag_sun = new ScalarProperty { Name = "Tag_sun", DataType =DataTypes.Boolean };
             	    Corel5Image2.ScalarProperties.Add(Tag_sun);
             	    ScalarProperty Tag_fox = new ScalarProperty { Name = "Tag_fox", DataType =DataTypes.Boolean };
             	    Corel5Image2.ScalarProperties.Add(Tag_fox);
             	    ScalarProperty Tag_skyline = new ScalarProperty { Name = "Tag_skyline", DataType =DataTypes.Boolean };
             	    Corel5Image2.ScalarProperties.Add(Tag_skyline);
             	    ScalarProperty Tag_ice = new ScalarProperty { Name = "Tag_ice", DataType =DataTypes.Boolean };
             	    Corel5Image2.ScalarProperties.Add(Tag_ice);
             	    ScalarProperty Tag_prop = new ScalarProperty { Name = "Tag_prop", DataType =DataTypes.Boolean };
             	    Corel5Image2.ScalarProperties.Add(Tag_prop);
             	    ScalarProperty Tag_indian = new ScalarProperty { Name = "Tag_indian", DataType =DataTypes.Boolean };
             	    Corel5Image2.ScalarProperties.Add(Tag_indian);
             	    ScalarProperty Tag_landscape = new ScalarProperty { Name = "Tag_landscape", DataType =DataTypes.Boolean };
             	    Corel5Image2.ScalarProperties.Add(Tag_landscape);
             	    ScalarProperty Tag_formula = new ScalarProperty { Name = "Tag_formula", DataType =DataTypes.Boolean };
             	    Corel5Image2.ScalarProperties.Add(Tag_formula);
             	    ScalarProperty Tag_temple = new ScalarProperty { Name = "Tag_temple", DataType =DataTypes.Boolean };
             	    Corel5Image2.ScalarProperties.Add(Tag_temple);
             	    ScalarProperty Tag_mare = new ScalarProperty { Name = "Tag_mare", DataType =DataTypes.Boolean };
             	    Corel5Image2.ScalarProperties.Add(Tag_mare);
             	    ScalarProperty Tag_roofs = new ScalarProperty { Name = "Tag_roofs", DataType =DataTypes.Boolean };
             	    Corel5Image2.ScalarProperties.Add(Tag_roofs);
             	    ScalarProperty Tag_cars = new ScalarProperty { Name = "Tag_cars", DataType =DataTypes.Boolean };
             	    Corel5Image2.ScalarProperties.Add(Tag_cars);
             	    ScalarProperty Tag_bulls = new ScalarProperty { Name = "Tag_bulls", DataType =DataTypes.Boolean };
             	    Corel5Image2.ScalarProperties.Add(Tag_bulls);
             	    ScalarProperty Tag_water = new ScalarProperty { Name = "Tag_water", DataType =DataTypes.Boolean };
             	    Corel5Image2.ScalarProperties.Add(Tag_water);
             	    ScalarProperty Tag_tracks = new ScalarProperty { Name = "Tag_tracks", DataType =DataTypes.Boolean };
             	    Corel5Image2.ScalarProperties.Add(Tag_tracks);
             	    ScalarProperty Tag_stone = new ScalarProperty { Name = "Tag_stone", DataType =DataTypes.Boolean };
             	    Corel5Image2.ScalarProperties.Add(Tag_stone);
             	    ScalarProperty Tag_island = new ScalarProperty { Name = "Tag_island", DataType =DataTypes.Boolean };
             	    Corel5Image2.ScalarProperties.Add(Tag_island);
             	    ScalarProperty Tag_coral = new ScalarProperty { Name = "Tag_coral", DataType =DataTypes.Boolean };
             	    Corel5Image2.ScalarProperties.Add(Tag_coral);
             	    ScalarProperty Tag_locomotive = new ScalarProperty { Name = "Tag_locomotive", DataType =DataTypes.Boolean };
             	    Corel5Image2.ScalarProperties.Add(Tag_locomotive);
             	    ScalarProperty Tag_turn = new ScalarProperty { Name = "Tag_turn", DataType =DataTypes.Boolean };
             	    Corel5Image2.ScalarProperties.Add(Tag_turn);
             	    ScalarProperty Tag_horizon = new ScalarProperty { Name = "Tag_horizon", DataType =DataTypes.Boolean };
             	    Corel5Image2.ScalarProperties.Add(Tag_horizon);
             	    ScalarProperty Tag_castle = new ScalarProperty { Name = "Tag_castle", DataType =DataTypes.Boolean };
             	    Corel5Image2.ScalarProperties.Add(Tag_castle);
             	    ScalarProperty Tag_road = new ScalarProperty { Name = "Tag_road", DataType =DataTypes.Boolean };
             	    Corel5Image2.ScalarProperties.Add(Tag_road);
             	    ScalarProperty Tag_wall = new ScalarProperty { Name = "Tag_wall", DataType =DataTypes.Boolean };
             	    Corel5Image2.ScalarProperties.Add(Tag_wall);
             	    ScalarProperty Tag_canyon = new ScalarProperty { Name = "Tag_canyon", DataType =DataTypes.Boolean };
             	    Corel5Image2.ScalarProperties.Add(Tag_canyon);
             	    ScalarProperty Tag_plants = new ScalarProperty { Name = "Tag_plants", DataType =DataTypes.Boolean };
             	    Corel5Image2.ScalarProperties.Add(Tag_plants);
             	    ScalarProperty Tag_church = new ScalarProperty { Name = "Tag_church", DataType =DataTypes.Boolean };
             	    Corel5Image2.ScalarProperties.Add(Tag_church);
             	    ScalarProperty Tag_swimmers = new ScalarProperty { Name = "Tag_swimmers", DataType =DataTypes.Boolean };
             	    Corel5Image2.ScalarProperties.Add(Tag_swimmers);
             	    ScalarProperty Tag_market = new ScalarProperty { Name = "Tag_market", DataType =DataTypes.Boolean };
             	    Corel5Image2.ScalarProperties.Add(Tag_market);
             	    ScalarProperty Tag_city = new ScalarProperty { Name = "Tag_city", DataType =DataTypes.Boolean };
             	    Corel5Image2.ScalarProperties.Add(Tag_city);
             	    ScalarProperty Tag_jet = new ScalarProperty { Name = "Tag_jet", DataType =DataTypes.Boolean };
             	    Corel5Image2.ScalarProperties.Add(Tag_jet);
             	    ScalarProperty Tag_tusks = new ScalarProperty { Name = "Tag_tusks", DataType =DataTypes.Boolean };
             	    Corel5Image2.ScalarProperties.Add(Tag_tusks);
             	    ScalarProperty Tag_valley = new ScalarProperty { Name = "Tag_valley", DataType =DataTypes.Boolean };
             	    Corel5Image2.ScalarProperties.Add(Tag_valley);
             	    ScalarProperty Tag_athlete = new ScalarProperty { Name = "Tag_athlete", DataType =DataTypes.Boolean };
             	    Corel5Image2.ScalarProperties.Add(Tag_athlete);
             	    ScalarProperty Tag_horses = new ScalarProperty { Name = "Tag_horses", DataType =DataTypes.Boolean };
             	    Corel5Image2.ScalarProperties.Add(Tag_horses);
             	    ScalarProperty Tag_flight = new ScalarProperty { Name = "Tag_flight", DataType =DataTypes.Boolean };
             	    Corel5Image2.ScalarProperties.Add(Tag_flight);
             	    ScalarProperty Tag_frost = new ScalarProperty { Name = "Tag_frost", DataType =DataTypes.Boolean };
             	    Corel5Image2.ScalarProperties.Add(Tag_frost);
             	    ScalarProperty Tag_park = new ScalarProperty { Name = "Tag_park", DataType =DataTypes.Boolean };
             	    Corel5Image2.ScalarProperties.Add(Tag_park);
             	    ScalarProperty Tag_lawn = new ScalarProperty { Name = "Tag_lawn", DataType =DataTypes.Boolean };
             	    Corel5Image2.ScalarProperties.Add(Tag_lawn);
             	    ScalarProperty Tag_tundra = new ScalarProperty { Name = "Tag_tundra", DataType =DataTypes.Boolean };
             	    Corel5Image2.ScalarProperties.Add(Tag_tundra);
             	    ScalarProperty Tag_hut = new ScalarProperty { Name = "Tag_hut", DataType =DataTypes.Boolean };
             	    Corel5Image2.ScalarProperties.Add(Tag_hut);
             	    ScalarProperty Tag_train = new ScalarProperty { Name = "Tag_train", DataType =DataTypes.Boolean };
             	    Corel5Image2.ScalarProperties.Add(Tag_train);
             	    ScalarProperty Tag_flowers = new ScalarProperty { Name = "Tag_flowers", DataType =DataTypes.Boolean };
             	    Corel5Image2.ScalarProperties.Add(Tag_flowers);
             	    ScalarProperty Tag_steel = new ScalarProperty { Name = "Tag_steel", DataType =DataTypes.Boolean };
             	    Corel5Image2.ScalarProperties.Add(Tag_steel);
             	    ScalarProperty Tag_frozen = new ScalarProperty { Name = "Tag_frozen", DataType =DataTypes.Boolean };
             	    Corel5Image2.ScalarProperties.Add(Tag_frozen);
             	    ScalarProperty Tag_runway = new ScalarProperty { Name = "Tag_runway", DataType =DataTypes.Boolean };
             	    Corel5Image2.ScalarProperties.Add(Tag_runway);
             	    ScalarProperty Tag_tree = new ScalarProperty { Name = "Tag_tree", DataType =DataTypes.Boolean };
             	    Corel5Image2.ScalarProperties.Add(Tag_tree);
             	    ScalarProperty Tag_cat = new ScalarProperty { Name = "Tag_cat", DataType =DataTypes.Boolean };
             	    Corel5Image2.ScalarProperties.Add(Tag_cat);
             	    ScalarProperty Tag_shops = new ScalarProperty { Name = "Tag_shops", DataType =DataTypes.Boolean };
             	    Corel5Image2.ScalarProperties.Add(Tag_shops);
             	    ScalarProperty Tag_grass = new ScalarProperty { Name = "Tag_grass", DataType =DataTypes.Boolean };
             	    Corel5Image2.ScalarProperties.Add(Tag_grass);
             	    ScalarProperty Tag_sculpture = new ScalarProperty { Name = "Tag_sculpture", DataType =DataTypes.Boolean };
             	    Corel5Image2.ScalarProperties.Add(Tag_sculpture);
             	    ScalarProperty Tag_display = new ScalarProperty { Name = "Tag_display", DataType =DataTypes.Boolean };
             	    Corel5Image2.ScalarProperties.Add(Tag_display);
             	    ScalarProperty Tag_bridge = new ScalarProperty { Name = "Tag_bridge", DataType =DataTypes.Boolean };
             	    Corel5Image2.ScalarProperties.Add(Tag_bridge);
             	    ScalarProperty Tag_palace = new ScalarProperty { Name = "Tag_palace", DataType =DataTypes.Boolean };
             	    Corel5Image2.ScalarProperties.Add(Tag_palace);
             	    ScalarProperty Tag_door = new ScalarProperty { Name = "Tag_door", DataType =DataTypes.Boolean };
             	    Corel5Image2.ScalarProperties.Add(Tag_door);
             	    ScalarProperty Tag_mountain = new ScalarProperty { Name = "Tag_mountain", DataType =DataTypes.Boolean };
             	    Corel5Image2.ScalarProperties.Add(Tag_mountain);
             	    ScalarProperty Tag_scotland = new ScalarProperty { Name = "Tag_scotland", DataType =DataTypes.Boolean };
             	    Corel5Image2.ScalarProperties.Add(Tag_scotland);
             	    ScalarProperty Tag_snow = new ScalarProperty { Name = "Tag_snow", DataType =DataTypes.Boolean };
             	    Corel5Image2.ScalarProperties.Add(Tag_snow);
             	    ScalarProperty Tag_field = new ScalarProperty { Name = "Tag_field", DataType =DataTypes.Boolean };
             	    Corel5Image2.ScalarProperties.Add(Tag_field);
             	    ScalarProperty Tag_forest = new ScalarProperty { Name = "Tag_forest", DataType =DataTypes.Boolean };
             	    Corel5Image2.ScalarProperties.Add(Tag_forest);
             	    ScalarProperty Tag_branch = new ScalarProperty { Name = "Tag_branch", DataType =DataTypes.Boolean };
             	    Corel5Image2.ScalarProperties.Add(Tag_branch);
             	    ScalarProperty Tag_boats = new ScalarProperty { Name = "Tag_boats", DataType =DataTypes.Boolean };
             	    Corel5Image2.ScalarProperties.Add(Tag_boats);
             	    ScalarProperty Tag_beach = new ScalarProperty { Name = "Tag_beach", DataType =DataTypes.Boolean };
             	    Corel5Image2.ScalarProperties.Add(Tag_beach);
             	    ScalarProperty Tag_polar = new ScalarProperty { Name = "Tag_polar", DataType =DataTypes.Boolean };
             	    Corel5Image2.ScalarProperties.Add(Tag_polar);
             	    ScalarProperty Tag_buildings = new ScalarProperty { Name = "Tag_buildings", DataType =DataTypes.Boolean };
             	    Corel5Image2.ScalarProperties.Add(Tag_buildings);
             	    ScalarProperty Tag_hotel = new ScalarProperty { Name = "Tag_hotel", DataType =DataTypes.Boolean };
             	    Corel5Image2.ScalarProperties.Add(Tag_hotel);
             	    ScalarProperty Tag_nest = new ScalarProperty { Name = "Tag_nest", DataType =DataTypes.Boolean };
             	    Corel5Image2.ScalarProperties.Add(Tag_nest);
             	    ScalarProperty Tag_petals = new ScalarProperty { Name = "Tag_petals", DataType =DataTypes.Boolean };
             	    Corel5Image2.ScalarProperties.Add(Tag_petals);
             	    ScalarProperty Tag_plane = new ScalarProperty { Name = "Tag_plane", DataType =DataTypes.Boolean };
             	    Corel5Image2.ScalarProperties.Add(Tag_plane);
             	    ScalarProperty Tag_statue = new ScalarProperty { Name = "Tag_statue", DataType =DataTypes.Boolean };
             	    Corel5Image2.ScalarProperties.Add(Tag_statue);
             	    ScalarProperty Tag_waves = new ScalarProperty { Name = "Tag_waves", DataType =DataTypes.Boolean };
             	    Corel5Image2.ScalarProperties.Add(Tag_waves);
             	    ScalarProperty Tag_arch = new ScalarProperty { Name = "Tag_arch", DataType =DataTypes.Boolean };
             	    Corel5Image2.ScalarProperties.Add(Tag_arch);
             	    ScalarProperty Tag_desert = new ScalarProperty { Name = "Tag_desert", DataType =DataTypes.Boolean };
             	    Corel5Image2.ScalarProperties.Add(Tag_desert);
             	    ScalarProperty Tag_pool = new ScalarProperty { Name = "Tag_pool", DataType =DataTypes.Boolean };
             	    Corel5Image2.ScalarProperties.Add(Tag_pool);
             	    ScalarProperty Tag_cliff = new ScalarProperty { Name = "Tag_cliff", DataType =DataTypes.Boolean };
             	    Corel5Image2.ScalarProperties.Add(Tag_cliff);
             	    ScalarProperty Tag_tiger = new ScalarProperty { Name = "Tag_tiger", DataType =DataTypes.Boolean };
             	    Corel5Image2.ScalarProperties.Add(Tag_tiger);
             	    ScalarProperty Tag_close__up = new ScalarProperty { Name = "Tag_close__up", DataType =DataTypes.Boolean };
             	    Corel5Image2.ScalarProperties.Add(Tag_close__up);
             	    ScalarProperty Tag_reflection = new ScalarProperty { Name = "Tag_reflection", DataType =DataTypes.Boolean };
             	    Corel5Image2.ScalarProperties.Add(Tag_reflection);
             	    ScalarProperty Tag_ocean = new ScalarProperty { Name = "Tag_ocean", DataType =DataTypes.Boolean };
             	    Corel5Image2.ScalarProperties.Add(Tag_ocean);
             	    ScalarProperty Tag_tulip = new ScalarProperty { Name = "Tag_tulip", DataType =DataTypes.Boolean };
             	    Corel5Image2.ScalarProperties.Add(Tag_tulip);
             	    ScalarProperty Tag_shore = new ScalarProperty { Name = "Tag_shore", DataType =DataTypes.Boolean };
             	    Corel5Image2.ScalarProperties.Add(Tag_shore);
             	    ScalarProperty Tag_sunset = new ScalarProperty { Name = "Tag_sunset", DataType =DataTypes.Boolean };
             	    Corel5Image2.ScalarProperties.Add(Tag_sunset);
             	    // Synchronize to alter the database schema.
             	    context.DataModel.Modules.Add(module);
             	    context.DataModel.Synchronize();

             	    // Generate Extensions Assembly.
             	    using (FileStream fout = new FileStream(@"../data/code/Zentity.Corel52.dll", FileMode.Create, FileAccess.Write))
             	 	 {
             	 	  byte[] rawAssembly = context.DataModel.GenerateExtensionsAssembly(
             	 	    "Zentity.Corel52", false, null, new string[] { "Zentity.Corel52" }, null);

             	 	   fout.Write(rawAssembly, 0, rawAssembly.Length);

              }
             	    // Generate Entity Framework artifacts.

             	    EFArtifactGenerationResults results = context.DataModel.GenerateEFArtifacts("Zentity.Corel52");
             	    results.Csdls.Where(tuple => tuple.Key == "Zentity.Core").First().Value.Save(@"../data/code/Zentity.Corel52.ExtendedCore.csdl");
             	    results.Csdls.Where(tuple => tuple.Key == "Zentity.Corel52").First().Value.Save(@"../data/code/Zentity.Corel52.csdl");
             	    results.Msl.Save(@"../data/code/Zentity.Corel52.Consolidated.msl");
             	    results.Ssdl.Save(@"../data/code/Zentity.Corel52.Consolidated.ssdl");
        }
コード例 #5
0
ファイル: DataModelService.cs プロジェクト: Plankankul/Zenity
        public void CreateDataModel(string rdfsXml, string schemaXml, string modelNamespace)
        {
            #region Validating Parameters

            if (string.IsNullOrEmpty(rdfsXml) || string.IsNullOrWhiteSpace(rdfsXml) ||
                string.IsNullOrEmpty(schemaXml) || string.IsNullOrWhiteSpace(schemaXml) ||
                string.IsNullOrEmpty(modelNamespace) || string.IsNullOrWhiteSpace(modelNamespace))
            {
                throw new FaultException(new FaultReason(Properties.Messages.NullEmptyMessage));
                //throw new FaultException<ArgumentNullException>(new ArgumentNullException(Properties.Messages.NullEmptyTitle), new FaultReason(Properties.Messages.NullEmptyMessage));
            }

            XDocument rdfsDocument;
            XDocument schemaDocument;
            try
            {
                rdfsDocument   = XDocument.Parse(rdfsXml);
                schemaDocument = XDocument.Parse(schemaXml);
            }
            catch (Exception)
            {
                throw new FaultException(new FaultReason(Properties.Messages.XmlParseFaultReason));
                //throw new FaultException<System.Xml.XmlException>(new System.Xml.XmlException(), new FaultReason(Properties.Messages.XmlParseFaultReason));
            }

            #endregion

            DataModel              dataModel;
            DataModelModule        dataModelModule;
            ResourceTypeCollection resourceTypes;
            try
            {
                using (ZentityContext zentityContext = new ZentityContext())
                {
                    dataModel = zentityContext.DataModel;
                    if (dataModel != null)
                    {
                        DataModelModule dataModelModuleExists = dataModel.Modules.FirstOrDefault(m => m.NameSpace.Equals(modelNamespace));
                        if (dataModelModuleExists == null)
                        {
                            dataModelModule = dataModel.Modules[Properties.Resources.ZentityCore];
                            if (dataModelModule != null)
                            {
                                resourceTypes = dataModelModule.ResourceTypes;
                                if (resourceTypes != null && resourceTypes.Count > 0)
                                {
                                    ResourceType baseResourceType = resourceTypes[Properties.Resources.ResourceName];
                                    if (baseResourceType != null)
                                    {
                                        DataModelModule newDataModelModule = DataModelModule.CreateFromRdfs(baseResourceType, rdfsDocument, schemaDocument, modelNamespace, false);
                                        zentityContext.DataModel.Modules.Add(newDataModelModule);
                                        zentityContext.DataModel.Synchronize();
                                    }
                                    else
                                    {
                                        throw new FaultException(new FaultReason(Properties.Messages.BaseResourceTypeFaultReason));
                                        //throw new FaultException<ObjectNotFoundException>(new ObjectNotFoundException(string.Format(Properties.Messages.ResourceTypeFormat, Properties.Resources.ResourceName)), new FaultReason(Properties.Messages.BaseResourceTypeFaultReason));
                                    }
                                }
                                else
                                {
                                    throw new FaultException(new FaultReason(Properties.Messages.NullResourceTypesFaultReason));
                                    //throw new FaultException<ObjectNotFoundException>(new ObjectNotFoundException(Properties.Resources.ResourceTypeName), new FaultReason(Properties.Messages.NullResourceTypesFaultReason));
                                }
                            }
                            else
                            {
                                throw new FaultException(new FaultReason(Properties.Messages.NullModelConfigurationMessage));
                                //throw new FaultException<ObjectNotFoundException>(new ObjectNotFoundException(string.Format(Properties.Messages.DataModelFormat, Properties.Resources.ZentityCore)), new FaultReason(Properties.Messages.NullModelConfigurationMessage));
                            }
                        }
                        else
                        {
                            throw new FaultException(new FaultReason(Properties.Messages.DuplicateDataModelFaultReason));
                            //throw new FaultException<DuplicateNameException>(new DuplicateNameException(Properties.Resources.DataModelName), new FaultReason(Properties.Messages.DuplicateDataModelFaultReason));
                        }
                    }
                    else
                    {
                        throw new FaultException(new FaultReason(Properties.Messages.ContextFaultReason));
                        //throw new FaultException<ObjectNotFoundException>(new ObjectNotFoundException(Properties.Messages.ZentityContext), new FaultReason(Properties.Messages.ContextFaultReason));
                    }
                }
            }
            catch (FaultException)
            {
                throw;
            }
            catch (Exception exception)
            {
                throw new FaultException(new FaultReason(exception.ToString()));
                //throw new FaultException<Exception>(exception, new FaultReason(Properties.Messages.ExceptionFaultReason));
            }
        }