use of com.sldeditor.common.datasource.DataSourcePropertiesInterface in project sldeditor by robward-scisys.
the class DataSourceConnectorShapeFile method getDataSourceProperties.
/* (non-Javadoc)
* @see com.sldeditor.datasource.connector.DataSourceConnectorInterface#getDataSourceProperties()
*/
@Override
public DataSourcePropertiesInterface getDataSourceProperties(Map<String, String> propertyMap) {
DataSourcePropertiesInterface properties = new DataSourceProperties(this);
properties.setPropertyMap(propertyMap);
return properties;
}
use of com.sldeditor.common.datasource.DataSourcePropertiesInterface in project sldeditor by robward-scisys.
the class MXDParser method processDataSource.
/**
* Process fields.
*
* @param layerName the layer name
* @param dataSourcePropertiesElement the data source properties element
* @return the data source properties
*/
private DataSourcePropertiesInterface processDataSource(String layerName, JsonElement dataSourcePropertiesElement) {
Map<String, String> propertyMap = new LinkedHashMap<String, String>();
if (dataSourcePropertiesElement != null) {
JsonObject dsObj = dataSourcePropertiesElement.getAsJsonObject();
JsonElement typeElement = dsObj.get(DatasourceKeys.TYPE);
if (typeElement != null) {
propertyMap.put(DatasourceKeys.TYPE, typeElement.getAsString());
}
JsonElement pathElement = dsObj.get(DatasourceKeys.PATH);
if (pathElement != null) {
propertyMap.put(DatasourceKeys.PATH, pathElement.getAsString());
}
JsonObject properties = dsObj.getAsJsonObject(DatasourceKeys.PROPERTIES);
if (properties != null) {
for (Map.Entry<String, JsonElement> field : properties.entrySet()) {
propertyMap.put(field.getKey(), field.getValue().getAsString());
}
}
}
DataSourcePropertiesInterface dataSourceProperties = DataSourceManager.getInstance().convert(propertyMap);
return dataSourceProperties;
}
Aggregations