diff -r b1fd0e0197c8 -r 859862939996 src/core/models/term.py --- a/src/core/models/term.py Tue Jun 25 10:28:25 2013 +0200 +++ b/src/core/models/term.py Tue Jun 25 15:34:18 2013 +0200 @@ -39,7 +39,32 @@ "match":3, "unsemantized":4, } - + +TERM_WK_LINK_SEMANTIC_LEVEL_CHOICES = ( + (0, "--"), + (1, "EE"), + (2, "EI"), + (3, "BM"), + (4, "NM") +) + +TERM_WK_LINK_SEMANTIC_LEVEL_CHOICES_TRANS = ( + (0, _("--")), + (1, _("EE")), + (2, _("EI")), + (3, _("BM")), + (4, _("NM")) +) + +TERM_WK_LINK_SEMANTIC_LEVEL_DICT = { + "--" : 0, + "EE" : 1, + "EI" : 2, + "BM" : 3, + "NM" : 4 +} + + class Thesaurus(models.Model): label = models.CharField(max_length=128, unique=True, blank=False, null=False, db_index=True) title = models.CharField(max_length=1024, unique=False, blank=False, null=False, db_index=False) @@ -69,6 +94,7 @@ alternative_wikipedia_url = models.URLField(max_length=2048, blank=True, null=True, db_index=True) alternative_wikipedia_pageid = models.BigIntegerField(unique=False, blank=True, null=True, db_index=True) url_status = models.IntegerField(choices=TERM_URL_STATUS_CHOICES_TRANS, blank=True, null=True, default=None, db_index=True) + link_semantic_level = models.IntegerField(choices=TERM_WK_LINK_SEMANTIC_LEVEL_CHOICES_TRANS, blank=True, null=True, default=None, db_index=True) dbpedia_uri = models.URLField(max_length=2048, blank=True, null=True, db_index=True) validation_date = models.DateTimeField(null=True, blank=True, serialize=False) validated = models.BooleanField(default=False, db_index=True)