/** {@inheritDoc} */ @Override public Set<String> removeAllColumnAnnotations( final FijiColumnName column ) throws IOException { requireState(State.OPEN, "remove annotation"); final Set<String> removedAnnotationKeys = Sets.newHashSet(); for (String metaTableKey : keySet()) { if (isKCAColumnMetaTableKey(metaTableKey) && Objects.equal(column, columnFromMetaTableKey(metaTableKey))) { removedAnnotationKeys.add(keyFromMetaTableKey(metaTableKey)); removeKV(metaTableKey); } } return removedAnnotationKeys; }
/** {@inheritDoc} */ @Override public Map<String, String> getAllColumnAnnotations( final FijiColumnName column ) throws IOException { requireState(State.OPEN, "get annotation"); final Map<String, String> collectedAnnotations = Maps.newHashMap(); for (String metaTableKey : keySet()) { if (isKCAColumnMetaTableKey(metaTableKey) && Objects.equal(column, columnFromMetaTableKey(metaTableKey))) { collectedAnnotations.put(keyFromMetaTableKey(metaTableKey), getKV(metaTableKey)); } } return collectedAnnotations; }
/** {@inheritDoc} */ @Override public Map<String, String> getColumnAnnotationsContaining( final FijiColumnName column, final String substring ) throws IOException { requireState(State.OPEN, "get annotation"); final Map<String, String> collectedAnnotations = Maps.newHashMap(); for (String metaTableKey : keySet()) { if (isKCAColumnMetaTableKey(metaTableKey) && Objects.equal(column, columnFromMetaTableKey(metaTableKey))) { final String annotationKey = keyFromMetaTableKey(metaTableKey); if (annotationKey.contains(substring)) { collectedAnnotations.put(annotationKey, getKV(metaTableKey)); } } } return collectedAnnotations; }
/** {@inheritDoc} */ @Override public Map<String, String> getColumnAnnotationsMatching( final FijiColumnName column, final String pattern ) throws IOException { requireState(State.OPEN, "get annotation"); final Map<String, String> collectedAnnotations = Maps.newHashMap(); for (String metaTableKey : keySet()) { if (isKCAColumnMetaTableKey(metaTableKey) && Objects.equal(column, columnFromMetaTableKey(metaTableKey))) { final String annotationKey = keyFromMetaTableKey(metaTableKey); if (annotationKey.matches(pattern)) { collectedAnnotations.put(annotationKey, getKV(metaTableKey)); } } } return collectedAnnotations; }
/** {@inheritDoc} */ @Override public Map<String, String> getColumnAnnotationsStartingWith( final FijiColumnName column, final String prefix ) throws IOException { requireState(State.OPEN, "get annotation"); final Map<String, String> collectedAnnotations = Maps.newHashMap(); for (String metaTableKey : keySet()) { if (isKCAColumnMetaTableKey(metaTableKey) && Objects.equal(column, columnFromMetaTableKey(metaTableKey))) { final String annotationKey = keyFromMetaTableKey(metaTableKey); if (annotationKey.startsWith(prefix)) { collectedAnnotations.put(annotationKey, getKV(metaTableKey)); } } } return collectedAnnotations; }
/** {@inheritDoc} */ @Override public Map<FijiColumnName, Map<String, String>> getColumnAnnotationsInFamilyContaining( final String family, final String substring ) throws IOException { requireState(State.OPEN, "get annotation"); final Map<FijiColumnName, Map<String, String>> collectedAnnotations = Maps.newHashMap(); for (String metaTableKey : keySet()) { if (isKCAColumnMetaTableKey(metaTableKey)) { final FijiColumnName column = columnFromMetaTableKey(metaTableKey); if (null != column && Objects.equal(family, column.getFamily())) { final String annotationKey = keyFromMetaTableKey(metaTableKey); if (annotationKey.contains(substring)) { final Map<String, String> existingAnnotations = collectedAnnotations.get(column); if (null != existingAnnotations) { existingAnnotations.put(annotationKey, getKV(metaTableKey)); } else { final Map<String, String> newAnnotations = Maps.newHashMap(); newAnnotations.put(annotationKey, getKV(metaTableKey)); collectedAnnotations.put(column, newAnnotations); } } } } } return collectedAnnotations; }
/** {@inheritDoc} */ @Override public Map<FijiColumnName, Set<String>> removeColumnAnnotationsInFamilyStartingWith( final String family, final String prefix ) throws IOException { requireState(State.OPEN, "remove annotation"); final Map<FijiColumnName, Set<String>> removedAnnotationKeys = Maps.newHashMap(); for (String metaTableKey : keySet()) { if (isKCAColumnMetaTableKey(metaTableKey)) { final FijiColumnName column = columnFromMetaTableKey(metaTableKey); if (null != column && Objects.equal(family, column.getFamily())) { final String annotationKey = keyFromMetaTableKey(metaTableKey); if (annotationKey.startsWith(prefix)) { final Set<String> removedKeysInColumn = removedAnnotationKeys.get(column); if (null != removedKeysInColumn) { removedKeysInColumn.add(annotationKey); } else { removedAnnotationKeys.put(column, Sets.newHashSet(annotationKey)); } removeKV(metaTableKey); } } } } return removedAnnotationKeys; }
/** {@inheritDoc} */ @Override public Map<FijiColumnName, Set<String>> removeColumnAnnotationsInFamilyMatching( final String family, final String pattern ) throws IOException { requireState(State.OPEN, "remove annotation"); final Map<FijiColumnName, Set<String>> removedAnnotationKeys = Maps.newHashMap(); for (String metaTableKey : keySet()) { if (isKCAColumnMetaTableKey(metaTableKey)) { final FijiColumnName column = columnFromMetaTableKey(metaTableKey); if (null != column && Objects.equal(family, column.getFamily())) { final String annotationKey = keyFromMetaTableKey(metaTableKey); if (annotationKey.matches(pattern)) { final Set<String> removedKeysInColumn = removedAnnotationKeys.get(column); if (null != removedKeysInColumn) { removedKeysInColumn.add(annotationKey); } else { removedAnnotationKeys.put(column, Sets.newHashSet(annotationKey)); } removeKV(metaTableKey); } } } } return removedAnnotationKeys; }
/** {@inheritDoc} */ @Override public Map<FijiColumnName, Set<String>> removeColumnAnnotationsInFamilyContaining( final String family, final String substring ) throws IOException { requireState(State.OPEN, "remove annotation"); final Map<FijiColumnName, Set<String>> removedAnnotationKeys = Maps.newHashMap(); for (String metaTableKey : keySet()) { if (isKCAColumnMetaTableKey(metaTableKey)) { final FijiColumnName column = columnFromMetaTableKey(metaTableKey); if (null != column && Objects.equal(family, column.getFamily())) { final String annotationKey = keyFromMetaTableKey(metaTableKey); if (annotationKey.contains(substring)) { final Set<String> removedKeysInColumn = removedAnnotationKeys.get(column); if (null != removedKeysInColumn) { removedKeysInColumn.add(annotationKey); } else { removedAnnotationKeys.put(column, Sets.newHashSet(annotationKey)); } removeKV(metaTableKey); } } } } return removedAnnotationKeys; }
/** {@inheritDoc} */ @Override public Set<String> removeColumnAnnotationsStartingWith( final FijiColumnName column, final String prefix ) throws IOException { requireState(State.OPEN, "remove annotation"); final Set<String> removedAnnotationKeys = Sets.newHashSet(); for (String metaTableKey : keySet()) { if (isKCAColumnMetaTableKey(metaTableKey) && Objects.equal(column, columnFromMetaTableKey(metaTableKey))) { final String annotationKey = keyFromMetaTableKey(metaTableKey); if (annotationKey.startsWith(prefix)) { removedAnnotationKeys.add(annotationKey); removeKV(metaTableKey); } } } return removedAnnotationKeys; }
/** {@inheritDoc} */ @Override public Set<String> removeColumnAnnotationsContaining( final FijiColumnName column, final String substring ) throws IOException { requireState(State.OPEN, "remove annotation"); final Set<String> removedAnnotationKeys = Sets.newHashSet(); for (String metaTableKey : keySet()) { if (isKCAColumnMetaTableKey(metaTableKey) && Objects.equal(column, columnFromMetaTableKey(metaTableKey))) { final String annotationKey = keyFromMetaTableKey(metaTableKey); if (annotationKey.contains(substring)) { removedAnnotationKeys.add(annotationKey); removeKV(metaTableKey); } } } return removedAnnotationKeys; }
/** {@inheritDoc} */ @Override public Set<String> removeColumnAnnotationsMatching( final FijiColumnName column, final String pattern ) throws IOException { requireState(State.OPEN, "remove annotation"); final Set<String> removedAnnotationKeys = Sets.newHashSet(); for (String metaTableKey : keySet()) { if (isKCAColumnMetaTableKey(metaTableKey) && Objects.equal(column, columnFromMetaTableKey(metaTableKey))) { final String annotationKey = keyFromMetaTableKey(metaTableKey); if (annotationKey.matches(pattern)) { removedAnnotationKeys.add(annotationKey); removeKV(metaTableKey); } } } return removedAnnotationKeys; }
/** {@inheritDoc} */ @Override public Map<FijiColumnName, Set<String>> removeAllColumnAnnotations() throws IOException { requireState(State.OPEN, "remove annotation"); final Map<FijiColumnName, Set<String>> removedAnnotationKeys = Maps.newHashMap(); for (String metaTableKey : keySet()) { if (isKCAColumnMetaTableKey(metaTableKey)) { final FijiColumnName column = columnFromMetaTableKey(metaTableKey); if (null != column) { final Set<String> removedKeysInColumn = removedAnnotationKeys.get(column); if (null != removedKeysInColumn) { removedKeysInColumn.add(keyFromMetaTableKey(metaTableKey)); } else { removedAnnotationKeys.put(column, Sets.newHashSet(keyFromMetaTableKey(metaTableKey))); } removeKV(metaTableKey); } } } return removedAnnotationKeys; }
/** {@inheritDoc} */ @Override public Map<FijiColumnName, Map<String, String>> getAllColumnAnnotations() throws IOException { requireState(State.OPEN, "get annotation"); final Map<FijiColumnName, Map<String, String>> collectedAnnotations = Maps.newHashMap(); for (String metaTableKey : keySet()) { if (isKCAColumnMetaTableKey(metaTableKey)) { final FijiColumnName column = columnFromMetaTableKey(metaTableKey); if (null != column) { final String annotationKey = keyFromMetaTableKey(metaTableKey); final Map<String, String> existingAnnotations = collectedAnnotations.get(column); if (null != existingAnnotations) { existingAnnotations.put(annotationKey, getKV(metaTableKey)); } else { final Map<String, String> newAnnotations = Maps.newHashMap(); newAnnotations.put(annotationKey, getKV(metaTableKey)); collectedAnnotations.put(column, newAnnotations); } } } } return collectedAnnotations; }
/** {@inheritDoc} */ @Override public Map<FijiColumnName, Map<String, String>> getColumnAnnotationsInFamilyMatching( final String family, final String pattern ) throws IOException { requireState(State.OPEN, "get annotation"); final Map<FijiColumnName, Map<String, String>> collectedAnnotations = Maps.newHashMap(); for (String metaTableKey : keySet()) { if (isKCAColumnMetaTableKey(metaTableKey)) { final FijiColumnName column = columnFromMetaTableKey(metaTableKey); if (null != column && Objects.equal(family, column.getFamily())) { final String annotationKey = keyFromMetaTableKey(metaTableKey); if (annotationKey.matches(pattern)) { final Map<String, String> existingAnnotations = collectedAnnotations.get(column); if (null != existingAnnotations) { existingAnnotations.put(annotationKey, getKV(metaTableKey)); } else { final Map<String, String> newAnnotations = Maps.newHashMap(); newAnnotations.put(annotationKey, getKV(metaTableKey)); collectedAnnotations.put(column, newAnnotations); } } } } } return collectedAnnotations; }
/** {@inheritDoc} */ @Override public Map<FijiColumnName, String> getColumnAnnotationsInFamily( final String family, final String exactKey ) throws IOException { requireState(State.OPEN, "get annotation"); final Map<FijiColumnName, String> collectedAnnotations = Maps.newHashMap(); for (String metaTableKey : keySet()) { if (isKCAColumnMetaTableKey(metaTableKey)) { final FijiColumnName column = columnFromMetaTableKey(metaTableKey); if (null != column && Objects.equal(family, column.getFamily()) && Objects.equal(exactKey, keyFromMetaTableKey(metaTableKey))) { collectedAnnotations.put(column, getKV(metaTableKey)); } } } return collectedAnnotations; }
/** {@inheritDoc} */ @Override public Set<FijiColumnName> removeColumnAnnotationsInFamily( final String family, final String exactKey ) throws IOException { requireState(State.OPEN, "remove annotation"); final Set<FijiColumnName> removedColumns = Sets.newHashSet(); for (String metaTableKey : keySet()) { if (isKCAColumnMetaTableKey(metaTableKey) && Objects.equal(exactKey, keyFromMetaTableKey(metaTableKey))) { final FijiColumnName column = columnFromMetaTableKey(metaTableKey); if (null != column && Objects.equal(family, column.getFamily())) { removedColumns.add(column); removeKV(metaTableKey); } } } return removedColumns; }
/** {@inheritDoc} */ @Override public Map<FijiColumnName, Map<String, String>> getAllColumnAnnotationsInFamily( final String family ) throws IOException { requireState(State.OPEN, "get annotation"); final Map<FijiColumnName, Map<String, String>> collectedAnnotations = Maps.newHashMap(); for (String metaTableKey : keySet()) { if (isKCAColumnMetaTableKey(metaTableKey)) { final FijiColumnName column = columnFromMetaTableKey(metaTableKey); if (null != column && Objects.equal(family, column.getFamily())) { final String annotationKey = keyFromMetaTableKey(metaTableKey); final Map<String, String> existingAnnotations = collectedAnnotations.get(column); if (null != existingAnnotations) { existingAnnotations.put(annotationKey, getKV(metaTableKey)); } else { final Map<String, String> newAnnotations = Maps.newHashMap(); newAnnotations.put(annotationKey, getKV(metaTableKey)); collectedAnnotations.put(column, newAnnotations); } } } } return collectedAnnotations; }
/** {@inheritDoc} */ @Override public Map<FijiColumnName, Set<String>> removeAllColumnAnnotationsInFamily( final String family ) throws IOException { requireState(State.OPEN, "remove annotation"); final Map<FijiColumnName, Set<String>> removedAnnotationKeys = Maps.newHashMap(); for (String metaTableKey : keySet()) { if (isKCAColumnMetaTableKey(metaTableKey)) { final FijiColumnName column = columnFromMetaTableKey(metaTableKey); if (null != column && Objects.equal(family, column.getFamily())) { final Set<String> removedKeysInColumn = removedAnnotationKeys.get(column); if (null != removedKeysInColumn) { removedKeysInColumn.add(keyFromMetaTableKey(metaTableKey)); } else { removedAnnotationKeys.put(column, Sets.newHashSet(keyFromMetaTableKey(metaTableKey))); } removeKV(metaTableKey); } } } return removedAnnotationKeys; }
/** {@inheritDoc} */ @Override public Map<FijiColumnName, Map<String, String>> getColumnAnnotationsInFamilyStartingWith( final String family, final String prefix ) throws IOException { requireState(State.OPEN, "get annotation"); final Map<FijiColumnName, Map<String, String>> collectedAnnotations = Maps.newHashMap(); for (String metaTableKey : keySet()) { if (isKCAColumnMetaTableKey(metaTableKey)) { final FijiColumnName column = columnFromMetaTableKey(metaTableKey); if (Objects.equal(family, column.getFamily())) { final String annotationKey = keyFromMetaTableKey(metaTableKey); if (annotationKey.startsWith(prefix)) { final Map<String, String> existingAnnotations = collectedAnnotations.get(column); if (null != existingAnnotations) { existingAnnotations.put(annotationKey, getKV(metaTableKey)); } else { final Map<String, String> newAnnotations = Maps.newHashMap(); newAnnotations.put(annotationKey, getKV(metaTableKey)); collectedAnnotations.put(column, newAnnotations); } } } } } return collectedAnnotations; }