def _term_regex(): assert isinstance(self.term_regex, (compat.basestring, tuple)) if isinstance(self.term_regex, compat.basestring): assert_string(self.term_regex) else: assert_iterable(self.term_regex, compat.basestring, tuple) assert len(self.term_regex) > 1 assert self.term_regex[0].count('{}') == (len(self.term_regex) - 1) for identifier in self.term_regex[1:]: assert_namespace(identifier, min_length=3, max_length=4)
def _canonical_name(): assert_string(self.canonical_name) assert_regex(self.canonical_name, REGEX_CANONICAL_NAME)
def _description(): if isinstance(self, IterableNode): assert_string(self.description) elif self.description is not None: assert_string(self.description)
def _label(): if self.label is not None: assert_string(self.label)
def _canonical_name(): assert_string(self.canonical_name) if isinstance(self.collection.term_regex, compat.basestring): assert_regex(self.canonical_name, self.collection.term_regex)