- public Collection<SchemaNodeIdentifier> parseArgumentValue(StmtContext<?, ?, ?> ctx, String value)
- throws SourceException {
-
- Splitter keySplitter = Splitter.on(StmtContextUtils.LIST_KEY_SEPARATOR).omitEmptyStrings().trimResults();
- List<String> keyTokens = keySplitter.splitToList(value);
-
- // to detect if key contains duplicates
- if ((new HashSet<>(keyTokens)).size() < keyTokens.size()) {
- throw new IllegalArgumentException();
+ public Collection<SchemaNodeIdentifier> parseArgumentValue(final StmtContext<?, ?, ?> ctx, final String value) {
+ final Builder<SchemaNodeIdentifier> builder = ImmutableSet.builder();
+ int tokens = 0;
+ for (String keyToken : StmtContextUtils.LIST_KEY_SPLITTER.split(value)) {
+ builder.add(SchemaNodeIdentifier.create(false, Utils.qNameFromArgument(ctx, keyToken)));
+ tokens++;