[DEV] continue rework (big one)

This commit is contained in:
Edouard DUPIN 2022-09-03 21:05:02 +02:00
parent 4db045751d
commit 382b6744c4
49 changed files with 322 additions and 188 deletions

View File

@ -16,12 +16,12 @@ import org.atriasoft.exml.builder.Builder;
import org.atriasoft.exml.builder.BuilderGeneric;
import org.atriasoft.exml.exception.ExmlException;
import org.atriasoft.exml.exception.ExmlParserErrorMulti;
import org.atriasoft.exml.generator.GeneratorGeneric;
import org.atriasoft.exml.internal.Log;
import org.atriasoft.exml.model.XmlElement;
import org.atriasoft.exml.model.XmlNode;
import org.atriasoft.exml.parser.ParseXml;
import org.atriasoft.exml.parser.ParsingProperty;
import org.atriasoft.exml.serializer.SerializerXml;
public class Exml {
/**
@ -40,9 +40,9 @@ public class Exml {
*/
public static void generate(final XmlNode root, final StringBuilder data) {
if (!root.isElement() || (((XmlElement) root).getValue() != null && !((XmlElement) root).getValue().isEmpty())) {
SerializerXml.serialize(root, data, 0);
GeneratorGeneric.serialize(root, data, 0);
} else {
SerializerXml.serializeRoot((XmlElement) root, data);
GeneratorGeneric.serializeRoot((XmlElement) root, data);
}
// return iGenerate(_data, 0);
}

View File

@ -8,10 +8,10 @@ import java.nio.file.Path;
import org.atriasoft.aknot.exception.AknotException;
import org.atriasoft.aknot.model.ModelType;
import org.atriasoft.aknot.pojo.IntrospectionObject;
import org.atriasoft.etk.Uri;
import org.atriasoft.exml.builder.Builder;
import org.atriasoft.exml.builder.BuilderIntrospection;
import org.atriasoft.exml.builder.IntrospectionObject;
import org.atriasoft.exml.exception.ExmlBuilderException;
import org.atriasoft.exml.exception.ExmlException;
import org.atriasoft.exml.exception.ExmlNodeDoesNotExist;
@ -44,6 +44,22 @@ public class XmlMapper {
}
}
public <T> T parse(final Path path, final Class<T> classType) throws ExmlException, ExmlNodeDoesNotExist, AknotException {
byte[] elemData = null;
try {
elemData = Files.readAllBytes(path);
} catch (final IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
if (elemData == null) {
Log.error("Can not read the Stream : " + path);
return null;
}
final String dataToParse = new String(elemData);
return parse(dataToParse, classType);
}
/**
* Parse a single root node that have the name of the Class Parsed:
* <pre>

View File

@ -9,7 +9,6 @@ import org.atriasoft.aknot.model.InterfaceFactoryAccess;
import org.atriasoft.aknot.model.IntrospectionModel;
import org.atriasoft.aknot.model.ModelType;
import org.atriasoft.aknot.pojo.CacheIntrospectionModel;
import org.atriasoft.aknot.pojo.IntrospectionObject;
import org.atriasoft.exml.exception.ExmlAttributeDoesNotExist;
import org.atriasoft.exml.exception.ExmlBuilderException;
import org.atriasoft.exml.exception.ExmlException;
@ -264,7 +263,7 @@ public class BuilderIntrospection implements Builder {
final IntrospectionObject tmpp = new IntrospectionObject(inferData);
newText(tmpp, text);
final Object dataLocal = tmpp.getData();
introspectionObject.addObject(IntrospectionObject.STUPID_TOCKEN, dataLocal);
introspectionObject.addObject(IntrospectionModel.STUPID_TOCKEN, dataLocal);
return;
}
if (model.hasTextModel()) {

View File

@ -0,0 +1,168 @@
package org.atriasoft.exml.builder;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.atriasoft.aknot.exception.AknotException;
import org.atriasoft.aknot.model.IntrospectionModel;
import org.atriasoft.exml.exception.ExmlException;
import org.atriasoft.exml.exception.ExmlNodeDoesNotExist;
import org.atriasoft.exml.internal.Log;
public class IntrospectionObject {
public static final String PUBLIC_TEXT_NAME = "##<< ** TEXT-ZONE ** >>##";
private final IntrospectionModel modelInterface;
private Object data = null;
private final Map<String, Object> properties = new HashMap<>();
private final Map<String, List<Object>> nodes = new HashMap<>();
public IntrospectionObject(final IntrospectionModel dataInterface) {
this.modelInterface = dataInterface;
}
@SuppressWarnings("unchecked")
public void addObject(final String nodeName, final Object value) throws ExmlException {
if (value == null) {
// specific case when a List is empty <links></links> but define for a specific list ==> need no action
return;
}
final String beanName = this.modelInterface.getBeanName(nodeName);
if (beanName == null) {
throw new ExmlNodeDoesNotExist("The node '" + nodeName + "' Does not exist...");
}
List<Object> node = this.nodes.get(beanName);
if (node == null) {
if (List.class.isAssignableFrom(value.getClass())) {
node = (List<Object>) value;
} else if (value.getClass().isArray()) {
Log.error("this is a big problem ...");
Log.error("this is a big problem ...");
Log.error("this is a big problem ...");
Log.error("this is a big problem ...");
Log.error("this is a big problem ...");
Log.error("this is a big problem ...");
Log.error("this is a big problem ...");
Log.error("this is a big problem ...");
Log.error("this is a big problem ...");
Log.error("this is a big problem ...");
} else {
node = new ArrayList<>();
node.add(value);
}
this.nodes.put(beanName, node);
} else if (value.getClass().isArray()) {
Log.error("this is a big problem ...");
Log.error("this is a big problem ...");
Log.error("this is a big problem ...");
Log.error("this is a big problem ...");
Log.error("this is a big problem ...");
Log.error("this is a big problem ...");
Log.error("this is a big problem ...");
Log.error("this is a big problem ...");
Log.error("this is a big problem ...");
Log.error("this is a big problem ...");
} else if (List.class.isAssignableFrom(value.getClass())) {
final List<Object> nodeIn = (List<Object>) value;
node.addAll(nodeIn);
} else {
node.add(value);
}
}
public void generateTheObject() throws AknotException {
if (this.data != null) {
// nothing to do ... ==> element already created
return;
}
Log.warning("Create the element for the Specific node ... type = " + this.modelInterface.getClassType().getCanonicalName() + (this.modelInterface.isArray() ? "[array]" : "")
+ (this.modelInterface.isList() ? "[List]" : ""));
Log.warning(" Properties : " + this.properties.keySet());
Log.warning(" Nodes : " + this.nodes.keySet());
this.data = this.modelInterface.createObject(this.properties, this.nodes);
}
public Object getData() {
return this.data;
}
public IntrospectionModel getModelIntrospection() {
return this.modelInterface;
}
public String getTreeNameOfSubNode(final String nodeName) throws AknotException, ExmlNodeDoesNotExist {
final String beanName = this.modelInterface.getBeanName(nodeName);
if (beanName == null) {
throw new ExmlNodeDoesNotExist("The node '" + nodeName + "' Does not exist...");
}
return this.modelInterface.getTreeNameOfSubNode(beanName);
}
public Class<?> getTypeOfProperty(final String nodeName) throws AknotException, ExmlNodeDoesNotExist {
final String beanName = this.modelInterface.getBeanName(nodeName);
if (beanName == null) {
throw new ExmlNodeDoesNotExist("The node '" + nodeName + "' Does not exist...");
}
return this.modelInterface.getTypeOfProperty(beanName);
}
/**
* Detect a subNode, and ask the type of the node at the parent Class
* @param nodeName Name of the node
* @return Class of the node to create
*/
public Class<?> getTypeOfSubNode(final String nodeName) throws AknotException, ExmlNodeDoesNotExist {
final String beanName = this.modelInterface.getBeanNameModel(nodeName);
if (beanName == null) {
throw new ExmlNodeDoesNotExist("The node '" + nodeName + "' Does not exist...");
}
return this.modelInterface.getTypeOfSubNode(beanName);
}
public Class<?> getTypeOfSubNodeSubType(final String nodeName) throws AknotException, ExmlNodeDoesNotExist {
final String beanName = this.modelInterface.getBeanNameModel(nodeName);
if (beanName == null) {
throw new ExmlNodeDoesNotExist("The node '" + nodeName + "' Does not exist...");
}
return this.modelInterface.getTypeOfSubNodeList(beanName);
}
public Class<?> getTypeOfSubProperty(final String nodeName) throws AknotException, ExmlNodeDoesNotExist {
final String beanName = this.modelInterface.getBeanName(nodeName);
if (beanName == null) {
throw new ExmlNodeDoesNotExist("The node '" + nodeName + "' Does not exist...");
}
return this.modelInterface.getTypeOfSubProperty(beanName);
}
public boolean isSubNodeOrPropertyExist(final String nodeName) {
final String beanName = this.modelInterface.getBeanName(nodeName);
if (beanName == null) {
return false;
}
return true;
}
public void putProperty(final String propertyName, final Object propertyValue) throws AknotException, ExmlException {
String beanName = null;
if (propertyName == PUBLIC_TEXT_NAME) {
beanName = this.modelInterface.getTextBeanName();
} else {
beanName = this.modelInterface.getBeanName(propertyName);
}
if (this.properties.containsKey(beanName)) {
throw new ExmlException("Property have multiple values ==> impossible case; A Node must contain only 1 attibutes");
}
this.properties.put(beanName, propertyValue);
}
public void setText(final String text) throws AknotException, ExmlException {
if (this.data != null) {
throw new ExmlException("Can not set multiple text value in a single NODE ...");
}
this.data = this.modelInterface.getValueFromText(text);
}
}

View File

@ -1,4 +1,4 @@
package org.atriasoft.exml.serializer;
package org.atriasoft.exml.generator;
import java.util.List;
@ -13,16 +13,16 @@ import org.atriasoft.exml.model.XmlNode;
import org.atriasoft.exml.model.XmlNodeType;
import org.atriasoft.exml.model.XmlText;
public class SerializerXml {
public class GeneratorGeneric {
public static void serialize(final XmlNode node, final StringBuilder data, final int indent) {
if (node instanceof XmlElement) {
SerializerXml.serializeElement((XmlElement) node, data, indent);
GeneratorGeneric.serializeElement((XmlElement) node, data, indent);
} else if (node instanceof XmlText) {
SerializerXml.serializeText((XmlText) node, data, indent);
GeneratorGeneric.serializeText((XmlText) node, data, indent);
} else if (node instanceof XmlDeclaration) {
SerializerXml.serializeDeclaration((XmlDeclaration) node, data, indent);
GeneratorGeneric.serializeDeclaration((XmlDeclaration) node, data, indent);
} else if (node instanceof XmlComment) {
SerializerXml.serializeComment((XmlComment) node, data, indent);
GeneratorGeneric.serializeComment((XmlComment) node, data, indent);
} else {
// TODO throw an error ...
}
@ -38,7 +38,7 @@ public class SerializerXml {
private static void serializeAttributeList(final XmlAttributeList list, final StringBuilder data, final int indent) {
for (int iii = 0; iii < list.getAttributes().size(); iii++) {
SerializerXml.serializeAttribute(list.getAttributes().get(iii), data, indent);
GeneratorGeneric.serializeAttribute(list.getAttributes().get(iii), data, indent);
}
}
@ -56,7 +56,7 @@ public class SerializerXml {
Tools.addIndent(data, indent);
data.append("<?");
data.append(declaration.getValue());
SerializerXml.serializeAttributeList(declaration, data, indent);
GeneratorGeneric.serializeAttributeList(declaration, data, indent);
data.append("?>");
}
@ -66,19 +66,19 @@ public class SerializerXml {
Tools.addIndent(data, indent);
data.append("<");
data.append(element.getValue());
SerializerXml.serializeAttributeList(element, data, indent);
GeneratorGeneric.serializeAttributeList(element, data, indent);
final List<XmlNode> nodes = element.getNodes();
if (nodes.size() > 0) {
if (nodes.size() == 1 && nodes.get(0) != null && nodes.get(0).getType() == XmlNodeType.TEXT && ((XmlText) nodes.get(0)).countLines() == 1) {
data.append(">");
SerializerXml.serialize(nodes.get(0), data, 0);
GeneratorGeneric.serialize(nodes.get(0), data, 0);
Log.verbose(" generate : '" + data + "'");
} else {
data.append(">");
for (final XmlNode node : nodes) {
if (node != null) {
SerializerXml.serialize(node, data, indent + 1);
GeneratorGeneric.serialize(node, data, indent + 1);
}
}
Tools.addIndent(data, indent);
@ -94,7 +94,7 @@ public class SerializerXml {
public static void serializeRoot(final XmlElement root, final StringBuilder data) {
for (int iii = 0; iii < root.getNodes().size(); iii++) {
final XmlNode node = root.getNodes().get(iii);
SerializerXml.serialize(node, data, 0);
GeneratorGeneric.serialize(node, data, 0);
}
}
@ -112,5 +112,5 @@ public class SerializerXml {
}
*/
private SerializerXml() {}
private GeneratorGeneric() {}
}

View File

@ -11,8 +11,8 @@ import java.util.List;
import java.util.ListIterator;
import org.atriasoft.exml.exception.ExmlNodeDoesNotExist;
import org.atriasoft.exml.generator.GeneratorGeneric;
import org.atriasoft.exml.internal.Log;
import org.atriasoft.exml.serializer.SerializerXml;
/** @file
* @author Edouard DUPIN
@ -171,12 +171,12 @@ public class XmlElement extends XmlAttributeList {
if (this.listSub.get(0).getType() == XmlNodeType.TEXT) {
res.append(this.listSub.get(0).getValue());
} else {
SerializerXml.serialize(this.listSub.get(0), res, 0);
GeneratorGeneric.serialize(this.listSub.get(0), res, 0);
}
} else {
for (int iii = 0; iii < this.listSub.size(); iii++) {
if (this.listSub.get(iii) != null) {
SerializerXml.serialize(this.listSub.get(iii), res, 0);
GeneratorGeneric.serialize(this.listSub.get(iii), res, 0);
}
}
}

View File

@ -1,115 +0,0 @@
package org.atriasoft.exml.serializer;
import java.util.List;
import org.atriasoft.etk.Tools;
import org.atriasoft.exml.generator.Generator;
import org.atriasoft.exml.internal.Log;
import org.atriasoft.exml.model.XmlAttribute;
import org.atriasoft.exml.model.XmlAttributeList;
import org.atriasoft.exml.model.XmlComment;
import org.atriasoft.exml.model.XmlDeclaration;
import org.atriasoft.exml.model.XmlElement;
import org.atriasoft.exml.model.XmlNode;
import org.atriasoft.exml.model.XmlNodeType;
import org.atriasoft.exml.model.XmlText;
import org.atriasoft.exml.parser.ParsingProperty;
public class SerializerXmlIntrospection {
public static void serialize(final XmlNode node, final StringBuilder data, final int indent) {
if (node instanceof XmlElement) {
SerializerXmlIntrospection.serializeElement((XmlElement) node, data, indent);
} else if (node instanceof XmlText) {
SerializerXmlIntrospection.serializeText((XmlText) node, data, indent);
} else if (node instanceof XmlDeclaration) {
SerializerXmlIntrospection.serializeDeclaration((XmlDeclaration) node, data, indent);
} else if (node instanceof XmlComment) {
SerializerXmlIntrospection.serializeComment((XmlComment) node, data, indent);
} else {
// TODO throw an error ...
}
}
private static void serializeAttribute(final XmlAttribute attribute, final StringBuilder data, final int indent) {
data.append(" ");
data.append(attribute.getName());
data.append("=\"");
data.append(attribute.getValue());
data.append("\"");
}
private static void serializeAttributeList(final XmlAttributeList list, final StringBuilder data, final int indent) {
for (int iii = 0; iii < list.getAttributes().size(); iii++) {
SerializerXmlIntrospection.serializeAttribute(list.getAttributes().get(iii), data, indent);
}
}
private static void serializeComment(final XmlComment comment, final StringBuilder data, final int indent) {
Tools.addIndent(data, indent);
data.append("<!--");
data.append(comment.getValue());
data.append("-->\n");
}
private static void serializeDeclaration(final XmlDeclaration declaration, final StringBuilder data, final int indent) {
Tools.addIndent(data, indent);
data.append("<?");
data.append(declaration.getValue());
SerializerXmlIntrospection.serializeAttributeList(declaration, data, indent);
data.append("?>\n");
}
private static void serializeElement(final XmlElement element, final StringBuilder data, final int indent) {
Tools.addIndent(data, indent);
data.append("<");
data.append(element.getValue());
SerializerXmlIntrospection.serializeAttributeList(element, data, indent);
final List<XmlNode> nodes = element.getNodes();
if (nodes.size() > 0) {
if (nodes.size() == 1 && nodes.get(0) != null && nodes.get(0).getType() == XmlNodeType.TEXT && ((XmlText) nodes.get(0)).countLines() == 1) {
data.append(">");
SerializerXmlIntrospection.serialize(nodes.get(0), data, 0);
Log.verbose(" generate : '" + data + "'");
} else {
data.append(">\n");
for (final XmlNode node : nodes) {
if (node != null) {
SerializerXmlIntrospection.serialize(node, data, indent + 1);
}
}
Tools.addIndent(data, indent);
}
data.append("</");
data.append(element.getValue());
data.append(">\n");
} else {
data.append("/>\n");
}
}
public static void serializeRoot(final XmlElement root, final StringBuilder data) {
for (int iii = 0; iii < root.getNodes().size(); iii++) {
final XmlNode node = root.getNodes().get(iii);
SerializerXmlIntrospection.serialize(node, data, 0);
}
}
private static void serializeText(final XmlText text, final StringBuilder data, final int indent) {
data.append(Tools.replaceSpecialCharOut(text.getValue()));
}
private final Generator generator;
public SerializerXmlIntrospection(final Generator generator) {
this.generator = generator;
}
public void generate(final Object root, final ParsingProperty property, final StringBuilder tmpp) {
//property.append(Tools.replaceSpecialCharOut(root.getValue()));
}
}

View File

@ -3,7 +3,7 @@
* @copyright 2021, Edouard DUPIN, all right reserved
* @license MPL v2.0 (see license file)
*/
package test.atriasoft.exml;
package test.atriasoft.exml.generic;
import org.atriasoft.aknot.exception.AknotException;
import org.atriasoft.exml.Exml;
@ -11,6 +11,8 @@ import org.atriasoft.exml.exception.ExmlException;
import org.atriasoft.exml.model.XmlNode;
import org.junit.jupiter.api.Assertions;
import test.atriasoft.exml.internal.Log;
class ExmlLocal {
// errorPos : -1 : no error , 1 : parsing error, 2 generation error, 3 comparaison error ????
public static void test(final String ref, final String input, final int errorPos) {

View File

@ -3,11 +3,13 @@
* @copyright 2021, Edouard DUPIN, all right reserved
* @license MPL v2.0 (see license file)
*/
package test.atriasoft.exml;
package test.atriasoft.exml.generic;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import test.atriasoft.exml.internal.Log;
public class ExmlTestAll {
@BeforeAll
public static void beforeClass() {

View File

@ -3,7 +3,7 @@
* @copyright 2021, Edouard DUPIN, all right reserved
* @license MPL v2.0 (see license file)
*/
package test.atriasoft.exml;
package test.atriasoft.exml.generic;
import org.atriasoft.exml.Exml;
import org.atriasoft.exml.exception.ExmlAttributeDoesNotExist;
@ -13,6 +13,8 @@ import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import test.atriasoft.exml.internal.Log;
public class ExmlTestAttribute {
@BeforeAll
public static void beforeClass() {

View File

@ -3,7 +3,7 @@
* @copyright 2021, Edouard DUPIN, all right reserved
* @license MPL v2.0 (see license file)
*/
package test.atriasoft.exml;
package test.atriasoft.exml.generic;
import org.atriasoft.exml.Exml;
import org.atriasoft.exml.model.XmlElement;
@ -11,6 +11,8 @@ import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import test.atriasoft.exml.internal.Log;
public class ExmlTestCData {
@BeforeAll
public static void beforeClass() {

View File

@ -3,7 +3,7 @@
* @copyright 2021, Edouard DUPIN, all right reserved
* @license MPL v2.0 (see license file)
*/
package test.atriasoft.exml;
package test.atriasoft.exml.generic;
import org.atriasoft.exml.model.XmlComment;
import org.atriasoft.exml.model.XmlNode;
@ -12,6 +12,8 @@ import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import test.atriasoft.exml.internal.Log;
public class ExmlTestComment {
@BeforeAll
public static void beforeClass() {

View File

@ -3,7 +3,7 @@
* @copyright 2021, Edouard DUPIN, all right reserved
* @license MPL v2.0 (see license file)
*/
package test.atriasoft.exml;
package test.atriasoft.exml.generic;
import org.atriasoft.exml.exception.ExmlAttributeDoesNotExist;
import org.atriasoft.exml.model.XmlDeclaration;
@ -12,6 +12,8 @@ import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import test.atriasoft.exml.internal.Log;
public class ExmlTestDeclarationXML {
@BeforeAll
public static void beforeClass() {

View File

@ -3,7 +3,7 @@
* @copyright 2021, Edouard DUPIN, all right reserved
* @license MPL v2.0 (see license file)
*/
package test.atriasoft.exml;
package test.atriasoft.exml.generic;
import org.atriasoft.exml.Exml;
import org.atriasoft.exml.exception.ExmlNodeDoesNotExist;
@ -14,6 +14,8 @@ import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import test.atriasoft.exml.internal.Log;
public class ExmlTestElement {
@BeforeAll
public static void beforeClass() {

View File

@ -3,11 +3,13 @@
* @copyright 2021, Edouard DUPIN, all right reserved
* @license MPL v2.0 (see license file)
*/
package test.atriasoft.exml;
package test.atriasoft.exml.generic;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import test.atriasoft.exml.internal.Log;
public class ExmlTestParseAttribute {
@BeforeAll
public static void beforeClass() {

View File

@ -3,11 +3,13 @@
* @copyright 2021, Edouard DUPIN, all right reserved
* @license MPL v2.0 (see license file)
*/
package test.atriasoft.exml;
package test.atriasoft.exml.generic;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import test.atriasoft.exml.internal.Log;
public class ExmlTestParseComment {
@BeforeAll
public static void beforeClass() {

View File

@ -3,11 +3,13 @@
* @copyright 2021, Edouard DUPIN, all right reserved
* @license MPL v2.0 (see license file)
*/
package test.atriasoft.exml;
package test.atriasoft.exml.generic;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import test.atriasoft.exml.internal.Log;
public class ExmlTestParseDeclaration {
@BeforeAll
public static void beforeClass() {

View File

@ -3,11 +3,13 @@
* @copyright 2021, Edouard DUPIN, all right reserved
* @license MPL v2.0 (see license file)
*/
package test.atriasoft.exml;
package test.atriasoft.exml.generic;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import test.atriasoft.exml.internal.Log;
public class ExmlTestParseElement {
static String refOutputElement = "<exemple/>";

View File

@ -3,7 +3,7 @@
* @copyright 2021, Edouard DUPIN, all right reserved
* @license MPL v2.0 (see license file)
*/
package test.atriasoft.exml;
package test.atriasoft.exml.internal;
import io.scenarium.logger.LogLevel;
import io.scenarium.logger.Logger;

View File

@ -3,7 +3,7 @@
* @copyright 2021, Edouard DUPIN, all right reserved
* @license MPL v2.0 (see license file)
*/
package test.atriasoft.exml;
package test.atriasoft.exml.introspection;
import java.util.Arrays;
@ -14,12 +14,13 @@ import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import test.atriasoft.exml.introspection.ClassMethodEnum;
import test.atriasoft.exml.introspection.ClassPublicMemberOnly;
import test.atriasoft.exml.introspection.ClassPublicMethodOnly;
import test.atriasoft.exml.introspection.ClassPublicMethodeNode;
import test.atriasoft.exml.introspection.ClassPublicMethodeStructured;
import test.atriasoft.exml.introspection.SimpleEnum;
import test.atriasoft.exml.internal.Log;
import test.atriasoft.exml.introspection.model.ClassMethodEnum;
import test.atriasoft.exml.introspection.model.ClassPublicMemberOnly;
import test.atriasoft.exml.introspection.model.ClassPublicMethodOnly;
import test.atriasoft.exml.introspection.model.ClassPublicMethodeNode;
import test.atriasoft.exml.introspection.model.ClassPublicMethodeStructured;
import test.atriasoft.exml.introspection.model.SimpleEnum;
public class ExmlTestIntrospection {
@BeforeAll

View File

@ -3,7 +3,7 @@
* @copyright 2021, Edouard DUPIN, all right reserved
* @license MPL v2.0 (see license file)
*/
package test.atriasoft.exml;
package test.atriasoft.exml.introspection;
import java.util.List;
@ -14,6 +14,8 @@ import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import test.atriasoft.exml.internal.Log;
public class ExmlTestIntrospectionBoolean {
@AknotDefaultAttribute
public class TestArrayBoolean {

View File

@ -3,7 +3,7 @@
* @copyright 2021, Edouard DUPIN, all right reserved
* @license MPL v2.0 (see license file)
*/
package test.atriasoft.exml;
package test.atriasoft.exml.introspection;
import org.atriasoft.aknot.annotation.AknotDefaultAttribute;
import org.atriasoft.aknot.annotation.AknotList;
@ -12,6 +12,8 @@ import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import test.atriasoft.exml.internal.Log;
public class ExmlTestIntrospectionBooleanNative {
@AknotDefaultAttribute
public class TestArrayBooleanFunc {

View File

@ -3,7 +3,7 @@
* @copyright 2021, Edouard DUPIN, all right reserved
* @license MPL v2.0 (see license file)
*/
package test.atriasoft.exml;
package test.atriasoft.exml.introspection;
import java.util.List;
@ -14,6 +14,8 @@ import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import test.atriasoft.exml.internal.Log;
public class ExmlTestIntrospectionByte {
@AknotDefaultAttribute
public class TestArrayByte {

View File

@ -3,7 +3,7 @@
* @copyright 2021, Edouard DUPIN, all right reserved
* @license MPL v2.0 (see license file)
*/
package test.atriasoft.exml;
package test.atriasoft.exml.introspection;
import org.atriasoft.aknot.annotation.AknotDefaultAttribute;
import org.atriasoft.aknot.annotation.AknotList;
@ -12,6 +12,8 @@ import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import test.atriasoft.exml.internal.Log;
public class ExmlTestIntrospectionByteNative {
@AknotDefaultAttribute
public class TestArrayByteFunc {

View File

@ -3,7 +3,7 @@
* @copyright 2021, Edouard DUPIN, all right reserved
* @license MPL v2.0 (see license file)
*/
package test.atriasoft.exml;
package test.atriasoft.exml.introspection;
import org.atriasoft.aknot.annotation.AknotAttribute;
import org.atriasoft.aknot.annotation.AknotDefaultAttribute;
@ -13,6 +13,8 @@ import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import test.atriasoft.exml.internal.Log;
public class ExmlTestIntrospectionDecoratorAttribute {
@AknotDefaultAttribute
public class TestNodeObject {

View File

@ -3,7 +3,7 @@
* @copyright 2021, Edouard DUPIN, all right reserved
* @license MPL v2.0 (see license file)
*/
package test.atriasoft.exml;
package test.atriasoft.exml.introspection;
import org.atriasoft.aknot.annotation.AknotCaseSensitive;
import org.atriasoft.aknot.annotation.AknotDefaultAttribute;
@ -16,6 +16,8 @@ import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import test.atriasoft.exml.internal.Log;
public class ExmlTestIntrospectionDecoratorCaseSensitive {
@AknotDefaultCaseSensitive
@AknotDefaultAttribute

View File

@ -3,7 +3,7 @@
* @copyright 2021, Edouard DUPIN, all right reserved
* @license MPL v2.0 (see license file)
*/
package test.atriasoft.exml;
package test.atriasoft.exml.introspection;
import org.atriasoft.aknot.annotation.AknotDefaultManaged;
import org.atriasoft.aknot.annotation.AknotManaged;
@ -13,6 +13,8 @@ import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import test.atriasoft.exml.internal.Log;
public class ExmlTestIntrospectionDecoratorManaged {
@AknotDefaultManaged
public class TestNodeObject {

View File

@ -3,7 +3,7 @@
* @copyright 2021, Edouard DUPIN, all right reserved
* @license MPL v2.0 (see license file)
*/
package test.atriasoft.exml;
package test.atriasoft.exml.introspection;
import org.atriasoft.aknot.annotation.AknotAttribute;
import org.atriasoft.aknot.annotation.AknotDefaultAttribute;
@ -13,6 +13,8 @@ import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import test.atriasoft.exml.internal.Log;
public class ExmlTestIntrospectionDecoratorNames {
public class ChangingNames {
private String value1RataPlouf;

View File

@ -3,7 +3,7 @@
* @copyright 2021, Edouard DUPIN, all right reserved
* @license MPL v2.0 (see license file)
*/
package test.atriasoft.exml;
package test.atriasoft.exml.introspection;
import org.atriasoft.aknot.annotation.AknotDefaultOptional;
import org.atriasoft.aknot.annotation.AknotName;
@ -13,6 +13,8 @@ import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import test.atriasoft.exml.internal.Log;
public class ExmlTestIntrospectionDecoratorOptionnal {
@AknotDefaultOptional
public class TestNodeObject {

View File

@ -3,7 +3,7 @@
* @copyright 2021, Edouard DUPIN, all right reserved
* @license MPL v2.0 (see license file)
*/
package test.atriasoft.exml;
package test.atriasoft.exml.introspection;
import java.util.List;
@ -14,6 +14,8 @@ import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import test.atriasoft.exml.internal.Log;
public class ExmlTestIntrospectionDouble {
@AknotDefaultAttribute
public class TestArrayDouble {

View File

@ -3,7 +3,7 @@
* @copyright 2021, Edouard DUPIN, all right reserved
* @license MPL v2.0 (see license file)
*/
package test.atriasoft.exml;
package test.atriasoft.exml.introspection;
import org.atriasoft.aknot.annotation.AknotDefaultAttribute;
import org.atriasoft.aknot.annotation.AknotList;
@ -12,6 +12,8 @@ import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import test.atriasoft.exml.internal.Log;
public class ExmlTestIntrospectionDoubleNative {
@AknotDefaultAttribute
public class TestArrayDoubleFunc {

View File

@ -3,7 +3,7 @@
* @copyright 2021, Edouard DUPIN, all right reserved
* @license MPL v2.0 (see license file)
*/
package test.atriasoft.exml;
package test.atriasoft.exml.introspection;
import java.util.List;
@ -14,6 +14,8 @@ import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import test.atriasoft.exml.internal.Log;
public class ExmlTestIntrospectionEnum {
@AknotDefaultAttribute
public class TestArrayEnum {

View File

@ -3,7 +3,7 @@
* @copyright 2021, Edouard DUPIN, all right reserved
* @license MPL v2.0 (see license file)
*/
package test.atriasoft.exml;
package test.atriasoft.exml.introspection;
import java.util.List;
@ -14,6 +14,8 @@ import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import test.atriasoft.exml.internal.Log;
public class ExmlTestIntrospectionFloat {
@AknotDefaultAttribute
public class TestArrayFloat {

View File

@ -3,7 +3,7 @@
* @copyright 2021, Edouard DUPIN, all right reserved
* @license MPL v2.0 (see license file)
*/
package test.atriasoft.exml;
package test.atriasoft.exml.introspection;
import org.atriasoft.aknot.annotation.AknotDefaultAttribute;
import org.atriasoft.aknot.annotation.AknotList;
@ -12,6 +12,8 @@ import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import test.atriasoft.exml.internal.Log;
public class ExmlTestIntrospectionFloatNative {
@AknotDefaultAttribute
public class TestArrayFloatFunc {

View File

@ -3,7 +3,7 @@
* @copyright 2021, Edouard DUPIN, all right reserved
* @license MPL v2.0 (see license file)
*/
package test.atriasoft.exml;
package test.atriasoft.exml.introspection;
import org.atriasoft.exml.XmlMapper;
import org.atriasoft.exml.exception.ExmlException;
@ -12,9 +12,10 @@ import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import test.atriasoft.exml.introspection.ClassPublicMemberOnly;
import test.atriasoft.exml.introspection.ClassPublicMethodOnly;
import test.atriasoft.exml.introspection.ClassPublicMethodeNode;
import test.atriasoft.exml.internal.Log;
import test.atriasoft.exml.introspection.model.ClassPublicMemberOnly;
import test.atriasoft.exml.introspection.model.ClassPublicMethodOnly;
import test.atriasoft.exml.introspection.model.ClassPublicMethodeNode;
public class ExmlTestIntrospectionGenerate {
private static final String NODE_NAME = "elem";

View File

@ -3,7 +3,7 @@
* @copyright 2021, Edouard DUPIN, all right reserved
* @license MPL v2.0 (see license file)
*/
package test.atriasoft.exml;
package test.atriasoft.exml.introspection;
import java.util.List;
@ -14,6 +14,8 @@ import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import test.atriasoft.exml.internal.Log;
public class ExmlTestIntrospectionInteger {
@AknotDefaultAttribute
public class TestArrayInteger {

View File

@ -3,7 +3,7 @@
* @copyright 2021, Edouard DUPIN, all right reserved
* @license MPL v2.0 (see license file)
*/
package test.atriasoft.exml;
package test.atriasoft.exml.introspection;
import org.atriasoft.aknot.annotation.AknotDefaultAttribute;
import org.atriasoft.aknot.annotation.AknotList;
@ -12,6 +12,8 @@ import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import test.atriasoft.exml.internal.Log;
public class ExmlTestIntrospectionIntegerNative {
@AknotDefaultAttribute
public class TestArrayIntegerFunc {

View File

@ -3,7 +3,7 @@
* @copyright 2021, Edouard DUPIN, all right reserved
* @license MPL v2.0 (see license file)
*/
package test.atriasoft.exml;
package test.atriasoft.exml.introspection;
import java.util.List;
@ -14,6 +14,8 @@ import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import test.atriasoft.exml.internal.Log;
public class ExmlTestIntrospectionObject {
public class SimpleObject {
@AknotAttribute

View File

@ -3,7 +3,7 @@
* @copyright 2021, Edouard DUPIN, all right reserved
* @license MPL v2.0 (see license file)
*/
package test.atriasoft.exml;
package test.atriasoft.exml.introspection;
import org.atriasoft.aknot.annotation.AknotAttribute;
import org.atriasoft.aknot.annotation.AknotName;
@ -12,6 +12,8 @@ import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import test.atriasoft.exml.internal.Log;
public class ExmlTestIntrospectionObjectConstructor {
public class TestConstructorSpecific {
@AknotAttribute

View File

@ -3,7 +3,7 @@
* @copyright 2021, Edouard DUPIN, all right reserved
* @license MPL v2.0 (see license file)
*/
package test.atriasoft.exml;
package test.atriasoft.exml.introspection;
import org.atriasoft.aknot.annotation.AknotAttribute;
import org.atriasoft.aknot.annotation.AknotName;
@ -12,6 +12,8 @@ import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import test.atriasoft.exml.internal.Log;
public class ExmlTestIntrospectionRecord {
public record TestRecord(
@AknotName("valueA") Integer valueA,

View File

@ -3,7 +3,7 @@
* @copyright 2021, Edouard DUPIN, all right reserved
* @license MPL v2.0 (see license file)
*/
package test.atriasoft.exml;
package test.atriasoft.exml.introspection;
import java.util.List;
@ -14,6 +14,8 @@ import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import test.atriasoft.exml.internal.Log;
public class ExmlTestIntrospectionShort {
public class TestArrayNodeShort {
public Short[] values;

View File

@ -3,7 +3,7 @@
* @copyright 2021, Edouard DUPIN, all right reserved
* @license MPL v2.0 (see license file)
*/
package test.atriasoft.exml;
package test.atriasoft.exml.introspection;
import org.atriasoft.aknot.annotation.AknotDefaultAttribute;
import org.atriasoft.aknot.annotation.AknotList;
@ -12,6 +12,8 @@ import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import test.atriasoft.exml.internal.Log;
public class ExmlTestIntrospectionShortNative {
public class TestArrayNodeShortFunc {
private short[] values;

View File

@ -1,4 +1,4 @@
package test.atriasoft.exml.introspection;
package test.atriasoft.exml.introspection.model;
import org.atriasoft.aknot.annotation.AknotDefaultManaged;

View File

@ -1,4 +1,4 @@
package test.atriasoft.exml.introspection;
package test.atriasoft.exml.introspection.model;
import org.atriasoft.aknot.annotation.AknotName;

View File

@ -1,4 +1,4 @@
package test.atriasoft.exml.introspection;
package test.atriasoft.exml.introspection.model;
import org.atriasoft.aknot.annotation.AknotDefaultAttribute;
import org.atriasoft.aknot.annotation.AknotName;

View File

@ -1,4 +1,4 @@
package test.atriasoft.exml.introspection;
package test.atriasoft.exml.introspection.model;
import org.atriasoft.aknot.annotation.AknotDefaultAttribute;
import org.atriasoft.aknot.annotation.AknotName;

View File

@ -1,4 +1,4 @@
package test.atriasoft.exml.introspection;
package test.atriasoft.exml.introspection.model;
import java.util.List;

View File

@ -1,4 +1,4 @@
package test.atriasoft.exml.introspection;
package test.atriasoft.exml.introspection.model;
import java.util.List;

View File

@ -1,4 +1,4 @@
package test.atriasoft.exml.introspection;
package test.atriasoft.exml.introspection.model;
public enum SimpleEnum {
PLIF,