|
11 | 11 | import com.expediagroup.sdk.rapid.examples.scenarios.geography.ParseRegionWithMultiPolygonCoordinatesScenario; |
12 | 12 | import org.slf4j.Logger; |
13 | 13 | import org.slf4j.LoggerFactory; |
14 | | - |
15 | 14 | import java.util.concurrent.ExecutionException; |
16 | 15 |
|
17 | | - |
| 16 | +/** |
| 17 | + * This is the main class for the Rapid SDK Geography demonstration. |
| 18 | + */ |
18 | 19 | public class RapidSdkGeographyDemoApp { |
19 | 20 |
|
20 | | - private static final Logger logger = LoggerFactory.getLogger(RapidSdkGeographyDemoApp.class); |
| 21 | + private static final Logger logger = LoggerFactory.getLogger(RapidSdkGeographyDemoApp.class); |
21 | 22 |
|
22 | | - public static void main(String[] args) throws ExecutionException, InterruptedException { |
| 23 | + public static void main(String[] args) throws ExecutionException, InterruptedException { |
23 | 24 |
|
24 | | - logger.info("======================================================================================="); |
25 | | - logger.info("======================================================================================="); |
26 | | - logger.info("== =="); |
27 | | - logger.info("== Howdy! This is a demonstration of Expedia Group RAPID SDK Geography, Enjoy! =="); |
28 | | - logger.info("== =="); |
29 | | - logger.info("======================================================================================="); |
30 | | - logger.info("======================================================================================="); |
| 25 | + logger.info("================================================================================"); |
| 26 | + logger.info("================================================================================"); |
| 27 | + logger.info("== =="); |
| 28 | + logger.info("==Howdy! This is a demonstration of Expedia Group RAPID SDK Geography, Enjoy! =="); |
| 29 | + logger.info("== =="); |
| 30 | + logger.info("================================================================================"); |
| 31 | + logger.info("================================================================================"); |
31 | 32 |
|
32 | | - logger.info("=============================== Running Geography Scenarios ==========================="); |
| 33 | + logger.info("============================ Running Geography Scenarios ======================="); |
33 | 34 |
|
34 | 35 | /* Run Get List of Region Names Scenario using the default profile |
35 | 36 | This scenario demonstrates the following: |
36 | 37 | 1. Getting all regions with details in a paginated manner |
37 | 38 | 2. Filtering region names |
38 | 39 | */ |
39 | | - GetListOfRegionNamesScenario getListOfRegionNamesScenario = new GetListOfRegionNamesScenario(); |
40 | | - getListOfRegionNamesScenario.setProfile(new DefaultRapidPartnerProfile()); |
41 | | - getListOfRegionNamesScenario.run(); |
| 40 | + GetListOfRegionNamesScenario getListOfRegionNamesScenario = new GetListOfRegionNamesScenario(); |
| 41 | + getListOfRegionNamesScenario.setProfile(new DefaultRapidPartnerProfile()); |
| 42 | + getListOfRegionNamesScenario.run(); |
42 | 43 |
|
43 | 44 | /* Run Get Region Name of Region Scenario using the default profile |
44 | 45 | This scenario demonstrates the following: |
45 | 46 | 1. Getting region details by region id |
46 | 47 | 2. Accessing region details |
47 | 48 | */ |
48 | | - GetRegionDetailsAndPropertyIdsScenario getRegionNameOfRegionScenario = new GetRegionDetailsAndPropertyIdsScenario(); |
49 | | - getRegionNameOfRegionScenario.setProfile(new DefaultRapidPartnerProfile()); |
50 | | - getRegionNameOfRegionScenario.run(); |
| 49 | + GetRegionDetailsAndPropertyIdsScenario getRegionNameOfRegionScenario = |
| 50 | + new GetRegionDetailsAndPropertyIdsScenario(); |
| 51 | + getRegionNameOfRegionScenario.setProfile(new DefaultRapidPartnerProfile()); |
| 52 | + getRegionNameOfRegionScenario.run(); |
51 | 53 |
|
52 | 54 | /* Run Get Region By Ancestor Id Scenario using the default profile |
53 | 55 | This scenario demonstrates the following: |
54 | 56 | 1. Getting paginated regions details by ancestor id |
55 | 57 | 2. Accessing region details |
56 | 58 | */ |
57 | | - GetRegionByAncestorIdScenario getRegionByAncestorIdScenario = new GetRegionByAncestorIdScenario(); |
58 | | - getRegionByAncestorIdScenario.setProfile(new DefaultRapidPartnerProfile()); |
59 | | - getRegionByAncestorIdScenario.run(); |
| 59 | + GetRegionByAncestorIdScenario getRegionByAncestorIdScenario = |
| 60 | + new GetRegionByAncestorIdScenario(); |
| 61 | + getRegionByAncestorIdScenario.setProfile(new DefaultRapidPartnerProfile()); |
| 62 | + getRegionByAncestorIdScenario.run(); |
60 | 63 |
|
61 | 64 | /* Run Get Region With MultiPolygon Coordinates Scenario using the default profile |
62 | 65 | This scenario demonstrates the following: |
63 | 66 | 1. Getting region details with multipolygon coordinates by region id |
64 | 67 | 2. Accessing region coordinates of type multipolygon |
65 | 68 | 3. Accessing every polygon list of coordinates. |
66 | 69 | */ |
67 | | - ParseRegionWithMultiPolygonCoordinatesScenario parseRegionWithMultiPolygonCoordinatesScenario = new ParseRegionWithMultiPolygonCoordinatesScenario(); |
68 | | - parseRegionWithMultiPolygonCoordinatesScenario.setProfile(new DefaultRapidPartnerProfile()); |
69 | | - parseRegionWithMultiPolygonCoordinatesScenario.run(); |
| 70 | + ParseRegionWithMultiPolygonCoordinatesScenario parseRegionWithMultiPolygonCoordinatesScenario = |
| 71 | + new ParseRegionWithMultiPolygonCoordinatesScenario(); |
| 72 | + parseRegionWithMultiPolygonCoordinatesScenario.setProfile(new DefaultRapidPartnerProfile()); |
| 73 | + parseRegionWithMultiPolygonCoordinatesScenario.run(); |
70 | 74 |
|
71 | 75 | /* Run Parse Region Ancestors Scenario using the default profile |
72 | 76 | This scenario demonstrates the following: |
73 | 77 | 1. Getting region details with ancestors by region id |
74 | 78 | 2. Parsing region ancestors |
75 | 79 | */ |
76 | | - ParseRegionAncestorsScenario parseRegionAncestorsScenario = new ParseRegionAncestorsScenario(); |
77 | | - parseRegionAncestorsScenario.setProfile(new DefaultRapidPartnerProfile()); |
78 | | - parseRegionAncestorsScenario.run(); |
| 80 | + ParseRegionAncestorsScenario parseRegionAncestorsScenario = new ParseRegionAncestorsScenario(); |
| 81 | + parseRegionAncestorsScenario.setProfile(new DefaultRapidPartnerProfile()); |
| 82 | + parseRegionAncestorsScenario.run(); |
79 | 83 |
|
80 | 84 | /* Run Parse Region Descendants Scenario using the default profile |
81 | 85 | This scenario demonstrates the following: |
82 | 86 | 1. Getting region details with descendants by region id |
83 | 87 | 2. Parsing region descendants |
84 | 88 | */ |
85 | | - ParseRegionDescendantsScenario parseRegionDescendantsScenario = new ParseRegionDescendantsScenario(); |
86 | | - parseRegionDescendantsScenario.setProfile(new DefaultRapidPartnerProfile()); |
87 | | - parseRegionDescendantsScenario.run(); |
| 89 | + ParseRegionDescendantsScenario parseRegionDescendantsScenario = |
| 90 | + new ParseRegionDescendantsScenario(); |
| 91 | + parseRegionDescendantsScenario.setProfile(new DefaultRapidPartnerProfile()); |
| 92 | + parseRegionDescendantsScenario.run(); |
88 | 93 |
|
89 | 94 | /* Run Parse Region Coordinates Scenario using the default profile |
90 | 95 | This scenario demonstrates the following: |
91 | 96 | 1. Getting region details with coordinates by region id |
92 | 97 | 2. Parsing region coordinates |
93 | 98 | */ |
94 | | - ParseRegionCoordinatesScenario parseRegionCoordinatesScenario = new ParseRegionCoordinatesScenario(); |
95 | | - parseRegionCoordinatesScenario.setProfile(new DefaultRapidPartnerProfile()); |
96 | | - parseRegionCoordinatesScenario.run(); |
| 99 | + ParseRegionCoordinatesScenario parseRegionCoordinatesScenario = |
| 100 | + new ParseRegionCoordinatesScenario(); |
| 101 | + parseRegionCoordinatesScenario.setProfile(new DefaultRapidPartnerProfile()); |
| 102 | + parseRegionCoordinatesScenario.run(); |
97 | 103 |
|
98 | 104 | /* Run Parse Region Categories Scenario using the default profile |
99 | 105 | This scenario demonstrates the following: |
100 | 106 | 1. Getting region details with property ids by region id |
101 | 107 | 2. Parsing region categories |
102 | 108 | */ |
103 | | - ParseRegionCategoriesScenario parseRegionCategoriesScenario = new ParseRegionCategoriesScenario(); |
104 | | - parseRegionCategoriesScenario.setProfile(new DefaultRapidPartnerProfile()); |
105 | | - parseRegionCategoriesScenario.run(); |
106 | | - |
107 | | - logger.info("=============================== End of Geography Scenarios ==========================="); |
108 | | - |
109 | | - logger.info("======================================================================================="); |
110 | | - logger.info("======================================================================================="); |
111 | | - logger.info("== =="); |
112 | | - logger.info("== That's all folks! That was the demonstration of RAPID SDK Geography. =="); |
113 | | - logger.info("== =="); |
114 | | - logger.info("======================================================================================="); |
115 | | - logger.info("======================================================================================="); |
116 | | - System.exit(0); |
117 | | - } |
| 109 | + ParseRegionCategoriesScenario parseRegionCategoriesScenario = |
| 110 | + new ParseRegionCategoriesScenario(); |
| 111 | + parseRegionCategoriesScenario.setProfile(new DefaultRapidPartnerProfile()); |
| 112 | + parseRegionCategoriesScenario.run(); |
| 113 | + |
| 114 | + logger.info("============================ End of Geography Scenarios ========================"); |
| 115 | + |
| 116 | + logger.info("================================================================================"); |
| 117 | + logger.info("================================================================================"); |
| 118 | + logger.info("== =="); |
| 119 | + logger.info("== That's all folks! That was the demonstration of RAPID SDK Geography. =="); |
| 120 | + logger.info("== =="); |
| 121 | + logger.info("================================================================================"); |
| 122 | + logger.info("================================================================================"); |
| 123 | + System.exit(0); |
| 124 | + } |
118 | 125 | } |
0 commit comments