returns the rml mapping filepath

        rml_name(str): Name of the rml mapping to retrieve
        rtn_format: ['filepath', 'data']
10361
def get_rml(self, rml_name, rtn_format="filepath"):
        

        try:
            rml_path = self.rml_maps[rml_name]
        except KeyError:
            if rml_name in self.rml_maps.values() or os.path.exists(rml_name):
                rml_path = rml_name
            else:
                raise LookupError("rml_name '%s' is not registered" % rml_name)
        if rtn_format == "data":
            with open(rml_path, "rb") as fo:
                return fo.read()
        return rml_path
483608
def raw_path(self):
        
        ret = self._val.path
        if not ret and self.is_absolute():
            ret = "/"
        return ret
1056098
def get_mapping_format(self):
        """"""
        if self.format == DataFormat.json or self.format == DataFormat.avro:
            return self.format.name
        else:
            return DataFormat.csv.name
733213
def rels_uri(self):
        
        rels_filename = '%s.rels' % self.filename
        rels_uri_str = posixpath.join(self.baseURI, '_rels', rels_filename)
        return PackURI(rels_uri_str)
1292369
def _get_file_paths(cur):
    
    out = []
    if isinstance(cur, (list, tuple)):
        for x in cur:
            new = _get_file_paths(x)
            if new:
                out.extend(new)
    elif isinstance(cur, dict):
        if "class" in cur:
            out.append(cur["path"])
        else:
            for k, v in cur.items():
                new = _get_file_paths(v)
                if new:
                    out.extend(new)
    return out
495171
def get_ogr_driver(filepath):
    
    filename, file_extension = os.path.splitext(filepath)
    EXTENSION = file_extension[1:]

    ogr_driver_count = ogr.GetDriverCount()
    for idx in range(ogr_driver_count):
        driver = ogr.GetDriver(idx)
        driver_extension = driver.GetMetadataItem(str('DMD_EXTENSION')) or ''
        driver_extensions = driver.GetMetadataItem(str('DMD_EXTENSIONS')) or ''

        if EXTENSION == driver_extension or EXTENSION in driver_extensions:
            return driver

    else:
        msg = 'No driver found for the following file extension: {}'.format(
            EXTENSION)
        raise ValueError(msg)
518968
def _loadfilepath(self, filepath, **kwargs):
        
        with open(filepath, "r") as f:
            data = json.load(f, **kwargs)
        return data
26713
def _input_as_path(self, data):
        
        self._input_filename = self.getTmpFilename(
            self.WorkingDir, suffix='.fasta')
        copyfile(data, self._input_filename)
        return self._input_filename
722842
def get_next_file_path(self, service, operation):
        
        base_name = '{0}.{1}'.format(service, operation)
        if self.prefix:
            base_name = '{0}.{1}'.format(self.prefix, base_name)
        LOG.debug('get_next_file_path: %s', base_name)
        next_file = None
        serializer_format = None
        index = self._index.setdefault(base_name, 1)

        while not next_file:
            file_name = os.path.join(
                self._data_path, base_name + '_{0}'.format(index))
            next_file, serializer_format = self.find_file_format(file_name)
            if next_file:
                self._index[base_name] += 1
            elif index != 1:
                index = 1
                self._index[base_name] = 1
            else:
                raise IOError('response file ({0}.[{1}]) not found'.format(
                    file_name, "|".join(Format.ALLOWED)))

        return next_file, serializer_format
1025921
def get_rml(self, rml_def, **kwargs):
        
        if isinstance(rml_def, str):
            rml_procs = self.es_defs.get("kds_esRmlProcessor", [])
            for item in rml_procs:
                if item['name'] == rml_def:
                    rml_def = item
                    break
        proc_kwargs = {rml_def['subj']: self.subject,
                       "dataset": self.dataset}
        proc_kwargs.update(rml_def['proc_kwargs'])
        return rml_def['processor'](**proc_kwargs)
853634
def get_rtr_by_name(self, rtr_name):
        
        upd_rtr_list = []
        try:
            rtr_list = self.neutronclient.list_routers()
            for rtr in rtr_list.get('routers'):
                if rtr_name == rtr['name']:
                    upd_rtr_list.append(rtr)
        except Exception as exc:
            LOG.error("Failed to get router by name %(name)s, "
                      "Exc %(exc)s",
                      {'name': rtr_name, 'exc': str(exc)})
        return upd_rtr_list
1037936
def get_all_rml(self, **kwargs):
        
        rml_procs = self.es_defs.get("kds_esRmlProcessor", [])
        role = kwargs.get('role')
        if role:
            rml_procs = [proc for proc in rml_procs
                         if role == 'rdf_class' or
                         proc['force']]
        rml_maps = {}
        for rml in rml_procs:
            rml_maps[rml['name']] = self.get_rml(rml, **kwargs)
        return rml_maps
340027
def DataPath():
    
    return os.path.abspath('%s/data'%(os.path.dirname( \
        os.path.realpath(__file__))))
1066217
def gen_mapname():
    
    filepath = None
    while (filepath is None) or (os.path.exists(os.path.join(config['mapfiles_dir'], filepath))):
        filepath = '%s.map' % _gen_string()
    return filepath
552193
def _get_url(self, filename):
        
        return self.cdn_url.format(self.mver, self.relnum, filename)
135104
def find_file_format(file_name):
        
        for file_format in Format.ALLOWED:
            file_path = '.'.join((file_name, file_format))
            if os.path.exists(file_path):
                return file_path, file_format
        return None, None
802973
def rel_path(self, uuid):
        # type: (UUID) -> Path
        
        _assert_uuid(uuid)
        filename = str(uuid)
        return Path(filename[0:2], filename[2:4], filename)