@Override public void init(SortedKeyValueIterator<Key, Value> source, Map<String, String> options, IteratorEnvironment env) throws IOException { super.init(source, options, env); Set<String> labels = new HashSet<>(); Set<String> excludedLabels = new HashSet<>(); for (Map.Entry<String, String> option : options.entrySet()) { if (option.getKey().startsWith(SETTING_LABEL_PREFIX)) { labels.add(option.getValue()); } else if (option.getKey().startsWith(SETTING_EXCLUDED_LABEL_PREFIX)) { excludedLabels.add(option.getValue()); } } this.labels = labels.size() == 0 ? null : labels; this.excludedLabels = excludedLabels.size() == 0 ? null : excludedLabels; }
@Override public void init(SortedKeyValueIterator<Key, Value> source, Map<String, String> options, IteratorEnvironment env) throws IOException { super.init(source, options, env); Set<String> labels = new HashSet<>(); Set<String> excludedLabels = new HashSet<>(); for (Map.Entry<String, String> option : options.entrySet()) { if (option.getKey().startsWith(SETTING_LABEL_PREFIX)) { labels.add(option.getValue()); } else if (option.getKey().startsWith(SETTING_EXCLUDED_LABEL_PREFIX)) { excludedLabels.add(option.getValue()); } } this.labels = labels.size() == 0 ? null : labels; this.excludedLabels = excludedLabels.size() == 0 ? null : excludedLabels; }
@Override public void init(SortedKeyValueIterator<Key, Value> source, Map<String, String> options, IteratorEnvironment env) throws IOException { super.init(source, options, env); fetchHints = new IteratorFetchHints( Boolean.parseBoolean(options.get(SETTING_FETCH_HINTS_PREFIX + "includeAllProperties")), parseSet(options.get(SETTING_FETCH_HINTS_PREFIX + "propertyNamesToInclude")), Boolean.parseBoolean(options.get(SETTING_FETCH_HINTS_PREFIX + "includeAllPropertyMetadata")), parseSet(options.get(SETTING_FETCH_HINTS_PREFIX + "metadataKeysToInclude")), Boolean.parseBoolean(options.get(SETTING_FETCH_HINTS_PREFIX + "includeHidden")), Boolean.parseBoolean(options.get(SETTING_FETCH_HINTS_PREFIX + "includeAllEdgeRefs")), Boolean.parseBoolean(options.get(SETTING_FETCH_HINTS_PREFIX + "includeOutEdgeRefs")), Boolean.parseBoolean(options.get(SETTING_FETCH_HINTS_PREFIX + "includeInEdgeRefs")), parseSet(options.get(SETTING_FETCH_HINTS_PREFIX + "edgeLabelsOfEdgeRefsToInclude")), Boolean.parseBoolean(options.get(SETTING_FETCH_HINTS_PREFIX + "includeEdgeLabelsAndCounts")), Boolean.parseBoolean(options.get(SETTING_FETCH_HINTS_PREFIX + "includeExtendedDataTableNames")) ); elementData = createElementData(); }