# HG changeset patch # User Sylvain Thénault # Date 1246270739 -7200 # Node ID 09d0445641e2ec009cd1a5b7b666dcaa48f9d4c6 # Parent 9dfa88ac9f492d8a0f4b61445057eacf6be80401# Parent d561b2725144a21b06b4d0098db1d03956aa4931 merge diff -r d561b2725144 -r 09d0445641e2 schema.py --- a/schema.py Mon Jun 29 11:45:05 2009 +0200 +++ b/schema.py Mon Jun 29 12:18:59 2009 +0200 @@ -19,8 +19,7 @@ from yams import BadSchemaDefinition, buildobjs as ybo from yams.schema import Schema, ERSchema, EntitySchema, RelationSchema from yams.constraints import BaseConstraint, StaticVocabularyConstraint -from yams.reader import (CONSTRAINTS, RelationFileReader, PyFileReader, - SchemaLoader) +from yams.reader import CONSTRAINTS, PyFileReader, SchemaLoader from rql import parse, nodes, RQLSyntaxError, TypeResolverException @@ -857,23 +856,6 @@ # schema loading ############################################################## -class CubicWebRelationFileReader(RelationFileReader): - """cubicweb specific relation file reader, handling additional RQL - constraints on a relation definition - """ - - def handle_constraint(self, rdef, constraint_text): - """arbitrary constraint is an rql expression for cubicweb""" - if not rdef.constraints: - rdef.constraints = [] - rdef.constraints.append(RQLVocabularyConstraint(constraint_text)) - - def process_properties(self, rdef, relation_def): - if 'inline' in relation_def: - rdef.inlined = True - RelationFileReader.process_properties(self, rdef, relation_def) - - CONSTRAINTS['RQLConstraint'] = RQLConstraint CONSTRAINTS['RQLUniqueConstraint'] = RQLUniqueConstraint CONSTRAINTS['RQLVocabularyConstraint'] = RQLVocabularyConstraint @@ -885,8 +867,6 @@ the persistent schema """ schemacls = CubicWebSchema - SchemaLoader.file_handlers.update({'.rel' : CubicWebRelationFileReader, - }) def load(self, config, path=(), **kwargs): """return a Schema instance from the schema definition read