test_class.file: vault-core/src/test/java/org/apache/jackrabbit/vault/util/DocViewPropertyTest.java
test_class.identifier: DocViewPropertyTest
test_case.body: @Test
      public void testParseMVSpecial() {
          DocViewProperty p = DocViewProperty.parse("foo", "[\\[hello,world]");
          assertEquals(p, true, PropertyType.UNDEFINED, "[hello", "world");
          p = DocViewProperty.parse("foo", "[[hello],[world]]");
          assertEquals(p, true, PropertyType.UNDEFINED, "[hello]", "[world]");
          p = DocViewProperty.parse("foo", "[he\\[llo,world]");
          assertEquals(p, true, PropertyType.UNDEFINED, "he[llo", "world");
          p = DocViewProperty.parse("foo", "[hello\\[,world]");
          assertEquals(p, true, PropertyType.UNDEFINED, "hello[", "world");
          p = DocViewProperty.parse("foo", "[hello,\\[world]");
          assertEquals(p, true, PropertyType.UNDEFINED, "hello", "[world");
          p = DocViewProperty.parse("foo", "[hello,world\\[]");
          assertEquals(p, true, PropertyType.UNDEFINED, "hello", "world[");
          p = DocViewProperty.parse("foo", "[hello,world");
          assertEquals(p, true, PropertyType.UNDEFINED, "hello", "world");
          p = DocViewProperty.parse("foo", "[bla{a\\,b},foo{a\\,b},bar{a\\,b}]");
          assertEquals(p, true, PropertyType.UNDEFINED, "bla{a,b}", "foo{a,b}", "bar{a,b}");
          p = DocViewProperty.parse("foo", "[/content/[a-z]{2\\,3}/[a-z]{2\\,3}(/.*)]");
          assertEquals(p, true, PropertyType.UNDEFINED, "/content/[a-z]{2,3}/[a-z]{2,3}(/.*)");
      }
