def vocabularies_list(self): response.headers['Content-Type'] = content_types['json'] return [json.dumps(vocabularies.get_names())]
import datetime import zope.interface import zope.schema from zope.schema.vocabulary import SimpleVocabulary, SimpleTerm from ckanext.publicamundi.lib import vocabularies from . import IMetadata from ._common import * from .thesaurus import (IThesaurus, IThesaurusTerms) _ = lambda t: t # Mock translator keyword_thesaurus_names = filter(lambda t: t.startswith('keywords-'), vocabularies.get_names()) class IInspireMetadata(IMetadata): zope.interface.taggedValue('recurse-on-invariants', True) # Metadata on metadata contact = zope.schema.List( title=_(u'Metadata Point of Contact'), description= _(u'The organisations responsible for the creation and maintenance of the metadata.' ), required=True, min_length=1, max_length=4,
import datetime import zope.interface import zope.schema from zope.schema.vocabulary import SimpleVocabulary, SimpleTerm from ckanext.publicamundi.lib import vocabularies from . import IMetadata from ._common import * from .thesaurus import (IThesaurus, IThesaurusTerms) _ = lambda t: t # Mock translator keyword_thesaurus_names = filter( lambda t: t.startswith('keywords-'), vocabularies.get_names()) class IInspireMetadata(IMetadata): zope.interface.taggedValue('recurse-on-invariants', True) # Metadata on metadata contact = zope.schema.List( title = _(u'Metadata Point of Contact'), description = _(u'The organisations responsible for the creation and maintenance of the metadata.'), required = True, min_length = 1, max_length = 4, value_type = zope.schema.Object(IResponsibleParty, title = _(u'Contact'), required = True))