213 Method returning the external state. |
213 Method returning the external state. |
214 |
214 |
215 @return external state (boolean) |
215 @return external state (boolean) |
216 """ |
216 """ |
217 return self.external |
217 return self.external |
|
218 |
|
219 def buildItemDataString(self): |
|
220 """ |
|
221 Public method to build a string to persist the specific item data. |
|
222 |
|
223 This string must start with ", " and should be built like |
|
224 "attribute=value" with pairs separated by ", ". value must not contain ", " |
|
225 or newlines. |
|
226 |
|
227 @return persistence data (string) |
|
228 """ |
|
229 entries = [ |
|
230 "item_type=class", |
|
231 "is_external={0}".format(self.external), |
|
232 "no_attributes={0}".format(self.noAttrs), |
|
233 "name={0}".format(self.model.getName()), |
|
234 ] |
|
235 attributes = self.model.getAttributes() |
|
236 if attributes: |
|
237 entries.append("attributes={0}".format("||".join(attributes))) |
|
238 methods = self.model.getMethods() |
|
239 if methods: |
|
240 entries.append("methods={0}".format("||".join(methods))) |
|
241 |
|
242 return ", " + ", ".join(entries) |
|
243 |
|
244 def parseItemDataString(self, data): |
|
245 """ |
|
246 Public method to parse the given persistence data. |
|
247 |
|
248 @param data persisted data to be parsed (string) |
|
249 """ |
|
250 # TODO: implement this |