diff options
author | Gordon Chung <chungg@ca.ibm.com> | 2013-10-21 14:30:35 -0400 |
---|---|---|
committer | Gordon Chung <chungg@ca.ibm.com> | 2013-10-21 14:52:21 -0400 |
commit | 0a78eb7f62c19798c851edada1c3b524fee84f6f (patch) | |
tree | 8b5252598c8a81b43e93545846d5505bbdf37484 /pycadf/resource.py | |
parent | b24d35599c5d4e460c12768eb76f4d97dde0e470 (diff) | |
download | pycadf-0a78eb7f62c19798c851edada1c3b524fee84f6f.tar.gz |
do not set typeURI in resource shortform
do not set typeURI if resource id is 'target' or 'initiator'
Partial-Fix: Bug #1240067
Change-Id: I2aba379822989aab7e5dac4a4368682e22463f80
Diffstat (limited to 'pycadf/resource.py')
-rw-r--r-- | pycadf/resource.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/pycadf/resource.py b/pycadf/resource.py index 2566bb0..fd26d04 100644 --- a/pycadf/resource.py +++ b/pycadf/resource.py @@ -88,7 +88,9 @@ class Resource(cadftype.CADFAbstractType): setattr(self, RESOURCE_KEYNAME_ID, id or identifier.generate_uuid()) # Resource.typeURI - setattr(self, RESOURCE_KEYNAME_TYPEURI, typeURI) + if (getattr(self, RESOURCE_KEYNAME_ID) != "target" and + getattr(self, RESOURCE_KEYNAME_ID) != "initiator"): + setattr(self, RESOURCE_KEYNAME_TYPEURI, typeURI) # Resource.name if name is not None: |