Return absolute path at which item content can be accessed.

        :param identifier: item identifier
        :returns: absolute path from which the item content can be accessed
510366
def get_item_abspath(self, identifier):
        
        admin_metadata = self.get_admin_metadata()
        uuid = admin_metadata["uuid"]
        # Create directory for the specific dataset.
        dataset_cache_abspath = os.path.join(self._irods_cache_abspath, uuid)
        mkdir_parents(dataset_cache_abspath)

        # Get the file extension from the  relpath from the handle metadata.
        irods_item_path = os.path.join(self._data_abspath, identifier)
        relpath = self._get_metadata_with_cache(irods_item_path, "handle")
        _, ext = os.path.splitext(relpath)

        local_item_abspath = os.path.join(
            dataset_cache_abspath,
            identifier + ext)

        if not os.path.isfile(local_item_abspath):
            tmp_local_item_abspath = local_item_abspath + ".tmp"
            _get_file_forcefully(irods_item_path, tmp_local_item_abspath)
            os.rename(tmp_local_item_abspath, local_item_abspath)

        return local_item_abspath
201693
def get_api_key_with_prefix(self, identifier):
        
        if self.api_key.get(identifier) and self.api_key_prefix.get(identifier):
            return self.api_key_prefix[identifier] + ' ' + self.api_key[identifier]
        elif self.api_key.get(identifier):
            return self.api_key[identifier]
1363039
def identifier(self):
        

        if not self.section.name:
            return self.name
        return preferences_settings.SECTION_KEY_SEPARATOR.join([self.section.name, self.name])
1107163
def generate_identifier(result):
    
    # Determine the playbook file path to use for the ID
    if result.task.playbook and result.task.playbook.path:
        playbook_file = result.task.playbook.path
    else:
        playbook_file = ''
    play_path = u'%s.%s' % (playbook_file, result.task.play.name)

    # Determine the task file path to use for the ID
    if result.task.file and result.task.file.path:
        task_file = result.task.file.path
    else:
        task_file = ''
    task_path = u'%s.%s' % (task_file, result.task.name)

    # Combine both of the above for a full path
    identifier_path = u'%s.%s' % (play_path, task_path)

    # Assign the identifier as a hash of the fully unique path.
    identifier = hashlib.sha1(encodeutils.to_utf8(identifier_path)).hexdigest()

    return identifier
482415
def CollectionItemToAff4Path(item, client_id=None):
  """"""
  if isinstance(item, rdf_flows.GrrMessage):
    client_id = item.source
    item = item.payload
  elif isinstance(item, rdf_flow_objects.FlowResult):
    client_id = item.client_id
    item = item.payload

  if not client_id:
    raise ValueError("Could not determine client_id.")
  elif isinstance(client_id, string_types):
    client_id = rdf_client.ClientURN(client_id)

  if isinstance(item, rdf_client_fs.StatEntry):
    return item.AFF4Path(client_id)
  elif isinstance(item, rdf_file_finder.FileFinderResult):
    return item.stat_entry.AFF4Path(client_id)
  elif isinstance(item, collectors.ArtifactFilesDownloaderResult):
    if item.HasField("downloaded_file"):
      return item.downloaded_file.AFF4Path(client_id)

  raise ItemNotExportableError(item)
755745
def find_subscription(self, identifier):
        
        for subscription in self.subscriptions.values():
            if subscription.identifier == identifier:
                return subscription
697594
def getDisplayIdentifier(self):
        
        if self.display_identifier is not None:
            return self.display_identifier
        if self.claimed_id is None:
            return None
        else:
            return urlparse.urldefrag(self.claimed_id)[0]
16276
def convert_identifier_to_key(identifier):
        
        key = ''.join(c for c in identifier if c.isalnum() or c in '_.-')
        if len(key) > 230:
            key = key[:150] + '-' + hashlib.md5(key).hexdigest()

        return "%s_accesses" % key
323995
def _parse_identifier(self, identifier, zone=None):
        
        rdtype, name, content = None, None, None
        if len(identifier) > 7:
            parts = identifier.split('/')
            rdtype, name, content = parts[0], parts[1], '/'.join(parts[2:])
        else:
            records = self._list_records_in_zone(zone)
            for record in records:
                if record['id'] == identifier:
                    rdtype, name, content = record['type'], record['name'] + '.', record['content']
        return rdtype, name, content
496052
def p_identifier(self, tree):
        '''  '''
        tree.value = tree.attr
        tree.svalue = tree.attr
934703
def permlink(self, identifier):
        ''' 
        '''
        temp = identifier.split("@")
        temp2 = temp[1].split("/")
        return [temp2[0], temp2[1]]
195374
public ItemImpl getItemByIdentifier(String identifier, boolean pool) throws RepositoryException
   {
      return getItemByIdentifier(identifier, pool, true);
   }
554173
def IdentifiersIndexer(instance):
    
    identifiers = instance.Schema()['Identifiers'].get(instance)
    return [safe_unicode(i['Identifier']) for i in identifiers]
384637
private NodeData getACL(String identifier, ACLSearch search) throws RepositoryException
   {
      final ItemData item = getItemData(identifier, false);
      return item != null && item.isNode() ? initACL(null, (NodeData)item, search) : null;
   }
1222537
@SuppressWarnings("unchecked")
    public Pair<Item, Integer> getItemById(final long identifier) {
        if (identifier == -1) {
            return null;
        }
        Triple result = recursive(new AdapterPredicate() {
            @Override
            public boolean apply(@NonNull IAdapter lastParentAdapter, int lastParentPosition, @NonNull IItem item, int position) {
                return item.getIdentifier() == identifier;
            }
        }, true);
        if (result.second == null) {
            return null;
        } else {
            return new Pair(result.second, result.third);
        }
    }
1256313
def get(self, item, fastpath=True):
        
        if self.items.is_unique:

            if not isna(item):
                loc = self.items.get_loc(item)
            else:
                indexer = np.arange(len(self.items))[isna(self.items)]

                # allow a single nan location indexer
                if not is_scalar(indexer):
                    if len(indexer) == 1:
                        loc = indexer.item()
                    else:
                        raise ValueError("cannot label index with a null key")

            return self.iget(loc, fastpath=fastpath)
        else:

            if isna(item):
                raise TypeError("cannot label index with a null key")

            indexer = self.items.get_indexer_for([item])
            return self.reindex_indexer(new_axis=self.items[indexer],
                                        indexer=indexer, axis=0,
                                        allow_dups=True)
132659
public Method get(final MethodIdentifier identifier) {
        // search for available methods
        readWriteLock.readLock().lock();
        try {
            final Optional<? extends IdentifiableMethod> method = availableMethods.stream().filter(m -> m.matches(identifier)).findAny();
            if (method.isPresent())
                return method.get();
        } finally {
            readWriteLock.readLock().unlock();
        }

        // apply default behaviour
        return DEFAULT_METHOD.apply(identifier);
    }