Commit d15c9d4b authored by Sylvain Thénault's avatar Sylvain Thénault
Browse files

Add a set defining all rule types in xsd2yams

for later sharing
parent 8d1f91ac86d1
......@@ -23,6 +23,7 @@ from cubes.compound.entities import IContainer, IContained
from cubes.seda import seda_profile_container_def
from cubes.seda.xsd import XSDMMapping
from cubes.seda.xsd2yams import RULE_TYPES
XSDM_MAPPING = XSDMMapping('ArchiveTransfer')
......@@ -109,9 +110,7 @@ def rule_type_from_etype(etype):
rule_type = etype[len('SEDA'):-len('Rule')]
rule_type = rule_type.lower()
assert rule_type in ('access', 'appraisal', 'classification',
'reuse', 'dissemination', 'storage'), \
'unhandled etype {}'.format(etype)
assert rule_type in RULE_TYPES, 'unhandled etype {0}'.format(etype)
return rule_type
......@@ -27,6 +27,8 @@ from xsd import XSDMMapping, un_camel_case
EXT_ETYPES = set(['Agent', 'ConceptScheme', 'Concept'])
RULE_TYPES = set(('access', 'appraisal', 'classification', 'reuse', 'dissemination', 'storage'))
# elements in the intermediary model but not in the yams model
SKIP_ETYPES = set(['SEDAid', 'SEDAhref', 'SEDAfilename'])
SKIP_ATTRS = set([
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment