gpt4 book ai didi

org.apache.tuscany.sca.xsd.XSDefinition.setLocation()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-26 20:37:05 27 4
gpt4 key购买 nike

本文整理了Java中org.apache.tuscany.sca.xsd.XSDefinition.setLocation()方法的一些代码示例,展示了XSDefinition.setLocation()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XSDefinition.setLocation()方法的具体详情如下:
包路径:org.apache.tuscany.sca.xsd.XSDefinition
类名称:XSDefinition
方法名:setLocation

XSDefinition.setLocation介绍

[英]Set the location of the XSD
[中]设置XSD的位置

代码示例

代码示例来源:origin: org.apache.tuscany.sca/tuscany-base-runtime

private void generateSchemas(List<XSDefinition> definitions, XSDFactory factory, JAXBContext context)
  throws IOException {
  DOMResolverImpl resolver = new DOMResolverImpl();
  context.generateSchema(resolver);
  Map<String, DOMResult> results = resolver.getResults();
  for (Map.Entry<String, DOMResult> entry : results.entrySet()) {
    XSDefinition definition = factory.createXSDefinition();
    definition.setUnresolved(true);
    definition.setDocument((Document)entry.getValue().getNode());
    definition.setNamespace(entry.getKey());
    URI location = null;
    try {
      location = new URI(entry.getValue().getSystemId());
    } catch (URISyntaxException e) {
      // ignore: use null value
    }    
    definition.setLocation(location);
    definitions.add(definition);
  }
}

代码示例来源:origin: org.apache.tuscany.sca/tuscany-databinding-jaxb

private void generateSchemas(List<XSDefinition> definitions, XSDFactory factory, JAXBContext context)
  throws IOException {
  DOMResolverImpl resolver = new DOMResolverImpl();
  context.generateSchema(resolver);
  Map<String, DOMResult> results = resolver.getResults();
  for (Map.Entry<String, DOMResult> entry : results.entrySet()) {
    XSDefinition definition = factory.createXSDefinition();
    definition.setUnresolved(true);
    definition.setDocument((Document)entry.getValue().getNode());
    definition.setNamespace(entry.getKey());
    URI location = null;
    try {
      location = new URI(entry.getValue().getSystemId());
    } catch (URISyntaxException e) {
      // ignore: use null value
    }    
    definition.setLocation(location);
    definitions.add(definition);
  }
}

代码示例来源:origin: org.apache.tuscany.sca/tuscany-xsd

protected XSDefinition indexRead(URL doc) throws Exception {
    XSDefinition xsd = factory.createXSDefinition();
    xsd.setUnresolved(true);
    xsd.setNamespace(helper.readAttribute(doc, XSD, "targetNamespace"));
    xsd.setLocation(doc.toURI());
    xsd.setUnresolved(false);
    return xsd;
  }
}

代码示例来源:origin: org.apache.tuscany.sca/tuscany-base-runtime

protected XSDefinition indexRead(URL doc) throws Exception {
    XSDefinition xsd = factory.createXSDefinition();
    xsd.setUnresolved(true);
    xsd.setNamespace(helper.readAttribute(doc, XSD, "targetNamespace"));
    xsd.setLocation(doc.toURI());
    xsd.setUnresolved(false);
    return xsd;
  }
}

代码示例来源:origin: org.apache.tuscany.sca/tuscany-base-runtime

XSDefinition unresolved = new XSDefinitionImpl();
unresolved.setUnresolved(true);
unresolved.setLocation(new URI(schemaLocation));
unresolved.setNamespace(targetNamespace);

代码示例来源:origin: org.apache.tuscany.sca/tuscany-binding-ws-wsdlgen

xsDef.setDocument(schemaDoc);
xsDef.setLocation(URI.create("xsd_" + index + ".xsd"));
index++;
wrapperXSDs.put(targetNS, xsDef);

代码示例来源:origin: org.apache.tuscany.sca/tuscany-base-runtime

xsDef.setDocument(schemaDoc);
xsDef.setLocation(URI.create("xsd_" + index + ".xsd"));
index++;
wrapperXSDs.put(targetNS, xsDef);

代码示例来源:origin: org.apache.tuscany.sca/tuscany-xsd

XSDefinition unresolved = new XSDefinitionImpl();
unresolved.setUnresolved(true);
unresolved.setLocation(new URI(schemaLocation));
unresolved.setNamespace(targetNamespace);

代码示例来源:origin: org.apache.tuscany.sca/tuscany-interface-wsdl

xsd.setUnresolved(true);
xsd.setNamespace(tns);
xsd.setLocation(URI.create(doc.toURI() + "#" + index));
index++;

代码示例来源:origin: org.apache.tuscany.sca/tuscany-base-runtime

xsDefinition.setNamespace(element.getAttribute("targetNamespace"));
xsDefinition.setDocument(doc);
xsDefinition.setLocation(URI.create(doc.getDocumentURI() + "#" + index));
XSDefinition resolved =
  contribution.getModelResolver().resolveModel(XSDefinition.class, xsDefinition, context);

代码示例来源:origin: org.apache.tuscany.sca/tuscany-interface-wsdl

xsDefinition.setNamespace(element.getAttribute("targetNamespace"));
xsDefinition.setDocument(doc);
xsDefinition.setLocation(URI.create(doc.getDocumentURI() + "#" + index));
XSDefinition resolved =
  contribution.getModelResolver().resolveModel(XSDefinition.class, xsDefinition, context);

代码示例来源:origin: org.apache.tuscany.sca/tuscany-base-runtime

xsd.setUnresolved(true);
xsd.setNamespace(tns);
xsd.setLocation(URI.create(doc.toURI() + "#" + index));
index++;

代码示例来源:origin: org.apache.tuscany.sca/tuscany-base-runtime

XmlSchema schema = schemaCollection.read(element, null);
xsDefinition.setSchema(schema);
xsDefinition.setLocation(URI.create(xmlString.getBaseURI() + "#" + index));
wsdlDefinition.getXmlSchemas().add(xsDefinition);
index++;

代码示例来源:origin: org.apache.tuscany.sca/tuscany-base-runtime

scaSchema.setUnresolved(true);
scaSchema.setNamespace(namespace);
scaSchema.setLocation(IOHelper.toURI(scaSchemaURL));
scaSchema.setUnresolved(false); 
scaSchema.setUnresolved(true);
scaSchema.setNamespace(Constants.SCA11_NS);
scaSchema.setLocation(IOHelper.toURI(scaSchemaURL));
scaSchema.setUnresolved(false); 
modelResolver.addModel(scaSchema, context);

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com