2019-12-13 15:48:20 +01:00
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
|
2019-12-11 11:31:25 +01:00
|
|
|
import ckan.plugins as p
|
2019-12-11 12:44:09 +01:00
|
|
|
import ckanext.spatial.views as blueprints
|
2019-12-13 15:48:20 +01:00
|
|
|
from ckanext.spatial.cli import get_commands
|
|
|
|
|
2019-12-11 11:31:25 +01:00
|
|
|
|
|
|
|
class SpatialQueryMixin(p.SingletonPlugin):
|
2019-12-11 12:44:09 +01:00
|
|
|
p.implements(p.IBlueprint)
|
2019-12-13 15:48:20 +01:00
|
|
|
p.implements(p.IClick)
|
2019-12-11 11:31:25 +01:00
|
|
|
|
2019-12-11 12:44:09 +01:00
|
|
|
# IBlueprint
|
2019-12-11 11:31:25 +01:00
|
|
|
|
2019-12-11 12:44:09 +01:00
|
|
|
def get_blueprint(self):
|
|
|
|
return [blueprints.api]
|
2019-12-11 11:31:25 +01:00
|
|
|
|
2019-12-13 15:48:20 +01:00
|
|
|
# IClick
|
|
|
|
|
|
|
|
def get_commands(self):
|
|
|
|
return get_commands()
|
|
|
|
|
|
|
|
|
2019-12-11 11:31:25 +01:00
|
|
|
class HarvestMetadataApiMixin(p.SingletonPlugin):
|
2019-12-11 12:44:09 +01:00
|
|
|
p.implements(p.IBlueprint)
|
2019-12-11 11:31:25 +01:00
|
|
|
|
2019-12-11 12:44:09 +01:00
|
|
|
# IBlueprint
|
2019-12-11 11:31:25 +01:00
|
|
|
|
2019-12-11 12:44:09 +01:00
|
|
|
def get_blueprint(self):
|
|
|
|
return [blueprints.harvest_metadata]
|