gpt4 book ai didi

com.reprezen.rapidml.ZenModel.getDataModels()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-15 02:28:49 28 4
gpt4 key购买 nike

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

ZenModel.getDataModels介绍

[英]Returns the value of the 'Data Models' containment reference list. The list contents are of type com.reprezen.rapidml.DataModel.

If the meaning of the 'Data Models' containment reference list isn't clear, there really should be more of a description here...
[中]返回“数据模型”包含引用列表的值。列表内容为com类型。雷普雷岑。rapidml。数据模型。
如果“数据模型”包含参考列表的含义不清楚,这里真的应该有更多的描述。。。

代码示例

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

@Check
public void checkDataModelNameUniqueness(ZenModel model) {
  Set<String> names = Sets.newHashSet();
  for (DataModel dataModel : model.getDataModels()) {
    if (names.contains(dataModel.getName())) {
      error(String.format("Duplicate name of data model '%s'", dataModel.getName()), dataModel,
          RapidmlPackage.Literals.DATA_MODEL__NAME);
    }
    names.add(dataModel.getName());
  }
}

代码示例来源:origin: com.reprezen.rapidml/com.reprezen.rapidml.model

/**
 * @param importDeclaration
 *            import declaration
 * @return list of namespaces that available from imported model
 */
public static List<String> getImportedNamespaces(ImportDeclaration importDeclaration) {
  ZenModel zenModel = importDeclaration.getImportedModel();
  List<String> result = new ArrayList<>();
  if (zenModel != null) {
    String namespace = ((zenModel.getNamespace() != null) ? zenModel.getNamespace() + "." : "")//
        + zenModel.getName();
 
    result.addAll(zenModel.getResourceAPIs().stream()//
        .map(rapi -> namespace + "." + rapi.getName()).collect(Collectors.toList()));
    result.addAll(zenModel.getDataModels().stream()//
        .map(dm -> namespace + "." + dm.getName()).collect(Collectors.toList()));
    Optional.ofNullable(zenModel.getSecuritySchemesLibrary())//
        .filter(it -> !it.getSecuritySchemes().isEmpty())//
        .ifPresent(it -> result.add(namespace + "." + it.getName()));
  }
  return Collections.unmodifiableList(result);
}

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

private JsonNode createMetadata(ZenModel model) {
  ObjectNode root = newObjectNode();
  ObjectNode modelNode = root.putObject("models").putObject(model.getName());
  ObjectNode dmsNode = modelNode.putObject("dataModels");
  for (DataModel dm : model.getDataModels()) {
    dmsNode.set(dm.getName(), createDataModelMetadata(dm));
  }
  return root;
}

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

if (model.getDataModels().size() == 1) {
  DataModel firstInterfaceDataModel = model.getDataModels().get(0);

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

public String generateInterfaceDataModels(final ZenModel model) {
 StringConcatenation _builder = new StringConcatenation();
 {
  EList<DataModel> _dataModels = model.getDataModels();
  for(final DataModel interfaceDataModel : _dataModels) {
   CharSequence _generateInterfaceDataModels = this.generateInterfaceDataModels(interfaceDataModel, false);
   _builder.append(_generateInterfaceDataModels);
   _builder.newLineIfNotEmpty();
  }
 }
 {
  Set<DataModel> _keySet = this.importHelper.importedTypes.keySet();
  for(final DataModel interfaceDataModel_1 : _keySet) {
   CharSequence _generateInterfaceDataModels_1 = this.generateInterfaceDataModels(interfaceDataModel_1, true);
   _builder.append(_generateInterfaceDataModels_1);
   _builder.newLineIfNotEmpty();
  }
 }
 return _builder.toString();
}

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

public void generate() {
 EList<DataModel> _dataModels = this.model.getDataModels();
 for (final DataModel dataModel : _dataModels) {
  final Function1<DataType, Boolean> _function = (DataType it) -> {
   return Boolean.valueOf((it instanceof Structure));
  };
  final Function1<DataType, Structure> _function_1 = (DataType it) -> {
   return ((Structure) it);
  };
  Iterable<Structure> _map = IterableExtensions.<DataType, Structure>map(IterableExtensions.<DataType>filter(dataModel.getOwnedDataTypes(), _function), _function_1);
  for (final Structure type : _map) {
   {
    @Extension
    final FileHelper fileHelper = FileHelper.of(type, FileRole.POCOS, this.context, this.config);
    fileHelper.writeFile(this.generatePoco(type), fileHelper.getCsharpFileName(type.getName()));
   }
  }
 }
}

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

private CharSequence generateXsdNamespaceDeclarations(final ZenModel zenModel) {
 StringConcatenation _builder = new StringConcatenation();
 {
  EList<DataModel> _dataModels = zenModel.getDataModels();
  for(final DataModel interfaceDataModel : _dataModels) {
   Object _generateNamespaceDeclaration = this.generateNamespaceDeclaration(interfaceDataModel);
   _builder.append(_generateNamespaceDeclaration);
   _builder.newLineIfNotEmpty();
  }
 }
 {
  EList<ResourceAPI> _resourceAPIs = zenModel.getResourceAPIs();
  for(final ResourceAPI resourceAPI : _resourceAPIs) {
   CharSequence _generateNamespaceDeclaration_1 = this.generateNamespaceDeclaration(resourceAPI);
   _builder.append(_generateNamespaceDeclaration_1);
   _builder.newLineIfNotEmpty();
  }
 }
 return _builder;
}

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

public void generate() {
 EList<DataModel> _dataModels = this.model.getDataModels();
 for (final DataModel dataModel : _dataModels) {

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

ObjectNode root = newObjectNode();
ObjectNode dataModelRoot = root.putObject("models").putObject(model.getName()).putObject("dataModels");
for (DataModel dm : model.getDataModels()) {
  ObjectNode structsRoot = dataModelRoot.putObject(dm.getName()).putObject("structures");
  for (DataType s : dm.getOwnedDataTypes()) {

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

EList<DataModel> _dataModels = model.getDataModels();
for(final DataModel dataModel : _dataModels) {
 _builder.append("        ");

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