Report the end of DTD declarations.

@throws SAXException The application may raise an exception.
@see #startDTD
540005
public void endDTD() throws SAXException
  {

    if (DEBUG)
      System.out.println("TransformerHandlerImpl#endDTD");

    if (null != m_lexicalHandler)
    {
      m_lexicalHandler.endDTD();
    }
  }
92413
@Override
    public void endElement(String uri, String localName, String name) throws SAXException {
        if ("table".equals(name)) {
            for (final Column column : this.currentColumns.values()) {
                this.currentTable.addColumn(column);
            }

            if (this.primaryKey != null) {
                this.currentTable.setPrimaryKey(this.primaryKey);
            }

            this.tables.put(this.currentTable.getName(), this.currentTable);
            this.tableColumnTypes.put(this.currentTable.getName(), this.currentColumnTypes);
            this.primaryKey = null;
            this.currentColumns = null;
            this.currentColumnTypes = null;
            this.currentTable = null;
        } else if ("column".equals(name)) {
            this.currentColumns.put(this.currentColumn.getName(), this.currentColumn);
            this.currentColumn = null;
        } else if ("name".equals(name)) {
            final String itemName = this.chars.toString().trim();

            if (this.currentIndex != null) {
                this.currentIndex.setName(itemName);
            } else if (this.currentUnique != null) {
                this.currentUnique.setName(itemName);
            } else if (this.currentTable == null) {
                this.currentTable = new Table(itemName);
            } else if (this.currentColumn == null) {
                this.currentColumn = new Column(itemName);
            }
        } else if ("type".equals(name)) {
            final String sqlTypeName = this.chars.toString().trim();

            final int sqlType = this.getSqlType(sqlTypeName);
            this.currentColumnTypes.put(this.currentColumn.getName(), sqlType);

            final String hibType = this.getHibernateType(sqlType);

            final SimpleValue value = new SimpleValue(this.mappings, this.currentTable);
            value.setTypeName(hibType);

            this.currentColumn.setValue(value);
        } else if ("param".equals(name)) {
            final String param = this.chars.toString().trim();

            final Integer length = Integer.valueOf(param);
            this.currentColumn.setLength(length);
        } else if ("primary-key".equals(name)) {
            final String columnName = this.chars.toString().trim();

            if (this.primaryKey == null) {
                this.primaryKey = new PrimaryKey();
            }

            final Column column = this.currentColumns.get(columnName);
            this.primaryKey.addColumn(column);
        } else if ("not-null".equals(name)) {
            final String columnName = this.chars.toString().trim();
            final Column column = this.currentColumns.get(columnName);
            column.setNullable(false);
        } else if ("column-ref".equals(name)) {
            final String columnName = this.chars.toString().trim();
            final Column column = this.currentColumns.get(columnName);

            if (this.currentIndex != null) {
                this.currentIndex.addColumn(column);
            } else if (this.currentUnique != null) {
                this.currentUnique.addColumn(column);
            }
        } else if ("index".equals(name)) {
            this.currentTable.addIndex(this.currentIndex);
            this.currentIndex = null;
        } else if ("unique".equals(name)) {
            this.currentTable.addUniqueKey(this.currentUnique);
            this.currentUnique = null;
        } else if ("key".equals(name)) {
            this.logger.warn(
                    "the 'key' element is ignored, use the table level 'primary-key' element instead");
        }

        this.chars = null;
    }
441455
@Override
    public void endElement(String uri, String localName, String qName) throws SAXException {
        stack.pop();
        final String parentNode = stack.peek();
        if (null != parentNode) {
            switch (parentNode) {
                case PROJECT:
                    if (null != qName) {
                        switch (qName) {
                            case GROUPID:
                                model.setGroupId(currentText.toString());
                                break;
                            case ARTIFACTID:
                                model.setArtifactId(currentText.toString());
                                break;
                            case VERSION:
                                model.setVersion(currentText.toString());
                                break;
                            case NAME:
                                model.setName(currentText.toString());
                                break;
                            case DESCRIPTION:
                                model.setDescription(currentText.toString());
                                break;
                            case URL:
                                model.setProjectURL(currentText.toString());
                                break;
                            default:
                                break;
                        }
                    }
                    break;
                case ORGANIZATION:
                    if (NAME.equals(qName)) {
                        model.setOrganization(currentText.toString());
                    } else if (URL.equals(qName)) {
                        model.setOrganizationUrl(currentText.toString());
                    }
                    break;
                case PARENT:
                    if (null != qName) {
                        switch (qName) {
                            case GROUPID:
                                model.setParentGroupId(currentText.toString());
                                break;
                            case ARTIFACTID:
                                model.setParentArtifactId(currentText.toString());
                                break;
                            case VERSION:
                                model.setParentVersion(currentText.toString());
                                break;
                            default:
                                break;
                        }
                    }
                    break;
                case LICENSE:
                    if (license != null) {
                        if (NAME.equals(qName)) {
                            license.setName(currentText.toString());
                        } else if (URL.equals(qName)) {
                            license.setUrl(currentText.toString());
                        }
                    }
                    break;
                case LICENSES:
                    if (LICENSE.equals(qName) && license != null) {
                        model.addLicense(license);
                    }
                    break;
                default:
                    break;
            }
        }
    }
925103
public void warning(SAXParseException exception) throws SAXException {
        if (logger.isLoggable(Level.WARNING))
            logger.warning("Warning on line " + exception.getLineNumber() +
                           ": " + exception.getMessage());
    }
364485
public void writeDTD(String dtd) throws XMLStreamException {
		if (preserveDTD) {
			try {
				this.checkPendingATEvents();
				SimpleDocTypeParser dtdParser = getDtdParser();
				dtdParser.parse(dtd);

				encoder.encodeDocType(dtdParser.name, dtdParser.publicID,
						dtdParser.systemID, dtdParser.text);
			} catch (Exception e) {
				throw new XMLStreamException(e.getLocalizedMessage(), e);
			}
		}
	}
758817
public void startDTD(String name, String publicId, String systemId)
        throws SAXException
    {
        m_handler.startDTD(name, publicId, systemId);
    }
449651
public void endElement(String namespaceURI, String localName, String qName)
        throws SAXException
    {
        if (m_firstTagNotEmitted)
        {
            flush();
            if (namespaceURI == null && m_firstElementURI != null)
                namespaceURI = m_firstElementURI;


            if (localName == null && m_firstElementLocalName != null)
                localName = m_firstElementLocalName;
        }
        
        m_handler.endElement(namespaceURI, localName, qName);
    }
1077735
protected void fireCDATAEvent(char[] chars, int start, int length)
        throws org.xml.sax.SAXException
    {
		if (m_tracer != null)
        {
            flushMyWriter();
			m_tracer.fireGenerateEvent(SerializerTrace.EVENTTYPE_CDATA, chars, start,length);
        }     	        	    	
    }
1350561
public void startDocument() throws SAXException {
        traceBuilder.delete(0, traceBuilder.length());
        trace("startDocument");
        currentDocument = documentBuilder.newDocument();
        currentElement = null;
    }
361050
public void endDocument() throws org.xml.sax.SAXException
    {
        flushPending();
        if (m_doIndent && !m_isprevtext)
        {
            try
            {
            outputLineSep();
            }
            catch(IOException e)
            {
                throw new SAXException(e);
            }
        }

        flushWriter();
        
        if (m_tracer != null)
            super.fireEndDoc();
    }
913516
@Override
    public void endDocument() throws SAXException {

        LOG.info("Content Processing finished, saving...");
        try {
            this.session.save();
        } catch (final RepositoryException e) {
            throw new AssertionError("Saving failed", e);
        }
        if (LOG.isInfoEnabled()) {
            LOG.info("Content imported in {} ms", (System.nanoTime() - this.startTime) / 1_000_000);
            LOG.info("END ContentImport");
        }
    }
1220996
private void startDTD()
        throws XMLStreamException
    {
        /* 21-Nov-2004, TSa: Let's make sure that the buffer gets cleared
         *   at this point. Need not start branching yet, however, since
         *   DTD event is often skipped.
         */
        mTextBuffer.resetInitialized();

        /* So, what we need is:<code>
         *  <!DOCTYPE' S Name (S ExternalID)? S? ('[' intSubset ']' S?)? '>
         *</code>. And we have already read the DOCTYPE token.
         */

        char c = getNextInCurrAfterWS(SUFFIX_IN_DTD);
        if (mCfgNsEnabled) {
            String str = parseLocalName(c);
            c = getNextChar(SUFFIX_IN_DTD);
            if (c == ':') { // Ok, got namespace and local name
                mRootPrefix = str;
                mRootLName = parseLocalName(getNextChar(SUFFIX_EOF_EXP_NAME));
            } else if (c <= CHAR_SPACE || c == '[' || c == '>') {
                // ok to get white space or '[', or closing '>'
                --mInputPtr; // pushback
                mRootPrefix = null;
                mRootLName = str;
            } else {
                throwUnexpectedChar(c, " in DOCTYPE declaration; expected '[' or white space.");
            }
        } else {
            mRootLName = parseFullName(c);
            mRootPrefix = null;
        }

        // Ok, fine, what next?
        c = getNextInCurrAfterWS(SUFFIX_IN_DTD);
        if (c != '[' && c != '>') {
            String keyw = null;
            
            if (c == 'P') {
                keyw = checkKeyword(getNextChar(SUFFIX_IN_DTD), "UBLIC");
                if (keyw != null) {
                    keyw = "P" + keyw;
                } else {
                    if (!skipWS(getNextChar(SUFFIX_IN_DTD))) {
                        throwUnexpectedChar(c, SUFFIX_IN_DTD+"; expected a space between PUBLIC keyword and public id");
                    }
                    c = getNextCharFromCurrent(SUFFIX_IN_DTD);
                    if (c != '"' && c != '\'') {
                        throwUnexpectedChar(c, SUFFIX_IN_DTD+"; expected a public identifier.");
                    }
                    mDtdPublicId = parsePublicId(c, SUFFIX_IN_DTD);
                    if (mDtdPublicId.length() == 0) {
                        // According to XML specs, this isn't illegal?
                        // however, better report it as empty, not null.
                        //mDtdPublicId = null;
                    }
                    if (!skipWS(getNextChar(SUFFIX_IN_DTD))) {
                        throwUnexpectedChar(c, SUFFIX_IN_DTD+"; expected a space between public and system identifiers");
                    }
                    c = getNextCharFromCurrent(SUFFIX_IN_DTD);
                    if (c != '"' && c != '\'') {
                        throwParseError(SUFFIX_IN_DTD+"; expected a system identifier.");
                    }
                    mDtdSystemId = parseSystemId(c, mNormalizeLFs, SUFFIX_IN_DTD);
                    if (mDtdSystemId.length() == 0) {
                        // According to XML specs, this isn't illegal?
                        // however, better report it as empty, not null.
                        //mDtdSystemId = null;
                    }
                }
            } else if (c == 'S') {
                mDtdPublicId = null;
                keyw = checkKeyword(getNextChar(SUFFIX_IN_DTD), "YSTEM");
                if (keyw != null) {
                    keyw = "S" + keyw;
                } else {
                    c = getNextInCurrAfterWS(SUFFIX_IN_DTD);
                    if (c != '"' && c != '\'') {
                        throwUnexpectedChar(c, SUFFIX_IN_DTD+"; expected a system identifier.");
                    }
                    mDtdSystemId = parseSystemId(c, mNormalizeLFs, SUFFIX_IN_DTD);
                    if (mDtdSystemId.length() == 0) {
                        // According to XML specs, this isn't illegal?
                        mDtdSystemId = null;
                    }
                }
            } else {
                if (!isNameStartChar(c)) {
                    throwUnexpectedChar(c, SUFFIX_IN_DTD+"; expected keywords 'PUBLIC' or 'SYSTEM'.");
                } else {
                    --mInputPtr;
                    keyw = checkKeyword(c, "SYSTEM"); // keyword passed in doesn't matter
                }
            }
            
            if (keyw != null) { // error:
                throwParseError("Unexpected keyword '"+keyw+"'; expected 'PUBLIC' or 'SYSTEM'");
            }
            
            // Ok, should be done with external DTD identifier:
            c = getNextInCurrAfterWS(SUFFIX_IN_DTD);
        }
        
        if (c == '[') { // internal subset
            ;
        } else {
            if (c != '>') {
                throwUnexpectedChar(c, SUFFIX_IN_DTD+"; expected closing '>'.");
            }
        }
        
        /* Actually, let's just push whatever char it is, back; this way
         * we can lazily initialize text buffer with DOCTYPE declaration
         * if/as necessary, even if there's no internal subset.
         */
        --mInputPtr; // pushback
        mTokenState = TOKEN_STARTED;
    }
