Git Product home page Git Product logo

context-mapper-standalone-example's Introduction

Context Mapper

Context Mapping DSL (CML) Standalone Example Project Build Status License

This is an example project illustrating how the Context Mapper DSL (CML) language can be used as standalone library outside the Eclipse IDE.

Build

The Context Mapper DSL library releases are available via the Maven central repository and can therefore be integrated within your Maven or Gradle builds.

Gradle:

implementation 'org.contextmapper:context-mapper-dsl:5.9.3'

Maven:

<dependency>
  <groupId>org.contextmapper</groupId>
  <artifactId>context-mapper-dsl</artifactId>
  <version>5.9.3</version>
</dependency>

If you want to use our SNAPSHOT's built from the master branch (context-mapper-dsl) you have to use the following repository: https://oss.sonatype.org/content/repositories/snapshots

Gradle Xtext Builder Plugin

This example project is built with Gradle. Have a look at build.gradle how it is configured. With the Xtext builder plugin you ensure that your CML files are compiled at build time.

Example Model

The CML models are configured to be in the source folder src/main/cml (see build.gradle). This example project contains the insurance example model (./src/main/cml/Insurance-Example-Model.cml) which can also be found in our examples repository.

Examples how to use CML models in your code

This example project contains the following example classes written in Java which illustrate how to use CML models and our generators:

For details about the generators and the CML language please consult our online documentation (currently we have no further documentation how to use the tools on code level in standalone applications). If you have questions how to use specific features within your standalone Java application don't hesitate to create an issue or contact us.

CLI

This example project also contains a jar that can be used from a CLI. To use it, you can build the project using any IDE, and use the generated jar. The available arguments are:

 -f,--file <arg>       CML file
 -o,--output <arg>     output folder
 -p,--template <arg>   freemarker template
 -t,--type <arg>       type of generator

The file and type arguments are mandatory. If you don't specify an output it uses src-gen folder.

The type of generators available are:

  • contextmap
  • generic
  • mdsl
  • plantuml

As example, to run from a command line:

java -jar context-mapper-standalone-example-1.0.0-SNAPSHOT.jar -f Insurance-Example-Model.cml -t contextmap

Contributing

Contribution is always welcome! Here are some ways how you can contribute:

Licence

ContextMapper is released under the Apache License, Version 2.0.

context-mapper-standalone-example's People

Contributors

joaoasrosa avatar stefan-ka avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.