gpt4 book ai didi

com.reprezen.genflow.api.zenmodel.ZenModelLocator.()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-19 01:53:31 41 4
gpt4 key购买 nike

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

ZenModelLocator.<init>介绍

暂无

代码示例

代码示例来源:origin: com.reprezen.genflow/genflow-api

@Override
public ILocator<ZenModel> getLocator(ZenModel model) {
  return new ZenModelLocator(model);
}

代码示例来源:origin: com.reprezen.genflow/rapidml-jaxrs

protected void initZenElement2ClassName(final ZenModel model, final Resource resource) {
 try {
  final GenTemplateTrace trace = this.context.getPrerequisiteTrace(JaxRsGenTemplate.JAXB_DEPENDENCY);
  final Collection<GenTemplateTraceItem> jaxbClassItems = GenTemplateTraceUtils.getTraceItemsOfType(trace, "jaxbClass");
  final ZenModelLocator zenModelLocator = new ZenModelLocator(model);
  for (final GenTemplateTraceItem item : jaxbClassItems) {
   {
    final String jaxbClassName = item.getProperties().get("jaxbClassName");
    final String jaxbPackageName = item.getProperties().get("jaxbPackageName");
    final Collection<GenTemplateTraceSourceItem> sourceItems = Collections2.<GenTemplateTraceSourceItem>filter(item.getSources(), 
     GenTemplateTraceUtils.hasSourceRole("sourceData"));
    final GenTemplateTraceSourceItem sourceItem = Iterables.<GenTemplateTraceSourceItem>getFirst(sourceItems, null);
    if ((sourceItem != null)) {
     final String locator = sourceItem.getLocator();
     final EObject zenElement = zenModelLocator.dereferenceEObject(locator);
     this.zenElement2ClassQName.put(zenElement, "jaxbClassName", jaxbClassName);
     this.zenElement2ClassQName.put(zenElement, "jaxbPackageName", jaxbPackageName);
    }
   }
  }
 } catch (Throwable _e) {
  throw Exceptions.sneakyThrow(_e);
 }
}

代码示例来源:origin: com.reprezen.genflow/rapidml-wadl

public TraceHelper(final IGenTemplateContext context, final ZenModel model) {
 try {
  this.context = context;
  ZenModelLocator _zenModelLocator = new ZenModelLocator(model);
  this.locator = _zenModelLocator;
  this.xsdTrace = context.getPrerequisiteTrace("xsdGenerator");
  List<GenTemplateTraceItem> _traceItemsOfType = GenTemplateTraceUtils.getTraceItemsOfType(this.xsdTrace, "namesInSchema");
  for (final GenTemplateTraceItem item : _traceItemsOfType) {
   this.namesItems.put(item.getLocator(), item);
  }
  EList<ResourceAPI> _resourceAPIs = model.getResourceAPIs();
  for (final ResourceAPI api : _resourceAPIs) {
   this.apiItems.put(api, GenTemplateTraceUtils.getTraceItem(this.xsdTrace, "resourceAPI", "sourceData", this.locator.<ResourceAPI>locate(api)));
  }
 } catch (Throwable _e) {
  throw Exceptions.sneakyThrow(_e);
 }
}

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