Fetch a document, identified by {@code spaceId:key}, from index.

@param spaceId
@param key
@return
@throws IOException
494997
protected Document doGet(String spaceId, String key) throws IOException {
        Term termGet = buildIdTerm(spaceId, key);
        IndexSearcher indexSearcher = getIndexSearcher();
        TopDocs result = indexSearcher.search(new TermQuery(termGet), 1);
        ScoreDoc[] hits = result != null ? result.scoreDocs : null;
        Document doc = hits != null && hits.length > 0 ? indexSearcher.doc(hits[0].doc) : null;
        return doc;
    }
422701
public byte[] get(byte[] key)
      throws IOException {
    int keyLength = key.length;
    if (keyLength >= slots.length || keyCounts[keyLength] == 0) {
      return null;
    }
    long hash = (long) hashUtils.hash(key);
    int numSlots = slots[keyLength];
    int slotSize = slotSizes[keyLength];
    int indexOffset = indexOffsets[keyLength];
    long dataOffset = dataOffsets[keyLength];

    for (int probe = 0; probe < numSlots; probe++) {
      int slot = (int) ((hash + probe) % numSlots);
      indexBuffer.position(indexOffset + slot * slotSize);
      indexBuffer.get(slotBuffer, 0, slotSize);

      long offset = LongPacker.unpackLong(slotBuffer, keyLength);
      if (offset == 0) {
        return null;
      }
      if (isKey(slotBuffer, key)) {
        byte[] value = mMapData ? getMMapBytes(dataOffset + offset) : getDiskBytes(dataOffset + offset);
        return value;
      }
    }
    return null;
  }
296257
protected static Object fetch(String key) {
        List valuesArray = (List) fetchObject(key);
        return valuesArray.get(RandomUtils.nextInt(valuesArray.size()));
    }
185468
@Override
    public V get(Object key) {
        final int index = key == null ? indexOfNull() : indexOf(key, key.hashCode());
        return index >= 0 ? (V)mArray[(index<<1)+1] : null;
    }
1077474
public <K> String get(final K key, Serializer<K> keySerializer) throws HectorException {
    ColumnQuery<K, String, String> q = createColumnQuery(keyspace, keySerializer, serializer, serializer);
    QueryResult<HColumn<String, String>> r = q.setKey(key).
        setName(COLUMN_NAME).
        setColumnFamily(CF_NAME).
        execute();
    HColumn<String, String> c = r.get();
    return c == null ? null : c.getValue();
  }
1033216
public V get(final int key) {
		final int index = (key & 0x7FFFFFFF) % elementData.length;

		IntLinkedEntry<V> m = elementData[index];
		while (m != null) {
			if (key == m.key) {
				if (accessOrder) {
					// if (log.isDebugEnabled()) log.debug("reliking " + this.key);
					m.remove();
					m.addBefore(header);
				}
				return m.value;
			}
			m = m.nextInSlot;
		}
		return null;
	}
836839
<T> T get(String key) {
    return this.<T>get(map, key.split("\\."));    
  }
619102
public V get(K key, int index) {
		final Collection<V> collection = get(key);
		return CollUtil.get(collection, index);
	}
1227857
@Override
    public Content getContent(String key, Object o) {
        return contents.getContent(key, o);
    }
443301
@Path("/{spaceID}")
    @GET
    @Produces(XML)
    public Response getSpace(@PathParam("spaceID") String spaceID,
                             @QueryParam("storeID") String storeID,
                             @QueryParam("prefix") String prefix,
                             @QueryParam("maxResults") long maxResults,
                             @QueryParam("marker") String marker) {
        StringBuilder msg = new StringBuilder("getting space contents(");
        msg.append(spaceID);
        msg.append(", ");
        msg.append(storeID);
        msg.append(", ");
        msg.append(prefix);
        msg.append(", ");
        msg.append(maxResults);
        msg.append(", ");
        msg.append(marker);
        msg.append(")");

        try {
            log.debug(msg.toString());
            return doGetSpace(spaceID, storeID, prefix, maxResults, marker);

        } catch (ResourceNotFoundException e) {
            return responseNotFound(msg.toString(), e, NOT_FOUND);

        } catch (ResourceException e) {
            return responseBad(msg.toString(), e, INTERNAL_SERVER_ERROR);

        } catch (Exception e) {
            return responseBad(msg.toString(), e, INTERNAL_SERVER_ERROR);
        }
    }
1148352
protected Query buildQuery(String spaceId, String key) {
        BooleanQuery.Builder builder = new BooleanQuery.Builder();
        if (!StringUtils.isBlank(spaceId)) {
            builder.add(new TermQuery(new Term(FIELD_SPACE_ID, spaceId.trim())), Occur.MUST);
        }
        if (!StringUtils.isBlank(key)) {
            builder.add(new TermQuery(new Term(FIELD_KEY, key.trim())), Occur.MUST);
        }
        return builder.build();
    }
137786
public Repository getHomeRepository(String spaceKey) throws GreenPepperServerException {
        String uid = getSettingsManager().getGlobalSettings().getSiteTitle() + "-" + spaceKey;
        Repository repository = Repository.newInstance(uid);
        repository.setMaxUsers(getNumberOfUserForGreenPepperUserGroup());
        return repository;
    }
529944
@Path("/{spaceID}")
    @PUT
    public Response addSpace(@PathParam("spaceID") String spaceID,
                             @QueryParam("storeID") String storeID) {
        String msg = "adding space(" + spaceID + ", " + storeID + ")";

        try {
            log.debug(msg);
            return doAddSpace(spaceID, storeID);

        } catch (InvalidIdException e) {
            return responseBad(msg, e, BAD_REQUEST);

        } catch (ResourceException e) {
            return responseBad(msg, e, INTERNAL_SERVER_ERROR);

        } catch (Exception e) {
            return responseBad(msg, e, INTERNAL_SERVER_ERROR);
        }
    }
1215308
public V get(final int key) {
		final int index = (key & 0x7FFFFFFF) % elementData.length;

		IntEntry<V> m = elementData[index];
		while (m != null) {
			if (key == m.key) {
				return m.value;
			}
			m = m.nextInSlot;
		}
		return null;
	}
188525
def get_space(self, space_key, expand='description.plain,homepage'):
        
        url = 'rest/api/space/{space_key}?expand={expand}'.format(space_key=space_key,
                                                                  expand=expand)
        return self.get(url)
836751
public @CheckForNull T get(String key) throws IOException {
        return get(key,false,null);
    }
354558
@Override
    public Iterator<String> getSpaceContents(String spaceId, String prefix) {
        ConnectOperation co =
            new ConnectOperation(host, port, username, password, zone);

        String path;
        if (prefix != null && !prefix.equals("")) {
            path = baseDirectory + "/" + spaceId + "/" + prefix;
        } else {
            path = baseDirectory + "/" + spaceId;
        }

        log.trace("listing space contents for " + path);
        try {
            return listRecursiveFiles(path, co.getConnection());
        } catch (IOException e) {
            log.error("Could not connect to iRODS", e);
            throw new StorageException(e);
        }
    }