Skip to content

Commit

Permalink
Removed unneeded Vocabs. Renamed source_type-Vocab to rdf_type
Browse files Browse the repository at this point in the history
  • Loading branch information
sandrarum committed Apr 4, 2018
1 parent 7eed3ea commit 755ee00
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 87 deletions.
4 changes: 2 additions & 2 deletions src/pkan/dcatapde/browser/harvester_entity/preview.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from pkan.dcatapde.constants import HARVESTER_FOLDER_ID
from pkan.dcatapde.constants import HARVESTER_FOLDER_TITLE
from pkan.dcatapde.content.harvester import Harvester
from pkan.dcatapde.vocabularies.source_type_vocab import SourceTypeVocabFactory
from pkan.dcatapde.vocabularies.rdf_type_vocab import RdfTypeVocabFactory
from plone import api
from Products.Five import BrowserView

Expand Down Expand Up @@ -40,7 +40,7 @@ def get_preview(self):
query = form['query_data']
if 'form.widgets.source_type' in form:
source_type_token = form['form.widgets.source_type'][0]
vocab = SourceTypeVocabFactory(self.context)
vocab = RdfTypeVocabFactory(self.context)
terms = vocab.by_token
term = terms[source_type_token]
source_type = term.value
Expand Down
2 changes: 1 addition & 1 deletion src/pkan/dcatapde/content/harvester.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class IHarvester(model.Schema):
u'variant like (JSON-LD, XML, Turtle), or a generic '
u'source like "JSON generic"',
),
vocabulary='pkan.dcatapde.SourceTypeVocabulary',
vocabulary='pkan.dcatapde.RdfTypeVocabulary',
)

top_node = schema.Choice(
Expand Down
9 changes: 3 additions & 6 deletions src/pkan/dcatapde/vocabularies/configure.zcml
Original file line number Diff line number Diff line change
Expand Up @@ -87,14 +87,11 @@

<!-- Harvesting Vocabularies. -->
<!-- ======================== -->
<utility
component=".harvesting_vocabulary.HarvestingVocabularyFactory"
name="pkan.dcatapde.HarvestingVocabulary"
/>


<utility
component=".source_type_vocab.SourceTypeVocabFactory"
name="pkan.dcatapde.SourceTypeVocabulary"
component=".rdf_type_vocab.RdfTypeVocabFactory"
name="pkan.dcatapde.RdfTypeVocabulary"
/>

<!-- Language Vocabularies. -->
Expand Down
38 changes: 0 additions & 38 deletions src/pkan/dcatapde/vocabularies/harvesting_vocabulary.py

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@


@implementer(IVocabularyFactory)
class SourceTypeVocabulary(object):
class RdfTypeVocabulary(object):
"""
"""

Expand Down Expand Up @@ -48,4 +48,4 @@ def __call__(self, context):
return SimpleVocabulary(terms)


SourceTypeVocabFactory = SourceTypeVocabulary()
RdfTypeVocabFactory = RdfTypeVocabulary()
38 changes: 0 additions & 38 deletions src/pkan/dcatapde/vocabularies/source_field.py

This file was deleted.

0 comments on commit 755ee00

Please sign in to comment.