/**
   * Invoked during {@link #initialize()} to create the parser context. The parser context is
   * created by the global {@link gov.nasa.worldwind.util.xml.XMLEventParserContextFactory}.
   *
   * @param reader the reader to associate with the parser context.
   * @return a new parser context.
   */
  protected ColladaParserContext createParserContext(XMLEventReader reader) {
    ColladaParserContext ctx =
        (ColladaParserContext)
            XMLEventParserContextFactory.createParserContext(
                ColladaConstants.COLLADA_MIME_TYPE, this.getNamespaceURI());

    if (ctx == null) {
      // Register a parser context for this root's default namespace
      String[] mimeTypes = new String[] {ColladaConstants.COLLADA_MIME_TYPE};
      XMLEventParserContextFactory.addParserContext(
          mimeTypes, new ColladaParserContext(this.getNamespaceURI()));
      ctx =
          (ColladaParserContext)
              XMLEventParserContextFactory.createParserContext(
                  ColladaConstants.COLLADA_MIME_TYPE, this.getNamespaceURI());
    }

    ctx.setEventReader(reader);

    return ctx;
  }