test_case.class_method_signature: DocViewPropertyTest.testParseMVSpecial()
test_case.full_signature: @Test public void testParseMVSpecial()
test_case.identifier: testParseMVSpecial
test_case.invocations: parse assertEquals parse assertEquals parse assertEquals parse assertEquals parse assertEquals parse assertEquals parse assertEquals parse assertEquals parse assertEquals
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testParseMVSpecial()
focal_class.declarator: BINARY_REF = "BinaryRef"
focal_class.modifier: private static final
focal_class.original_string: private static final String BINARY_REF = "BinaryRef";
focal_class.type: String
focal_class.var_name: BINARY_REF
focal_class.declarator: name
focal_class.modifier: public final
focal_class.original_string: public final String name;
focal_class.type: String
focal_class.var_name: name
focal_class.declarator: values
focal_class.modifier: public final
focal_class.original_string: public final String[] values;
focal_class.type: String[]
focal_class.var_name: values
focal_class.declarator: isMulti
focal_class.modifier: public final
focal_class.original_string: public final boolean isMulti;
focal_class.type: boolean
focal_class.var_name: isMulti
focal_class.declarator: type
focal_class.modifier: public final
focal_class.original_string: public final int type;
focal_class.type: int
focal_class.var_name: type
focal_class.declarator: isReferenceProperty
focal_class.modifier: public final
focal_class.original_string: public final boolean isReferenceProperty;
focal_class.type: boolean
focal_class.var_name: isReferenceProperty
focal_class.declarator: UNAMBIGOUS = new HashSet<String>()
focal_class.modifier: private static final
focal_class.original_string: private static final Set<String> UNAMBIGOUS = new HashSet<String>();
focal_class.type: Set<String>
focal_class.var_name: UNAMBIGOUS
focal_class.file: vault-core/src/main/java/org/apache/jackrabbit/vault/util/DocViewProperty.java
focal_class.identifier: DocViewProperty
focal_class.class_method_signature: DocViewProperty.DocViewProperty(String name, String[] values, boolean multi, int type)
focal_class.full_signature: public  DocViewProperty(String name, String[] values, boolean multi, int type)
focal_class.identifier: DocViewProperty
focal_class.modifiers: public
focal_class.parameters: (String name, String[] values, boolean multi, int type)
focal_class.signature:  DocViewProperty(String name, String[] values, boolean multi, int type)
focal_class.class_method_signature: DocViewProperty.DocViewProperty(String name, String[] values, boolean multi, int type, boolean isRef)
focal_class.full_signature: public  DocViewProperty(String name, String[] values, boolean multi, int type, boolean isRef)
focal_class.identifier: DocViewProperty
focal_class.modifiers: public
focal_class.parameters: (String name, String[] values, boolean multi, int type, boolean isRef)
focal_class.signature:  DocViewProperty(String name, String[] values, boolean multi, int type, boolean isRef)
focal_class.class_method_signature: DocViewProperty.parse(String name, String value)
focal_class.full_signature: public static DocViewProperty parse(String name, String value)
focal_class.identifier: parse
focal_class.modifiers: public static
focal_class.parameters: (String name, String value)
focal_class.return: DocViewProperty
focal_class.signature: DocViewProperty parse(String name, String value)
focal_class.class_method_signature: DocViewProperty.format(Property prop)
focal_class.full_signature: public static String format(Property prop)
focal_class.identifier: format
focal_class.modifiers: public static
focal_class.parameters: (Property prop)
focal_class.return: String
focal_class.signature: String format(Property prop)
focal_class.class_method_signature: DocViewProperty.format(Property prop, boolean sort, boolean useBinaryReferences)
focal_class.full_signature: public static String format(Property prop, boolean sort, boolean useBinaryReferences)
focal_class.identifier: format
focal_class.modifiers: public static
focal_class.parameters: (Property prop, boolean sort, boolean useBinaryReferences)
focal_class.return: String
focal_class.signature: String format(Property prop, boolean sort, boolean useBinaryReferences)
focal_class.class_method_signature: DocViewProperty.escape(StringBuffer buf, String value, boolean isMulti)
focal_class.full_signature: protected static void escape(StringBuffer buf, String value, boolean isMulti)
focal_class.identifier: escape
focal_class.modifiers: protected static
focal_class.parameters: (StringBuffer buf, String value, boolean isMulti)
focal_class.return: void
focal_class.signature: void escape(StringBuffer buf, String value, boolean isMulti)
focal_class.class_method_signature: DocViewProperty.isAmbiguous(Property prop)
focal_class.full_signature: public static boolean isAmbiguous(Property prop)
focal_class.identifier: isAmbiguous
focal_class.modifiers: public static
focal_class.parameters: (Property prop)
focal_class.return: boolean
focal_class.signature: boolean isAmbiguous(Property prop)
focal_class.class_method_signature: DocViewProperty.apply(Node node)
focal_class.full_signature: public boolean apply(Node node)
focal_class.identifier: apply
focal_class.modifiers: public
focal_class.parameters: (Node node)
focal_class.return: boolean
focal_class.signature: boolean apply(Node node)
focal_class.class_method_signature: DocViewProperty.hashCode()
focal_class.full_signature: @Override public int hashCode()
focal_class.identifier: hashCode
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int hashCode()
focal_class.class_method_signature: DocViewProperty.equals(Object obj)
focal_class.full_signature: @Override public boolean equals(Object obj)
focal_class.identifier: equals
focal_class.modifiers: @Override public
focal_class.parameters: (Object obj)
focal_class.return: boolean
focal_class.signature: boolean equals(Object obj)
focal_class.class_method_signature: DocViewProperty.toString()
focal_class.full_signature: @Override public String toString()
focal_class.identifier: toString
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String toString()
focal_method.body: public static DocViewProperty parse(String name, String value) {
          boolean isMulti = false;
          boolean isBinaryRef = false;
          int type = PropertyType.UNDEFINED;
          int pos = 0;
          char state = 'b';
          List<String> vals = null;
          StringBuffer tmp = new StringBuffer();
          int unicode = 0;
          int unicodePos = 0;
          while (pos < value.length()) {
              char c = value.charAt(pos++);
              switch (state) {
                  case 'b': // begin (type or array or value)
                      if (c == '{') {
                          state = 't';
                      } else if (c == '[') {
                          isMulti = true;
                          state = 'v';
                      } else if (c == '\\') {
                          state = 'e';
                      } else {
                          tmp.append(c);
                          state = 'v';
                      }
                      break;
                  case 'a': // array (array or value)
                      if (c == '[') {
                          isMulti = true;
                          state = 'v';
                      } else if (c == '\\') {
                          state = 'e';
                      } else {
                          tmp.append(c);
                          state = 'v';
                      }
                      break;
                  case 't':
                      if (c == '}') {
                          if (BINARY_REF.equals(tmp.toString())) {
                              type = PropertyType.BINARY;
                              isBinaryRef = true;
                          } else {
                              type = PropertyType.valueFromName(tmp.toString());
                          }
                          tmp.setLength(0);
                          state = 'a';
                      } else {
                          tmp.append(c);
                      }
                      break;
                  case 'v': // value
                      if (c == '\\') {
                          state = 'e';
                      } else if (c == ',' && isMulti) {
                          if (vals == null) {
                              vals = new LinkedList<String>();
                          }
                          vals.add(tmp.toString());
                          tmp.setLength(0);
                      } else if (c == ']' && isMulti && pos == value.length()) {
                          if (tmp.length() > 0 || vals != null) {
                              if (vals == null) {
                                  vals = new LinkedList<String>();
                              }
                              vals.add(tmp.toString());
                              tmp.setLength(0);
                          }
                      } else {
                          tmp.append(c);
                      }
                      break;
                  case 'e': // escaped
                      if (c == 'u') {
                          state = 'u';
                          unicode = 0;
                          unicodePos = 0;
                      } else if (c == '0') {
                          // special case to treat empty values. see JCR-3661
                          state = 'v';
                          if (vals == null) {
                              vals = new LinkedList<String>();
                          }
                      } else {
                          state = 'v';
                          tmp.append(c);
                      }
                      break;
                  case 'u': // unicode escaped
                      unicode = (unicode << 4) + Character.digit(c, 16);
                      if (++unicodePos == 4) {
                          tmp.appendCodePoint(unicode);
                          state = 'v';
                      }
                      break;
  
              }
          }
          String[] values;
          if (isMulti) {
              // add value if missing ']'
              if (tmp.length() > 0) {
                  if (vals == null) {
                      vals = new LinkedList<String>();
                  }
                  vals.add(tmp.toString());
              }
              if (vals == null) {
                  values = Constants.EMPTY_STRING_ARRAY;
              } else {
                  values = vals.toArray(new String[vals.size()]);
              }
          } else {
              values = new String[]{tmp.toString()};
          }
          return new DocViewProperty(name, values, isMulti, type, isBinaryRef);
      }
focal_method.class_method_signature: DocViewProperty.parse(String name, String value)
focal_method.full_signature: public static DocViewProperty parse(String name, String value)
focal_method.identifier: parse
focal_method.invocations: length charAt append append equals toString valueFromName toString setLength append add toString setLength length length add toString setLength append append digit appendCodePoint length add toString toArray size toString
focal_method.modifiers: public static
focal_method.parameters: (String name, String value)
focal_method.return: DocViewProperty
focal_method.signature: DocViewProperty parse(String name, String value)