Ejemplo n.º 1
0
    def get_record_type(cls, xml):
        '''
        For a given ISO19139 record, returns the "type"
        e.g. "dataset", "series", "service"

        xml - etree of the ISO19139 XML record
        '''
        iso_parser = ISODocument(xml_tree=xml)
        return iso_parser.read_value('resource-type')[0]
Ejemplo n.º 2
0
    def get_record_type(cls, xml):
        '''
        For a given ISO19139 record, returns the "type"
        e.g. "dataset", "series", "service"

        xml - etree of the ISO19139 XML record
        '''
        iso_parser = ISODocument(xml_tree=xml)
        return iso_parser.read_value('resource-type')[0]
Ejemplo n.º 3
0
    def get_record_type(cls, xml):
        '''For a given ISO19139 record, returns the "type"
        e.g. "dataset", "series", "service"
        
        xml - etree of the ISO19139 XML record

        :param xml: 

        '''
        iso_parser = ISODocument(xml_tree=xml)
        record_types = iso_parser.read_value(u'resource-type')
        if len(record_types):
            return record_types[0]
        else:
            return u'dataset'