class Coverage(_ResourceBase): resource_type = "coverage" url_part_stores = 'coveragestores' url_part_types = 'coverages' title = xml_property("title") abstract = xml_property("abstract") enabled = xml_property("enabled") advertised = xml_property("advertised", default="true") native_bbox = xml_property("nativeBoundingBox", bbox) latlon_bbox = xml_property("latLonBoundingBox", bbox) projection = xml_property("srs") projection_policy = xml_property("projectionPolicy") keywords = xml_property("keywords", string_list) request_srs_list = xml_property("requestSRS", string_list) response_srs_list = xml_property("responseSRS", string_list) supported_formats = xml_property("supportedFormats", string_list) metadata_links = xml_property("metadataLinks", metadata_link_list) writers = dict(title=write_string("title"), abstract=write_string("abstract"), enabled=write_bool("enabled"), advertised=write_bool("advertised"), nativeBoundingBox=write_bbox("nativeBoundingBox"), latLonBoundingBox=write_bbox("latLonBoundingBox"), srs=write_string("srs"), projection_policy=write_string("projectionPolicy"), keywords=write_string_list("keywords"), metadataLinks=write_metadata_link_list("metadataLinks"), requestSRS=write_string_list("requestSRS"), responseSRS=write_string_list("responseSRS"), supportedFormats=write_string_list("supportedFormats"))
class Coverage(_ResourceBase): resource_type = "coverage" url_part_stores = 'coveragestores' url_part_types = 'coverages' title = xml_property("title") native_name = xml_property("nativeName") native_format = xml_property("nativeFormat") native_crs = xml_property("nativeCRS") default_interpolation_method = xml_property("defaultInterpolationMethod") abstract = xml_property("abstract") description = xml_property("description") enabled = xml_property("enabled") advertised = xml_property("advertised", default="true") native_bbox = xml_property("nativeBoundingBox", bbox) latlon_bbox = xml_property("latLonBoundingBox", bbox) projection = xml_property("srs") projection_policy = xml_property("projectionPolicy") keywords = xml_property("keywords", string_list) request_srs_list = xml_property("requestSRS", string_list) response_srs_list = xml_property("responseSRS", string_list) supported_formats = xml_property("supportedFormats", string_list) metadata_links = xml_property("metadataLinks", metadata_link_list) metadata = xml_property("metadata", metadata) interpolation_methods = xml_property("interpolationMethods", string_list) writers = { 'title': write_string("title"), 'native_name': write_string("nativeName"), 'native_format': write_string("nativeFormat"), 'native_crs': write_string("nativeCRS"), 'default_interpolation_method': write_string("defaultInterpolationMethod"), 'description': write_string("description"), 'abstract': write_string("abstract"), 'enabled': write_bool("enabled"), 'advertised': write_bool("advertised"), 'nativeBoundingBox': write_bbox("nativeBoundingBox"), 'latLonBoundingBox': write_bbox("latLonBoundingBox"), 'srs': write_string("srs"), 'projection_policy': write_string("projectionPolicy"), 'keywords': write_string_list("keywords"), 'metadataLinks': write_metadata_link_list("metadataLinks"), 'requestSRS': write_string_list("requestSRS"), 'responseSRS': write_string_list("responseSRS"), 'supportedFormats': write_string_list("supportedFormats"), 'interpolation_methods': write_string_list("interpolationMethods"), 'metadata': write_metadata("metadata") }
class FeatureType(_ResourceBase): resource_type = "featureType" url_part_stores = 'datastores' url_part_types = 'featuretypes' title = xml_property("title") abstract = xml_property("abstract") enabled = xml_property("enabled") advertised = xml_property("advertised", default="true") native_bbox = xml_property("nativeBoundingBox", bbox) latlon_bbox = xml_property("latLonBoundingBox", bbox) projection = xml_property("srs") projection_policy = xml_property("projectionPolicy") keywords = xml_property("keywords", string_list) attributes = xml_property("attributes", attribute_list) metadata_links = xml_property("metadataLinks", metadata_link_list) writers = dict(name=write_string("name"), title=write_string("title"), abstract=write_string("abstract"), enabled=write_bool("enabled"), advertised=write_bool("advertised"), nativeBoundingBox=write_bbox("nativeBoundingBox"), latLonBoundingBox=write_bbox("latLonBoundingBox"), srs=write_string("srs"), nativeCRS=write_string("nativeCRS"), projectionPolicy=write_string("projectionPolicy"), keywords=write_string_list("keywords"), metadataLinks=write_metadata_link_list("metadataLinks"))
class Coverage(ResourceInfo): def __init__(self, catalog, workspace, store, name): super(Coverage, self).__init__() self.catalog = catalog self.workspace = workspace self.store = store self.name = name @property def href(self): return url(self.catalog.service_url, ["workspaces", self.workspace.name, "coveragestores", self.store.name, "coverages", self.name + ".xml"]) resource_type = "coverage" save_method = "PUT" title = xml_property("title") abstract = xml_property("abstract") enabled = xml_property("enabled") native_bbox = xml_property("nativeBoundingBox", bbox) latlon_bbox = xml_property("latLonBoundingBox", bbox) projection = xml_property("srs") projection_policy = xml_property("projectionPolicy") keywords = xml_property("keywords", string_list) request_srs_list = xml_property("requestSRS", string_list) response_srs_list = xml_property("responseSRS", string_list) supported_formats = xml_property("supportedFormats", string_list) metadata_links = xml_property("metadataLinks", metadata_link_list) writers = dict( title = write_string("title"), abstract = write_string("abstract"), enabled = write_bool("enabled"), nativeBoundingBox = write_bbox("nativeBoundingBox"), latLonBoundingBox = write_bbox("latLonBoundingBox"), srs = write_string("srs"), projection_policy = write_string("projectionPolicy"), keywords = write_string_list("keywords"), metadataLinks = write_metadata_link_list("metadataLinks"), requestSRS = write_string_list("requestSRS"), responseSRS = write_string_list("responseSRS"), supportedFormats = write_string_list("supportedFormats") )
class WmsLayer(ResourceInfo): resource_type = "wmsLayer" save_method = settings.PUT def __init__(self, catalog, workspace, store, name): super(WmsLayer, self).__init__() self.catalog = catalog self.workspace = workspace self.store = store self.name = name @property def href(self): return urljoin( self.catalog.service_url, "workspaces/{}/wmsstores/{}/wmslayers/{}.xml".format( self.workspace.name, self.store.name, self.name ) ) title = xml_property("title") description = xml_property("description") abstract = xml_property("abstract") keywords = xml_property("keywords", string_list) # nativeCRS projection = xml_property("srs") native_bbox = xml_property("nativeBoundingBox", bbox) latlon_bbox = xml_property("latLonBoundingBox", bbox) projection_policy = xml_property("projectionPolicy") enabled = xml_property("enabled", lambda x: x.text == "true") advertised = xml_property("advertised", lambda x: x.text == "true", default=True) metadata_links = xml_property("metadataLinks", metadata_link_list) writers = { 'title': write_string("title"), 'description': write_string("description"), 'abstract': write_string("abstract"), 'keywords': write_string_list("keywords"), # nativeCRS 'srs': write_string("srs"), 'nativeBoundingBox': write_bbox("nativeBoundingBox"), 'latLonBoundingBox': write_bbox("latLonBoundingBox"), 'projectionPolicy': write_string("projectionPolicy"), 'enabled': write_bool("enabled"), 'advertised': write_bool("advertised"), 'metadataLinks': write_metadata_link_list("metadataLinks") }
class WmsLayer(ResourceInfo): resource_type = "wmsLayer" save_method = "PUT" def __init__(self, catalog, workspace, store, name): super(WmsLayer, self).__init__() self.catalog = catalog self.workspace = workspace self.store = store self.name = name @property def href(self): return "%s/workspaces/%s/wmsstores/%s/wmslayers/%s.xml" % ( self.catalog.service_url, self.workspace.name, self.store.name, self.name ) title = xml_property("title") description = xml_property("description") abstract = xml_property("abstract") keywords = xml_property("keywords", string_list) # nativeCRS projection = xml_property("srs") native_bbox = xml_property("nativeBoundingBox", bbox) latlon_bbox = xml_property("latLonBoundingBox", bbox) projection_policy = xml_property("projectionPolicy") enabled = xml_property("enabled", lambda x: x.text == "true") advertised = xml_property("advertised", lambda x: x.text == "true", default=True) metadata_links = xml_property("metadataLinks", metadata_link_list) writers = dict( title = write_string("title"), description = write_string("description"), abstract = write_string("abstract"), keywords = write_string_list("keywords"), # nativeCRS projection = write_string("srs"), nativeBoundingBox = write_bbox("nativeBoundingBox"), latLonBoundingBox = write_bbox("latLonBoundingBox"), projection_policy = write_string("projectionPolicy"), enabled = write_bool("enabled"), advertised = write_bool("advertised"), metadataLinks = write_metadata_link_list("metadataLinks") )
class FeatureType(ResourceInfo): resource_type = "featureType" save_method = "PUT" def __init__(self, catalog, workspace, store, name): super(FeatureType, self).__init__() assert isinstance(store, ResourceInfo) assert isinstance(name, basestring) self.catalog = catalog self.workspace = workspace self.store = store self.name = name @property def href(self): return url(self.catalog.service_url, [ "workspaces", self.workspace.name, "datastores", self.store.name, "featuretypes", self.name + ".xml" ]) title = xml_property("title") abstract = xml_property("abstract") enabled = xml_property("enabled") advertised = xml_property("advertised") native_bbox = xml_property("nativeBoundingBox", bbox) latlon_bbox = xml_property("latLonBoundingBox", bbox) projection = xml_property("srs") projection_policy = xml_property("projectionPolicy") keywords = xml_property("keywords", string_list) attributes = xml_property("attributes", attribute_list) metadata_links = xml_property("metadataLinks", metadata_link_list) writers = dict(title=write_string("title"), abstract=write_string("abstract"), enabled=write_bool("enabled"), advertised=write_bool("advertised"), nativeBoundingBox=write_bbox("nativeBoundingBox"), latLonBoundingBox=write_bbox("latLonBoundingBox"), srs=write_string("srs"), projectionPolicy=write_string("projectionPolicy"), keywords=write_string_list("keywords"), metadataLinks=write_metadata_link_list("metadataLinks"))
class FeatureType(_ResourceBase): resource_type = "featureType" url_part_stores = 'datastores' url_part_types = 'featuretypes' title = xml_property("title") native_name = xml_property("nativeName") abstract = xml_property("abstract") enabled = xml_property("enabled") advertised = xml_property("advertised", default="true") native_bbox = xml_property("nativeBoundingBox", bbox) latlon_bbox = xml_property("latLonBoundingBox", bbox) projection = xml_property("srs") projection_policy = xml_property("projectionPolicy") keywords = xml_property("keywords", string_list) attributes = xml_property("attributes", attribute_list) metadata_links = xml_property("metadataLinks", metadata_link_list) metadata = xml_property("metadata", metadata) cqlFilter = xml_property("cqlFilter") writers = { 'name': write_string("name"), 'nativeName': write_string("nativeName"), 'title': write_string("title"), 'abstract': write_string("abstract"), 'enabled': write_bool("enabled"), 'advertised': write_bool("advertised"), 'nativeBoundingBox': write_bbox("nativeBoundingBox"), 'latLonBoundingBox': write_bbox("latLonBoundingBox"), 'srs': write_string("srs"), 'nativeCRS': write_string("nativeCRS"), 'projectionPolicy': write_string("projectionPolicy"), 'keywords': write_string_list("keywords"), 'metadataLinks': write_metadata_link_list("metadataLinks"), 'metadata': write_metadata("metadata"), 'cqlFilter': write_string('cqlFilter') }
class FeatureType(_ResourceBase): resource_type = "featureType" url_part_stores = "datastores" url_part_types = "featuretypes" title = xml_property("title") native_name = xml_property("nativeName") abstract = xml_property("abstract") enabled = xml_property("enabled") advertised = xml_property("advertised", default="true") native_bbox = xml_property("nativeBoundingBox", bbox) latlon_bbox = xml_property("latLonBoundingBox", bbox) projection = xml_property("srs") projection_policy = xml_property("projectionPolicy") keywords = xml_property("keywords", string_list) attributes = xml_property("attributes", attribute_list) metadata_links = xml_property("metadataLinks", metadata_link_list) metadata = xml_property("metadata", metadata) writers = { "name": write_string("name"), "nativeName": write_string("nativeName"), "title": write_string("title"), "abstract": write_string("abstract"), "enabled": write_bool("enabled"), "advertised": write_bool("advertised"), "nativeBoundingBox": write_bbox("nativeBoundingBox"), "latLonBoundingBox": write_bbox("latLonBoundingBox"), "srs": write_string("srs"), "nativeCRS": write_string("nativeCRS"), "projectionPolicy": write_string("projectionPolicy"), "keywords": write_string_list("keywords"), "metadataLinks": write_metadata_link_list("metadataLinks"), "metadata": write_metadata("metadata"), }