-
Notifications
You must be signed in to change notification settings - Fork 0
/
Metadata.py
68 lines (58 loc) · 2.06 KB
/
Metadata.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
import cgDataV2.Exceptions
class Metadata(object):
"""This class describes the basic metadata associated with each class. Each
class type has its own type of metadata, but there are some elements common to
all metadata types
"""
def __init__(self, filename, validate=True):
"""Given the pathname of a metadata file, return the corresponding
metadata object. Upon creation, run the validator
method on the new object and throw a ValidationFailed exception
if unsuccessful.
"""
pass
def __validate(self):
"""Validate this GenomicMatrixMetadata object, and throw a
ValidationFailed exception if unsuccessful.
"""
pass
def type(self):
"""
Return the metadata type.
"""
pass
def version(self, newVersion=None):
"""
Update the version if a new version is specified
Return the metadata version.
"""
pass
def shortTitle(self, newShortTitle=None):
"""
The shortTitle is a short description of the object.
Update the shortTitle if a new shortTitle is specified.
Return the shortTitle if defined, or None if undefined.
"""
pass
def longTitle(self, newLongTitle=None):
"""
The longTitle is a longer description of the object.
Update the longTitle if a new longTitle is specified.
Return the longTitle if defined, or None if undefined.
"""
pass
def description(self, newDescription=None):
"""
The description is a text string detailing the object.
Update the description if a new description is specified.
Return the description if defined, or None if undefined.
"""
pass
def validate(self):
"""Validate the fields expected in all metadata objects. Return
True if the validation is successful, False otherwise
"""
pass
def write(self, filename):
"""Write the metadata object to the specified filename"""
pass