test_class.file: webster/src/test/java/net/adamcin/oakpal/webster/QNameTest.java
test_class.identifier: QNameTest
test_case.body: @Test
      public void testParseQName() {
          final QName ntPrefixName = QName.parseQName(JsonCnd.BUILTIN_MAPPINGS, QName.Type.NODETYPE, "nt:aType");
          assertEquals("type is ", QName.Type.NODETYPE, ntPrefixName.getType());
          assertEquals("prefix is ", "nt", ntPrefixName.getPrefix());
          assertEquals("localName is ", "aType", ntPrefixName.getLocalName());
          assertEquals("uri is ", NamespaceRegistry.NAMESPACE_NT, ntPrefixName.getUri());
          assertEquals("toString is ",
                  "nt:aType", ntPrefixName.toString());
          assertEquals("expanded is ",
                  "{" + NamespaceRegistry.NAMESPACE_NT + "}aType", ntPrefixName.toExpandedForm());
  
          final QName ntUriName = QName.parseQName(JsonCnd.BUILTIN_MAPPINGS, QName.Type.NODETYPE,
                  "{http://foo.com}anotherType");
          assertEquals("type is ", QName.Type.NODETYPE, ntUriName.getType());
          assertNull("prefix is null", ntUriName.getPrefix());
          assertEquals("localName is ", "anotherType", ntUriName.getLocalName());
          assertEquals("uri is ", "http://foo.com", ntUriName.getUri());
          assertEquals("toString is ",
                  "{http://foo.com}anotherType", ntUriName.toString());
          assertEquals("expanded is ",
                  "{http://foo.com}anotherType", ntUriName.toExpandedForm());
      }
test_case.class_method_signature: QNameTest.testParseQName()
test_case.full_signature: @Test public void testParseQName()
test_case.identifier: testParseQName
test_case.invocations: parseQName assertEquals getType assertEquals getPrefix assertEquals getLocalName assertEquals getUri assertEquals toString assertEquals toExpandedForm parseQName assertEquals getType assertNull getPrefix assertEquals getLocalName assertEquals getUri assertEquals toString assertEquals toExpandedForm
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testParseQName()
focal_class.declarator: type
focal_class.modifier: private final
focal_class.original_string: private final Type type;
focal_class.type: Type
focal_class.var_name: type
focal_class.declarator: prefix
focal_class.modifier: private final
focal_class.original_string: private final String prefix;
focal_class.type: String
focal_class.var_name: prefix
focal_class.declarator: localName
focal_class.modifier: private final
focal_class.original_string: private final String localName;
focal_class.type: String
focal_class.var_name: localName
focal_class.declarator: uri
focal_class.modifier: private final
focal_class.original_string: private final String uri;
focal_class.type: String
focal_class.var_name: uri
focal_class.file: webster/src/main/java/net/adamcin/oakpal/webster/QName.java
focal_class.identifier: QName
focal_class.class_method_signature: QName.QName(final @NotNull Type type,
                   final @Nullable String prefix,
                   final @NotNull String localName,
                   final @Nullable String uri)
focal_class.full_signature: public  QName(final @NotNull Type type,
                   final @Nullable String prefix,
                   final @NotNull String localName,
                   final @Nullable String uri)
focal_class.identifier: QName
focal_class.modifiers: public
focal_class.parameters: (final @NotNull Type type,
                   final @Nullable String prefix,
                   final @NotNull String localName,
                   final @Nullable String uri)
focal_class.signature:  QName(final @NotNull Type type,
                   final @Nullable String prefix,
                   final @NotNull String localName,
                   final @Nullable String uri)
focal_class.class_method_signature: QName.parseQName(final @NotNull NamespaceMapping mapping,
                                     final @NotNull Type type,
                                     final @NotNull String qName)
focal_class.full_signature: public static QName parseQName(final @NotNull NamespaceMapping mapping,
                                     final @NotNull Type type,
                                     final @NotNull String qName)
