All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.ctc.wstx.ent.ParsedExtEntity Maven / Gradle / Ivy

There is a newer version: 0.10.0
Show newest version
package com.ctc.wstx.ent;

import java.io.IOException;
import java.io.Writer;
import java.net.URL;

import javax.xml.stream.Location;
import javax.xml.stream.XMLResolver;
import javax.xml.stream.XMLStreamException;

import com.ctc.wstx.api.ReaderConfig;
import com.ctc.wstx.cfg.XmlConsts;
import com.ctc.wstx.io.DefaultInputResolver;
import com.ctc.wstx.io.WstxInputSource;

public class ParsedExtEntity
    extends ExtEntity
{
    public ParsedExtEntity(Location loc, String name, URL ctxt,
                           String pubId, String sysId)
    {
        super(loc, name, ctxt, pubId, sysId);
    }

    public String getNotationName() {
        return null;
    }

    /*
    ///////////////////////////////////////////
    // Implementation of abstract base methods
    ///////////////////////////////////////////
     */

    public void writeEnc(Writer w) throws IOException
    {
        w.write("");
    }

    /*
    ///////////////////////////////////////////
    // Extended API for Wstx core
    ///////////////////////////////////////////
     */

    // // // Type information
    
    public boolean isParsed() { return true; }
    
    public WstxInputSource expand(WstxInputSource parent,
                                  XMLResolver res, ReaderConfig cfg,
                                  int xmlVersion)
        throws IOException, XMLStreamException
    {
        /* 05-Feb-2006, TSa: If xmlVersion not explicitly known, it defaults
         *    to 1.0
         */
        if (xmlVersion == XmlConsts.XML_V_UNKNOWN) {
            xmlVersion = XmlConsts.XML_V_10;
        }
        return DefaultInputResolver.resolveEntity
            (parent, mContext, mName, getPublicId(), getSystemId(), res, cfg, xmlVersion);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy