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

Java DOMInputImpl类代码示例

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

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



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

示例1: resourceToLSInput

import org.apache.xerces.dom.DOMInputImpl; //导入依赖的package包/类
private LSInput resourceToLSInput(String publicId, String systemId) {

		InputStream is = resourceAsStream(systemId);

		if (is != null) {
			DOMInputImpl result = new DOMInputImpl(); // any old impl would do
			result.setByteStream(is);
			result.setCharacterStream(null);
			result.setPublicId(publicId);
			result.setSystemId(systemId);

			return result;
		}
		else {
			return null;
		}
	}
 
开发者ID:betfair,项目名称:cougar,代码行数:18,代码来源:InterceptingResolver.java


示例2: addStringData

import org.apache.xerces.dom.DOMInputImpl; //导入依赖的package包/类
public DOMInputImpl addStringData(String stringData, String systemID){
    DOMInputImpl input = new DOMInputImpl();
    input.setStringData(stringData);
    input.setSystemId(systemID);
    add(input);
    return input;
}
 
开发者ID:santhosh-tekuri,项目名称:jlibs,代码行数:8,代码来源:DOMLSInputList.java


示例3: addReader

import org.apache.xerces.dom.DOMInputImpl; //导入依赖的package包/类
public DOMInputImpl addReader(Reader reader, String systemID){
    DOMInputImpl input = new DOMInputImpl();
    input.setCharacterStream(reader);
    input.setSystemId(systemID);
    add(input);
    return input;
}
 
开发者ID:santhosh-tekuri,项目名称:jlibs,代码行数:8,代码来源:DOMLSInputList.java


示例4: addStream

import org.apache.xerces.dom.DOMInputImpl; //导入依赖的package包/类
public DOMInputImpl addStream(InputStream stream, String systemID, String encoding){
    DOMInputImpl input = new DOMInputImpl();
    input.setByteStream(stream);
    input.setSystemId(systemID);
    input.setEncoding(encoding);
    add(input);
    return input;
}
 
开发者ID:santhosh-tekuri,项目名称:jlibs,代码行数:9,代码来源:DOMLSInputList.java


示例5: resolveResource

import org.apache.xerces.dom.DOMInputImpl; //导入依赖的package包/类
@Override
public LSInput resolveResource( String type, String namespaceURI, String publicId, String systemId, String baseURI )
{
    LOG.debug(
        "Resource resolved to empty (DOM): type={} namespace={} publicId={} systemId={} baseURI={}",
        type, namespaceURI, publicId, systemId, baseURI
    );
    return new DOMInputImpl( publicId, systemId, baseURI, "", null );
}
 
开发者ID:werval,项目名称:werval,代码行数:10,代码来源:EmptyResolver.java


示例6: resolveResource

import org.apache.xerces.dom.DOMInputImpl; //导入依赖的package包/类
@Override
public LSInput resolveResource(String type, String namespaceURI, String publicId, String systemId, String baseURI) {
	InputStream is = ResourceUtil.loadResource(SCHEMA_DIR+new File(systemId).getName());
	if(is!=null) {
		return new DOMInputImpl(publicId, systemId, baseURI, is, null);
	}
	System.err.println("Can't resolve: "+type+" "+namespaceURI+" "+publicId+" "+systemId+" "+baseURI);
	return null;
}
 
开发者ID:bl-dpt,项目名称:geolint,代码行数:10,代码来源:GMLXercesWrapper.java


示例7: loadSchemas

import org.apache.xerces.dom.DOMInputImpl; //导入依赖的package包/类
private static final XSModel loadSchemas(final List<XMLSchema> schemas, XMLSchemaInformationDao dao)
    throws IllegalArgumentException, XMLParseException {
    if (schemas == null) {
        throw new IllegalArgumentException("Schemas must be non null.");
    }

    LSInputList list = new LSInputList() {
        public LSInput item(int index) {
            DOMInputImpl input = new DOMInputImpl();
            input.setSystemId(schemas.get(index).getRootDocument().getSystemID());
            input.setStringData(schemas.get(index).getRootDocument().getSchemaText());
            return input;
        }


        public int getLength() {
            return schemas.size();
        }
    };

    GMEXMLSchemaLoader schemaLoader = new GMEXMLSchemaLoader(schemas, dao);

    XSModel model = schemaLoader.loadInputList(list);
    if (model == null) {
        throw schemaLoader.getErrorHandler().createXMLParseException();
    }

    return model;
}
 
开发者ID:NCIP,项目名称:cagrid-core,代码行数:30,代码来源:XercesSchemaTestCase.java


示例8: addSystemID

import org.apache.xerces.dom.DOMInputImpl; //导入依赖的package包/类
public DOMInputImpl addSystemID(String systemID){
    DOMInputImpl input = new DOMInputImpl();
    input.setSystemId(systemID);
    add(input);
    return input;
}
 
开发者ID:santhosh-tekuri,项目名称:jlibs,代码行数:7,代码来源:DOMLSInputList.java


示例9: JAXPValidatorComponent

import org.apache.xerces.dom.DOMInputImpl; //导入依赖的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:AaronZhangL,项目名称:SplitCharater,代码行数:48,代码来源:JAXPValidatorComponent.java


示例10: createSchema

import org.apache.xerces.dom.DOMInputImpl; //导入依赖的package包/类
public Schema createSchema(Reader reader) {
    DOMInputImpl input = new DOMInputImpl();
    input.setCharacterStream(reader);
    return createSchema(input);
}
 
开发者ID:elodina,项目名称:xml-avro,代码行数:6,代码来源:SchemaBuilder.java


示例11: parseString

import org.apache.xerces.dom.DOMInputImpl; //导入依赖的package包/类
/**
 * Parse an XML Schema document from String specified
 * 
 * @param schema    String data to parse. If provided, this will always be treated as a
 *                  sequence of 16-bit units (UTF-16 encoded characters). If an XML
 *                  declaration is present, the value of the encoding attribute
 *                  will be ignored.
 * @param baseURI   The base URI to be used for resolving relative
 *                  URIs to absolute URIs.
 */
public XSModel parseString(String schema, String baseURI){
    return xsLoader.load(new DOMInputImpl(null, null, baseURI, schema, null));
}
 
开发者ID:santhosh-tekuri,项目名称:jlibs,代码行数:14,代码来源:XSParser.java



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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