focal_class.identifier: parseQName
focal_class.modifiers: public static
focal_class.parameters: (final @NotNull NamespaceMapping mapping,
                                     final @NotNull Type type,
                                     final @NotNull String qName)
focal_class.return: QName
focal_class.signature: QName parseQName(final @NotNull NamespaceMapping mapping,
                                     final @NotNull Type type,
                                     final @NotNull String qName)
focal_class.class_method_signature: QName.adaptName(final @NotNull NamespaceMapping mapping,
                                    final @NotNull Type type,
                                    final @NotNull Name name)
focal_class.full_signature: public static QName adaptName(final @NotNull NamespaceMapping mapping,
                                    final @NotNull Type type,
                                    final @NotNull Name name)
focal_class.identifier: adaptName
focal_class.modifiers: public static
focal_class.parameters: (final @NotNull NamespaceMapping mapping,
                                    final @NotNull Type type,
                                    final @NotNull Name name)
focal_class.return: QName
focal_class.signature: QName adaptName(final @NotNull NamespaceMapping mapping,
                                    final @NotNull Type type,
                                    final @NotNull Name name)
focal_class.class_method_signature: QName.getType()
focal_class.full_signature: public Type getType()
focal_class.identifier: getType
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Type
focal_class.signature: Type getType()
focal_class.class_method_signature: QName.getPrefix()
focal_class.full_signature: public String getPrefix()
focal_class.identifier: getPrefix
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getPrefix()
focal_class.class_method_signature: QName.getLocalName()
focal_class.full_signature: public String getLocalName()
focal_class.identifier: getLocalName
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getLocalName()
focal_class.class_method_signature: QName.getUri()
focal_class.full_signature: public String getUri()
focal_class.identifier: getUri
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getUri()
focal_class.class_method_signature: QName.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_class.class_method_signature: QName.toExpandedForm()
focal_class.full_signature: public String toExpandedForm()
focal_class.identifier: toExpandedForm
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String toExpandedForm()
focal_class.class_method_signature: QName.equals(final Object o)
focal_class.full_signature: @Override public boolean equals(final Object o)
focal_class.identifier: equals
focal_class.modifiers: @Override public
focal_class.parameters: (final Object o)
focal_class.return: boolean
focal_class.signature: boolean equals(final Object o)
focal_class.class_method_signature: QName.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_method.body: public static QName parseQName(final @NotNull NamespaceMapping mapping,
                                     final @NotNull Type type,
                                     final @NotNull String qName) {
          if (qName.startsWith("{") && qName.contains("}")) {
              final int lastBrace = qName.indexOf("}");
              final String uri = qName.substring(1, lastBrace);
              final String localName = qName.substring(lastBrace + 1);
              return new QName(type,
                      result1(mapping::getPrefix).apply(uri).toOptional().orElse(null),
                      localName, uri);
          } else if (qName.contains(":")) {
              final String[] parts = qName.split(":", 2);
              final String prefix = parts[0];
              final String localName = parts[1];
              return new QName(type, prefix, localName,
                      result1(mapping::getURI).apply(prefix).toOptional().orElse(null));
          }
          throw new UnqualifiedNameException(qName);
      }
focal_method.class_method_signature: QName.parseQName(final @NotNull NamespaceMapping mapping,
                                     final @NotNull Type type,
                                     final @NotNull String qName)
focal_method.full_signature: public static QName parseQName(final @NotNull NamespaceMapping mapping,
                                     final @NotNull Type type,
                                     final @NotNull String qName)
focal_method.identifier: parseQName
focal_method.invocations: startsWith contains indexOf substring substring orElse toOptional apply result1 contains split orElse toOptional apply result1
focal_method.modifiers: public static
focal_method.parameters: (final @NotNull NamespaceMapping mapping,
                                     final @NotNull Type type,
                                     final @NotNull String qName)
focal_method.return: QName
focal_method.signature: QName parseQName(final @NotNull NamespaceMapping mapping,
                                     final @NotNull Type type,
                                     final @NotNull String qName)