onCloseTag() {
        const poppedTag = this.activeTagStack.pop();
        // If we were converting a tag to a string, and the tag was not self-closing, close it here.
        if (poppedTag.childrenStringEmitClosingTag) {
            poppedTag.childrenStringTags.push(poppedTag.childrenStringEmitClosingTag);
        }
        // Set the literal value if we were collecting XML tags to string
        if (poppedTag.childrenTagsToString) {
            poppedTag.datatype = this.dataFactory.namedNode(RdfXmlParser.RDF + 'XMLLiteral');
            poppedTag.text = poppedTag.childrenStringTags.join('');
            poppedTag.hadChildren = false; // Force a literal triple to be emitted hereafter
        }
        if (poppedTag.childrenCollectionSubject) {
            // Terminate the rdf:List
            this.emitTriple(poppedTag.childrenCollectionSubject, poppedTag.childrenCollectionPredicate, this.dataFactory.namedNode(RdfXmlParser.RDF + 'nil'), poppedTag.reifiedStatementId);
        }
        else if (poppedTag.predicate) {
            if (!poppedTag.hadChildren && poppedTag.childrenParseType !== ParseType.PROPERTY) {
                // Property element contains text
                this.emitTriple(poppedTag.subject, poppedTag.predicate, this.dataFactory.literal(poppedTag.text || '', poppedTag.datatype || poppedTag.language), poppedTag.reifiedStatementId);
            }
            else if (!poppedTag.predicateEmitted) {
                // Emit remaining properties on an anonymous property element
                const subject = this.dataFactory.blankNode();
                this.emitTriple(poppedTag.subject, poppedTag.predicate, subject, poppedTag.reifiedStatementId);
                for (let i = 0; i < poppedTag.predicateSubPredicates.length; i++) {
                    this.emitTriple(subject, poppedTag.predicateSubPredicates[i], poppedTag.predicateSubObjects[i], null);
                }
            }
        }
    }
/**
     * Handle the closing of the last tag.
     */
Handle the closing of the last tag.
Handle the closing of the last tag .
onCloseTag() {
        const poppedTag = this.activeTagStack.pop();
        if (poppedTag.childrenStringEmitClosingTag) {
            poppedTag.childrenStringTags.push(poppedTag.childrenStringEmitClosingTag);
        }
        if (poppedTag.childrenTagsToString) {
            poppedTag.datatype = this.dataFactory.namedNode(RdfXmlParser.RDF + 'XMLLiteral');
            poppedTag.text = poppedTag.childrenStringTags.join('');
            poppedTag.hadChildren = false; 
        }
        if (poppedTag.childrenCollectionSubject) {
            this.emitTriple(poppedTag.childrenCollectionSubject, poppedTag.childrenCollectionPredicate, this.dataFactory.namedNode(RdfXmlParser.RDF + 'nil'), poppedTag.reifiedStatementId);
        }
        else if (poppedTag.predicate) {
            if (!poppedTag.hadChildren && poppedTag.childrenParseType !== ParseType.PROPERTY) {
                this.emitTriple(poppedTag.subject, poppedTag.predicate, this.dataFactory.literal(poppedTag.text || '', poppedTag.datatype || poppedTag.language), poppedTag.reifiedStatementId);
            }
            else if (!poppedTag.predicateEmitted) {
                const subject = this.dataFactory.blankNode();
                this.emitTriple(poppedTag.subject, poppedTag.predicate, subject, poppedTag.reifiedStatementId);
                for (let i = 0; i < poppedTag.predicateSubPredicates.length; i++) {
                    this.emitTriple(subject, poppedTag.predicateSubPredicates[i], poppedTag.predicateSubObjects[i], null);
                }
            }
        }
    }
onCloseTag ( ) { const poppedTag = this . activeTagStack . pop ( ) ; if ( poppedTag . childrenStringEmitClosingTag ) { poppedTag . childrenStringTags . push ( poppedTag . childrenStringEmitClosingTag ) ; } if ( poppedTag . childrenTagsToString ) { poppedTag . datatype = this . dataFactory . namedNode ( RdfXmlParser . RDF + 'XMLLiteral' ) ; poppedTag . text = poppedTag . childrenStringTags . join ( '' ) ; poppedTag . hadChildren = false ; } if ( poppedTag . childrenCollectionSubject ) { this . emitTriple ( poppedTag . childrenCollectionSubject , poppedTag . childrenCollectionPredicate , this . dataFactory . namedNode ( RdfXmlParser . RDF + 'nil' ) , poppedTag . reifiedStatementId ) ; } else if ( poppedTag . predicate ) { if ( ! poppedTag . hadChildren && poppedTag . childrenParseType !== ParseType . PROPERTY ) { this . emitTriple ( poppedTag . subject , poppedTag . predicate , this . dataFactory . literal ( poppedTag . text || '' , poppedTag . datatype || poppedTag . language ) , poppedTag . reifiedStatementId ) ; } else if ( ! poppedTag . predicateEmitted ) { const subject = this . dataFactory . blankNode ( ) ; this . emitTriple ( poppedTag . subject , poppedTag . predicate , subject , poppedTag . reifiedStatementId ) ; for ( let i = 0 ; i < poppedTag . predicateSubPredicates . length ; i ++ ) { this . emitTriple ( subject , poppedTag . predicateSubPredicates [ i ] , poppedTag . predicateSubObjects [ i ] , null ) ; } } } }
Handle the closing of the last tag.
Handle the closing of the last tag .
// If we were converting a tag to a string, and the tag was not self-closing, close it here. // Set the literal value if we were collecting XML tags to string // Force a literal triple to be emitted hereafter // Terminate the rdf:List // Property element contains text // Emit remaining properties on an anonymous property element