- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中com.reprezen.rapidml.ZenModel.getName()
方法的一些代码示例,展示了ZenModel.getName()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZenModel.getName()
方法的具体详情如下:
包路径:com.reprezen.rapidml.ZenModel
类名称:ZenModel
方法名:getName
[英]Returns the value of the 'Name' attribute.
If the meaning of the 'Name' attribute isn't clear, there really should be more of a description here...
[中]返回“Name”属性的值。
如果“Name”属性的含义不清楚,这里真的应该有更多的描述。。。
代码示例来源:origin: com.reprezen.rapidml/com.reprezen.rapidml
@SuppressWarnings("unused")
private QualifiedName qualifiedName(ZenModel model) {
if (!Strings.isEmpty(model.getNamespace())) {
return QualifiedName.create(model.getNamespace().split("\\.")).append(model.getName()); //$NON-NLS-1$
}
return QualifiedName.create(model.getName());
}
}
代码示例来源:origin: com.reprezen.genflow/rapidml-jsonschema
protected ObjectNode getJsonSchemaNode(final ZenModel model) {
final ObjectNode root = this.mapper.createObjectNode();
ObjectNode _put = root.put("$schema", "http://json-schema.org/draft-04/schema#");
StringConcatenation _builder = new StringConcatenation();
_builder.append("Schema for ");
String _name = model.getName();
_builder.append(_name);
_builder.append(" model");
_put.put("description", _builder.toString()).put("type", "object").put("title", model.getName());
final ObjectNode definitions = this.jsonSchemaNodeFactory.generateDefinitionsNode(model);
root.set("definitions", definitions);
final ObjectNode properties = root.putObject("properties");
ArrayList<Map.Entry<String, JsonNode>> _newArrayList = Lists.<Map.Entry<String, JsonNode>>newArrayList(definitions.fields());
for (final Map.Entry<String, JsonNode> definition : _newArrayList) {
{
final String key = definition.getKey();
properties.putObject(key).put("$ref", ("#/definitions/" + key));
}
}
return root;
}
}
代码示例来源:origin: com.reprezen.genflow/rapidml-swagger
public boolean addDefaultResourceAPI(final ZenModel model) {
boolean _xblockexpression = false;
{
final ResourceAPI resourceAPI = RapidmlFactory.eINSTANCE.createResourceAPI();
resourceAPI.setBaseURI("http://localhost");
resourceAPI.setName(model.getName());
_xblockexpression = model.getResourceAPIs().add(resourceAPI);
}
return _xblockexpression;
}
代码示例来源:origin: com.reprezen.genflow/rapidml-csharp
public static NameHelper forModel(final ZenModel model) {
NameHelper _xblockexpression = null;
{
String _namespace = model.getNamespace();
String _plus = (_namespace + ".");
String _name = model.getName();
final String qname = (_plus + _name);
NameHelper _elvis = null;
NameHelper _get = NameHelper.helpers.get(qname);
if (_get != null) {
_elvis = _get;
} else {
NameHelper _xblockexpression_1 = null;
{
final NameHelper helper = new NameHelper();
NameHelper.helpers.put(qname, helper);
_xblockexpression_1 = helper;
}
_elvis = _xblockexpression_1;
}
_xblockexpression = _elvis;
}
return _xblockexpression;
}
代码示例来源:origin: com.reprezen.rapidml/com.reprezen.rapidml
if (firstInterfaceDataModel.getName() != null && model.getName() != null) {
QualifiedName importedNamespace = QualifiedName.create(model.getName(),
firstInterfaceDataModel.getName());
return Optional.of(importedNamespace);
ZenModel model = context instanceof ZenModel ? (ZenModel) context : RapidmlModelUtils.getZenModel(context);
SecuritySchemeLibrary securitySchemeLibrary = model.getSecuritySchemesLibrary();
if (securitySchemeLibrary != null && securitySchemeLibrary.getName() != null && model.getName() != null) {
QualifiedName importedNamespace = QualifiedName.create(model.getName(),
securitySchemeLibrary.getName());
return Optional.of(importedNamespace);
代码示例来源:origin: com.reprezen.genflow/rapidml-csharp
public static TypeHelper forModel(final ZenModel model) {
TypeHelper _xblockexpression = null;
{
String _namespace = model.getNamespace();
String _plus = (_namespace + ".");
String _name = model.getName();
final String qname = (_plus + _name);
TypeHelper _elvis = null;
TypeHelper _get = TypeHelper.helpers.get(qname);
if (_get != null) {
_elvis = _get;
} else {
TypeHelper _xblockexpression_1 = null;
{
final TypeHelper helper = new TypeHelper();
TypeHelper.helpers.put(qname, helper);
_xblockexpression_1 = helper;
}
_elvis = _xblockexpression_1;
}
_xblockexpression = _elvis;
}
return _xblockexpression;
}
代码示例来源:origin: com.reprezen.genflow/rapidml-csharp
public void validate(ZenModel model) throws IllegalArgumentException {
if (rootNamespace == null) {
rootNamespace = model.getName();
}
checkValidName(rootNamespace, "rootNamespace");
checkValidFolder(modelsFolder, "modelsFolder");
checkValidFolder(controllersFolder, "controllersFolder");
checkValidFramework(framework);
}
代码示例来源: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-jaxrs
public static String getPackageName(final ServiceDataResource inputElement) {
StringConcatenation _builder = new StringConcatenation();
_builder.append("com.modelsolv.reprezen.resources.");
EObject _eContainer = inputElement.eContainer().eContainer();
String _lowerCase = ((ZenModel) _eContainer).getName().toLowerCase();
_builder.append(_lowerCase);
return _builder.toString();
}
代码示例来源:origin: com.reprezen.rapidml/com.reprezen.rapidml.model
/**
* @param model
* model
* @return list of resource definitions that imported using import RESTfulInterfaces
*/
static List<ResourceDefinition> getImportedResources(ZenModel model) {
ArrayList<ResourceDefinition> result = new ArrayList<>();
for (ImportDeclaration importDecl : model.getImports()) {
String uri = importDecl.getImportURI();
if (!Strings.isNullOrEmpty(uri)) {
Resource modelResource = importDecl.eResource();
Resource resource = getResource(modelResource, uri);
if (resource != null && resource.getErrors().isEmpty() && !resource.getContents().isEmpty()) {
ZenModel zenModel = (ZenModel) resource.getContents().get(0);
String namespace = Strings.isNullOrEmpty(zenModel.getNamespace()) ? zenModel.getName() : zenModel
.getNamespace() + "." + zenModel.getName(); //$NON-NLS-1$
for (ResourceAPI resourceAPI : zenModel.getResourceAPIs()) {
String ifaceFQN = namespace + "." + resourceAPI.getName(); //$NON-NLS-1$
if (ifaceFQN.equals(importDecl.getImportedNamespace())) {
result.addAll(resourceAPI.getOwnedResourceDefinitions());
}
}
}
}
}
return result;
}
代码示例来源:origin: com.reprezen.genflow/rapidml-nodejs
@Override
public void generate(ZenModel model) throws GenerationException {
String metadataFile = String.format("%s_metadata.yaml", model.getName());
generateFile(metadataFile, new MetadataGenerator(model));
if (context.getGenTargetParameters().get("genMetadataSkeleton") == Boolean.TRUE) {
String skeletonFile = String.format("%s_metadata-skel.yaml", model.getName());
Object structSkel = context.getGenTargetParameters().get("structMetadataSkeleton");
Object primSkel = context.getGenTargetParameters().get("primFieldMetadataSkeleton");
Object refSkel = context.getGenTargetParameters().get("refFieldMetadataSkeleton");
if (!(context.getGenTargetParameters().get("omitFieldsWithoutSkeletons") == Boolean.TRUE)) {
primSkel = primSkel == null ? emptyObject : primSkel;
refSkel = primSkel == null ? emptyObject : refSkel;
}
generateFile(skeletonFile, new MetadataSkeletonGenerator(model, structSkel, primSkel, refSkel));
}
for (ResourceAPI api : model.getResourceAPIs()) {
for (ResourceDefinition resource : api.getOwnedResourceDefinitions()) {
if (resource instanceof ServiceDataResource) {
String resourcePath = String.format("handlers/%s/%s/%s.js", model.getName(), api.getName(),
resource.getName());
generateFile(resourcePath, new ResourceStubGenerator((ServiceDataResource) resource));
String customPath = String.format("custom/%s/%s/%sImpl.js", model.getName(), api.getName(),
resource.getName());
generateFile(customPath, new CustomCodeGenerator((ServiceDataResource) resource), false);
}
}
}
generateFile("app.js", new AppGenerator(metadataFile, context));
}
代码示例来源:origin: com.reprezen.genflow/swagger-nswag
@Override
public void generate(ZenModel model) throws GenerationException {
Config config = Config.fromContext(context);
File outputFile = new File(context.getOutputDirectory(), model.getName() + " Controller.cs");
Swagger swagger = getSwaggerFromPrereq();
try {
new NSwagGenerator(config).generate(config.getNSwagRunFile(swagger, Output.CS_SERVER, outputFile));
} catch (IOException e) {
throw new GenerationException("Failed to run NSwag Generation", e);
}
}
代码示例来源:origin: com.reprezen.genflow/swagger-nswag
@Override
public void generate(ZenModel model) throws GenerationException {
Config config = Config.fromContext(context);
File outputFile = new File(context.getOutputDirectory(), model.getName() + " Client.cs");
Swagger swagger = getSwaggerFromPrereq();
try {
new NSwagGenerator(config).generate(config.getNSwagRunFile(swagger, Output.CS_CLIENT, outputFile));
} catch (IOException e) {
throw new GenerationException("Failed to run NSwag Generation", e);
}
}
代码示例来源:origin: com.reprezen.genflow/swagger-nswag
@Override
public void generate(ZenModel model) throws GenerationException {
Config config = Config.fromContext(context);
File outputFile = new File(context.getOutputDirectory(), model.getName() + " Client.js");
Swagger swagger = getSwaggerFromPrereq();
try {
new NSwagGenerator(config).generate(config.getNSwagRunFile(swagger, Output.TS_CLIENT, outputFile));
} catch (IOException e) {
throw new GenerationException("Failed to run NSwag Generation", e);
}
}
代码示例来源: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.genflow/rapidml-diagram
@Override
public String generate(final ZenModel model) {
String _xblockexpression = null;
{
String _xifexpression = null;
boolean _isPreview = this.isPreview();
if (_isPreview) {
String _xblockexpression_1 = null;
{
final XGenerateJSON generator = new XGenerateJSON();
generator.init(this.context);
_xblockexpression_1 = generator.generateJSON(model);
}
_xifexpression = _xblockexpression_1;
}
final String jsonData = _xifexpression;
_xblockexpression = this.generate(jsonData, model.getName());
}
return _xblockexpression;
}
代码示例来源:origin: com.reprezen.genflow/rapidml-nodejs
private String getRefTypeName(ReferenceProperty prop) {
DataModel thisDataModel = (DataModel) prop.getContainingDataType().eContainer();
ZenModel thisModel = (ZenModel) thisDataModel.eContainer();
Structure refType = prop.getType();
DataModel refDataModel = (DataModel) refType.eContainer();
ZenModel refModel = (ZenModel) refDataModel.eContainer();
if (thisDataModel == refDataModel) {
return refType.getName();
} else if (thisModel == refModel) {
return String.format("%s.%s", refDataModel.getName(), refType.getName());
} else {
return String.format("%s.%s.%s", refModel.getName(), refDataModel.getName(), refType.getName());
}
}
代码示例来源:origin: com.reprezen.genflow/rapidml-nodejs
private String getFqName(final ResourceDefinition resource) {
String _xblockexpression = null;
{
EObject _eContainer = resource.eContainer();
final ResourceAPI api = ((ResourceAPI) _eContainer);
EObject _eContainer_1 = api.eContainer();
final ZenModel model = ((ZenModel) _eContainer_1);
StringConcatenation _builder = new StringConcatenation();
String _name = model.getName();
_builder.append(_name);
_builder.append(".");
String _name_1 = api.getName();
_builder.append(_name_1);
_builder.append(".");
String _name_2 = resource.getName();
_builder.append(_name_2);
_xblockexpression = _builder.toString();
}
return _xblockexpression;
}
代码示例来源:origin: com.reprezen.genflow/rapidml-nodejs
private String getFqName(final DataType type) {
String _xblockexpression = null;
{
EObject _eContainer = type.eContainer();
final DataModel dataModel = ((DataModel) _eContainer);
EObject _eContainer_1 = dataModel.eContainer();
final ZenModel model = ((ZenModel) _eContainer_1);
StringConcatenation _builder = new StringConcatenation();
String _name = model.getName();
_builder.append(_name);
_builder.append(".");
String _name_1 = dataModel.getName();
_builder.append(_name_1);
_builder.append(".");
String _name_2 = type.getName();
_builder.append(_name_2);
_xblockexpression = _builder.toString();
}
return _xblockexpression;
}
代码示例来源:origin: com.reprezen.genflow/rapidml-nodejs
@Override
public String generate() throws GenerationException {
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");
本文整理了Java中com.reprezen.rapidml.ZenModel类的一些代码示例,展示了ZenModel类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Ma
本文整理了Java中com.reprezen.rapidml.ZenModel.getImports()方法的一些代码示例,展示了ZenModel.getImports()的具体用法。这些代码示例主要
本文整理了Java中com.reprezen.rapidml.ZenModel.getDataModels()方法的一些代码示例,展示了ZenModel.getDataModels()的具体用法。这些
本文整理了Java中com.reprezen.rapidml.ZenModel.getName()方法的一些代码示例,展示了ZenModel.getName()的具体用法。这些代码示例主要来源于Git
本文整理了Java中com.reprezen.rapidml.ZenModel.getSecuritySchemesLibrary()方法的一些代码示例,展示了ZenModel.getSecurity
本文整理了Java中com.reprezen.rapidml.ZenModel.getResourceAPIs()方法的一些代码示例,展示了ZenModel.getResourceAPIs()的具体用
本文整理了Java中com.reprezen.rapidml.ZenModel.getNamespace()方法的一些代码示例,展示了ZenModel.getNamespace()的具体用法。这些代码
本文整理了Java中com.reprezen.rapidml.xtext.loaders.ZenModelLoader类的一些代码示例,展示了ZenModelLoader类的具体用法。这些代码示例主要
本文整理了Java中com.reprezen.rapidml.xtext.util.ZenModelHelper类的一些代码示例,展示了ZenModelHelper类的具体用法。这些代码示例主要来源于
本文整理了Java中com.reprezen.rapidml.xtext.loaders.ZenModelLoader.loadModel()方法的一些代码示例,展示了ZenModelLoader.l
本文整理了Java中com.reprezen.rapidml.xtext.loaders.ZenModelLoader.loadAndValidateModel()方法的一些代码示例,展示了ZenMo
本文整理了Java中com.reprezen.rapidml.xtext.util.ZenModelHelper.getUsedEnums()方法的一些代码示例,展示了ZenModelHelper.g
我是一名优秀的程序员,十分优秀!