gpt4 book ai didi

org.eclipse.xsd.util.XSDResourceFactoryImpl类的使用及代码示例

转载 作者:知者 更新时间:2024-03-19 08:32:40 30 4
gpt4 key购买 nike

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

XSDResourceFactoryImpl介绍

[英]The Resource Factory implementation for the model. This class is the XSD resource factory that knows how to parse .xsd files to produce a MOF model. This class is not intended for subclassing outside of the model implementation; it is intended to be used as is with the Resource framework.
[中]模型的资源工厂实现。这个类是知道如何解析的XSD资源工厂。xsd文件生成MOF模型。该类不用于在模型实现之外进行子类化;它旨在与资源框架一起使用。

代码示例

代码示例来源:origin: geotools/geotools

@BeforeClass
public static void oneTimeSetUp() {
  reader = EmfComplexFeatureReader.newInstance();
  // need to register custom factory to load schema resources
  Resource.Factory.Registry.INSTANCE
      .getExtensionToFactoryMap()
      .put("xsd", new XSDResourceFactoryImpl());
}

代码示例来源:origin: org.eclipse.xsd/org.eclipse.xsd

Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("xsd", new XSDResourceFactoryImpl());

代码示例来源:origin: org.eclipse/org.eclipse.xsd

Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("xsd", new XSDResourceFactoryImpl());

代码示例来源:origin: stackoverflow.com

import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.resource.ResourceSet;
import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
import org.eclipse.xsd.util.XSDResourceFactoryImpl;
import org.eclipse.xsd.util.XSDResourceImpl;
import org.eclipse.xsd.XSDSchema;

static ResourceSet resourceSet;
XSDResourceFactoryImpl rf = new XSDResourceFactoryImpl();
Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("xsd", rf);
resourceSet = new ResourceSetImpl();
resourceSet.getLoadOptions().put(XSDResourceImpl.XSD_TRACK_LOCATION, Boolean.TRUE);
XSDResourceImpl rsrc = (XSDResourceImpl)(resourceSet.getResource(uri, true));
XSDSchema sch = rsrc.getSchema();

代码示例来源:origin: org.eclipse/org.eclipse.xsd

public static ResourceSet createResourceSet()
{
 ResourceSet result = new ResourceSetImpl();
 result.getResourceFactoryRegistry().getExtensionToFactoryMap().put("xsd", new XSDResourceFactoryImpl());
 return result;
}

代码示例来源:origin: org.eclipse/org.eclipse.xsd

protected ResourceSet createResourceSet()
{
 ResourceSet result = new ResourceSetImpl();
 result.getLoadOptions().put(XSDResourceImpl.XSD_TRACK_LOCATION, Boolean.TRUE);
 Map<String, Object> extensionToFactoryMap =  result.getResourceFactoryRegistry().getExtensionToFactoryMap();
 extensionToFactoryMap.put("wsdl", new XSDResourceFactoryImpl());
 extensionToFactoryMap.put("xsd", new XSDResourceFactoryImpl());
 if (ecoreResourceFactoryImplClass != null)
 {
  try
  {
    extensionToFactoryMap.put("ecore", ecoreResourceFactoryImplClass.newInstance());
  }
  catch (Exception exception)
  {
   XSDPlugin.INSTANCE.log(exception);
  }
 }
 return result;
}

代码示例来源:origin: org.dhatim/milyn-smooks-ect

private ResourceSet createResourceSet() {
  ResourceSet resourceSet = new ResourceSetImpl();
  /*
   * Register XML Factory implementation using DEFAULT_EXTENSION
   */
  resourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap()
      .put("xsd", new XSDResourceFactoryImpl());
  return resourceSet;
}

代码示例来源:origin: org.eclipse.xsd/org.eclipse.xsd

public static ResourceSet createResourceSet()
{
 ResourceSet result = new ResourceSetImpl();
 result.getResourceFactoryRegistry().getExtensionToFactoryMap().put("xsd", new XSDResourceFactoryImpl());
 return result;
}

代码示例来源:origin: org.virtuslab/milyn-smooks-ect

private ResourceSet createResourceSet() {
  ResourceSet resourceSet = new ResourceSetImpl();
  /*
   * Register XML Factory implementation using DEFAULT_EXTENSION
   */
  resourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap()
      .put("xsd", new XSDResourceFactoryImpl());
  return resourceSet;
}

代码示例来源:origin: org.eclipse.xsd/org.eclipse.xsd

protected ResourceSet createResourceSet()
{
 ResourceSet result = new ResourceSetImpl();
 result.getLoadOptions().put(XSDResourceImpl.XSD_TRACK_LOCATION, Boolean.TRUE);
 Map<String, Object> extensionToFactoryMap =  result.getResourceFactoryRegistry().getExtensionToFactoryMap();
 extensionToFactoryMap.put("wsdl", new XSDResourceFactoryImpl());
 extensionToFactoryMap.put("xsd", new XSDResourceFactoryImpl());
 if (ecoreResourceFactoryImplClass != null)
 {
  try
  {
    extensionToFactoryMap.put("ecore", ecoreResourceFactoryImplClass.newInstance());
  }
  catch (Exception exception)
  {
   XSDPlugin.INSTANCE.log(exception);
  }
 }
 return result;
}

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