use of com.revolsys.collection.map.MapEx in project com.revolsys.open by revolsys.
the class ArcGisResponse method newObject.
public static <T extends ObjectWithProperties> T newObject(final Class<T> clazz, final MapEx properties, final String name) {
final MapEx values = properties.getValue(name);
if (values == null) {
return null;
} else {
try {
final T value = clazz.newInstance();
value.setProperties(values);
return value;
} catch (final Throwable t) {
t.printStackTrace();
return null;
}
}
}
use of com.revolsys.collection.map.MapEx in project com.revolsys.open by revolsys.
the class WebServiceConnection method getWebService.
@SuppressWarnings("unchecked")
public <W extends WebService<?>> W getWebService() {
synchronized (this) {
if (this.webService == null || this.webService.isClosed()) {
this.webService = null;
try {
final MapEx config = getConfig();
this.webService = MapObjectFactory.toObject(config);
} catch (final Throwable e) {
Exceptions.throwUncheckedException(e);
}
}
}
return (W) this.webService;
}
use of com.revolsys.collection.map.MapEx in project com.revolsys.open by revolsys.
the class WebServiceConnection method refresh.
@Override
public void refresh() {
final WebService<?> webService = getWebService();
final MapEx config = getConfig();
webService.setProperties(config);
webService.refresh();
}
use of com.revolsys.collection.map.MapEx in project com.revolsys.open by revolsys.
the class TestFile method toMap.
@Override
public MapEx toMap() {
final MapEx map = new LinkedHashMapEx();
map.put("type", "test");
addToMap(map, "testDescription", this.testDescription);
final Map<String, Object> properties = getProperties();
addToMap(map, "properties", properties, Collections.emptyMap());
return map;
}
use of com.revolsys.collection.map.MapEx in project com.revolsys.open by revolsys.
the class TestCase method toMap.
@Override
public MapEx toMap() {
final MapEx map = new LinkedHashMapEx();
map.put("type", "test");
if (Property.hasValue(this.testDescription)) {
map.put("description", this.testDescription);
}
addToMap(map, "geometryFactory", this.geometryFactory);
final Map<String, Object> properties = new LinkedHashMap<>();
if (this.testFile != null) {
addAllToMap(properties, this.testFile.getProperties());
}
addToMap(properties, "a", this.a);
addToMap(properties, "b", this.b);
if (!properties.isEmpty()) {
map.put("properties", properties);
}
// MapSerializerUtil.add(map, "tests", tests);
return map;
}
Aggregations