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


Java XSDSchema.updateElement方法代码示例

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

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

示例1: buildSchemaContent

import org.eclipse.xsd.XSDSchema; //导入方法依赖的package包/类
private void buildSchemaContent(FeatureTypeInfo featureTypeMeta, XSDSchema schema,
         XSDFactory factory, String baseUrl)
         throws IOException {
     if (!findTypeInSchema(featureTypeMeta, schema, factory)) {
         // build the type manually
         FeatureType featureType = featureTypeMeta.getFeatureType();
         if(featureTypeMeta.isCircularArcPresent() && this.getClass().equals(GML3.class)) {
             featureType = new CurveTypeWrapper(featureType);
         }
XSDComplexTypeDefinition xsdComplexType = buildComplexSchemaContent(featureType, schema, factory);

         XSDElementDeclaration element = factory.createXSDElementDeclaration();
         element.setName(featureTypeMeta.getName());
         element.setTargetNamespace(featureTypeMeta.getNamespace().getURI());
         synchronized(Schemas.class) {
             // this call changes the global schemas too, need to be synchronized
             element.setSubstitutionGroupAffiliation(getFeatureElement());
         }
         element.setTypeDefinition(xsdComplexType);

         schema.getContents().add(element);

         schema.updateElement();
     }
 }
 
开发者ID:STEMLab,项目名称:geoserver-3d-extension,代码行数:26,代码来源:ISOFeatureTypeSchemaBuilder.java


示例2: doWrite

import org.eclipse.xsd.XSDSchema; //导入方法依赖的package包/类
protected void doWrite(FeatureTypeInfo[] featureTypeInfos, OutputStream output,
        Operation describeFeatureType) throws IOException {

    //create the schema
    Object request = describeFeatureType.getParameters()[0];
    DescribeFeatureTypeRequest req = DescribeFeatureTypeRequest.adapt(request);
    
    XSDSchema schema = schemaBuilder.build(featureTypeInfos, req.getBaseURL());

    //serialize
    schema.updateElement();
    final String encoding = gs.getSettings().getCharset();
    XSDResourceImpl.serialize(output, schema.getElement(), encoding);
}
 
开发者ID:STEMLab,项目名称:geoserver-3d-extension,代码行数:15,代码来源:XmlSchemaEncoder_ISO.java


示例3: createSchema

import org.eclipse.xsd.XSDSchema; //导入方法依赖的package包/类
private XSDSchema createSchema(Node node) {

		// Here you might get an attribute which says what type
		XSDSchema schema = XSDFactory.eINSTANCE.createXSDSchema();
		schema.setSchemaForSchemaQNamePrefix("xsd");

		Map<String, String> map = schema.getQNamePrefixToNamespaceMap();
		map.put(schema.getSchemaForSchemaQNamePrefix(),
				"http://www.w3.org/2001/XMLSchema");

		schema.updateElement(true);

		Element element = schema.getElement();

		generateBeanSchema(element, node);

		return getUpdatedSchema(schema);

	}
 
开发者ID:camac,项目名称:Barista,代码行数:20,代码来源:BaristaPublishedObject.java


示例4: getUpdatedSchema

import org.eclipse.xsd.XSDSchema; //导入方法依赖的package包/类
private XSDSchema getUpdatedSchema(XSDSchema schema) {

		schema.updateElement(true);
		ByteStreamCache cache = new ByteStreamCache();

		XSDResourceImpl.serialize(cache.getOutputStream(), schema.getElement());

		schema = XSDSchemaHelper.openSchema(new InputStreamReader(cache
				.getInputStream()));

		try {
			cache.getOutputStream().close();
			cache.getInputStream().close();
		} catch (IOException e) {

		}

		return schema;

	}
 
开发者ID:camac,项目名称:Barista,代码行数:21,代码来源:BaristaPublishedObject.java



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