1168061
public void endProcessingNode() {
        if (nodeCount.decrementAndGet() == 0 && recorder != null) {
            Node node = rootNode.build();

            trace.setTimestamp(node.getTimestamp());
            trace.setTransaction(getTransaction());
            trace.getNodes().add(node);

            if (checkForSamplingProperties(node)) {
                reportingLevel = ReportingLevel.All;
            }

            boolean sampled = sampler.isSampled(trace, reportingLevel);
            if (sampled && reportingLevel == null) {
                reportingLevel = ReportingLevel.All;
            }

            if (sampled) {
                recorder.record(trace);
            }
        }
    }
696870
public void endDocument() throws SAXException
  {
    super.endDocument();

    // Add a NULL entry to the end of the node arrays as
    // the end indication.
    m_exptype.addElement(NULL);
    m_parent.addElement(NULL);
    m_nextsib.addElement(NULL);
    m_firstch.addElement(NULL);

    // Set the cached references after the document is built.
    m_extendedTypes = m_expandedNameTable.getExtendedTypes();
    m_exptype_map = m_exptype.getMap();
    m_nextsib_map = m_nextsib.getMap();
    m_firstch_map = m_firstch.getMap();
    m_parent_map  = m_parent.getMap();
  }
1232547
@Override
    public void writeDTD(String rootName, String systemId, String publicId,
                         String internalSubset)
        throws XMLStreamException
    {
        /* Alas: although we can create a DocumentType object, there
         * doesn't seem to be a way to attach it in DOM-2!
         */
        if (mCurrElem != null) {
            throw new IllegalStateException("Operation only allowed to the document before adding root element");
        }
        reportUnsupported("writeDTD()");
    }
1136332
@Override
    public void endElement(String uri, String localName, String qName) throws SAXException {
        if (null != qName) {
            switch (qName) {
                case COMPANY_NAME:
                    data.setCompanyName(currentText.toString());
                    break;
                case PRODUCT_NAME:
                    data.setProductName(currentText.toString());
                    break;
                case PRODUCT_VERSION:
                    data.setProductVersion(currentText.toString());
                    break;
                case COMMENTS:
                    data.setComments(currentText.toString());
                    break;
                case FILE_DESCRIPTION:
                    data.setFileDescription(currentText.toString());
                    break;
                case FILE_NAME:
                    data.setFileName(currentText.toString());
                    break;
                case FILE_VERSION:
                    data.setFileVersion(currentText.toString());
                    break;
                case INTERNAL_NAME:
                    data.setInternalName(currentText.toString());
                    break;
                case ORIGINAL_FILE_NAME:
                    data.setOriginalFilename(currentText.toString());
                    break;
                case FULLNAME:
                    data.setFullName(currentText.toString());
                    break;
                case NAMESPACE:
                    data.addNamespace(currentText.toString());
                    break;
                case ERROR:
                    data.setError(currentText.toString());
                    break;
                case WARNING:
                    data.setWarning(currentText.toString());
                    break;
                default:
                    break;
            }
        }
    }
739027
@Override
	public void endElement(String uri, String localName, String qName) throws SAXException {
		if(localName.equals("sessionid")) {
			String session = characters.toString();
			configs.put(session, session);

			log.info("Found Session '" + session + "'");	// with href: " + atts.getValue("href")
		}
		characters.setLength(0);
	}