当前位置: 首页>>代码示例>>Java>>正文


Java Result.getSystemId方法代码示例

本文整理汇总了Java中javax.xml.transform.Result.getSystemId方法的典型用法代码示例。如果您正苦于以下问题:Java Result.getSystemId方法的具体用法?Java Result.getSystemId怎么用?Java Result.getSystemId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在javax.xml.transform.Result的用法示例。


在下文中一共展示了Result.getSystemId方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createOutput

import javax.xml.transform.Result; //导入方法依赖的package包/类
public Result createOutput(String namespaceUri, String suggestedFileName) throws IOException {
    logger.entering(getClass().getName(),"createOutput",new Object[]{namespaceUri,suggestedFileName});
    Result r = resolver.createOutput(namespaceUri,suggestedFileName);
    if(r!=null) {
        String sysId = r.getSystemId();
        logger.finer("system ID = "+sysId);
        if(sysId!=null) {
            // TODO: make sure that the system Id is absolute

            // don't use java.net.URI, because it doesn't allow some characters (like SP)
            // which can legally used as file names.

            // but don't use java.net.URL either, because it doesn't allow a made-up URI
            // like kohsuke://foo/bar/zot
        } else
            throw new AssertionError("system ID cannot be null");
    }
    logger.exiting(getClass().getName(),"createOutput",r);
    return r;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:21,代码来源:FoolProofResolver.java

示例2: doGeneration

import javax.xml.transform.Result; //导入方法依赖的package包/类
/**
 * Performes the actual WSDL generation
 */
public void doGeneration() {
    XmlSerializer serviceWriter;
    XmlSerializer portWriter = null;
    String fileName = mangleName(model.getServiceQName().getLocalPart());
    Result result = wsdlResolver.getWSDL(fileName + DOT_WSDL);
    wsdlLocation = result.getSystemId();
    serviceWriter = new CommentFilter(ResultFactory.createSerializer(result));
    if (model.getServiceQName().getNamespaceURI().equals(model.getTargetNamespace())) {
        portWriter = serviceWriter;
        schemaPrefix = fileName + "_";
    } else {
        String wsdlName = mangleName(model.getPortTypeName().getLocalPart());
        if (wsdlName.equals(fileName))
            wsdlName += "PortType";
        Holder<String> absWSDLName = new Holder<String>();
        absWSDLName.value = wsdlName + DOT_WSDL;
        result = wsdlResolver.getAbstractWSDL(absWSDLName);

        if (result != null) {
            portWSDLID = result.getSystemId();
            if (portWSDLID.equals(wsdlLocation)) {
                portWriter = serviceWriter;
            } else {
                portWriter = new CommentFilter(ResultFactory.createSerializer(result));
            }
        } else {
            portWSDLID = absWSDLName.value;
        }
        schemaPrefix = new java.io.File(portWSDLID).getName();
        int idx = schemaPrefix.lastIndexOf('.');
        if (idx > 0)
            schemaPrefix = schemaPrefix.substring(0, idx);
        schemaPrefix = mangleName(schemaPrefix) + "_";
    }
    generateDocument(serviceWriter, portWriter);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:40,代码来源:WSDLGenerator.java


注:本文中的javax.xml.transform.Result.getSystemId方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。