-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* Setup lib-kotlin and base-kotlin modules #222 * Added documentation #222 * Added DocKotlinParser #222 * Sonar issue #222 * Coverage #222 * Coverage #222 * Added kotlin freemarker step #222 (it does not actually use freemarker, but it relies on FreemarkerDocProcessConfig architecture). * Removed sonar and codacy issues #222 * Script evaluation now depends on fj-script-helper #222 * Fix fj-script-helper version #222 * Kotlin generation constructors documentation #222 * Kotlin generation constructors documentation #222 * Kotlin generation attribute documentation #222 * Kotlin generation class documentation #222 * Kotlin generation additional documentation #222 * Codacy issues #222 * Snyk scan removed (free limit reached) #222 * Kotlin generation additional documentation #222 * playground review with doc kotlin parser #222 * Fix link * Kotlin step documentation #222 * Kotlin parser documentation #222
- Loading branch information
Showing
75 changed files
with
3,670 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Fugerit Document Generation Framework (fj-doc) | ||
|
||
## Core library : json extension (fj-doc-base-kotlin) | ||
|
||
[back to fj-doc index](../README.md) | ||
|
||
[![Maven Central](https://img.shields.io/maven-central/v/org.fugerit.java/fj-doc-base-kotlin.svg)](https://mvnrepository.com/artifact/org.fugerit.java/fj-doc-base-kotlin) | ||
[![javadoc](https://javadoc.io/badge2/org.fugerit.java/fj-doc-base-kotlin/javadoc.svg)](https://javadoc.io/doc/org.fugerit.java/fj-doc-base-kotlin) | ||
|
||
*Description* : | ||
Add the option to use a kotlin script as document generator instead of standard xml source provided by default. | ||
|
||
*Status* : | ||
All basic features are implemented (kotlin parsing, conversion from and to xml) | ||
|
||
*Since* : fj-doc 8.10.0 | ||
|
||
*Native support* : | ||
Disabled, native support will be added in a future release. | ||
|
||
*Doc Kotlin format* | ||
The xml and kotlin format have inherent differences. For more information [read the documentation](https://venusdocs.fugerit.org/guide/#doc-format-entry-point-kotlin). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,116 @@ | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<artifactId>fj-doc-base-kotlin</artifactId> | ||
|
||
<parent> | ||
<groupId>org.fugerit.java</groupId> | ||
<artifactId>fj-doc</artifactId> | ||
<version>8.9.8-SNAPSHOT</version> | ||
</parent> | ||
|
||
<name>fj-doc-base-kotlin</name> | ||
<description>Module for producting documents from Kotlin script</description> | ||
|
||
<licenses> | ||
<license> | ||
<name>Apache License, Version 2.0</name> | ||
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url> | ||
<distribution>repo</distribution> | ||
</license> | ||
</licenses> | ||
|
||
<properties> | ||
<fj-script-helper-version>1.0.0</fj-script-helper-version> | ||
<kotlin.version>2.0.21</kotlin.version> | ||
</properties> | ||
|
||
<build> | ||
|
||
<plugins> | ||
<plugin> | ||
<groupId>org.jetbrains.kotlin</groupId> | ||
<artifactId>kotlin-maven-plugin</artifactId> | ||
<version>${kotlin.version}</version> | ||
<executions> | ||
<execution> | ||
<id>compile</id> | ||
<phase>compile</phase> | ||
<goals> | ||
<goal>compile</goal> | ||
</goals> | ||
</execution> | ||
<execution> | ||
<id>test-compile</id> | ||
<phase>test-compile</phase> | ||
<goals> | ||
<goal>test-compile</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
<configuration> | ||
<jvmTarget>1.8</jvmTarget> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
|
||
<dependencies> | ||
|
||
<dependency> | ||
<groupId>org.fugerit.java</groupId> | ||
<artifactId>fj-core</artifactId> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.fugerit.java</groupId> | ||
<artifactId>fj-doc-base</artifactId> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.fugerit.java</groupId> | ||
<artifactId>fj-xml-to-json</artifactId> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.fugerit.java</groupId> | ||
<artifactId>fj-script-helper</artifactId> | ||
<version>${fj-script-helper-version}</version> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.jetbrains.kotlin</groupId> | ||
<artifactId>kotlin-stdlib-jdk8</artifactId> | ||
<version>${kotlin.version}</version> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.jetbrains.kotlin</groupId> | ||
<artifactId>kotlin-scripting-jsr223</artifactId> | ||
<version>${kotlin.version}</version> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.junit.jupiter</groupId> | ||
<artifactId>junit-jupiter-api</artifactId> | ||
<version>${junit-jupiter-api-version}</version> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.jetbrains.kotlin</groupId> | ||
<artifactId>kotlin-test</artifactId> | ||
<version>${kotlin.version}</version> | ||
<scope>test</scope> | ||
</dependency> | ||
|
||
</dependencies> | ||
|
||
<organization> | ||
<url>https://www.fugerit.org</url> | ||
<name>Fugerit</name> | ||
</organization> | ||
|
||
<url>https://www.fugerit.org/perm/venus/</url> | ||
|
||
</project> |
18 changes: 18 additions & 0 deletions
18
fj-doc-base-kotlin/src/main/java/org/fugerit/java/doc/base/kotlin/dsl/Background.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package org.fugerit.java.doc.base.kotlin.dsl | ||
|
||
/** | ||
* Background represents the background element. | ||
* | ||
* This class will provide function to handle all background attributes and kids | ||
*/ | ||
class Background : HelperDSL.TagWithText( "background" ) { | ||
/** | ||
* Creates a new default Image instance. | ||
* @return the new instance. | ||
*/ | ||
fun image( init: Image.() -> Unit = {} ): Image { | ||
return initTag(Image(), init); | ||
} | ||
|
||
|
||
} |
26 changes: 26 additions & 0 deletions
26
fj-doc-base-kotlin/src/main/java/org/fugerit/java/doc/base/kotlin/dsl/Barcode.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package org.fugerit.java.doc.base.kotlin.dsl | ||
|
||
/** | ||
* Barcode represents the barcode element. | ||
* | ||
* This class will provide function to handle all barcode attributes and kids | ||
*/ | ||
class Barcode : HelperDSL.TagWithText( "barcode" ) { | ||
|
||
/** | ||
* Function handling size attribute of the Barcode with specific check on type. | ||
* @return the value for the size attribute. | ||
*/ | ||
fun size( value: Int ): Barcode = fontSizeType( this, "size", value ) | ||
/** | ||
* Function handling type attribute of the Barcode with generic check on type. | ||
* @return the value for the type attribute. | ||
*/ | ||
fun type( value: String ): Barcode = setAtt( this, "type", value ) | ||
/** | ||
* Function handling text attribute of the Barcode with specific check on type. | ||
* @return the value for the text attribute. | ||
*/ | ||
fun text( value: String ): Barcode = altType( this, "text", value ) | ||
|
||
} |
81 changes: 81 additions & 0 deletions
81
fj-doc-base-kotlin/src/main/java/org/fugerit/java/doc/base/kotlin/dsl/Body.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
package org.fugerit.java.doc.base.kotlin.dsl | ||
|
||
/** | ||
* Body represents the body element. | ||
* | ||
* This class will provide function to handle all body attributes and kids | ||
*/ | ||
class Body : HelperDSL.TagWithText( "body" ) { | ||
/** | ||
* Creates a new default Para instance. | ||
* @return the new instance. | ||
*/ | ||
fun para( text: String = "", init: Para.() -> Unit = {} ): Para { | ||
return initTag(Para(text), init); | ||
} | ||
/** | ||
* Creates a new default Table instance. | ||
* @return the new instance. | ||
*/ | ||
fun table( init: Table.() -> Unit = {} ): Table { | ||
return initTag(Table(), init); | ||
} | ||
/** | ||
* Creates a new default List instance. | ||
* @return the new instance. | ||
*/ | ||
fun list( init: List.() -> Unit = {} ): List { | ||
return initTag(List(), init); | ||
} | ||
/** | ||
* Creates a new default Image instance. | ||
* @return the new instance. | ||
*/ | ||
fun image( init: Image.() -> Unit = {} ): Image { | ||
return initTag(Image(), init); | ||
} | ||
/** | ||
* Creates a new default Phrase instance. | ||
* @return the new instance. | ||
*/ | ||
fun phrase( text: String = "", init: Phrase.() -> Unit = {} ): Phrase { | ||
return initTag(Phrase(text), init); | ||
} | ||
/** | ||
* Creates a new default Nbsp instance. | ||
* @return the new instance. | ||
*/ | ||
fun nbsp( init: Nbsp.() -> Unit = {} ): Nbsp { | ||
return initTag(Nbsp(), init); | ||
} | ||
/** | ||
* Creates a new default Br instance. | ||
* @return the new instance. | ||
*/ | ||
fun br( init: Br.() -> Unit = {} ): Br { | ||
return initTag(Br(), init); | ||
} | ||
/** | ||
* Creates a new default Barcode instance. | ||
* @return the new instance. | ||
*/ | ||
fun barcode( init: Barcode.() -> Unit = {} ): Barcode { | ||
return initTag(Barcode(), init); | ||
} | ||
/** | ||
* Creates a new default H instance. | ||
* @return the new instance. | ||
*/ | ||
fun h( text: String = "", init: H.() -> Unit = {} ): H { | ||
return initTag(H(text), init); | ||
} | ||
/** | ||
* Creates a new default PageBreak instance. | ||
* @return the new instance. | ||
*/ | ||
fun pageBreak( init: PageBreak.() -> Unit = {} ): PageBreak { | ||
return initTag(PageBreak(), init); | ||
} | ||
|
||
|
||
} |
24 changes: 24 additions & 0 deletions
24
fj-doc-base-kotlin/src/main/java/org/fugerit/java/doc/base/kotlin/dsl/Bookmark.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package org.fugerit.java.doc.base.kotlin.dsl | ||
|
||
/** | ||
* Bookmark represents the bookmark element. | ||
* | ||
* This class will provide function to handle all bookmark attributes and kids | ||
*/ | ||
class Bookmark( text: String = "" ) : HelperDSL.TagWithText( "bookmark" ) { | ||
|
||
init { setText(text) } | ||
/** | ||
* Function to set text content for this element. | ||
*/ | ||
|
||
fun setText( value: String ) { addKid( HelperDSL.TextElement( value ) ) } | ||
|
||
|
||
/** | ||
* Function handling ref attribute of the Bookmark with specific check on type. | ||
* @return the value for the ref attribute. | ||
*/ | ||
fun ref( value: String ): Bookmark = idType( this, "ref", value ) | ||
|
||
} |
18 changes: 18 additions & 0 deletions
18
fj-doc-base-kotlin/src/main/java/org/fugerit/java/doc/base/kotlin/dsl/BookmarkTree.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package org.fugerit.java.doc.base.kotlin.dsl | ||
|
||
/** | ||
* BookmarkTree represents the bookmark-tree element. | ||
* | ||
* This class will provide function to handle all bookmark-tree attributes and kids | ||
*/ | ||
class BookmarkTree : HelperDSL.TagWithText( "bookmark-tree" ) { | ||
/** | ||
* Creates a new default Bookmark instance. | ||
* @return the new instance. | ||
*/ | ||
fun bookmark( text: String = "", init: Bookmark.() -> Unit = {} ): Bookmark { | ||
return initTag(Bookmark(text), init); | ||
} | ||
|
||
|
||
} |
11 changes: 11 additions & 0 deletions
11
fj-doc-base-kotlin/src/main/java/org/fugerit/java/doc/base/kotlin/dsl/Br.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package org.fugerit.java.doc.base.kotlin.dsl | ||
|
||
/** | ||
* Br represents the br element. | ||
* | ||
* This class will provide function to handle all br attributes and kids | ||
*/ | ||
class Br : HelperDSL.TagWithText( "br" ) { | ||
|
||
|
||
} |
Oops, something went wrong.