• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java XMLResourceIdentifierImpl类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中com.sun.org.apache.xerces.internal.util.XMLResourceIdentifierImpl的典型用法代码示例。如果您正苦于以下问题:Java XMLResourceIdentifierImpl类的具体用法?Java XMLResourceIdentifierImpl怎么用?Java XMLResourceIdentifierImpl使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



XMLResourceIdentifierImpl类属于com.sun.org.apache.xerces.internal.util包,在下文中一共展示了XMLResourceIdentifierImpl类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: XIncludeHandler

import com.sun.org.apache.xerces.internal.util.XMLResourceIdentifierImpl; //导入依赖的package包/类
public XIncludeHandler() {
    fDepth = 0;

    fSawFallback[fDepth] = false;
    fSawInclude[fDepth] = false;
    fState[fDepth] = STATE_NORMAL_PROCESSING;
    fNotations = new ArrayList();
    fUnparsedEntities = new ArrayList();

    fBaseURIScope = new IntStack();
    fBaseURI = new Stack();
    fLiteralSystemID = new Stack();
    fExpandedSystemID = new Stack();
    fCurrentBaseURI = new XMLResourceIdentifierImpl();

    fLanguageScope = new IntStack();
    fLanguageStack = new Stack();
    fCurrentLanguage = null;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:20,代码来源:XIncludeHandler.java


示例2: addUnparsedEntity

import com.sun.org.apache.xerces.internal.util.XMLResourceIdentifierImpl; //导入依赖的package包/类
/**
 * Adds an unparsed entity declaration.
 * <p>
 * <strong>Note:</strong> This method ignores subsequent entity
 * declarations.
 * <p>
 * <strong>Note:</strong> The name should be a unique symbol. The
 * SymbolTable can be used for this purpose.
 *
 * @param name     The name of the entity.
 * @param publicId The public identifier of the entity.
 * @param systemId The system identifier of the entity.
 * @param notation The name of the notation.
 *
 * @see SymbolTable
 */
public void addUnparsedEntity(String name,
String publicId, String systemId,
String baseSystemId, String notation) {

    fCurrentEntity = fEntityManager.getCurrentEntity();
    if (!fEntities.containsKey(name)) {
        Entity entity = new Entity.ExternalEntity(name, new XMLResourceIdentifierImpl(publicId, systemId, baseSystemId, null), notation, fInExternalSubset);
        //                  (fCurrentEntity == null) ? fasle : fCurrentEntity.isEntityDeclInExternalSubset());
        //                  fCurrentEntity.isEntityDeclInExternalSubset());
        fEntities.put(name, entity);
    }
    else{
        if(fWarnDuplicateEntityDef){
            fErrorReporter.reportError(XMLMessageFormatter.XML_DOMAIN,
            "MSG_DUPLICATE_ENTITY_DEFINITION",
            new Object[]{ name },
            XMLErrorReporter.SEVERITY_WARNING );
        }
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:37,代码来源:XMLEntityStorage.java


示例3: XIncludeHandler

import com.sun.org.apache.xerces.internal.util.XMLResourceIdentifierImpl; //导入依赖的package包/类
public XIncludeHandler() {
    fDepth = 0;

    fSawFallback[fDepth] = false;
    fSawInclude[fDepth] = false;
    fState[fDepth] = STATE_NORMAL_PROCESSING;
    fNotations = new ArrayList<>();
    fUnparsedEntities = new ArrayList<>();

    fBaseURIScope = new IntStack();
    fBaseURI = new Stack();
    fLiteralSystemID = new Stack();
    fExpandedSystemID = new Stack();
    fCurrentBaseURI = new XMLResourceIdentifierImpl();

    fLanguageScope = new IntStack();
    fLanguageStack = new Stack();
    fCurrentLanguage = null;
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:20,代码来源:XIncludeHandler.java


示例4: addUnparsedEntity

import com.sun.org.apache.xerces.internal.util.XMLResourceIdentifierImpl; //导入依赖的package包/类
/**
 * Adds an unparsed entity declaration.
 * <p>
 * <strong>Note:</strong> This method ignores subsequent entity
 * declarations.
 * <p>
 * <strong>Note:</strong> The name should be a unique symbol. The
 * SymbolTable can be used for this purpose.
 *
 * @param name     The name of the entity.
 * @param publicId The public identifier of the entity.
 * @param systemId The system identifier of the entity.
 * @param notation The name of the notation.
 *
 * @see SymbolTable
 */
public void addUnparsedEntity(String name,
String publicId, String systemId,
String baseSystemId, String notation) {

    fCurrentEntity = fEntityManager.getCurrentEntity();
    if (!fEntities.containsKey(name)) {
        Entity entity = new Entity.ExternalEntity(name,
                new XMLResourceIdentifierImpl(publicId, systemId, baseSystemId, null),
                notation, fInExternalSubset);
        fEntities.put(name, entity);
    }
    else{
        if(fWarnDuplicateEntityDef){
            fErrorReporter.reportError(XMLMessageFormatter.XML_DOMAIN,
            "MSG_DUPLICATE_ENTITY_DEFINITION",
            new Object[]{ name },
            XMLErrorReporter.SEVERITY_WARNING );
        }
    }
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:37,代码来源:XMLEntityStorage.java


示例5: checkAndSendNotation

import com.sun.org.apache.xerces.internal.util.XMLResourceIdentifierImpl; //导入依赖的package包/类
/**
 * The purpose of this method is to check if a Notation conflicts with a previously
 * declared notation in the current pipeline stack.  If there is no conflict, the
 * Notation is sent by the root pipeline.
 *
 * @param not the Notation to check for conflicts
 */
protected void checkAndSendNotation(Notation not) {
    if (isRootDocument()) {
        int index = fNotations.indexOf(not);
        if (index == -1) {
            // There is no notation with the same name that we have sent.
            XMLResourceIdentifier id =
                new XMLResourceIdentifierImpl(
                    not.publicId,
                    not.systemId,
                    not.baseURI,
                    not.expandedSystemId);
            addNotation(not.name, id, not.augmentations);
            if (fSendUEAndNotationEvents && fDTDHandler != null) {
                fDTDHandler.notationDecl(not.name, id, not.augmentations);
            }
        }
        else {
            Notation localNotation = (Notation)fNotations.get(index);
            if (!not.isDuplicate(localNotation)) {
                reportFatalError(
                    "NonDuplicateNotation",
                    new Object[] { not.name });
            }
        }
    }
    else {
        fParentXIncludeHandler.checkAndSendNotation(not);
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:37,代码来源:XIncludeHandler.java


示例6: JAXPValidatorComponent

import com.sun.org.apache.xerces.internal.util.XMLResourceIdentifierImpl; //导入依赖的package包/类
/**
 * @param validatorHandler may not be null.
 */
public JAXPValidatorComponent( ValidatorHandler validatorHandler ) {
    this.validator = validatorHandler;
    TypeInfoProvider tip = validatorHandler.getTypeInfoProvider();
    if(tip==null)   tip = noInfoProvider;
    this.typeInfoProvider = tip;

    // configure wiring between internal components.
    xni2sax.setContentHandler(validator);
    validator.setContentHandler(sax2xni);
    this.setSide(xni2sax);

    // configure validator with proper EntityResolver/ErrorHandler.
    validator.setErrorHandler(new ErrorHandlerProxy() {
        protected XMLErrorHandler getErrorHandler() {
            XMLErrorHandler handler = fErrorReporter.getErrorHandler();
            if(handler!=null)   return handler;
            return new ErrorHandlerWrapper(DraconianErrorHandler.getInstance());
        }
    });
    validator.setResourceResolver(new LSResourceResolver() {
        public LSInput resolveResource(String type,String ns, String publicId, String systemId, String baseUri) {
            if(fEntityResolver==null)   return null;
            try {
                XMLInputSource is = fEntityResolver.resolveEntity(
                    new XMLResourceIdentifierImpl(publicId,systemId,baseUri,null));
                if(is==null)    return null;

                LSInput di = new DOMInputImpl();
                di.setBaseURI(is.getBaseSystemId());
                di.setByteStream(is.getByteStream());
                di.setCharacterStream(is.getCharacterStream());
                di.setEncoding(is.getEncoding());
                di.setPublicId(is.getPublicId());
                di.setSystemId(is.getSystemId());

                return di;
            } catch( IOException e ) {
                // erors thrown by the callback is not supposed to be
                // reported to users.
                throw new XNIException(e);
            }
        }
    });
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:48,代码来源:JAXPValidatorComponent.java


示例7: checkAndSendUnparsedEntity

import com.sun.org.apache.xerces.internal.util.XMLResourceIdentifierImpl; //导入依赖的package包/类
/**
 * The purpose of this method is to check if an UnparsedEntity conflicts with a previously
 * declared entity in the current pipeline stack.  If there is no conflict, the
 * UnparsedEntity is sent by the root pipeline.
 *
 * @param ent the UnparsedEntity to check for conflicts
 */
protected void checkAndSendUnparsedEntity(UnparsedEntity ent) {
    if (isRootDocument()) {
        int index = fUnparsedEntities.indexOf(ent);
        if (index == -1) {
            // There is no unparsed entity with the same name that we have sent.
            // Calling unparsedEntityDecl() will add the entity to our local store,
            // and also send the unparsed entity to the DTDHandler
            XMLResourceIdentifier id =
                new XMLResourceIdentifierImpl(
                    ent.publicId,
                    ent.systemId,
                    ent.baseURI,
                    ent.expandedSystemId);
            addUnparsedEntity(
                ent.name,
                id,
                ent.notation,
                ent.augmentations);
            if (fSendUEAndNotationEvents && fDTDHandler != null) {
                fDTDHandler.unparsedEntityDecl(
                    ent.name,
                    id,
                    ent.notation,
                    ent.augmentations);
            }
        }
        else {
            UnparsedEntity localEntity =
                (UnparsedEntity)fUnparsedEntities.get(index);
            if (!ent.isDuplicate(localEntity)) {
                reportFatalError(
                    "NonDuplicateUnparsedEntity",
                    new Object[] { ent.name });
            }
        }
    }
    else {
        fParentXIncludeHandler.checkAndSendUnparsedEntity(ent);
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:48,代码来源:XIncludeHandler.java


示例8: addExternalEntity

import com.sun.org.apache.xerces.internal.util.XMLResourceIdentifierImpl; //导入依赖的package包/类
/**
 * Adds an external entity declaration.
 * <p>
 * <strong>Note:</strong> This method ignores subsequent entity
 * declarations.
 * <p>
 * <strong>Note:</strong> The name should be a unique symbol. The
 * SymbolTable can be used for this purpose.
 *
 * @param name         The name of the entity.
 * @param publicId     The public identifier of the entity.
 * @param literalSystemId     The system identifier of the entity.
 * @param baseSystemId The base system identifier of the entity.
 *                     This is the system identifier of the entity
 *                     where <em>the entity being added</em> and
 *                     is used to expand the system identifier when
 *                     the system identifier is a relative URI.
 *                     When null the system identifier of the first
 *                     external entity on the stack is used instead.
 *
 * @see SymbolTable
 */
public void addExternalEntity(String name,
String publicId, String literalSystemId,
String baseSystemId) {
    if (!fEntities.containsKey(name)) {
        if (baseSystemId == null) {
            // search for the first external entity on the stack
            //xxx commenting the 'size' variable..
            /**
             * int size = fEntityStack.size();
             * if (size == 0 && fCurrentEntity != null && fCurrentEntity.entityLocation != null) {
             * baseSystemId = fCurrentEntity.entityLocation.getExpandedSystemId();
             * }
             */

            //xxx we need to have information about the current entity.
            if (fCurrentEntity != null && fCurrentEntity.entityLocation != null) {
                baseSystemId = fCurrentEntity.entityLocation.getExpandedSystemId();
            }
            /**
             * for (int i = size - 1; i >= 0 ; i--) {
             * ScannedEntity externalEntity =
             * (ScannedEntity)fEntityStack.elementAt(i);
             * if (externalEntity.entityLocation != null && externalEntity.entityLocation.getExpandedSystemId() != null) {
             * baseSystemId = externalEntity.entityLocation.getExpandedSystemId();
             * break;
             * }
             * }
             */
        }

        fCurrentEntity = fEntityManager.getCurrentEntity();
        Entity entity = new Entity.ExternalEntity(name,
        new XMLResourceIdentifierImpl(publicId, literalSystemId,
        baseSystemId, expandSystemId(literalSystemId, baseSystemId)),
        null, fInExternalSubset);
        //TODO :: Forced to pass true above remove it.
        //(fCurrentEntity == null) ? fasle : fCurrentEntity.isEntityDeclInExternalSubset());
        //                                  null, fCurrentEntity.isEntityDeclInExternalSubset());
        fEntities.put(name, entity);
    }
    else{
        if(fWarnDuplicateEntityDef){
            fErrorReporter.reportError(XMLMessageFormatter.XML_DOMAIN,
            "MSG_DUPLICATE_ENTITY_DEFINITION",
            new Object[]{ name },
            XMLErrorReporter.SEVERITY_WARNING );
        }
    }

}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:73,代码来源:XMLEntityStorage.java



注:本文中的com.sun.org.apache.xerces.internal.util.XMLResourceIdentifierImpl类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java JavassistProxyFactory类代码示例发布时间:2022-05-23
下一篇:
Java TDoubleCharMap类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap