You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nlpcraft.apache.org by ar...@apache.org on 2020/09/02 05:27:01 UTC
[incubator-nlpcraft] branch NLPCRAFT-112 updated: WIP on JDK 11.
This is an automated email from the ASF dual-hosted git repository.
aradzinski pushed a commit to branch NLPCRAFT-112
in repository https://gitbox.apache.org/repos/asf/incubator-nlpcraft.git
The following commit(s) were added to refs/heads/NLPCRAFT-112 by this push:
new b3fae27 WIP on JDK 11.
b3fae27 is described below
commit b3fae2795606a71d1679847095b93da6bdade8af
Author: Aaron Radzinski <ar...@datalingvo.com>
AuthorDate: Tue Sep 1 22:26:50 2020 -0700
WIP on JDK 11.
---
javadoc/stylesheet.css | 570 ++++++++++++++++-----
nlpcraft/pom.xml | 29 +-
.../NCVariantImpl.java => common/NCException.java} | 29 +-
.../nlpcraft/common/config/NCConfigurable.scala | 12 +-
.../nlpcraft/common/config/NCConfigurableJava.java | 167 ++++++
.../apache/nlpcraft/common/debug/NCLogHolder.scala | 2 +-
.../scala/org/apache/nlpcraft/common/package.scala | 2 +-
.../apache/nlpcraft/common/util/NCIdGenerator.java | 56 +-
.../apache/nlpcraft/examples/alarm/AlarmModel.java | 2 +-
.../examples/helloworld/HelloWorldModel.java | 2 +-
.../examples/lightswitch/LightSwitchModel.scala | 2 +-
.../examples/misc/darksky/DarkSkyService.java | 31 +-
.../misc/geo/cities/CitiesDataProvider.java | 2 +-
.../apache/nlpcraft/examples/phone/PhoneModel.java | 2 +-
.../apache/nlpcraft/examples/time/TimeModel.java | 2 +-
.../nlpcraft/examples/time/TimeModelApp.java | 1 +
.../nlpcraft/examples/weather/WeatherModel.java | 2 +-
.../org/apache/nlpcraft/model/NCConversation.java | 4 +-
.../org/apache/nlpcraft/model/NCCustomParser.java | 2 +-
.../org/apache/nlpcraft/model/NCIntentMatch.java | 2 +-
.../scala/org/apache/nlpcraft/model/NCResult.java | 7 +-
.../scala/org/apache/nlpcraft/model/NCVariant.java | 2 +-
.../apache/nlpcraft/model/impl/NCCompanyImpl.java | 47 +-
.../org/apache/nlpcraft/model/impl/NCUserImpl.java | 18 +-
.../apache/nlpcraft/model/impl/NCVariantImpl.java | 2 +-
.../nlpcraft/model/impl/json/NCElementJson.java | 79 ---
.../nlpcraft/model/impl/json/NCMacroJson.java | 25 -
.../nlpcraft/model/impl/json/NCModelJson.java | 307 +----------
.../nlpcraft/model/impl/json/NCValueJson.java | 29 --
.../model/opencensus/NCPrometheusExporter.java | 9 +-
.../model/tools/cmdline/NCCommandLine.scala | 16 +-
.../model/tools/embedded/NCEmbeddedProbe.java | 2 +-
.../model/tools/embedded/NCEmbeddedResult.java | 15 +-
.../model/tools/sqlgen/NCSqlModelGenerator.java | 2 +-
.../nlpcraft/model/tools/sqlgen/NCSqlSchema.java | 2 +-
.../tools/sqlgen/impl/__javadoc_fix.java} | 22 +-
.../tools/test/impl/__javadoc_fix.java} | 11 +-
.../__javadoc_fix.java} | 13 +-
.../probe/mgrs/nlp/NCProbeEnrichmentManager.scala | 3 +
.../mgrs/nlp/__javadoc_fix.java} | 11 +-
.../mgrs/nlp/impl/__javadoc_fix.java} | 12 +-
.../nlpcraft/server/mdo/impl/NCMdoEntity.java | 4 +
.../nlpcraft/server/mdo/impl/NCMdoField.java | 14 +-
pom.xml | 8 +-
44 files changed, 837 insertions(+), 744 deletions(-)
diff --git a/javadoc/stylesheet.css b/javadoc/stylesheet.css
index 30779e5..7d240e0 100644
--- a/javadoc/stylesheet.css
+++ b/javadoc/stylesheet.css
@@ -15,36 +15,52 @@
* limitations under the License.
*/
+/*
+ * Styles for individual HTML elements.
+ *
+ * These are styles that are specific to individual HTML elements. Changing them affects the style of a particular
+ * HTML element throughout the page.
+ */
+
body {
background-color:#ffffff;
color:#353833;
- font-family:Helvetica, sans-serif;
- font-size:15px;
+ font-family: "Roboto Mono", Helvetica, Arial, sans-serif;
+ font-size:14px;
margin:0;
+ padding:0;
+ height:100%;
+ width:100%;
}
-a:link, a:visited {
- color:#4A6782;
- text-decoration:none;
+iframe {
+ margin:0;
+ padding:0;
+ height:100%;
+ width:100%;
+ overflow-y:scroll;
+ border:none;
}
-a:hover, a:focus {
- color:#bb7a2a;
+a:link, a:visited {
text-decoration:none;
-}
-a:active {
color:#4A6782;
+}
+a[href]:hover, a[href]:focus {
text-decoration:none;
+ color:#bb7a2a;
}
a[name] {
color:#353833;
- text-decoration:none;
}
-a[name]:hover {
- color:#353833;
- text-decoration:none;
+a[name]:before, a[name]:target, a[id]:before, a[id]:target {
+ content:"";
+ display:inline-block;
+ position:relative;
+ padding-top:129px;
+ margin-top:-129px;
}
pre {
- font-family: monospace;
- font-size: 90%;
+ font-family:"Roboto Mono", monospace;
+ font-size:14px;
}
h1 {
font-size:20px;
@@ -57,7 +73,7 @@ h3 {
font-style:italic;
}
h4 {
- font-size:14px;
+ font-size:13px;
}
h5 {
font-size:12px;
@@ -69,41 +85,44 @@ ul {
list-style-type:disc;
}
code, tt {
- font-family: monospace;
+ font-family:"Roboto Mono", monospace;
+ font-size:14px;
padding-top:4px;
margin-top:8px;
line-height:1.4em;
- color: #4A6782;
}
dt code {
- font-family: monospace;
+ font-family:"Roboto Mono", monospace;
+ font-size:14px;
padding-top:4px;
- color: #4A6782;
}
table tr td dt code {
- font-family: monospace;
+ font-family:"Roboto Mono", monospace;
+ font-size:14px;
vertical-align:top;
padding-top:4px;
- color: #4A6782;
-}
-a code {
- color: inherit !important;
- text-decoration: underline;
}
sup {
font-size:8px;
}
+
/*
-Document title and Copyright styles
-*/
+ * Styles for HTML generated by javadoc.
+ *
+ * These are style classes that are used by the standard doclet to generate HTML documentation.
+ */
+
+/*
+ * Styles for document title and copyright.
+ */
.clear {
clear:both;
- height:0;
+ height:0px;
overflow:hidden;
}
.aboutLanguage {
float:right;
- padding:0 21px;
+ padding:0px 21px;
font-size:11px;
z-index:200;
margin-top:-9px;
@@ -126,16 +145,25 @@ Document title and Copyright styles
font-weight:bold;
}
/*
-Navigation bar styles
-*/
+ * Styles for navigation bar.
+ */
.bar {
background-color:#4D7A97;
color:#FFFFFF;
- padding: .6em .5em .6em .8em;
+ padding:.8em .5em .4em .8em;
height:auto;/*height:1.8em;*/
font-size:11px;
margin:0;
}
+.navPadding {
+ padding-top: 107px;
+}
+.fixedNav {
+ position:fixed;
+ width:100%;
+ z-index:999;
+ background-color:#ffffff;
+}
.topNav {
background-color:#4D7A97;
color:#FFFFFF;
@@ -185,7 +213,22 @@ ul.navList li{
padding: 5px 6px;
text-transform:uppercase;
}
-ul.subNavList li{
+ul.navListSearch {
+ float:right;
+ margin:0 0 0 0;
+ padding:0;
+}
+ul.navListSearch li {
+ list-style:none;
+ float:right;
+ padding: 5px 6px;
+ text-transform:uppercase;
+}
+ul.navListSearch li label {
+ position:relative;
+ right:-16px;
+}
+ul.subNavList li {
list-style:none;
float:left;
}
@@ -211,22 +254,30 @@ ul.subNavList li{
overflow:hidden;
}
/*
-Page header and footer styles
-*/
+ * Styles for page header and footer.
+ */
.header, .footer {
clear:both;
margin:0 20px;
padding:5px 0 0 0;
}
-.indexHeader {
- margin:10px;
+.indexNav {
position:relative;
+ font-size:12px;
+ background-color:#dee3e9;
}
-.indexHeader span{
- margin-right:15px;
+.indexNav ul {
+ margin-top:0;
+ padding:5px;
}
-.indexHeader h1 {
- font-size:14px;
+.indexNav ul li {
+ display:inline;
+ list-style-type:none;
+ padding-right:10px;
+ text-transform:uppercase;
+}
+.indexNav h1 {
+ font-size:13px;
}
.title {
color:#2c4557;
@@ -244,11 +295,11 @@ Page header and footer styles
}
.header ul li, .footer ul li {
list-style:none;
- font-size:14px;
+ font-size:13px;
}
/*
-Heading styles
-*/
+ * Styles for headings.
+ */
div.details ul.blockList ul.blockList ul.blockList li.blockList h4, div.details ul.blockList ul.blockList ul.blockListLast li.blockList h4 {
background-color:#dee3e9;
border:1px solid #d0d9e0;
@@ -266,12 +317,13 @@ ul.blockList ul.blockList li.blockList h3 {
margin:15px 0;
}
ul.blockList li.blockList h2 {
- padding:0 0 20px 0;
+ padding:0px 0 20px 0;
}
/*
-Page layout container styles
-*/
-.contentContainer, .sourceContainer, .classUseContainer, .serializedFormContainer, .constantValuesContainer {
+ * Styles for page layout containers.
+ */
+.contentContainer, .sourceContainer, .classUseContainer, .serializedFormContainer, .constantValuesContainer,
+.allClassesContainer, .allPackagesContainer {
clear:both;
padding:10px 20px;
position:relative;
@@ -279,10 +331,10 @@ Page layout container styles
.indexContainer {
margin:10px;
position:relative;
- font-size:14px;
+ font-size:12px;
}
.indexContainer h2 {
- font-size:14px;
+ font-size:13px;
padding:0 0 3px 0;
}
.indexContainer ul {
@@ -300,8 +352,9 @@ Page layout container styles
color:#4E4E4E;
}
.contentContainer .description dl dd, .contentContainer .details dl dd, .serializedFormContainer dl dd {
- margin:5px 0 10px 0;
- font-size:15px;
+ margin:5px 0 10px 0px;
+ font-size:14px;
+ font-family:"Roboto Mono", Georgia, "Times New Roman", Times, serif;
}
.serializedFormContainer dl.nameValue dt {
margin-left:1px;
@@ -315,8 +368,11 @@ Page layout container styles
display:inline;
}
/*
-List styles
-*/
+ * Styles for lists.
+ */
+li.circle {
+ list-style:circle;
+}
ul.horizontal li {
display:inline;
font-size:0.9em;
@@ -344,7 +400,7 @@ ul.blockList li.blockList, ul.blockListLast li.blockList {
line-height:1.4;
}
ul.blockList ul.blockList li.blockList, ul.blockList ul.blockListLast li.blockList {
- padding:0 20px 5px 10px;
+ padding:0px 20px 5px 10px;
border:1px solid #ededed;
background-color:#f8f8f8;
}
@@ -369,19 +425,22 @@ table tr td dl, table tr td dl dt, table tr td dl dd {
margin-bottom:1px;
}
/*
-Table styles
-*/
-.overviewSummary, .memberSummary, .typeSummary, .useSummary, .constantsSummary, .deprecatedSummary {
+ * Styles for tables.
+ */
+.overviewSummary, .memberSummary, .typeSummary, .useSummary, .constantsSummary, .deprecatedSummary,
+.requiresSummary, .packagesSummary, .providesSummary, .usesSummary {
width:100%;
+ border-spacing:0;
border-left:1px solid #EEE;
border-right:1px solid #EEE;
border-bottom:1px solid #EEE;
}
-.overviewSummary, .memberSummary {
- padding:0;
+.overviewSummary, .memberSummary, .requiresSummary, .packagesSummary, .providesSummary, .usesSummary {
+ padding:0px;
}
.overviewSummary caption, .memberSummary caption, .typeSummary caption,
-.useSummary caption, .constantsSummary caption, .deprecatedSummary caption {
+.useSummary caption, .constantsSummary caption, .deprecatedSummary caption,
+.requiresSummary caption, .packagesSummary caption, .providesSummary caption, .usesSummary caption {
position:relative;
text-align:left;
background-repeat:no-repeat;
@@ -389,24 +448,38 @@ Table styles
font-weight:bold;
clear:none;
overflow:hidden;
- padding:0;
+ padding:0px;
padding-top:10px;
padding-left:1px;
- margin:0;
+ margin:0px;
white-space:pre;
}
.overviewSummary caption a:link, .memberSummary caption a:link, .typeSummary caption a:link,
-.useSummary caption a:link, .constantsSummary caption a:link, .deprecatedSummary caption a:link,
+.constantsSummary caption a:link, .deprecatedSummary caption a:link,
+.requiresSummary caption a:link, .packagesSummary caption a:link, .providesSummary caption a:link,
+.usesSummary caption a:link,
.overviewSummary caption a:hover, .memberSummary caption a:hover, .typeSummary caption a:hover,
-.useSummary caption a:hover, .constantsSummary caption a:hover, .deprecatedSummary caption a:hover,
+.constantsSummary caption a:hover, .deprecatedSummary caption a:hover,
+.requiresSummary caption a:hover, .packagesSummary caption a:hover, .providesSummary caption a:hover,
+.usesSummary caption a:hover,
.overviewSummary caption a:active, .memberSummary caption a:active, .typeSummary caption a:active,
-.useSummary caption a:active, .constantsSummary caption a:active, .deprecatedSummary caption a:active,
+.constantsSummary caption a:active, .deprecatedSummary caption a:active,
+.requiresSummary caption a:active, .packagesSummary caption a:active, .providesSummary caption a:active,
+.usesSummary caption a:active,
.overviewSummary caption a:visited, .memberSummary caption a:visited, .typeSummary caption a:visited,
-.useSummary caption a:visited, .constantsSummary caption a:visited, .deprecatedSummary caption a:visited {
+.constantsSummary caption a:visited, .deprecatedSummary caption a:visited,
+.requiresSummary caption a:visited, .packagesSummary caption a:visited, .providesSummary caption a:visited,
+.usesSummary caption a:visited {
color:#FFFFFF;
}
+.useSummary caption a:link, .useSummary caption a:hover, .useSummary caption a:active,
+.useSummary caption a:visited {
+ color:#1f389c;
+}
.overviewSummary caption span, .memberSummary caption span, .typeSummary caption span,
-.useSummary caption span, .constantsSummary caption span, .deprecatedSummary caption span {
+.useSummary caption span, .constantsSummary caption span, .deprecatedSummary caption span,
+.requiresSummary caption span, .packagesSummary caption span, .providesSummary caption span,
+.usesSummary caption span {
white-space:nowrap;
padding-top:5px;
padding-left:12px;
@@ -418,7 +491,8 @@ Table styles
border: none;
height:16px;
}
-.memberSummary caption span.activeTableTab span {
+.memberSummary caption span.activeTableTab span, .packagesSummary caption span.activeTableTab span,
+.overviewSummary caption span.activeTableTab span, .typeSummary caption span.activeTableTab span {
white-space:nowrap;
padding-top:5px;
padding-left:12px;
@@ -429,7 +503,8 @@ Table styles
background-color:#F8981D;
height:16px;
}
-.memberSummary caption span.tableTab span {
+.memberSummary caption span.tableTab span, .packagesSummary caption span.tableTab span,
+.overviewSummary caption span.tableTab span, .typeSummary caption span.tableTab span {
white-space:nowrap;
padding-top:5px;
padding-left:12px;
@@ -440,23 +515,28 @@ Table styles
background-color:#4D7A97;
height:16px;
}
-.memberSummary caption span.tableTab, .memberSummary caption span.activeTableTab {
- padding-top:0;
- padding-left:0;
- padding-right:0;
+.memberSummary caption span.tableTab, .memberSummary caption span.activeTableTab,
+.packagesSummary caption span.tableTab, .packagesSummary caption span.activeTableTab,
+.overviewSummary caption span.tableTab, .overviewSummary caption span.activeTableTab,
+.typeSummary caption span.tableTab, .typeSummary caption span.activeTableTab {
+ padding-top:0px;
+ padding-left:0px;
+ padding-right:0px;
background-image:none;
float:none;
display:inline;
}
.overviewSummary .tabEnd, .memberSummary .tabEnd, .typeSummary .tabEnd,
-.useSummary .tabEnd, .constantsSummary .tabEnd, .deprecatedSummary .tabEnd {
+.useSummary .tabEnd, .constantsSummary .tabEnd, .deprecatedSummary .tabEnd,
+.requiresSummary .tabEnd, .packagesSummary .tabEnd, .providesSummary .tabEnd, .usesSummary .tabEnd {
display:none;
width:5px;
position:relative;
float:left;
background-color:#F8981D;
}
-.memberSummary .activeTableTab .tabEnd {
+.memberSummary .activeTableTab .tabEnd, .packagesSummary .activeTableTab .tabEnd,
+.overviewSummary .activeTableTab .tabEnd, .typeSummary .activeTableTab .tabEnd {
display:none;
width:5px;
margin-right:3px;
@@ -464,66 +544,88 @@ Table styles
float:left;
background-color:#F8981D;
}
-.memberSummary .tableTab .tabEnd {
+.memberSummary .tableTab .tabEnd, .packagesSummary .tableTab .tabEnd,
+.overviewSummary .tableTab .tabEnd, .typeSummary .tableTab .tabEnd {
display:none;
width:5px;
margin-right:3px;
position:relative;
background-color:#4D7A97;
float:left;
-
+}
+.rowColor th, .altColor th {
+ font-weight:normal;
}
.overviewSummary td, .memberSummary td, .typeSummary td,
-.useSummary td, .constantsSummary td, .deprecatedSummary td {
+.useSummary td, .constantsSummary td, .deprecatedSummary td,
+.requiresSummary td, .packagesSummary td, .providesSummary td, .usesSummary td {
text-align:left;
- padding:0 0 12px 10px;
+ padding:0px 0px 12px 10px;
}
-th.colOne, th.colFirst, th.colLast, .useSummary th, .constantsSummary th,
-td.colOne, td.colFirst, td.colLast, .useSummary td, .constantsSummary td{
+th.colFirst, th.colSecond, th.colLast, th.colConstructorName, th.colDeprecatedItemName, .useSummary th,
+.constantsSummary th, .packagesSummary th, td.colFirst, td.colSecond, td.colLast, .useSummary td,
+.constantsSummary td {
vertical-align:top;
- padding-right:0;
+ padding-right:0px;
padding-top:8px;
padding-bottom:3px;
}
-th.colFirst, th.colLast, th.colOne, .constantsSummary th {
+th.colFirst, th.colSecond, th.colLast, th.colConstructorName, th.colDeprecatedItemName, .constantsSummary th,
+.packagesSummary th {
background:#dee3e9;
text-align:left;
padding:8px 3px 3px 7px;
}
td.colFirst, th.colFirst {
- white-space:nowrap;
- font-size:14px;
+ font-size:13px;
}
-td.colLast, th.colLast {
- font-size:14px;
+td.colSecond, th.colSecond, td.colLast, th.colConstructorName, th.colDeprecatedItemName, th.colLast {
+ font-size:13px;
}
-td.colOne, th.colOne {
- font-size:14px;
+.constantsSummary th, .packagesSummary th {
+ font-size:13px;
+}
+.providesSummary th.colFirst, .providesSummary th.colLast, .providesSummary td.colFirst,
+.providesSummary td.colLast {
+ white-space:normal;
+ font-size:13px;
}
.overviewSummary td.colFirst, .overviewSummary th.colFirst,
-.useSummary td.colFirst, .useSummary th.colFirst,
-.overviewSummary td.colOne, .overviewSummary th.colOne,
+.requiresSummary td.colFirst, .requiresSummary th.colFirst,
+.packagesSummary td.colFirst, .packagesSummary td.colSecond, .packagesSummary th.colFirst, .packagesSummary th,
+.usesSummary td.colFirst, .usesSummary th.colFirst,
+.providesSummary td.colFirst, .providesSummary th.colFirst,
.memberSummary td.colFirst, .memberSummary th.colFirst,
-.memberSummary td.colOne, .memberSummary th.colOne,
-.typeSummary td.colFirst{
- width:25%;
+.memberSummary td.colSecond, .memberSummary th.colSecond, .memberSummary th.colConstructorName,
+.typeSummary td.colFirst, .typeSummary th.colFirst {
vertical-align:top;
}
-td.colOne a:link, td.colOne a:active, td.colOne a:visited, td.colOne a:hover, td.colFirst a:link, td.colFirst a:active, td.colFirst a:visited, td.colFirst a:hover, td.colLast a:link, td.colLast a:active, td.colLast a:visited, td.colLast a:hover, .constantValuesContainer td a:link, .constantValuesContainer td a:active, .constantValuesContainer td a:visited, .constantValuesContainer td a:hover {
+.packagesSummary th.colLast, .packagesSummary td.colLast {
+ white-space:normal;
+}
+td.colFirst a:link, td.colFirst a:visited,
+td.colSecond a:link, td.colSecond a:visited,
+th.colFirst a:link, th.colFirst a:visited,
+th.colSecond a:link, th.colSecond a:visited,
+th.colConstructorName a:link, th.colConstructorName a:visited,
+th.colDeprecatedItemName a:link, th.colDeprecatedItemName a:visited,
+.constantValuesContainer td a:link, .constantValuesContainer td a:visited,
+.allClassesContainer td a:link, .allClassesContainer td a:visited,
+.allPackagesContainer td a:link, .allPackagesContainer td a:visited {
font-weight:bold;
}
.tableSubHeadingColor {
background-color:#EEEEFF;
}
-.altColor {
+.altColor, .altColor th {
background-color:#FFFFFF;
}
-.rowColor {
+.rowColor, .rowColor th {
background-color:#EEEEEF;
}
/*
-Content styles
-*/
+ * Styles for contents.
+ */
.description pre {
margin-top:0;
}
@@ -534,27 +636,22 @@ Content styles
.docSummary {
padding:0;
}
-
ul.blockList ul.blockList ul.blockList li.blockList h3 {
font-style:normal;
}
-
div.block {
- font-size:15px;
- font-family: Helvetica, "Times New Roman", Times, serif;
+ font-size:14px;
+ font-family:"Roboto Mono", Georgia, "Times New Roman", Times, serif;
}
-
td.colLast div {
- padding-top:0;
+ padding-top:0px;
}
-
-
td.colLast a {
padding-bottom:3px;
}
/*
-Formatting effect styles
-*/
+ * Styles for formatting effect.
+ */
.sourceLineNo {
color:green;
padding:0 30px 0 0;
@@ -566,26 +663,261 @@ h1.hidden {
}
.block {
display:block;
- margin:3px 10px 2px 0;
+ margin:3px 10px 2px 0px;
color:#474747;
}
-.deprecatedLabel, .descfrmTypeLabel, .memberNameLabel, .memberNameLink,
-.overrideSpecifyLabel, .packageHierarchyLabel, .paramLabel, .returnLabel,
-.seeLabel, .simpleTagLabel, .throwsLabel, .typeNameLabel, .typeNameLink {
+.deprecatedLabel, .descfrmTypeLabel, .implementationLabel, .memberNameLabel, .memberNameLink,
+.moduleLabelInPackage, .moduleLabelInType, .overrideSpecifyLabel, .packageLabelInType,
+.packageHierarchyLabel, .paramLabel, .returnLabel, .seeLabel, .simpleTagLabel,
+.throwsLabel, .typeNameLabel, .typeNameLink, .searchTagLink {
font-weight:bold;
}
.deprecationComment, .emphasizedPhrase, .interfaceName {
font-style:italic;
}
-
-div.block div.block span.deprecationComment, div.block div.block span.emphasizedPhrase,
+.deprecationBlock {
+ font-size:14px;
+ font-family:"Roboto Mono", Georgia, "Times New Roman", Times, serif;
+ border-style:solid;
+ border-width:thin;
+ border-radius:10px;
+ padding:10px;
+ margin-bottom:10px;
+ margin-right:10px;
+ display:inline-block;
+}
+div.block div.deprecationComment, div.block div.block span.emphasizedPhrase,
div.block div.block span.interfaceName {
font-style:normal;
}
+div.contentContainer ul.blockList li.blockList h2 {
+ padding-bottom:0px;
+}
+/*
+ * Styles for IFRAME.
+ */
+.mainContainer {
+ margin:0 auto;
+ padding:0;
+ height:100%;
+ width:100%;
+ position:fixed;
+ top:0;
+ left:0;
+}
+.leftContainer {
+ height:100%;
+ position:fixed;
+ width:320px;
+}
+.leftTop {
+ position:relative;
+ float:left;
+ width:315px;
+ top:0;
+ left:0;
+ height:30%;
+ border-right:6px solid #ccc;
+ border-bottom:6px solid #ccc;
+}
+.leftBottom {
+ position:relative;
+ float:left;
+ width:315px;
+ bottom:0;
+ left:0;
+ height:70%;
+ border-right:6px solid #ccc;
+ border-top:1px solid #000;
+}
+.rightContainer {
+ position:absolute;
+ left:320px;
+ top:0;
+ bottom:0;
+ height:100%;
+ right:0;
+ border-left:1px solid #000;
+}
+.rightIframe {
+ margin:0;
+ padding:0;
+ height:100%;
+ right:30px;
+ width:100%;
+ overflow:visible;
+ margin-bottom:30px;
+}
+/*
+ * Styles specific to HTML5 elements.
+ */
+main, nav, header, footer, section {
+ display:block;
+}
+/*
+ * Styles for javadoc search.
+ */
+.ui-autocomplete-category {
+ font-weight:bold;
+ font-size:15px;
+ padding:7px 0 7px 3px;
+ background-color:#4D7A97;
+ color:#FFFFFF;
+}
+.resultItem {
+ font-size:13px;
+}
+.ui-autocomplete {
+ max-height:85%;
+ max-width:65%;
+ overflow-y:scroll;
+ overflow-x:scroll;
+ white-space:nowrap;
+ box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);
+}
+ul.ui-autocomplete {
+ position:fixed;
+ z-index:999999;
+}
+ul.ui-autocomplete li {
+ float:left;
+ clear:both;
+ width:100%;
+}
+.resultHighlight {
+ font-weight:bold;
+}
+#search {
+ background-image:url('resources/glass.png');
+ background-size:13px;
+ background-repeat:no-repeat;
+ background-position:2px 3px;
+ padding-left:20px;
+ position:relative;
+ right:-18px;
+}
+#reset {
+ background-color: rgb(255,255,255);
+ background-image:url('resources/x.png');
+ background-position:center;
+ background-repeat:no-repeat;
+ background-size:12px;
+ border:0 none;
+ width:16px;
+ height:17px;
+ position:relative;
+ left:-4px;
+ top:-4px;
+ font-size:0px;
+}
+.watermark {
+ color:#545454;
+}
+.searchTagDescResult {
+ font-style:italic;
+ font-size:11px;
+}
+.searchTagHolderResult {
+ font-style:italic;
+ font-size:12px;
+}
+.searchTagResult:before, .searchTagResult:target {
+ color:red;
+}
+.moduleGraph span {
+ display:none;
+ position:absolute;
+}
+.moduleGraph:hover span {
+ display:block;
+ margin: -100px 0 0 100px;
+ z-index: 1;
+}
+.methodSignature {
+ white-space:normal;
+ color: #4d7a97;
+ font-weight: 700;
+}
-div.contentContainer ul.blockList li.blockList h2{
- padding-bottom:0;
+/*
+ * Styles for user-provided tables.
+ *
+ * borderless:
+ * No borders, vertical margins, styled caption.
+ * This style is provided for use with existing doc comments.
+ * In general, borderless tables should not be used for layout purposes.
+ *
+ * plain:
+ * Plain borders around table and cells, vertical margins, styled caption.
+ * Best for small tables or for complex tables for tables with cells that span
+ * rows and columns, when the "striped" style does not work well.
+ *
+ * striped:
+ * Borders around the table and vertical borders between cells, striped rows,
+ * vertical margins, styled caption.
+ * Best for tables that have a header row, and a body containing a series of simple rows.
+ */
+
+table.borderless,
+table.plain,
+table.striped {
+ margin-top: 10px;
+ margin-bottom: 10px;
+}
+table.borderless > caption,
+table.plain > caption,
+table.striped > caption {
+ font-weight: bold;
+ font-size: smaller;
+}
+table.borderless th, table.borderless td,
+table.plain th, table.plain td,
+table.striped th, table.striped td {
+ padding: 2px 5px;
+}
+table.borderless,
+table.borderless > thead > tr > th, table.borderless > tbody > tr > th, table.borderless > tr > th,
+table.borderless > thead > tr > td, table.borderless > tbody > tr > td, table.borderless > tr > td {
+ border: none;
+}
+table.borderless > thead > tr, table.borderless > tbody > tr, table.borderless > tr {
+ background-color: transparent;
+}
+table.plain {
+ border-collapse: collapse;
+ border: 1px solid black;
}
+table.plain > thead > tr, table.plain > tbody tr, table.plain > tr {
+ background-color: transparent;
+}
+table.plain > thead > tr > th, table.plain > tbody > tr > th, table.plain > tr > th,
+table.plain > thead > tr > td, table.plain > tbody > tr > td, table.plain > tr > td {
+ border: 1px solid black;
+}
+table.striped {
+ border-collapse: collapse;
+ border: 1px solid black;
+}
+table.striped > thead {
+ background-color: #E3E3E3;
+}
+table.striped > thead > tr > th, table.striped > thead > tr > td {
+ border: 1px solid black;
+}
+table.striped > tbody > tr:nth-child(even) {
+ background-color: #EEE
+}
+table.striped > tbody > tr:nth-child(odd) {
+ background-color: #FFF
+}
+table.striped > tbody > tr > th, table.striped > tbody > tr > td {
+ border-left: 1px solid black;
+ border-right: 1px solid black;
+}
+table.striped > tbody > tr > th {
+ font-weight: normal;
+}
+
/* ================================================================= */
diff --git a/nlpcraft/pom.xml b/nlpcraft/pom.xml
index bb01973..eb14116 100644
--- a/nlpcraft/pom.xml
+++ b/nlpcraft/pom.xml
@@ -28,7 +28,7 @@
<groupId>org.apache.nlpcraft</groupId>
<artifactId>nlpcraft-parent</artifactId>
<version>0.6.2</version>
- <relativePath>../</relativePath>
+ <relativePath>../pom.xml</relativePath>
</parent>
<dependencies>
@@ -282,6 +282,13 @@
<argument>java</argument>
<argument>-Xmx4G</argument>
<argument>-Xms4G</argument>
+ <argument>--add-exports=java.base/jdk.internal.misc=ALL-UNNAMED</argument>
+ <argument>--add-exports=java.base/sun.nio.ch=ALL-UNNAMED</argument>
+ <argument>--add-exports=java.management/com.sun.jmx.mbeanserver=ALL-UNNAMED</argument>
+ <argument>--add-exports=jdk.internal.jvmstat/sun.jvmstat.monitor=ALL-UNNAMED</argument>
+ <argument>--add-exports=java.base/sun.reflect.generics.reflectiveObjects=ALL-UNNAMED</argument>
+ <argument>--add-opens=jdk.management/com.sun.management.internal=ALL-UNNAMED</argument>
+ <argument>--illegal-access=permit</argument>
<argument>-jar</argument>
<argument>${project.build.directory}/${nlpcraft.all.deps.jar}</argument>
<argument>-server</argument>
@@ -330,13 +337,13 @@
<artifactId>maven-javadoc-plugin</artifactId>
<version>${maven.javadoc.plugin.ver}</version>
<configuration>
- <!-- Required as of JDK 8u121 -->
- <additionalOptions>--allow-script-in-comments, -Xdoclint:none</additionalOptions>
+ <additionalOptions>--allow-script-in-comments</additionalOptions>
<javadocDirectory>${project.basedir}/../javadoc</javadocDirectory>
+ <doclint>all</doclint>
<docfilessubdirs>true</docfilessubdirs>
<encoding>UTF-8</encoding>
- <failOnError>false</failOnError>
- <failOnWarning>false</failOnWarning>
+ <failOnError>true</failOnError>
+ <failOnWarnings>true</failOnWarnings>
<sourcepath>${project.basedir}/src/main/scala</sourcepath>
<stylesheetfile>${project.parent.basedir}/javadoc/stylesheet.css</stylesheetfile>
<bottom>
@@ -359,25 +366,25 @@
<link href="https://nlpcraft.apache.org/javadoc/resources/sh/styles/shCoreNLPCraft.css" rel="stylesheet" type="text/css" title="Style">
<link href="https://nlpcraft.apache.org/javadoc/resources/sh/styles/shThemeNLPCraft.css" rel="stylesheet" type="text/css" title="Style">
<link href="https://fonts.googleapis.com/css?family=Roboto+Mono" rel="stylesheet">
+ <link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet">
<script async defer src="https://buttons.github.io/buttons.js"></script>
]]>
</top>
- <subpackages>
- org.apache.nlpcraft.model:org.apache.nlpcraft.probe.embedded
- </subpackages>
<excludePackageNames>
- org.apache.nlpcraft.model.intent.utils:org.apache.nlpcraft.model.impl:org.apache.nlpcraft.model.builder.parsing:org.apache.nlpcraft.model.builder.impl:org.apache.nlpcraft.model.intent.impl:org.apache.nlpcraft.model.intent.impl.antlr4
+ org.apache.nlpcraft.common.*:org.apache.nlpcraft.common:org.apache.nlpcraft.examples.*:org.apache.nlpcraft.examples:org.apache.nlpcraft.model.impl:org.apache.nlpcraft.model.impl.json:org.apache.nlpcraft.model.intent.impl.antlr4:org.apache.nlpcraft.model.intent.utils:org.apache.nlpcraft.probe.mgrs.model.antlr4:org.apache.nlpcraft.server.mdo.impl
</excludePackageNames>
<groups>
<group>
<title>Data Model APIs</title>
<packages>
- org.apache.nlpcraft.model.opencensus:org.apache.nlpcraft.model.factories.basic:org.apache.nlpcraft.model.factories.spring:org.apache.nlpcraft.model:org.apache.nlpcraft.model.utils:org.apache.nlpcraft.model.intent:org.apache.nlpcraft.model.parsing
+ org.apache.nlpcraft.model.factories.basic:org.apache.nlpcraft.model.factories.spring:org.apache.nlpcraft.model:org.apache.nlpcraft.model.intent:org.apache.nlpcraft.model.opencensus
</packages>
</group>
<group>
<title>Tools</title>
- <packages>org.apache.nlpcraft.probe.embedded:org.apache.nlpcraft.model.tools.sqlgen:org.apache.nlpcraft.model.tools.test</packages>
+ <packages>
+ org.apache.nlpcraft.model.tools.embedded:org.apache.nlpcraft.model.tools.sqlgen:org.apache.nlpcraft.model.tools.test
+ </packages>
</group>
</groups>
<header>
diff --git a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/impl/NCVariantImpl.java b/nlpcraft/src/main/scala/org/apache/nlpcraft/common/NCException.java
similarity index 58%
copy from nlpcraft/src/main/scala/org/apache/nlpcraft/model/impl/NCVariantImpl.java
copy to nlpcraft/src/main/scala/org/apache/nlpcraft/common/NCException.java
index 1fdb185..9829616 100644
--- a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/impl/NCVariantImpl.java
+++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/common/NCException.java
@@ -15,21 +15,30 @@
* limitations under the License.
*/
-package org.apache.nlpcraft.model.impl;
+package org.apache.nlpcraft.common;
-import org.apache.nlpcraft.model.*;
-import java.util.*;
+import org.apache.nlpcraft.common.util.*;
/**
- * Default implementation for variant.
+ * Base NLPCraft exception.
*/
-public class NCVariantImpl extends ArrayList<NCToken> implements NCVariant {
+public class NCException extends RuntimeException {
/**
- * Creates new variant with given tokens.
- *
- * @param c
+ * Creates new exception with given parameters.
+ *
+ * @param msg Error message.
+ * @param cause Optional cause of this exception.
*/
- public NCVariantImpl(Collection<? extends NCToken> c) {
- super(c);
+ public NCException(String msg, Throwable cause) {
+ super(msg, NCUtils.getOriginCause(cause));
+ }
+
+ /**
+ * Creates new exception with given error message.
+ *
+ * @param msg Error message.
+ */
+ public NCException(String msg) {
+ super(msg);
}
}
diff --git a/nlpcraft/src/main/scala/org/apache/nlpcraft/common/config/NCConfigurable.scala b/nlpcraft/src/main/scala/org/apache/nlpcraft/common/config/NCConfigurable.scala
index 9d523a5..7770202 100644
--- a/nlpcraft/src/main/scala/org/apache/nlpcraft/common/config/NCConfigurable.scala
+++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/common/config/NCConfigurable.scala
@@ -20,13 +20,14 @@ package org.apache.nlpcraft.common.config
import com.typesafe.config.{Config, ConfigFactory}
import com.typesafe.scalalogging.LazyLogging
import org.apache.nlpcraft.common.NCE
+import org.slf4j.LoggerFactory
import scala.collection.JavaConverters._
/**
* Mixin for configuration factory based on https://github.com/lightbend/config.
*/
-trait NCConfigurable extends LazyLogging {
+trait NCConfigurable {
import NCConfigurable._
// Accessor to the loaded config. It should reload config.
@@ -251,8 +252,10 @@ trait NCConfigurable extends LazyLogging {
* @param errMsgs Optional error messages.
*/
def abortWith(errMsgs: String*): Unit = {
+ val logger = LoggerFactory.getLogger(getClass)
+
errMsgs.foreach(s ⇒ logger.error(s))
-
+
// Abort immediately.
System.exit(1)
}
@@ -260,7 +263,7 @@ trait NCConfigurable extends LazyLogging {
object NCConfigurable extends LazyLogging {
private var cfg: Config = _
-
+
/**
* Initializes system-wide configuration singleton with given parameters. All specific implementations
* of `NCConfigurable` trait will reuse this config instance.
@@ -336,5 +339,8 @@ object NCConfigurable extends LazyLogging {
logger.info(s"Configuration successfully loaded as a merge of: ${lines.mkString("\n + ", "\n + ", "")}")
}
+
+ // Set parsed configuration into Java shim.
+ NCConfigurableJava.setConfig(cfg)
}
}
\ No newline at end of file
diff --git a/nlpcraft/src/main/scala/org/apache/nlpcraft/common/config/NCConfigurableJava.java b/nlpcraft/src/main/scala/org/apache/nlpcraft/common/config/NCConfigurableJava.java
new file mode 100644
index 0000000..320eb12
--- /dev/null
+++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/common/config/NCConfigurableJava.java
@@ -0,0 +1,167 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.nlpcraft.common.config;
+
+import com.typesafe.config.Config;
+import org.apache.commons.math3.util.Pair;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.Arrays;
+
+/**
+ * Quick adapter for usage in Java code.
+ */
+public class NCConfigurableJava {
+ private static Config cfg = null;
+
+ /**
+ *
+ */
+ public NCConfigurableJava() {
+ // No-op.
+ }
+
+ /**
+ *
+ * @param extCfg External config to set.
+ */
+ public static void setConfig(Config extCfg) {
+ cfg = extCfg;
+ }
+
+ /**
+ * Gets mandatory configuration property in `host:port` format.
+ *
+ * @param name Full configuration property path (name).
+ * @return Pair of host and port from given configuration property.
+ */
+ public Pair<String, Integer> getHostPort(String name) {
+ checkMandatory(name);
+
+ String ep = getString(name);
+
+ int i = ep.indexOf(':');
+
+ if (i <= 0)
+ abortWith(String.format("Invalid 'host:port' endpoint format: %s", ep));
+
+ try {
+ return new Pair<String, Integer>(ep.substring(0, i), Integer.parseInt(ep.substring(i + 1)));
+ }
+ catch (NumberFormatException e) {
+ abortWith(String.format("Invalid 'host:port' endpoint port: %s", ep));
+
+ throw new AssertionError();
+ }
+ }
+
+ /**
+ * Gets mandatory configuration property in `host:port` format.
+ *
+ * @param name Full configuration property path (name).
+ * @param dfltHost Default host value.
+ * @param dfltPort Default port value.
+ * @return Pair of host and port from given configuration property or default values.
+ */
+ public Pair<String, Integer> getHostPortOrElse(String name, String dfltHost, int dfltPort) {
+ return cfg.hasPath(name) ? getHostPort(name) : new Pair<String, Integer>(dfltHost, dfltPort);
+ }
+
+ /**
+ *
+ * @param errMsgs Optional error messages.
+ */
+ void abortWith(String... errMsgs) {
+ Logger logger = LoggerFactory.getLogger(getClass());
+
+ Arrays.stream(errMsgs).sequential().forEach(logger::error);
+
+ // Abort immediately.
+ System.exit(1);
+ }
+
+ /**
+ *
+ * @param name Full configuration property path (name).
+ */
+ private void checkMandatory(String name) {
+ if (!cfg.hasPath(name))
+ abortWith(String.format("Mandatory configuration property '%s' not found.", name));
+ }
+
+
+ /**
+ * Gets mandatory configuration property.
+ *
+ * @param name Full configuration property path (name).
+ * @return Integer configuration property.
+ */
+ public int getInt(String name) {
+ checkMandatory(name);
+
+ return cfg.getInt(name);
+ }
+
+ /**
+ * Gets mandatory configuration property.
+ *
+ * @param name Full configuration property path (name).
+ * @return Boolean configuration property.
+ */
+ public boolean getBool(String name) {
+ checkMandatory(name);
+
+ return cfg.getBoolean(name);
+ }
+
+ /**
+ * Gets mandatory configuration property.
+ *
+ * @param name Full configuration property path (name).
+ * @return Long configuration property.
+ */
+ public long getLong(String name) {
+ checkMandatory(name);
+
+ return cfg.getLong(name);
+ }
+
+ /**
+ * Gets optional configuration property with default fallback value.
+ *
+ * @param name Full configuration property path (name).
+ * @param dflt Default fallback value.
+ * @return String configuration property or default value.
+ */
+ public String getStringOrElse(String name, String dflt) {
+ return cfg.hasPath(name) ? cfg.getString(name) : dflt;
+ }
+
+ /**
+ * Gets mandatory configuration property.
+ *
+ * @param name Full configuration property path (name).
+ * @return String configuration property.
+ */
+ public String getString(String name) {
+ checkMandatory(name);
+
+ return cfg.getString(name);
+ }
+}
diff --git a/nlpcraft/src/main/scala/org/apache/nlpcraft/common/debug/NCLogHolder.scala b/nlpcraft/src/main/scala/org/apache/nlpcraft/common/debug/NCLogHolder.scala
index eee555e..ea2e692 100644
--- a/nlpcraft/src/main/scala/org/apache/nlpcraft/common/debug/NCLogHolder.scala
+++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/common/debug/NCLogHolder.scala
@@ -19,7 +19,7 @@ package org.apache.nlpcraft.common.debug
import java.util
import com.google.gson.Gson
-import org.apache.nlpcraft.common.util.NCUtils
+import org.apache.nlpcraft.common.util._
import org.apache.nlpcraft.model._
import scala.collection.JavaConverters._
diff --git a/nlpcraft/src/main/scala/org/apache/nlpcraft/common/package.scala b/nlpcraft/src/main/scala/org/apache/nlpcraft/common/package.scala
index 9135af9..b79d64a 100644
--- a/nlpcraft/src/main/scala/org/apache/nlpcraft/common/package.scala
+++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/common/package.scala
@@ -20,7 +20,7 @@ package org.apache.nlpcraft
import java.util.concurrent.Callable
import java.util.function.{BiPredicate, Consumer, Supplier, Function ⇒ JFunction, Predicate ⇒ JPredicate}
-import org.apache.nlpcraft.common.util.NCUtils
+import org.apache.nlpcraft.common.util._
import scala.language.implicitConversions
diff --git a/nlpcraft/src/main/scala/org/apache/nlpcraft/common/util/NCIdGenerator.java b/nlpcraft/src/main/scala/org/apache/nlpcraft/common/util/NCIdGenerator.java
index 06aa1c7..d8578e4 100644
--- a/nlpcraft/src/main/scala/org/apache/nlpcraft/common/util/NCIdGenerator.java
+++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/common/util/NCIdGenerator.java
@@ -20,7 +20,7 @@ package org.apache.nlpcraft.common.util;
import java.util.*;
/**
- * Copied & modified from: https://github.com/peet/hashids.java/blob/master/src/HashidsJava/Hashids.java
+ * Copied and modified from: https://github.com/peet/hashids.java/blob/master/src/HashidsJava/Hashids.java
* Copyright (C) Peet Goddard
*/
public class NCIdGenerator {
@@ -45,7 +45,7 @@ public class NCIdGenerator {
/**
*
- * @param salt
+ * @param salt Salt seed.
*/
NCIdGenerator(String salt) {
this(salt, 0);
@@ -53,8 +53,8 @@ public class NCIdGenerator {
/**
*
- * @param salt
- * @param minHashLen
+ * @param salt Salt seed.
+ * @param minHashLen Minimal hash length.
*/
NCIdGenerator(String salt, int minHashLen) {
this(salt, minHashLen, DEFAULT_ALPHABET);
@@ -62,9 +62,9 @@ public class NCIdGenerator {
/**
*
- * @param salt
- * @param minHashLen
- * @param alphabet
+ * @param salt Salt seed.
+ * @param minHashLen Minimal hash length.
+ * @param alphabet Alphabet.
*/
NCIdGenerator(String salt, int minHashLen, String alphabet) {
if (alphabet == null || alphabet.trim().isEmpty())
@@ -98,18 +98,22 @@ public class NCIdGenerator {
}
/**
+ * Encrypts one or more long values.
*
- * @param nums
- * @return
+ * @param nums Long values to encrypt.
+ * @return Encrypted value (hash).
+ * @see #decrypt(String)
*/
public String encrypt(long... nums) {
return encode(nums, alphabet, salt, minHashLen);
}
/**
+ * Decrypts given hash into array of long.
*
- * @param hash
- * @return
+ * @param hash Hash value to decrypt.
+ * @return Array of long values.
+ * @see #encrypt(long...)
*/
public long[] decrypt(String hash) {
return decode(hash);
@@ -209,9 +213,9 @@ public class NCIdGenerator {
/**
*
- * @param hash
- * @param alphabet
- * @return
+ * @param hash Hash to un-hash.
+ * @param alphabet Alphabet to use.
+ * @return Unhashed long value.
*/
private long unhash(String hash, String alphabet) {
long num = 0;
@@ -227,8 +231,8 @@ public class NCIdGenerator {
/**
*
- * @param hash
- * @return
+ * @param hash Hash to decode.
+ * @return Array of longs.
*/
private long[] decode(String hash) {
List<Long> ret = new ArrayList<>();
@@ -282,9 +286,9 @@ public class NCIdGenerator {
/**
*
- * @param alphabet
- * @param salt
- * @return
+ * @param alphabet Alphabet to use.
+ * @param salt Salt seed.
+ * @return Shuffle result.
*/
private static String consistentShuffle(String alphabet, String salt) {
StringBuilder ret = new StringBuilder();
@@ -338,7 +342,7 @@ public class NCIdGenerator {
/**
*
- * @return
+ * @return Salt seed.
*/
public String getSalt() {
return salt;
@@ -346,7 +350,7 @@ public class NCIdGenerator {
/**
*
- * @return
+ * @return Alphabet in use.
*/
public String getAlphabet() {
return alphabet;
@@ -354,7 +358,7 @@ public class NCIdGenerator {
/**
*
- * @return
+ * @return Minimal hash length.
*/
public int getMinHashLength() {
return minHashLen;
@@ -362,8 +366,8 @@ public class NCIdGenerator {
/**
*
- * @param longs
- * @return
+ * @param longs List to map.
+ * @return Mapped list of longs.
*/
private static long[] longListToPrimitiveArray(List<Long> longs) {
long[] longArr = new long[longs.size()];
@@ -378,8 +382,8 @@ public class NCIdGenerator {
/**
*
- * @param chars
- * @return
+ * @param chars Characters to map.
+ * @return List of strings.
*/
private static List<String> charArrayToStringList(char[] chars) {
ArrayList<String> lst = new ArrayList<>(chars.length);
diff --git a/nlpcraft/src/main/scala/org/apache/nlpcraft/examples/alarm/AlarmModel.java b/nlpcraft/src/main/scala/org/apache/nlpcraft/examples/alarm/AlarmModel.java
index 1f21f24..7ccc9ef 100644
--- a/nlpcraft/src/main/scala/org/apache/nlpcraft/examples/alarm/AlarmModel.java
+++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/examples/alarm/AlarmModel.java
@@ -32,7 +32,7 @@ import static java.time.temporal.ChronoUnit.*;
* "buzz me in an hour and 15 minutes", or "set my alarm for 30 secs". When the timers is up it will
* simply print out "BEEP BEEP BEEP" in the probe console.
* <p>
- * See 'README.md' file in the same folder for running & testing instructions.
+ * See 'README.md' file in the same folder for running and testing instructions.
*/
public class AlarmModel extends NCModelFileAdapter {
private static final DateTimeFormatter FMT =
diff --git a/nlpcraft/src/main/scala/org/apache/nlpcraft/examples/helloworld/HelloWorldModel.java b/nlpcraft/src/main/scala/org/apache/nlpcraft/examples/helloworld/HelloWorldModel.java
index d38df8d..8d1580a 100644
--- a/nlpcraft/src/main/scala/org/apache/nlpcraft/examples/helloworld/HelloWorldModel.java
+++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/examples/helloworld/HelloWorldModel.java
@@ -28,7 +28,7 @@ import org.apache.nlpcraft.model.NCResult;
* This trivial example simply responds with 'Hello World!' on any user input.
* This is the simplest user model that can be defined.
* <p>
- * See 'README.md' file in the same folder for running & testing instructions.
+ * See 'README.md' file in the same folder for running and testing instructions.
*/
public class HelloWorldModel extends NCModelAdapter {
/**
diff --git a/nlpcraft/src/main/scala/org/apache/nlpcraft/examples/lightswitch/LightSwitchModel.scala b/nlpcraft/src/main/scala/org/apache/nlpcraft/examples/lightswitch/LightSwitchModel.scala
index e99a8b4..c9c0479 100644
--- a/nlpcraft/src/main/scala/org/apache/nlpcraft/examples/lightswitch/LightSwitchModel.scala
+++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/examples/lightswitch/LightSwitchModel.scala
@@ -29,7 +29,7 @@ import org.apache.nlpcraft.model.{NCIntentTerm, _}
* You can easily modify intent callbacks to perform the actual light switching using
* HomeKit or Arduino-based controllers.
* <p>
- * See 'README.md' file in the same folder for running & testing instructions.
+ * See 'README.md' file in the same folder for running and testing instructions.
*/
class LightSwitchModel extends NCModelFileAdapter("org/apache/nlpcraft/examples/lightswitch/lightswitch_model.yaml") {
/**
diff --git a/nlpcraft/src/main/scala/org/apache/nlpcraft/examples/misc/darksky/DarkSkyService.java b/nlpcraft/src/main/scala/org/apache/nlpcraft/examples/misc/darksky/DarkSkyService.java
index 10995a2..c4ae11d 100644
--- a/nlpcraft/src/main/scala/org/apache/nlpcraft/examples/misc/darksky/DarkSkyService.java
+++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/examples/misc/darksky/DarkSkyService.java
@@ -123,9 +123,9 @@ public class DarkSkyService {
/**
*
- * @param lat
- * @param lon
- * @param d
+ * @param lat Latitude.
+ * @param lon Longitude.
+ * @param d Date.
* @return
*/
private Map<String, Object> get(double lat, double lon, Instant d) {
@@ -137,8 +137,8 @@ public class DarkSkyService {
/**
*
- * @param url
- * @return
+ * @param url REST endpoint URL.
+ * @return REST call result.
*/
private Map<String, Object> get(String url) {
// Ack.
@@ -162,13 +162,14 @@ public class DarkSkyService {
/**
* See https://darksky.net/dev/docs#response-format to extract fields.
*
- * @param lat
- * @param lon
- * @param from
- * @param to
- * @return
+ * @param lat Latitude.
+ * @param lon Longitude.
+ * @param from From date.
+ * @param to To date.
+ * @return List of REST call results.
+ * @throws DarkSkyException Thrown in case of any provider errors.
*/
- public List<Map<String, Object>> getTimeMachine(double lat, double lon, Instant from, Instant to) {
+ public List<Map<String, Object>> getTimeMachine(double lat, double lon, Instant from, Instant to) throws DarkSkyException {
assert from != null;
assert to != null;
@@ -199,10 +200,10 @@ public class DarkSkyService {
/**
* See https://darksky.net/dev/docs#response-format to extract fields.
*
- * @param lat
- * @param lon
- * @return
- * @throws DarkSkyException
+ * @param lat Latitude.
+ * @param lon Longitude.
+ * @return REST call result.
+ * @throws DarkSkyException Thrown in case of any provider errors.
*/
public Map<String, Object> getCurrent(double lat, double lon) throws DarkSkyException {
return get("https://api.darksky.net/forecast/" + key + '/' + lat + ',' + lon +
diff --git a/nlpcraft/src/main/scala/org/apache/nlpcraft/examples/misc/geo/cities/CitiesDataProvider.java b/nlpcraft/src/main/scala/org/apache/nlpcraft/examples/misc/geo/cities/CitiesDataProvider.java
index 15d6dfa..a3a0f80 100644
--- a/nlpcraft/src/main/scala/org/apache/nlpcraft/examples/misc/geo/cities/CitiesDataProvider.java
+++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/examples/misc/geo/cities/CitiesDataProvider.java
@@ -31,7 +31,7 @@ import java.util.stream.Collectors;
*/
public class CitiesDataProvider {
/**
- * Creates and returns cities timezone map for all cities with a population > 15000 or capitals.
+ * Creates and returns cities timezone map for all cities with a population > 15000 or capitals.
*
* @return Cities timezone map.
*/
diff --git a/nlpcraft/src/main/scala/org/apache/nlpcraft/examples/phone/PhoneModel.java b/nlpcraft/src/main/scala/org/apache/nlpcraft/examples/phone/PhoneModel.java
index 95159f4..05c94aa 100644
--- a/nlpcraft/src/main/scala/org/apache/nlpcraft/examples/phone/PhoneModel.java
+++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/examples/phone/PhoneModel.java
@@ -31,7 +31,7 @@ import java.util.stream.*;
* be enabled to run this example - see 'tokenProviders' section in server configuration.
* Note also that this example is using class-based intent DSL (to demonstrate its usage).
* <p>
- * See 'README.md' file in the same folder for running & testing instructions.
+ * See 'README.md' file in the same folder for running and testing instructions.
*/
public class PhoneModel extends NCModelFileAdapter {
/**
diff --git a/nlpcraft/src/main/scala/org/apache/nlpcraft/examples/time/TimeModel.java b/nlpcraft/src/main/scala/org/apache/nlpcraft/examples/time/TimeModel.java
index bf278ff..8835e4b 100644
--- a/nlpcraft/src/main/scala/org/apache/nlpcraft/examples/time/TimeModel.java
+++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/examples/time/TimeModel.java
@@ -38,7 +38,7 @@ import static java.time.format.FormatStyle.*;
* This example answers the questions about current time, either local or at some city.
* It provides YAML response with time and timezone information.
* <p>
- * See 'README.md' file in the same folder for running & testing instructions.
+ * See 'README.md' file in the same folder for running and testing instructions.
*/
public class TimeModel extends NCModelFileAdapter {
// Medium data formatter.
diff --git a/nlpcraft/src/main/scala/org/apache/nlpcraft/examples/time/TimeModelApp.java b/nlpcraft/src/main/scala/org/apache/nlpcraft/examples/time/TimeModelApp.java
index cfe1d9f..3800b2f 100644
--- a/nlpcraft/src/main/scala/org/apache/nlpcraft/examples/time/TimeModelApp.java
+++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/examples/time/TimeModelApp.java
@@ -28,6 +28,7 @@ public class TimeModelApp {
* Main entry point.
*
* @param args Command like arguments (none required).
+ * @throws Exception Thrown in case of any errors.
*/
public static void main(String[] args) throws Exception {
// Start the data probe "in place" with 'TimeModel' model.
diff --git a/nlpcraft/src/main/scala/org/apache/nlpcraft/examples/weather/WeatherModel.java b/nlpcraft/src/main/scala/org/apache/nlpcraft/examples/weather/WeatherModel.java
index 123b1f9..f123d6a 100644
--- a/nlpcraft/src/main/scala/org/apache/nlpcraft/examples/weather/WeatherModel.java
+++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/examples/weather/WeatherModel.java
@@ -40,7 +40,7 @@ import static java.time.temporal.ChronoUnit.DAYS;
* Note that this example uses class-based intent DSL to demonstrate its usage pattern.
* Note also that it also returns intent ID together with execution result which can be used in testing.
* <p>
- * See 'README.md' file in the same folder for running & testing instructions.
+ * See 'README.md' file in the same folder for running and testing instructions.
*/
public class WeatherModel extends NCModelFileAdapter {
// Please register your own account at https://darksky.net/dev/docs/libraries and
diff --git a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/NCConversation.java b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/NCConversation.java
index c76cbcd..1276c8e 100644
--- a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/NCConversation.java
+++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/NCConversation.java
@@ -66,7 +66,7 @@ public interface NCConversation {
/**
* Removes all tokens from the conversation STM. It is equivalent to:
* <pre class="brush: java">
- * clearStm(tok -> true);
+ * clearStm(tok -> true);
* </pre>
*/
default void clearAllStm() {
@@ -89,7 +89,7 @@ public interface NCConversation {
/**
* Clears entire history of matched intents. It is equivalent to:
* <pre class="brush: java">
- * clearDialog(id -> true);
+ * clearDialog(id -> true);
* </pre>
*/
default void clearAllDialog() {
diff --git a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/NCCustomParser.java b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/NCCustomParser.java
index b249368..3f539d7 100644
--- a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/NCCustomParser.java
+++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/NCCustomParser.java
@@ -43,7 +43,7 @@ public interface NCCustomParser extends NCLifecycle {
* @param mdl Instance of data model this parser belongs to.
* @param words Entire user input represented as a list of custom words.
* @param elements List of already parsed and detected model elements at the point of this call.
- * @return List of custom elements. List can be empty or {@link null} if no model elements detected.
+ * @return List of custom elements. List can be empty or {@code null} if no model elements detected.
* @see NCModel#getParsers()
*/
List<NCCustomElement> parse(NCRequest req, NCModelView mdl, List<NCCustomWord> words, List<NCCustomElement> elements);
diff --git a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/NCIntentMatch.java b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/NCIntentMatch.java
index 4d01d94..669a0e3 100644
--- a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/NCIntentMatch.java
+++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/NCIntentMatch.java
@@ -43,7 +43,7 @@ public interface NCIntentMatch extends Serializable {
String getIntentId();
/**
- * Context of the user input query.
+ * Gets context of the user input query.
*
* @return Original query context.
*/
diff --git a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/NCResult.java b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/NCResult.java
index 4c2a7c7..76bc257 100644
--- a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/NCResult.java
+++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/NCResult.java
@@ -18,7 +18,7 @@
package org.apache.nlpcraft.model;
import org.apache.nlpcraft.common.NCException;
-import org.apache.nlpcraft.common.util.NCUtils;
+import org.apache.nlpcraft.common.util.*;
import java.io.Serializable;
import java.util.Collection;
@@ -27,7 +27,8 @@ import java.util.Collection;
* Data model result returned from model intent callbacks. Result consists of the
* text body and the type. The type is similar in notion to MIME types. The following is the list of supported
* result types:
- * <table summary="" class="dl-table">
+ * <table class="dl-table">
+ * <caption>Result types.</caption>
* <tr>
* <th>Result Type</th>
* <th>Factory Method</th>
@@ -226,7 +227,7 @@ public class NCResult implements Serializable {
/**
* Sets optional intent ID.
*
- * @param intentId
+ * @param intentId Intent ID to set for this result.
*/
public void setIntentId(String intentId) {
this.intentId = intentId;
diff --git a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/NCVariant.java b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/NCVariant.java
index 50e546d..e959db5 100644
--- a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/NCVariant.java
+++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/NCVariant.java
@@ -33,7 +33,7 @@ public interface NCVariant extends List<NCToken> {
/**
* Utility method that returns all non-freeword tokens. It's equivalent to:
* <pre class="brush: java">
- * return stream().filter(tok -> !tok.isFreeWord()).collect(Collectors.toList());
+ * return stream().filter(tok -> !tok.isFreeWord()).collect(Collectors.toList());
* </pre>
*
* @return All non-freeword tokens.
diff --git a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/impl/NCCompanyImpl.java b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/impl/NCCompanyImpl.java
index 08274c6..398def8 100644
--- a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/impl/NCCompanyImpl.java
+++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/impl/NCCompanyImpl.java
@@ -36,14 +36,14 @@ public class NCCompanyImpl implements NCCompany {
/**
*
- * @param id
- * @param name
- * @param website
- * @param country
- * @param region
- * @param address
- * @param city
- * @param postalCode
+ * @param id Id.
+ * @param name Name.
+ * @param website Website.
+ * @param country Country.
+ * @param region Region.
+ * @param address Address.
+ * @param city City.
+ * @param postalCode Postal code.
*/
public NCCompanyImpl(
long id,
@@ -65,43 +65,28 @@ public class NCCompanyImpl implements NCCompany {
this.postalCode = postalCode;
}
- @Override
- public long getId() {
+ @Override public long getId() {
return id;
}
-
- @Override
- public String getName() {
+ @Override public String getName() {
return name;
}
-
- @Override
- public Optional<String> getWebsite() {
+ @Override public Optional<String> getWebsite() {
return website;
}
-
- @Override
- public Optional<String> getCountry() {
+ @Override public Optional<String> getCountry() {
return country;
}
-
- @Override
- public Optional<String> getRegion() {
+ @Override public Optional<String> getRegion() {
return region;
}
-
- @Override
- public Optional<String> getCity() {
+ @Override public Optional<String> getCity() {
return city;
}
-
- @Override
- public Optional<String> getAddress() {
+ @Override public Optional<String> getAddress() {
return address;
}
-
- @Override
- public Optional<String> getPostalCode() {
+ @Override public Optional<String> getPostalCode() {
return postalCode;
}
}
diff --git a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/impl/NCUserImpl.java b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/impl/NCUserImpl.java
index b591daf..fb322e5 100644
--- a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/impl/NCUserImpl.java
+++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/impl/NCUserImpl.java
@@ -35,15 +35,15 @@ public class NCUserImpl implements NCUser {
private final long signupTstamp;
/**
- *
- * @param id
- * @param firstName
- * @param lastName
- * @param email
- * @param avatarUrl
- * @param props
- * @param isAdmin
- * @param signupTstamp
+ *
+ * @param id Id.
+ * @param firstName First name.
+ * @param lastName Last name.
+ * @param email Email.
+ * @param avatarUrl Avatar URL.
+ * @param props Additional properties.
+ * @param isAdmin Is admin flag.
+ * @param signupTstamp Signup timestamp.
*/
public NCUserImpl(
long id,
diff --git a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/impl/NCVariantImpl.java b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/impl/NCVariantImpl.java
index 1fdb185..463041f 100644
--- a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/impl/NCVariantImpl.java
+++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/impl/NCVariantImpl.java
@@ -27,7 +27,7 @@ public class NCVariantImpl extends ArrayList<NCToken> implements NCVariant {
/**
* Creates new variant with given tokens.
*
- * @param c
+ * @param c Collection of tokens.
*/
public NCVariantImpl(Collection<? extends NCToken> c) {
super(c);
diff --git a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/impl/json/NCElementJson.java b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/impl/json/NCElementJson.java
index c931d01..ab8c1e8 100644
--- a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/impl/json/NCElementJson.java
+++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/impl/json/NCElementJson.java
@@ -32,130 +32,51 @@ public class NCElementJson {
private NCValueJson[] values = new NCValueJson[0];
private String valueLoader;
- /**
- *
- * @return
- */
public String getParentId() {
return parentId;
}
-
- /**
- *
- * @param parentId
- */
public void setParentId(String parentId) {
this.parentId = parentId;
}
-
- /**
- *
- * @return
- */
public NCValueJson[] getValues() {
return values;
}
-
- /**
- *
- * @param values
- */
public void setValues(NCValueJson[] values) {
this.values = values;
}
-
- /**
- *
- * @return
- */
public Map<String, Object> getMetadata() {
return metadata;
}
-
- /**
- *
- * @param metadata
- */
public void setMetadata(Map<String, Object> metadata) {
this.metadata = metadata;
}
-
- /**
- *
- * @return
- */
public String getId() {
return id;
}
-
- /**
- *
- * @param id
- */
public void setId(String id) {
this.id = id;
}
-
- /**
- *
- * @return
- */
public String[] getGroups() {
return groups;
}
-
- /**
- *
- * @param groups
- */
public void setGroups(String[] groups) {
this.groups = groups;
}
-
- /**
- *
- * @return
- */
public String getDescription() {
return desc;
}
-
- /**
- *
- * @param desc
- */
public void setDescription(String desc) {
this.desc = desc;
}
-
- /**
- *
- * @return
- */
public String[] getSynonyms() {
return synonyms;
}
-
- /**
- *
- * @param synonyms
- */
public void setSynonyms(String[] synonyms) {
this.synonyms = synonyms;
}
-
- /**
- *
- * @return
- */
public String getValueLoader() {
return valueLoader;
}
-
- /**
- *
- * @param valueLoader
- */
public void setValueLoader(String valueLoader) {
this.valueLoader = valueLoader;
}
diff --git a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/impl/json/NCMacroJson.java b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/impl/json/NCMacroJson.java
index 37b4ec8..992c752 100644
--- a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/impl/json/NCMacroJson.java
+++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/impl/json/NCMacroJson.java
@@ -28,45 +28,20 @@ public class NCMacroJson {
*
*/
public NCMacroJson() {} // No-op.
-
- /**
- *
- * @param name
- * @param macro
- */
public NCMacroJson(String name, String macro) {
this.name = name;
this.macro = macro;
}
- /**
- *
- * @return
- */
public String getName() {
return name;
}
-
- /**
- *
- * @param name
- */
public void setName(String name) {
this.name = name;
}
-
- /**
- *
- * @return
- */
public String getMacro() {
return macro;
}
-
- /**
- *
- * @param macro
- */
public void setMacro(String macro) {
this.macro = macro;
}
diff --git a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/impl/json/NCModelJson.java b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/impl/json/NCModelJson.java
index 77dc1ba..117197d 100644
--- a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/impl/json/NCModelJson.java
+++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/impl/json/NCModelJson.java
@@ -57,482 +57,179 @@ public class NCModelJson {
private int maxTotalSynonyms = DFLT_MAX_TOTAL_SYNONYMS;
private boolean isPermutateSynonyms = DFLT_IS_PERMUTATE_SYNONYMS;
- /**
- *
- * @return
- */
public String getId() {
return id;
}
-
- /**
- *
- * @param id
- */
public void setId(String id) {
this.id = id;
}
-
- /**
- *
- * @return
- */
public String getName() {
return name;
}
-
- /**
- *
- * @param name
- */
public void setName(String name) {
this.name = name;
}
-
- /**
- *
- * @return
- */
public String getVersion() {
return version;
}
-
- /**
- *
- * @param version
- */
public void setVersion(String version) {
this.version = version;
}
-
- /**
- *
- * @return
- */
public Map<String, Object> getMetadata() {
return metadata;
}
-
- /**
- *
- * @param metadata
- */
public void setMetadata(Map<String, Object> metadata) {
this.metadata = metadata;
}
-
- /**
- *
- * @return
- */
public NCMacroJson[] getMacros() {
return macros;
}
-
- /**
- *
- * @param macros
- */
public void setMacros(NCMacroJson[] macros) {
this.macros = macros;
}
-
- /**
- *
- * @return
- */
public NCElementJson[] getElements() {
return elements;
}
-
- /**
- *
- * @param elements
- */
public void setElements(NCElementJson[] elements) {
this.elements = elements;
}
-
- /**
- *
- * @return
- */
public String[] getAdditionalStopwords() {
return additionalStopwords;
}
-
- /**
- *
- * @param additionalStopwords
- */
public void setAdditionalStopwords(String[] additionalStopwords) {
this.additionalStopwords = additionalStopwords;
}
-
- /**
- *
- * @return
- */
public String[] getExcludedStopwords() {
return excludedStopwords;
}
-
- /**
- *
- * @param excludedStopwords
- */
public void setExcludedStopwords(String[] excludedStopwords) {
this.excludedStopwords = excludedStopwords;
}
-
- /**
- *
- * @return
- */
public String[] getSuspiciousWords() {
return suspiciousWords;
}
-
- /**
- *
- * @param suspiciousWords
- */
public void setSuspiciousWords(String[] suspiciousWords) {
this.suspiciousWords = suspiciousWords;
}
-
- /**
- *
- * @return
- */
public String getDescription() {
return description;
}
-
- /**
- *
- * @param description
- */
public void setDescription(String description) {
this.description = description;
}
-
- /**
- *
- * @return
- */
public int getMaxUnknownWords() {
return maxUnknownWords;
}
-
- /**
- *
- * @param maxUnknownWords
- */
public void setMaxUnknownWords(int maxUnknownWords) {
this.maxUnknownWords = maxUnknownWords;
}
-
- /**
- *
- * @return
- */
public int getMaxFreeWords() {
return maxFreeWords;
}
-
- /**
- *
- * @param maxFreeWords
- */
public void setMaxFreeWords(int maxFreeWords) {
this.maxFreeWords = maxFreeWords;
}
-
- /**
- *
- * @return
- */
public int getMaxSuspiciousWords() {
return maxSuspiciousWords;
}
-
- /**
- *
- * @param maxSuspiciousWords
- */
public void setMaxSuspiciousWords(int maxSuspiciousWords) {
this.maxSuspiciousWords = maxSuspiciousWords;
}
-
- /**
- *
- * @return
- */
public int getMinWords() {
return minWords;
}
-
- /**
- *
- * @param minWords
- */
public void setMinWords(int minWords) {
this.minWords = minWords;
}
-
- /**
- *
- * @return
- */
public int getMaxWords() {
return maxWords;
}
-
- /**
- *
- * @param maxWords
- */
public void setMaxWords(int maxWords) {
this.maxWords = maxWords;
}
-
- /**
- *
- * @return
- */
public int getMinTokens() {
return minTokens;
}
-
- /**
- *
- * @param minTokens
- */
public void setMinTokens(int minTokens) {
this.minTokens = minTokens;
}
-
- /**
- *
- * @return
- */
public int getMaxTokens() {
return maxTokens;
}
-
- /**
- *
- * @param maxTokens
- */
public void setMaxTokens(int maxTokens) {
this.maxTokens = maxTokens;
}
-
- /**
- *
- * @return
- */
public int getMinNonStopwords() {
return minNonStopwords;
}
-
- /**
- *
- * @param minNonStopwords
- */
public void setMinNonStopwords(int minNonStopwords) {
this.minNonStopwords = minNonStopwords;
}
-
- /**
- *
- * @return
- */
public boolean isNonEnglishAllowed() {
return isNonEnglishAllowed;
}
-
- /**
- *
- * @param nonEnglishAllowed
- */
public void setNonEnglishAllowed(boolean nonEnglishAllowed) {
isNonEnglishAllowed = nonEnglishAllowed;
}
-
- /**
- *
- * @return
- */
public boolean isNotLatinCharsetAllowed() {
return isNotLatinCharsetAllowed;
}
-
- /**
- *
- * @param notLatinCharsetAllowed
- */
- public void setNotLatinCharsetAllowed(boolean notLatinCharsetAllowed) {
- isNotLatinCharsetAllowed = notLatinCharsetAllowed;
- }
-
- /**
- *
- * @return
- */
+ public void setNotLatinCharsetAllowed(boolean notLatinCharsetAllowed) { isNotLatinCharsetAllowed = notLatinCharsetAllowed; }
public boolean isSwearWordsAllowed() {
return isSwearWordsAllowed;
}
-
- /**
- *
- * @param swearWordsAllowed
- */
public void setSwearWordsAllowed(boolean swearWordsAllowed) {
isSwearWordsAllowed = swearWordsAllowed;
}
-
- /**
- *
- * @return
- */
public boolean isNoNounsAllowed() {
return isNoNounsAllowed;
}
-
- /**
- *
- * @param noNounsAllowed
- */
public void setNoNounsAllowed(boolean noNounsAllowed) {
isNoNounsAllowed = noNounsAllowed;
}
-
- /**
- *
- * @return
- */
public boolean isNoUserTokensAllowed() {
return isNoUserTokensAllowed;
}
-
- /**
- *
- * @param noUserTokensAllowed
- */
public void setNoUserTokensAllowed(boolean noUserTokensAllowed) {
isNoUserTokensAllowed = noUserTokensAllowed;
}
-
- /**
- *
- * @return
- */
public int getJiggleFactor() {
return jiggleFactor;
}
-
- /**
- *
- * @param jiggleFactor
- */
public void setJiggleFactor(int jiggleFactor) {
this.jiggleFactor = jiggleFactor;
}
-
- /**
- *
- * @return
- */
public boolean isDupSynonymsAllowed() {
return isDupSynonymsAllowed;
}
-
- /**
- *
- * @param dupSynonymsAllowed
- */
public void setDupSynonymsAllowed(boolean dupSynonymsAllowed) {
isDupSynonymsAllowed = dupSynonymsAllowed;
}
-
- /**
- *
- * @return
- */
public int getMaxTotalSynonyms() {
return maxTotalSynonyms;
}
-
- /**
- *
- * @param maxTotalSynonyms
- */
public void setMaxTotalSynonyms(int maxTotalSynonyms) {
this.maxTotalSynonyms = maxTotalSynonyms;
}
-
- /**
- *
- * @param isPermutateSynonyms
- */
public void setPermutateSynonyms(boolean isPermutateSynonyms) {
this.isPermutateSynonyms = isPermutateSynonyms;
}
-
- /**
- *
- * @return
- */
public boolean isPermutateSynonyms() {
return isPermutateSynonyms;
}
-
- /**
- *
- * @return
- */
public String[] getEnabledBuiltInTokens() {
return enabledBuiltInTokens;
}
-
- /**
- *
- * @param enabledBuiltInTokens Set of enabled built-in token IDs.
- */
- public void setEnabledBuiltInTokens(String[] enabledBuiltInTokens) {
- this.enabledBuiltInTokens = enabledBuiltInTokens;
- }
-
- /**
- *
- * @return
- */
+ public void setEnabledBuiltInTokens(String[] enabledBuiltInTokens) { this.enabledBuiltInTokens = enabledBuiltInTokens; }
public String[] getIntents() {
return intents;
}
-
- /**
- *
- * @param intents
- */
public void setIntents(String[] intents) {
this.intents = intents;
}
-
- /**
- *
- * @return
- */
public String[] getParsers() {
return parsers;
}
-
- /**
- *
- * @param parsers
- */
public void setParsers(String[] parsers) {
this.parsers = parsers;
}
diff --git a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/impl/json/NCValueJson.java b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/impl/json/NCValueJson.java
index 5088f7d..225f734 100644
--- a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/impl/json/NCValueJson.java
+++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/impl/json/NCValueJson.java
@@ -25,50 +25,21 @@ public class NCValueJson {
private String[] synonyms = new String[0];
private String valueLoader;
- /**
- *
- * @return
- */
public String getName() {
return name;
}
-
- /**
- *
- * @param name
- */
public void setName(String name) {
this.name = name;
}
-
- /**
- *
- * @return
- */
public String[] getSynonyms() {
return synonyms;
}
-
- /**
- *
- * @param synonyms
- */
public void setSynonyms(String[] synonyms) {
this.synonyms = synonyms;
}
-
- /**
- *
- * @return
- */
public String getValueLoader() {
return valueLoader;
}
-
- /**
- *
- * @param valueLoader
- */
public void setValueLoader(String valueLoader) {
this.valueLoader = valueLoader;
}
diff --git a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/opencensus/NCPrometheusExporter.java b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/opencensus/NCPrometheusExporter.java
index 0371b48..e167cc5 100644
--- a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/opencensus/NCPrometheusExporter.java
+++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/opencensus/NCPrometheusExporter.java
@@ -19,11 +19,11 @@ package org.apache.nlpcraft.model.opencensus;
import io.opencensus.exporter.stats.prometheus.*;
import io.prometheus.client.exporter.*;
+import org.apache.commons.math3.util.Pair;
import org.apache.nlpcraft.common.*;
import org.apache.nlpcraft.common.config.*;
import org.apache.nlpcraft.model.*;
import org.slf4j.*;
-import scala.*;
import java.io.*;
/**
@@ -56,17 +56,16 @@ import java.io.*;
* </pre>
* See <a target=_ href="https://nlpcraft.apache.org/server-and-probe.html">documentation</a> on how to configure probe life cycle
* components, default values, etc.
- * <p>
*/
public class NCPrometheusExporter implements NCLifecycle {
private static class Config extends NCConfigurableJava {
private static final String pre = "nlpcraft.probe.opencensus.prometheus";
private final String namespace = getStringOrElse(pre + ".namespace", "nlpcraft-probe");
- private final Tuple2<String, Integer> hostPort =
+ private final Pair<String, Integer> hostPort =
getHostPortOrElse(pre + ".hostport", "localhost", 8889);
- private final String host = hostPort._1;
- private final int port = hostPort._2;
+ private final String host = hostPort.getFirst();
+ private final int port = hostPort.getSecond();
}
private static final Config cfg = new Config();
diff --git a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/tools/cmdline/NCCommandLine.scala b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/tools/cmdline/NCCommandLine.scala
index 53a8dac..3022a62 100644
--- a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/tools/cmdline/NCCommandLine.scala
+++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/tools/cmdline/NCCommandLine.scala
@@ -119,6 +119,15 @@ object NCCommandLine extends App {
"configuration file has different name or in different location use this parameter to " +
"provide an alternative path."
),
+ Parameter(
+ id = "outputPath",
+ names = Seq("--output-path", "-o"),
+ valueDesc = Some("{path}"),
+ optional = true,
+ desc =
+ "File path for both REST server stdout and stderr output. If not provided, the REST server" +
+ s"output will be piped into '$${USER_HOME}/.nlpcraft/server-output.txt' file."
+ )
),
examples = Seq(
Example(
@@ -283,10 +292,11 @@ object NCCommandLine extends App {
if (param.optional)
lines += s"$T___${T___}Optional."
- val descLine = s"$T___$T___${param.desc}"
-
- lines += descLine
+ lines += s"$T___$T___${param.desc}"
+ lines += ""
}
+
+ lines.remove(lines.size - 1) // Remove last empty line.
}
if (cmd.examples.nonEmpty) {
diff --git a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/tools/embedded/NCEmbeddedProbe.java b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/tools/embedded/NCEmbeddedProbe.java
index 412f850..47c2428 100644
--- a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/tools/embedded/NCEmbeddedProbe.java
+++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/tools/embedded/NCEmbeddedProbe.java
@@ -42,7 +42,7 @@ import java.util.function.*;
* the processing flow is shortened:
* <br>
* <code>
- * <b>JVM</b><sub>1</sub>(App) ⇒ <b>JVM</b><sub>2</sub>(REST Server) ⇒ <b>JVM</b><sub>1</sub>(Probe -> App)
+ * <b>JVM</b><sub>1</sub>(App) ⇒ <b>JVM</b><sub>2</sub>(REST Server) ⇒ <b>JVM</b><sub>1</sub>(Probe ⇒ App)
* </code>
* <br>
* In this case there are only 2 hops as both client application and the data probe (and the model) are hosted
diff --git a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/tools/embedded/NCEmbeddedResult.java b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/tools/embedded/NCEmbeddedResult.java
index 9e1d1f5..3dbe984 100644
--- a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/tools/embedded/NCEmbeddedResult.java
+++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/tools/embedded/NCEmbeddedResult.java
@@ -85,13 +85,14 @@ public interface NCEmbeddedResult {
/**
* Gets optional error code. One of the following codes:
- * <table class="dl-table" summary="">
- * <thead>
- * <tr>
- * <th>Code</th>
- * <th>Description</th>
- * </tr>
- * </thead>
+ * <table class="dl-table">
+ * <caption>Error codes.</caption>
+ * <thead>
+ * <tr>
+ * <th>Code</th>
+ * <th>Description</th>
+ * </tr>
+ * </thead>
* <tbody>
* <tr>
* <td><code>1</code></td>
diff --git a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/tools/sqlgen/NCSqlModelGenerator.java b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/tools/sqlgen/NCSqlModelGenerator.java
index b48cab5..c04d18e 100644
--- a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/tools/sqlgen/NCSqlModelGenerator.java
+++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/tools/sqlgen/NCSqlModelGenerator.java
@@ -19,7 +19,7 @@ package org.apache.nlpcraft.model.tools.sqlgen;
import org.apache.nlpcraft.model.*;
import org.apache.nlpcraft.common.NCException;
-import org.apache.nlpcraft.model.tools.sqlgen.impl.NCSqlModelGeneratorImpl;
+import org.apache.nlpcraft.model.tools.sqlgen.impl.*;
/**
* Command line utility to generate YAML/JSON NLPCraft model stub from given SQL RDBMS.
diff --git a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/tools/sqlgen/NCSqlSchema.java b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/tools/sqlgen/NCSqlSchema.java
index 8b71c8b..70302bd 100644
--- a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/tools/sqlgen/NCSqlSchema.java
+++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/tools/sqlgen/NCSqlSchema.java
@@ -46,7 +46,7 @@ public interface NCSqlSchema {
* Creates and returns collection of all SQL columns across all tables in given schema. It is
* equivalent to:
* <pre class="brush: java">
- * return getTables().stream().flatMap(t -> t.getColumns().stream()).collect(Collectors.toList());
+ * return getTables().stream().flatMap(t -> t.getColumns().stream()).collect(Collectors.toList());
* </pre>
*
* @return Collection of all SQL columns across all tables in given schema.
diff --git a/nlpcraft/src/main/scala/org/apache/nlpcraft/common/NCException.scala b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/tools/sqlgen/impl/__javadoc_fix.java
similarity index 66%
rename from nlpcraft/src/main/scala/org/apache/nlpcraft/common/NCException.scala
rename to nlpcraft/src/main/scala/org/apache/nlpcraft/model/tools/sqlgen/impl/__javadoc_fix.java
index d5dcece..e29232c 100644
--- a/nlpcraft/src/main/scala/org/apache/nlpcraft/common/NCException.scala
+++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/tools/sqlgen/impl/__javadoc_fix.java
@@ -15,21 +15,13 @@
* limitations under the License.
*/
-package org.apache.nlpcraft.common
+package org.apache.nlpcraft.model.tools.sqlgen.impl;
/**
- * Base NLPCraft (NC) exception.
- *
- * @param msg Error message.
- * @param cause Optional cause.
- */
-class NCException(msg: String, cause: Throwable = null) extends RuntimeException(msg, U.getOriginCause(cause)) {
- /**
- * Java-compatible constructor.
- *
- * @param msg Error message.
- */
- def this(msg: String) = {
- this(msg, null)
- }
+ * This is an ugly fix for Javadoc problem when dealing with mixed Java and Scala project.
+ * Javadoc reports an error if the given package doesn't have a single Java declaration in it.
+ * This fake class serves the purpose of fooling Javadoc...
+ */
+class __javadoc_fix {
}
+
diff --git a/nlpcraft/src/main/scala/org/apache/nlpcraft/common/config/NCConfigurableJava.scala b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/tools/test/impl/__javadoc_fix.java
similarity index 71%
copy from nlpcraft/src/main/scala/org/apache/nlpcraft/common/config/NCConfigurableJava.scala
copy to nlpcraft/src/main/scala/org/apache/nlpcraft/model/tools/test/impl/__javadoc_fix.java
index 72bacf0..a60660f 100644
--- a/nlpcraft/src/main/scala/org/apache/nlpcraft/common/config/NCConfigurableJava.scala
+++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/tools/test/impl/__javadoc_fix.java
@@ -15,11 +15,12 @@
* limitations under the License.
*/
-package org.apache.nlpcraft.common.config
+package org.apache.nlpcraft.model.tools.test.impl;
/**
- * Quick adapter for usage in Java code.
- */
-class NCConfigurableJava extends NCConfigurable {
- // No-op.
+ * This is an ugly fix for Javadoc problem when dealing with mixed Java and Scala project.
+ * Javadoc reports an error if the given package doesn't have a single Java declaration in it.
+ * This fake class serves the purpose of fooling Javadoc...
+ */
+class __javadoc_fix {
}
diff --git a/nlpcraft/src/main/scala/org/apache/nlpcraft/common/config/NCConfigurableJava.scala b/nlpcraft/src/main/scala/org/apache/nlpcraft/probe/__javadoc_fix.java
similarity index 72%
copy from nlpcraft/src/main/scala/org/apache/nlpcraft/common/config/NCConfigurableJava.scala
copy to nlpcraft/src/main/scala/org/apache/nlpcraft/probe/__javadoc_fix.java
index 72bacf0..4b845cd 100644
--- a/nlpcraft/src/main/scala/org/apache/nlpcraft/common/config/NCConfigurableJava.scala
+++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/probe/__javadoc_fix.java
@@ -15,11 +15,12 @@
* limitations under the License.
*/
-package org.apache.nlpcraft.common.config
+package org.apache.nlpcraft.probe;
/**
- * Quick adapter for usage in Java code.
- */
-class NCConfigurableJava extends NCConfigurable {
- // No-op.
-}
+ * This is an ugly fix for Javadoc problem when dealing with mixed Java and Scala project.
+ * Javadoc reports an error if the given package doesn't have a single Java declaration in it.
+ * This fake class serves the purpose of fooling Javadoc...
+ */
+class __javadoc_fix {
+}
\ No newline at end of file
diff --git a/nlpcraft/src/main/scala/org/apache/nlpcraft/probe/mgrs/nlp/NCProbeEnrichmentManager.scala b/nlpcraft/src/main/scala/org/apache/nlpcraft/probe/mgrs/nlp/NCProbeEnrichmentManager.scala
index 7922e4e..224a548 100644
--- a/nlpcraft/src/main/scala/org/apache/nlpcraft/probe/mgrs/nlp/NCProbeEnrichmentManager.scala
+++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/probe/mgrs/nlp/NCProbeEnrichmentManager.scala
@@ -83,7 +83,9 @@ object NCProbeEnrichmentManager extends NCService with NCOpenCensusModelStats {
override def start(parent: Span = null): NCService = startScopedSpan("start", parent) { _ ⇒
embeddedCbs = mutable.HashSet.empty[EMBEDDED_CB]
+
pool = Executors.newFixedThreadPool(8 * Runtime.getRuntime.availableProcessors())
+
execCtxExecutor = ExecutionContext.fromExecutor(pool)
super.start()
@@ -96,6 +98,7 @@ object NCProbeEnrichmentManager extends NCService with NCOpenCensusModelStats {
}
U.shutdownPools(pool)
+
execCtxExecutor = null
super.stop()
diff --git a/nlpcraft/src/main/scala/org/apache/nlpcraft/common/config/NCConfigurableJava.scala b/nlpcraft/src/main/scala/org/apache/nlpcraft/probe/mgrs/nlp/__javadoc_fix.java
similarity index 71%
copy from nlpcraft/src/main/scala/org/apache/nlpcraft/common/config/NCConfigurableJava.scala
copy to nlpcraft/src/main/scala/org/apache/nlpcraft/probe/mgrs/nlp/__javadoc_fix.java
index 72bacf0..6a8afda 100644
--- a/nlpcraft/src/main/scala/org/apache/nlpcraft/common/config/NCConfigurableJava.scala
+++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/probe/mgrs/nlp/__javadoc_fix.java
@@ -15,11 +15,12 @@
* limitations under the License.
*/
-package org.apache.nlpcraft.common.config
+package org.apache.nlpcraft.probe.mgrs.nlp;
/**
- * Quick adapter for usage in Java code.
- */
-class NCConfigurableJava extends NCConfigurable {
- // No-op.
+ * This is an ugly fix for Javadoc problem when dealing with mixed Java and Scala project.
+ * Javadoc reports an error if the given package doesn't have a single Java declaration in it.
+ * This fake class serves the purpose of fooling Javadoc...
+ */
+class __javadoc_fix {
}
diff --git a/nlpcraft/src/main/scala/org/apache/nlpcraft/common/config/NCConfigurableJava.scala b/nlpcraft/src/main/scala/org/apache/nlpcraft/probe/mgrs/nlp/impl/__javadoc_fix.java
similarity index 71%
rename from nlpcraft/src/main/scala/org/apache/nlpcraft/common/config/NCConfigurableJava.scala
rename to nlpcraft/src/main/scala/org/apache/nlpcraft/probe/mgrs/nlp/impl/__javadoc_fix.java
index 72bacf0..bcc24af 100644
--- a/nlpcraft/src/main/scala/org/apache/nlpcraft/common/config/NCConfigurableJava.scala
+++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/probe/mgrs/nlp/impl/__javadoc_fix.java
@@ -15,11 +15,13 @@
* limitations under the License.
*/
-package org.apache.nlpcraft.common.config
+package org.apache.nlpcraft.probe.mgrs.nlp.impl;
/**
- * Quick adapter for usage in Java code.
- */
-class NCConfigurableJava extends NCConfigurable {
- // No-op.
+ * This is an ugly fix for Javadoc problem when dealing with mixed Java and Scala project.
+ * Javadoc reports an error if the given package doesn't have a single Java declaration in it.
+ * This fake class serves the purpose of fooling Javadoc...
+ */
+class __javadoc_fix {
}
+
diff --git a/nlpcraft/src/main/scala/org/apache/nlpcraft/server/mdo/impl/NCMdoEntity.java b/nlpcraft/src/main/scala/org/apache/nlpcraft/server/mdo/impl/NCMdoEntity.java
index 1c41114..f237c7e 100644
--- a/nlpcraft/src/main/scala/org/apache/nlpcraft/server/mdo/impl/NCMdoEntity.java
+++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/server/mdo/impl/NCMdoEntity.java
@@ -33,11 +33,15 @@ import java.lang.annotation.Target;
public @interface NCMdoEntity {
/**
* Name of the SQL table, if any.
+ *
+ * @return Name of the SQL table.
*/
String table() default "";
/**
* Whether or not SQL is supported.
+ *
+ * @return Whether or not SQL is supported.
*/
boolean sql() default true;
}
diff --git a/nlpcraft/src/main/scala/org/apache/nlpcraft/server/mdo/impl/NCMdoField.java b/nlpcraft/src/main/scala/org/apache/nlpcraft/server/mdo/impl/NCMdoField.java
index 3a43495..43b1bfe 100644
--- a/nlpcraft/src/main/scala/org/apache/nlpcraft/server/mdo/impl/NCMdoField.java
+++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/server/mdo/impl/NCMdoField.java
@@ -32,12 +32,12 @@ import java.lang.annotation.Target;
@Target({ElementType.FIELD, ElementType.METHOD})
public @interface NCMdoField {
/**
- * Whether or not to include into SQL CRUD operations.
+ * @return Whether or not to include into SQL CRUD operations.
*/
boolean sql() default true;
/**
- * Whether or not to include into JSON export.
+ * @return Whether or not to include into JSON export.
*/
boolean json() default true;
@@ -50,26 +50,28 @@ public @interface NCMdoField {
* Converter function can have zero or one parameter only. If it has one parameter
* the actual field value will be passed in to convert. Function should return a
* new value to be used in JSON export.
+ *
+ * @return Optional function name to generate JSON value for the field.
*/
String jsonConverter() default "";
/**
- * SQL column name. This is mandatory if 'table' is specified in 'NCMdoEntity' annotation.
+ * @return SQL column name. This is mandatory if 'table' is specified in 'NCMdoEntity' annotation.
*/
String column() default "";
/**
- * Custom JSON field name to use instead of source code parameter name.
+ * @return Custom JSON field name to use instead of source code parameter name.
*/
String jsonName() default "";
/**
- * Custom JDBC type to use instead of default JDBC type mapping.
+ * @return Custom JDBC type to use instead of default JDBC type mapping.
*/
int jdbcType() default Integer.MIN_VALUE;
/**
- * Wether or not this field is a primary key.
+ * @return Whether or not this field is a primary key.
*/
boolean pk() default false;
}
diff --git a/pom.xml b/pom.xml
index 57d4fc2..0541d45 100644
--- a/pom.xml
+++ b/pom.xml
@@ -525,8 +525,8 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven.compiler.plugin.ver}</version>
<configuration>
- <source>1.8</source>
- <target>1.8</target>
+ <source>11</source>
+ <target>11</target>
</configuration>
</plugin>
@@ -542,11 +542,11 @@
------------------------------------------------------------------------
You are trying to compile NLPCraft with inappropriate JDK version!
Detected JDK Version: ${java.runtime.version}
- JDK version should be 8 or 11
+ JDK version should be 11 or later
------------------------------------------------------------------------
</message>
- <version>1.8,11</version>
+ <version>11</version>
</requireJavaVersion>
</rules>
</configuration>