def __init__(self, element):
if isinstance(element, ElementType):<EOL><INDENT>root = element<EOL><DEDENT>else:<EOL><INDENT>root = etree.fromstring(element)<EOL><DEDENT>if hasattr(root, "<STR_LIT>"):<EOL><INDENT>root = root.getroot()<EOL><DEDENT>self.system = SensorML(element).members[<NUM_LIT:0>]<EOL>self.ioos_version = testXMLValue(<EOL>root.find(<EOL>"<STR_LIT>"<EOL>% (SWE_NS, SWE_NS, SWE_NS)<EOL>)<EOL>)<EOL>if self.ioos_version != "<STR_LIT:1.0>":<EOL><INDENT>warnings.warn(<EOL>"<STR_LIT>"<EOL>% self.ioos_version<EOL>)<EOL><DEDENT>self.shortName = self.get_ioos_def("<STR_LIT>", "<STR_LIT>", ont)<EOL>self.longName = self.get_ioos_def("<STR_LIT>", "<STR_LIT>", ont)<EOL>self.keywords = list(map(str, self.system.keywords))<EOL>try:<EOL><INDENT>self.location = self.system.location[<NUM_LIT:0>]<EOL><DEDENT>except (TypeError, IndexError):  <EOL><INDENT>self.location = None<EOL><DEDENT>try:<EOL><INDENT>timerange = testXMLValue(<EOL>self.system.get_capabilities_by_name("<STR_LIT>")[<EOL><NUM_LIT:0><EOL>].find("<STR_LIT>" + nsp("<STR_LIT>"))<EOL>).split("<STR_LIT:U+0020>")<EOL>self.starting = parser.parse(timerange[<NUM_LIT:0>])<EOL>self.ending = parser.parse(timerange[<NUM_LIT:1>])<EOL><DEDENT>except (AttributeError, TypeError, ValueError, IndexError):<EOL><INDENT>self.starting = None<EOL>self.ending = None<EOL><DEDENT>
Common things between all describe sensor requests