stop using deprecated classes
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Thu, 30 Jul 2009 19:10:42 +0200
changeset 48 5a3d2c1f6137
parent 47 95c9fb0120e5
child 49 6698d7177dd0
stop using deprecated classes
schema.py
--- a/schema.py	Thu Jul 30 09:17:02 2009 +0200
+++ b/schema.py	Thu Jul 30 19:10:42 2009 +0200
@@ -5,13 +5,13 @@
 :contact: http://www.logilab.fr/ -- mailto:contact@logilab.fr
 """
 
-from yams.buildobjs import (MetaUserEntityType, MetaUserRelationType,
+from yams.buildobjs import (EntityType, RelationType,
                             SubjectRelation, ObjectRelation,
                             String)
 
 from cubicweb.schema import RQLConstraint, ERQLExpression
 
-class Classification(MetaUserEntityType):
+class Classification(EntityType):
     """classification schemes are used by users to classify entities.
     """
     permissions = {
@@ -27,13 +27,13 @@
                                  constraints = [RQLConstraint('RDEF to_entity O, RDEF relation_type R, R name "applied_to"')])
 
 
-class classifies(MetaUserRelationType):
+class classifies(RelationType):
     """entity types classified by the classification. Only entity type
     supporting the applied_to relation can be selectioned
     """
 
 
-class Keyword(MetaUserEntityType):
+class Keyword(EntityType):
     """A keyword is like a tag but is application specific
     and used to define a classification scheme
     """
@@ -66,11 +66,11 @@
     __specializes_schema__ = True
     code = String(required=True, fulltextindexed=True, indexed=True, maxsize=128)
 
-class subkeyword_of(MetaUserRelationType):
+class subkeyword_of(RelationType):
     """a keyword can specialize another keyword"""
 
 
-class included_in(MetaUserRelationType):
+class included_in(RelationType):
     """a keyword is included in a classification scheme"""
     inlined = True
 
@@ -78,7 +78,7 @@
 # define in parent application which entity types may be linked to a keyword
 # by the applied_to relation
 
-class applied_to(MetaUserRelationType):
+class applied_to(RelationType):
     """tagged objects"""
     fulltext_container = 'object'
     constraints = [RQLConstraint('S included_in CS, O is ET, CS classifies ET')]