diff options
author | Gordon Chung <chungg@ca.ibm.com> | 2014-03-10 16:28:21 -0400 |
---|---|---|
committer | Gordon Chung <chungg@ca.ibm.com> | 2014-03-10 17:18:30 -0400 |
commit | 3d587491e7f2bfe9bd9bc8a2b19ebc4946b963e5 (patch) | |
tree | eaf7d814e8c295f571ad23d3a813ea7c72e5d963 /pycadf/attachment.py | |
parent | a93e2ae4d6a3412c79ddfdea5b4cfe6d7ec28d3b (diff) | |
download | pycadf-3d587491e7f2bfe9bd9bc8a2b19ebc4946b963e5.tar.gz |
add docstrings to functions
add docstrings to functions
Change-Id: I112e297d20de5026784298e93b6ff05733639a1c
Implements: blueprint document-pycadf
Diffstat (limited to 'pycadf/attachment.py')
-rw-r--r-- | pycadf/attachment.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/pycadf/attachment.py b/pycadf/attachment.py index 8519867..9b5e43e 100644 --- a/pycadf/attachment.py +++ b/pycadf/attachment.py @@ -43,6 +43,12 @@ class Attachment(cadftype.CADFAbstractType): six.string_types)) def __init__(self, typeURI=None, content=None, name=None): + """Create Attachment data type + + :param typeURI: uri that identifies type of data in content + :param content: container that contains any type of data + :param contentType: name used to identify content. + """ # Attachment.typeURI if typeURI is not None: setattr(self, ATTACHMENT_KEYNAME_TYPEURI, typeURI) @@ -57,7 +63,8 @@ class Attachment(cadftype.CADFAbstractType): # self validate cadf:Attachment type against schema def is_valid(self): - # Existence test, All attributes must exist for valid Attachment type + """Validation to ensure Attachment required attributes are set. + """ return ( self._isset(ATTACHMENT_KEYNAME_TYPEURI) and self._isset(ATTACHMENT_KEYNAME_NAME) and |