gpt4 book ai didi

org.apache.tuscany.sca.xsd.XSDFactory类的使用及代码示例

转载 作者:知者 更新时间:2024-03-20 04:51:40 27 4
gpt4 key购买 nike

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

XSDFactory介绍

[英]Factory for XSD definitions
[中]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

private XmlSchemaType getType(QName typeName) {
  XmlSchemaType type = wsdlDefinition.getXmlSchemaType(typeName);
  if (type == null) {
    XSDefinition definition = xsdFactory.createXSDefinition();
    definition.setUnresolved(true);
    definition.setNamespace(typeName.getNamespaceURI());
    definition = resolver.resolveModel(XSDefinition.class, definition, context);
    if (definition.getSchema() != null) {
      type = definition.getSchema().getTypeByName(typeName);
    }
  }
  return type;
}

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

private XmlSchemaType getType(QName typeName) {
  XmlSchemaType type = wsdlDefinition.getXmlSchemaType(typeName);
  if (type == null) {
    XSDefinition definition = xsdFactory.createXSDefinition();
    definition.setUnresolved(true);
    definition.setNamespace(typeName.getNamespaceURI());
    definition = resolver.resolveModel(XSDefinition.class, definition, context);
    if (definition.getSchema() != null) {
      type = definition.getSchema().getTypeByName(typeName);
    }
  }
  return type;
}

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

private XmlSchemaElement getElement(QName elementName) {
  XmlSchemaElement element = wsdlDefinition.getXmlSchemaElement(elementName);
  if (element == null) {
    XSDefinition definition = xsdFactory.createXSDefinition();
    definition.setUnresolved(true);
    definition.setNamespace(elementName.getNamespaceURI());
    definition = resolver.resolveModel(XSDefinition.class, definition, context);
    if (definition.getSchema() != null) {
      element = definition.getSchema().getElementByName(elementName);
    }
  }
  return element;
}

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

private XmlSchemaElement getElement(QName elementName) {
  XmlSchemaElement element = wsdlDefinition.getXmlSchemaElement(elementName);
  if (element == null) {
    XSDefinition definition = xsdFactory.createXSDefinition();
    definition.setUnresolved(true);
    definition.setNamespace(elementName.getNamespaceURI());
    definition = resolver.resolveModel(XSDefinition.class, definition, context);
    if (definition.getSchema() != null) {
      element = definition.getSchema().getElementByName(elementName);
    }
  }
  return element;
}

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

xsDef = xsdFactory.createXSDefinition();
xsDef.setUnresolved(true);
xsDef.setNamespace(targetNS);

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

xsDef = xsdFactory.createXSDefinition();
xsDef.setUnresolved(true);
xsDef.setNamespace(targetNS);

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

XSDefinition xsdDefinition = xsdFactory.createXSDefinition();
xsdDefinition.setUnresolved(true);
xsdDefinition.setNamespace(property.getXSDType().getNamespaceURI());

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

XSDefinition xsd = xsdFactory.createXSDefinition();
xsd.setUnresolved(true);
xsd.setNamespace(tns);
XSDefinition xsd = xsdFactory.createXSDefinition();
xsd.setUnresolved(true);
xsd.setNamespace("http://www.w3.org/2001/XMLSchema");

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

XSDefinition xsdDefinition = xsdFactory.createXSDefinition();
xsdDefinition.setUnresolved(true);
xsdDefinition.setNamespace(property.getXSDType().getNamespaceURI());

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

XSDefinition xsd = xsdFactory.createXSDefinition();
xsd.setUnresolved(true);
xsd.setNamespace(tns);
XSDefinition xsd = xsdFactory.createXSDefinition();
xsd.setUnresolved(true);
xsd.setNamespace("http://www.w3.org/2001/XMLSchema");

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

XSDefinition xsDefinition = xsdFactory.createXSDefinition();
xsDefinition.setUnresolved(true);
xsDefinition.setNamespace(element.getAttribute("targetNamespace"));

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

inputStream.close();
XSDefinition xsdDefinition = xsdFactory.createXSDefinition();
xsdDefinition.setSchema(schema);
      XSDefinition xsDefinition = xsdFactory.createXSDefinition();
      xsDefinition.setUnresolved(true);
      xsDefinition.setNamespace(element.getAttribute("targetNamespace"));

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

XSDefinition xsDefinition = xsdFactory.createXSDefinition();
xsDefinition.setUnresolved(true);
xsDefinition.setNamespace(element.getAttribute("targetNamespace"));

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

return d;
XSDefinition aggregated = factory.createXSDefinition();
for (XSDefinition d : definitions) {
  loadOnDemand(d);

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

return d;
XSDefinition aggregated = factory.createXSDefinition();
for (XSDefinition d : definitions) {
  loadOnDemand(d);

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

XSDefinition scaSchema = xsdFactory.createXSDefinition();
scaSchema.setUnresolved(true);
scaSchema.setNamespace(namespace);
XSDefinition scaSchema = xsdFactory.createXSDefinition();
scaSchema.setUnresolved(true);
scaSchema.setNamespace(Constants.SCA11_NS);

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