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


Java MetadataFinder类代码示例

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


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

示例1: JAXBModelBuilder

import com.sun.tools.internal.ws.wsdl.parser.MetadataFinder; //导入依赖的package包/类
public JAXBModelBuilder(WsimportOptions options, ClassNameCollector classNameCollector, MetadataFinder finder, ErrorReceiver errReceiver) {
    this._classNameAllocator = new ClassNameAllocatorImpl(classNameCollector);
    this.errReceiver = errReceiver;
    this.options = options;
    this.forest = finder;

    internalBuildJAXBModel();
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:9,代码来源:JAXBModelBuilder.java

示例2: fetchWsdls

import com.sun.tools.internal.ws.wsdl.parser.MetadataFinder; //导入依赖的package包/类
/**
 *  Fetches the wsdls in the DOMForest to the options.destDir
 * @param forest
 * @return location of fetched root WSDL document
 * @throws IOException
 * @throws XMLStreamException
 * @throws FileNotFoundException
 */
public String fetchWsdls(MetadataFinder forest) throws IOException, XMLStreamException {
    String rootWsdl = null;
    for(String root: forest.getRootDocuments()) {
        rootWsdl = root;
    }

    Set<String> externalRefs = forest.getExternalReferences();
    Map<String,String> documentMap = createDocumentMap(forest, getWSDLDownloadDir(), rootWsdl, externalRefs);
    String rootWsdlName = fetchFile(rootWsdl,forest, documentMap,getWSDLDownloadDir());
    for(String reference: forest.getExternalReferences()) {
        fetchFile(reference,forest,documentMap,getWSDLDownloadDir());
    }
    return WSDL_PATH +"/" + rootWsdlName;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:23,代码来源:WSDLFetcher.java

示例3: AbstractDocument

import com.sun.tools.internal.ws.wsdl.parser.MetadataFinder; //导入依赖的package包/类
protected AbstractDocument(MetadataFinder forest, ErrorReceiver errReceiver) {
    this.forest = forest;
    this.errReceiver = errReceiver;
    kinds = new HashMap();
    importedEntities = new ArrayList();
    importedDocuments = new HashSet();
    includedEntities = new ArrayList();
    includedDocuments = new HashSet();
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:10,代码来源:AbstractDocument.java

示例4: fetchWsdls

import com.sun.tools.internal.ws.wsdl.parser.MetadataFinder; //导入依赖的package包/类
/**
 *  Fetches the wsdls in the DOMForest to the options.destDir
 * @param forest
 * @return
 * @throws IOException
 * @throws XMLStreamException
 * @throws FileNotFoundException
 */
public String fetchWsdls(MetadataFinder forest) throws IOException, XMLStreamException {
    String rootWsdl = null;
    for(String root: forest.getRootDocuments()) {
        rootWsdl = root;
    }

    Set<String> externalRefs = forest.getExternalReferences();
    Map<String,String> documentMap = createDocumentMap(forest, getWSDLDownloadDir(), rootWsdl, externalRefs);
    String rootWsdlName = fetchFile(rootWsdl,forest, documentMap,getWSDLDownloadDir());
    for(String reference: forest.getExternalReferences()) {
        fetchFile(reference,forest,documentMap,getWSDLDownloadDir());
    }
    return WSDL_PATH +"/" + rootWsdlName;
}
 
开发者ID:alexkasko,项目名称:openjdk-icedtea7,代码行数:23,代码来源:WSDLFetcher.java

示例5: WSDLModeler

import com.sun.tools.internal.ws.wsdl.parser.MetadataFinder; //导入依赖的package包/类
public WSDLModeler(WsimportOptions options, ErrorReceiver receiver, MetadataFinder forest) {
    super(options, receiver,forest);
    this.classNameCollector = new ClassNameCollector();
    this.explicitDefaultPackage = options.defaultPackage;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:6,代码来源:WSDLModeler.java

示例6: WSDLModelerBase

import com.sun.tools.internal.ws.wsdl.parser.MetadataFinder; //导入依赖的package包/类
public WSDLModelerBase(WsimportOptions options, ErrorReceiver receiver, MetadataFinder forest) {
    this.options = options;
    this.errReceiver = new ErrorReceiverFilter(receiver);
    this.forest = forest;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:6,代码来源:WSDLModelerBase.java

示例7: createDocumentMap

import com.sun.tools.internal.ws.wsdl.parser.MetadataFinder; //导入依赖的package包/类
private Map<String,String> createDocumentMap(MetadataFinder forest, File baseDir, final String rootWsdl, Set<String> externalReferences) {
    Map<String,String> map = new HashMap<String,String>();
    String rootWsdlFileName = rootWsdl;
    String rootWsdlName;

    int slashIndex = rootWsdl.lastIndexOf("/");
    if( slashIndex >= 0) {
        rootWsdlFileName = rootWsdl.substring(slashIndex+1);
    }
    if(!rootWsdlFileName.endsWith(WSDL_FILE_EXTENSION)) {
        Document rootWsdlDoc =  forest.get(rootWsdl);
        NodeList serviceNodes = rootWsdlDoc.getElementsByTagNameNS(WSDLConstants.QNAME_SERVICE.getNamespaceURI(),WSDLConstants.QNAME_SERVICE.getLocalPart());
        if (serviceNodes.getLength() == 0) {
            rootWsdlName = "Service";
        } else {
            Node serviceNode = serviceNodes.item(0);
            String serviceName = ((Element)serviceNode).getAttribute( WSDLConstants.ATTR_NAME);
            rootWsdlName = serviceName;
        }
        rootWsdlFileName = rootWsdlName+ WSDL_FILE_EXTENSION;
    } else {
        rootWsdlName = rootWsdlFileName.substring(0,rootWsdlFileName.length()-5);
    }

    map.put(rootWsdl,sanitize(rootWsdlFileName));

    int i =1;
    for(String ref: externalReferences) {
        Document refDoc =  forest.get(ref);
        Element rootEl = refDoc.getDocumentElement();
        String fileExtn;
        String fileName = null;
        int index = ref.lastIndexOf("/");
        if (index >= 0) {
            fileName = ref.substring(index + 1);
        }
        if(rootEl.getLocalName().equals(WSDLConstants.QNAME_DEFINITIONS.getLocalPart()) && rootEl.getNamespaceURI().equals(WSDLConstants.NS_WSDL)) {
          fileExtn = WSDL_FILE_EXTENSION;
        } else if(rootEl.getLocalName().equals(WSDLConstants.QNAME_SCHEMA.getLocalPart()) && rootEl.getNamespaceURI().equals(WSDLConstants.NS_XMLNS)) {
          fileExtn = SCHEMA_FILE_EXTENSION;
        } else {
            fileExtn = ".xml";
        }
        if(fileName != null && (fileName.endsWith(WSDL_FILE_EXTENSION) || fileName.endsWith(SCHEMA_FILE_EXTENSION))) {
            map.put(ref, rootWsdlName+"_"+fileName);
        } else {
            map.put(ref, rootWsdlName+"_metadata"+ (i++) + fileExtn);
        }
    }
    return map;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:52,代码来源:WSDLFetcher.java

示例8: WSDLDocument

import com.sun.tools.internal.ws.wsdl.parser.MetadataFinder; //导入依赖的package包/类
public WSDLDocument(MetadataFinder forest, ErrorReceiver errReceiver) {
    super(forest, errReceiver);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:4,代码来源:WSDLDocument.java


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