- ๐ย I'm based in North Vancouver, Canada
- โ๏ธย You can contact me at [email protected]
My GitHub Stats
Set of goodies for J2CL apps
License: Apache License 2.0
My GitHub Stats
public class Export {
private final App app;
public Export(App app) {
this.app = app;
}
@GWT3Export
public void layout(String yaml) {
app.layout(yaml);
}
}
Following treblereel/mapper-xml#81 on XMLMapper
I get a model class like the following:-
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"header",
"miningBuildTask",
"dataDictionary",
"transformationDictionary",
"model",
"extension"
})
@XmlRootElement(name = "PMML")
@JsType
@GWT3Export
@XMLMapper
@Configuration(additionalAnnotation = {
@Configuration.ConfigurationAnnotation(JsType.class),
@Configuration.ConfigurationAnnotation(GWT3Export.class)
})
public class PMML {
@XmlElement(name = "Header", required = true)
protected Header header;
...
}
The important things to understand are:-
PMML
is a DTO that has a (un)marshaller generated by the @XMLMapper
annotation@GWT3Export
generated.This worked fine.
However the generated (un)marshaller also needs exposing through JsInterop and J2CL boiler-plate generated.
This is why I now add the @Configuration
annotations.
However when I attempt to J2CL compile the application I receive the following error:-
/home/manstis/workspaces/git/manstis/marshaller/marshaller-api/target/gwt3BuildCache/0.17-SNAPSHOT/marshaller-api-b8fb723b2f15496d22b830c894a5776cbc13fb79/closure-inputs/com/anstis/pmml/model/PMML_XMLMapperImpl.impl.java.js:64:
Originally at:
/home/manstis/workspaces/git/manstis/marshaller/marshaller-api/target/gwt3BuildCache/0.17-SNAPSHOT/marshaller-api-b8fb723b2f15496d22b830c894a5776cbc13fb79/closure-inputs/com/anstis/pmml/model/PMML_XMLMapperImpl.native_js:1: ERROR - [JSC_UNDEFINED_VARIABLE] variable com_anstis_pmml_model_PMML_XMLMapperImpl is undeclared
1| const _PMML_XMLMapperImpl = com_anstis_pmml_model_PMML_XMLMapperImpl
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/home/manstis/workspaces/git/manstis/marshaller/marshaller-api/target/gwt3BuildCache/0.17-SNAPSHOT/marshaller-api-b8fb723b2f15496d22b830c894a5776cbc13fb79/closure-inputs/com/anstis/pmml/model/PMML_XMLMapperImpl.impl.java.js:66:
Originally at:
/home/manstis/workspaces/git/manstis/marshaller/marshaller-api/target/gwt3BuildCache/0.17-SNAPSHOT/marshaller-api-b8fb723b2f15496d22b830c894a5776cbc13fb79/closure-inputs/com/anstis/pmml/model/PMML_XMLMapperImpl.native_js:3: ERROR - [JSC_UNDEFINED_VARIABLE] variable PMML_XMLMapperImpl is undeclared
3| goog.exportProperty(_PMML_XMLMapperImpl, 'INSTANCE', PMML_XMLMapperImpl.$static_INSTANCE__com_anstis_pmml_model_PMML_XMLMapperImpl);
^^^^^^^^^^^^^^^^^^
2 error(s), 0 warning(s)
The files are in the following ZIP:-
PMML_XMLMapperImpl.zip
See https://issues.redhat.com/browse/KOGITO-5652
I have submitted a PR with a simple failing unit test.
Fortunately, putting together the test highlighted that it is the package name causing problems and not the interfaces.
Even more fortunate is that I am not a supersticious person so having submitted PR #13 does not faze me!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.