equal
deleted
inserted
replaced
107 prophdlr=RestrictedSchemaDotPropsHandler(self.req)) |
107 prophdlr=RestrictedSchemaDotPropsHandler(self.req)) |
108 |
108 |
109 class EETypeSchemaImageView(TmpFileViewMixin, EntityView): |
109 class EETypeSchemaImageView(TmpFileViewMixin, EntityView): |
110 id = 'eschemagraph' |
110 id = 'eschemagraph' |
111 content_type = 'image/png' |
111 content_type = 'image/png' |
112 __selectors__ = implements('EEType') |
112 __select__ = implements('EEType') |
113 skip_rels = ('owned_by', 'created_by', 'identity', 'is', 'is_instance_of') |
113 skip_rels = ('owned_by', 'created_by', 'identity', 'is', 'is_instance_of') |
114 |
114 |
115 def _generate(self, tmpfile): |
115 def _generate(self, tmpfile): |
116 """display schema information for an entity""" |
116 """display schema information for an entity""" |
117 entity = self.entity(self.row, self.col) |
117 entity = self.entity(self.row, self.col) |
119 visitor = OneHopESchemaVisitor(self.req, eschema, skiprels=self.skip_rels) |
119 visitor = OneHopESchemaVisitor(self.req, eschema, skiprels=self.skip_rels) |
120 s2d.schema2dot(outputfile=tmpfile, visitor=visitor, |
120 s2d.schema2dot(outputfile=tmpfile, visitor=visitor, |
121 prophdlr=RestrictedSchemaDotPropsHandler(self.req)) |
121 prophdlr=RestrictedSchemaDotPropsHandler(self.req)) |
122 |
122 |
123 class ERTypeSchemaImageView(EETypeSchemaImageView): |
123 class ERTypeSchemaImageView(EETypeSchemaImageView): |
124 __selectors__ = implements('ERType') |
124 __select__ = implements('ERType') |
125 |
125 |
126 def _generate(self, tmpfile): |
126 def _generate(self, tmpfile): |
127 """display schema information for an entity""" |
127 """display schema information for an entity""" |
128 entity = self.entity(self.row, self.col) |
128 entity = self.entity(self.row, self.col) |
129 rschema = self.vreg.schema.rschema(entity.name) |
129 rschema = self.vreg.schema.rschema(entity.name) |
185 |
185 |
186 |
186 |
187 class EETypeWorkflowImageView(TmpFileViewMixin, EntityView): |
187 class EETypeWorkflowImageView(TmpFileViewMixin, EntityView): |
188 id = 'ewfgraph' |
188 id = 'ewfgraph' |
189 content_type = 'image/png' |
189 content_type = 'image/png' |
190 __selectors__ = implements('EEType') |
190 __select__ = implements('EEType') |
191 |
191 |
192 def _generate(self, tmpfile): |
192 def _generate(self, tmpfile): |
193 """display schema information for an entity""" |
193 """display schema information for an entity""" |
194 entity = self.entity(self.row, self.col) |
194 entity = self.entity(self.row, self.col) |
195 visitor = WorkflowVisitor(entity) |
195 visitor = WorkflowVisitor(entity) |