{"id":15044036,"url":"https://github.com/fluentcodes/elasticobjects","last_synced_at":"2026-01-02T04:35:27.859Z","repository":{"id":38617274,"uuid":"153377625","full_name":"fluentcodes/elasticobjects","owner":"fluentcodes","description":"A java framework using typed JSON for looseless communication of composed objects by one generic endpoint. Functionality is provided by special call objects with a generic execute method. Predefined generic calls for files, JSON, Excel, CSV, databases or templates. Compared with todays RPC its a \"Remote Object Call\" (ROC) architecture.","archived":false,"fork":false,"pushed_at":"2023-05-26T22:12:32.000Z","size":70892,"stargazers_count":0,"open_issues_count":7,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-20T13:23:28.554Z","etag":null,"topics":["csv","database","excel","hacktoberfest","hacktoberfest2020","java-8","json","low-code","templates"],"latest_commit_sha":null,"homepage":"http://www.elasticobjects.org","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fluentcodes.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-10-17T01:30:01.000Z","updated_at":"2022-01-07T08:46:38.000Z","dependencies_parsed_at":"2024-11-19T10:59:59.550Z","dependency_job_id":null,"html_url":"https://github.com/fluentcodes/elasticobjects","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fluentcodes%2Felasticobjects","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fluentcodes%2Felasticobjects/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fluentcodes%2Felasticobjects/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fluentcodes%2Felasticobjects/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fluentcodes","download_url":"https://codeload.github.com/fluentcodes/elasticobjects/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243451606,"owners_count":20293168,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["csv","database","excel","hacktoberfest","hacktoberfest2020","java-8","json","low-code","templates"],"created_at":"2024-09-24T20:49:59.209Z","updated_at":"2026-01-02T04:35:27.821Z","avatar_url":"https://github.com/fluentcodes.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Open Source Helpers](https://www.codetriage.com/fluentcodes/elasticobjects/badges/users.svg)](https://www.codetriage.com/fluentcodes/elasticobjects)\n\n\u003e [elasticobjects.org](https://www.elasticobjects.org/examples/ExamplesStart.html) provide a detailed documentation with interactive examples build by template calls. The sources you find in  [example-springboot](example-springboot).\n\n# (EO) Elastic Objects\n\nElastic Objects is a tiny layer offering path access methods to any java object tree.\n\u003cp\u003e\nThe access\nto underlying\njava objects is mediated by key and\n\u003cstrong\u003estrict object configurations\u003c/strong\u003e defined by\n\u003cnobreak\u003e\u003ca href=\"elastic-objects/src/main/resources/ModelConfig.json\"\u003e \u003cimg src=\"example-springboot/src/main/resources/static/pics/github.png\" height=\"12\" width=\"12\" \" style=\"margin:0px 4px 0px 6px;\"/\u003e\u0026nbsp;ModelConfig.json\u003c/a\u003e\u003c/nobreak\u003e\nand\n\u003cnobreak\u003e\u003ca href=\"elastic-objects/src/main/resources/FieldConfig.json\"\u003e \u003cimg src=\"example-springboot/src/main/resources/static/pics/github.png\" height=\"12\" width=\"12\" \" style=\"margin:0px 4px 0px 6px;\"/\u003e\u0026nbsp;FieldConfig.json\u003c/a\u003e\u003c/nobreak\u003e\nin the class path. The configurations become first class citizen to determine type in an object tree.\n\u003c/p\u003e\n\u003cp\u003e\nEmbedded\n \u003cnobreak\u003e\u003ca href=\"elastic-objects/src/main/java/org/fluentcodes/projects/elasticobjects/calls/Call.java\"\u003e \u003cimg src=\"example-springboot/src/main/resources/static/pics/github.png\" height=\"12\" width=\"12\" \" style=\"margin:0px 4px 0px 6px;\"/\u003e\u0026nbsp;Call\u003c/a\u003e\u003c/nobreak\u003e\nobjects could manipulate the object tree with a generic execute method.\nIt's a \"Remote Object Call\" (ROC) architecture instead of RPC concepts.\n\u003c/p\u003e\n\nWith the configuration key embedded in json the serialization/deserialization allows\ntypesafe communication between computers without endpoints or web frameworks.\nEmbedded in arbitrary text it could initiate complex workflows or compose complex text.\n\n## Core (elastic-objects)\n### elastic-objects Module\nThe [core](elastic-objects) has actually no dependencies beside Log4j and is rather small with a jar size of approximately 90 KB.\n\n    \u003cdependency\u003e\n        \u003cgroupId\u003eorg.fluentcodes.projects.elasticobjects\u003c/groupId\u003e\n        \u003cartifactId\u003eelastic-objects\u003c/artifactId\u003e\n        \u003cversion\u003e0.9.4\u003c/version\u003e\n    \u003c/dependency\u003e\n\n\u003cdiv align=\"right\" id=\"mvn\"\u003e\n\u003ca href=\"https://mvnrepository.com/artifact/org.fluentcodes.projects.elasticobjects/elastic-objects\"\u003emvn repository\u003c/a\u003e\u003c/div\u003e\n\n### elastic-objects Examples\n\u003cp\u003e\nThe following examples you find in\n\u003cnobreak\u003e\u003ca href=\"elastic-objects-test/src/test/java/org/fluentcodes/projects/elasticobjects/documentation/EOReadmeTest.java\"\u003e \u003cimg src=\"example-springboot/src/main/resources/static/pics/github.png\" height=\"12\" width=\"12\" \" style=\"margin:0px 4px 0px 6px;\"/\u003e\u0026nbsp;EOReadmeTest\u003c/a\u003e\u003c/nobreak\u003e\nas runnable tests.\nThe test object is\n\u003cnobreak\u003e\u003ca href=\"elastic-objects-test/src/main/java/org/fluentcodes/projects/elasticobjects/domain/test/AnObject.java\"\u003e \u003cimg src=\"example-springboot/src/main/resources/static/pics/github.png\" height=\"12\" width=\"12\" \" style=\"margin:0px 4px 0px 6px;\"/\u003e\u0026nbsp;AnObject\u003c/a\u003e\u003c/nobreak\u003e.\n\u003c/p\u003e\n\n#### Get and Set\n\nSome get and set operations.\n\n    EoRoot root = EoRoot.ofValue(CONFIG_MAPS, new AnObject());\n    EOInterfaceScalar child = root.set(\"test\", \"myAnObject\", \"myString\");\n    \n    assertEquals(\"test\", root.get(\"myAnObject\", \"myString\"));\n    assertEquals(\"test\", child.get());\n\n#### Underlying Object\n\u003cp\u003e\nThe set method changes the value of  \n\u003cnobreak\u003e\u003ca href=\"elastic-objects-test/src/main/java/org/fluentcodes/projects/elasticobjects/domain/test/AnObject.java\"\u003e \u003cimg src=\"example-springboot/src/main/resources/static/pics/github.png\" height=\"12\" width=\"12\" \" style=\"margin:0px 4px 0px 6px;\"/\u003e\u0026nbsp;AnObject\u003c/a\u003e\u003c/nobreak\u003e\nvia its\n\u003ca href=\"https://elasticobjects.org/config/ModelConfig/AnObject\"\u003e≡AnObject\u003c/a\u003e configuration :\n\u003c/p\u003e\n\n    EoRoot root = EoRoot.ofValue(CONFIG_MAPS, new AnObject());\n    root.set(\"test\", \"myAnObject\", \"myString\");\n    \n    AnObject anObject = (AnObject) root.get();\n    assertEquals(\"test\", anObject.getMyAnObject().getMyString());    \n\n#### String Path Representation\n\nFor all accessors one can use a path string with a \"/\" delimiter like in a file system. Again we set\nthe value *test* in the fields [≡AnObject](https://elasticobjects.org/config/ModelConfig/AnObject) and [≡myString](https://elasticobjects.org/config/FieldConfig/myString).\n\n\n    EoRoot root = EoRoot.ofValue(CONFIG_MAPS, new AnObject());\n    EOInterfaceScalar child = root.set(\"test\", \"myAnObject/myString\");\n    \n    assertEquals(\"test\", root.get(\"myAnObject/myString\"));\n    assertEquals(\"test\", child.get());\n\n#### Remove child\n\nOne can remove a branch from the object tree in a path way.\n\n    EoRoot root = EoRoot.ofValue(CONFIG_MAPS, new AnObject());\n    EOInterfaceScalar child = root.set(\"test\", \"myAnObject/myString\");\n    \n    EO parent = child.remove();\n    assertFalse(parent.hasEo(\"myString\"));\n    \n    AnObject parentObject = (AnObject) parent.get();\n    assertNull(parentObject.getMyString());    \n\n#### Field Length Restrictions\n\nThe field configuration [≡myString](https://elasticobjects.org/config/FieldConfig/myString) has a max size of 20. It will be checked when setting a value. In this example the value *test01234567890123456789* has the length 24 and produce an exception.\n\n    EoRoot root = EoRoot.ofClass(CONFIG_MAPS, AnObject.class);\n    assertEquals(AnObject.class, root.getModelClass());\n    Assertions.assertThatThrownBy(\n            ()-\u003e{root.set(\"test01234567890123456789\", \"myString\");})\n            .isInstanceOf(EoException.class)\n            .hasMessageContaining(\"Problem creating child at '/' with key 'myString' with value 'test01234567890123456789' with message String value for field 'test01234567890123456789' has size 24 bigger than max length 20.\");\n\nInteractive example: https://www.elasticobjects.org/examples/AnObjectTooLong.html.\n\n#### Restrictions to a Map\n\u003cp\u003e\nIt's possible to add field configurations with a Map as underlying object. In\n\u003cnobreak\u003e\u003ca href=\"elastic-objects-test/src/main/resources/ModelConfig.json\"\u003e \u003cimg src=\"example-springboot/src/main/resources/static/pics/github.png\" height=\"12\" width=\"12\" \" style=\"margin:0px 4px 0px 6px;\"/\u003e\u0026nbsp;ModelConfig.json\u003c/a\u003e\u003c/nobreak\u003e\nthe configuration of\n\u003ca href=\"https://elasticobjects.org/config/ModelConfig/AnObjectMap\"\u003e≡AnObjectMap\u003c/a\u003e\nhas the field definition\n\u003ca href=\"https://elasticobjects.org/config/FieldConfig/myString\"\u003e≡myString\u003c/a\u003e.\nThis will be checked within\n\u003cnobreak\u003e\u003ca href=\"elastic-objects/src/main/java/org/fluentcodes/projects/elasticobjects/models/ModelConfigMap.java\"\u003e \u003cimg src=\"example-springboot/src/main/resources/static/pics/github.png\" height=\"12\" width=\"12\" \" style=\"margin:0px 4px 0px 6px;\"/\u003e\u0026nbsp;ModelConfigMap\u003c/a\u003e\u003c/nobreak\u003e\n\u003c/p\u003e.\n\nHere the previous example with \"AnObjectMap\":\n\n    EoRoot root = EoRoot.ofClassName(CONFIG_MAPS, \"AnObjectMap\");\n    assertEquals(LinkedHashMap.class.getSimpleName(), root.get().getClass().getSimpleName());\n    Assertions.assertThatThrownBy(\n            ()-\u003e{root.set(\"test01234567890123456789\", \"myString\");})\n            .isInstanceOf(EoException.class)\n                .hasMessageContaining(\"Problem creating child at '/' with key 'myString' with value 'test01234567890123456789' with message String value for field 'test01234567890123456789' has size 24 bigger than max length 20.\");\n\nInteractive example: https://www.elasticobjects.org/examples/AnObjectMapTooLong.html.\n\n##### Field does not exist\n\nWhen field definition are set, also names will be checked:\n\n    EoRoot root = EoRoot.ofClassName(CONFIG_MAPS, \"AnObjectMap\");\n    Assertions.assertThatThrownBy(\n            ()-\u003e{root.set(\"test\", \"notValid\");})\n            .isInstanceOf(EoException.class)\n            .hasMessageContaining(\"Problem creating child at '/' with key 'notValid' with value 'test' with message No field defined for 'notValid'.\");\n\nInteractive example: https://www.elasticobjects.org/examples/AnObjectMapFieldNotExists.html.\n\n#### Typed JSON\n\nThe default json representation contains keys of the model configuration [≡AnObject](https://elasticobjects.org/config/ModelConfig/AnObject):\n\n        EoRoot root = EoRoot.ofValue(CONFIG_MAPS, new AnObject());\n        EOInterfaceScalar child = root.set(\"test\", \"myAnObject\", \"myString\");\n        assertEquals(\"{\\n\" +\n                \"  \\\"_rootmodel\\\": \\\"AnObject\\\",\\n\" +\n                \"  \\\"(AnObject)myAnObject\\\": {\\n\" +\n                \"    \\\"myString\\\": \\\"test\\\"\\n\" +\n                \"  }\\n\" +\n                \"}\", root.toJson());\n\n\n#### From JSON\n\nThis typed json will mapped to the appropriate object class when deserialized:\n\n        EoRoot root = EoRoot.ofValue(CONFIG_MAPS, new AnObject());\n        root.set(\"test\", \"myAnObject\", \"myString\");\n        String json = root.toJson();      \n         \n        EoRoot rootFromJson = EoRoot.ofValue(CONFIG_MAPS, json);       \n        assertEquals(AnObject.class, rootFromJson.get().getClass());\n        \n        AnObject myAnObject = (AnObject)rootFromJson.get();\n        assertEquals(\"test\", myAnObject.getMyAnObject().getMyString());\n\nInteractive example: https://www.elasticobjects.org/examples/AnObjectTyped.html.\n\n#### Clone\nWhen a java object is mapped to EO the underlying object is a clone with the same structure and leaf values.\n\n    final AnObject anObject = new AnObject();\n    anObject.setMyString(\"value1\");\n\n    final EoRoot rootMap = EoRoot.ofValue(CONFIG_MAPS, anObject);\n    final AnObject cloned = (AnObject) rootMap.get();\n\n    assertNotEquals(anObject, cloned);\n    assertEquals(anObject.getMyString(), cloned.getMyString());\n\n#### Transform\nOne can easily transform an object to another type, when the target object has the same fields. The following example  \ncreates a Map from AnObject:\n\n    final AnObject anObject = new AnObject();\n    anObject.setMyString(\"value2\");\n\n    final EoRoot rootMap = EoRoot.ofClass(CONFIG_MAPS, anObject, Map.class);\n    final Map transformed = (Map) rootMap.get();\n\n    assertEquals(anObject.getMyString(), transformed.get(\"myString\"));\n\n#### Non Mapped values\nEvery field key starting with underscore will not be mapped to the parent object.\n\n    final String json = \"{\\\"myString\\\":\\\"test\\\", \\\"_comment\\\":\\\"FieldNames with underscore will not set in parent object.\\\"}\";\n\n    final EoRoot root = EoRoot.ofClass(CONFIG_MAPS, json, AnObject.class);\n\n    assertEquals(\"FieldNames with underscore will not set in parent object.\", root.get(\"_comment\"));\n    assertEquals(\"{\\n\" +\n            \"  \\\"myString\\\": \\\"test\\\"\\n\" +\n            \"}\", root.toJson(JSONSerializationType.STANDARD));\n\nInteractive example: https://www.elasticobjects.org/examples/Comment.html.\n\n## Calls (eo-calls)\n### eo-calls Module\nThe [calls](eo-calls) module with a jar size of about 150 KB offers some basic calls also using configurations with a role permission concept for\nfiles and directories\nsimple csv\nor templates.\n\n    \u003cdependency\u003e\n        \u003cgroupId\u003eorg.fluentcodes.projects.elasticobjects\u003c/groupId\u003e\n        \u003cartifactId\u003eeo-calls\u003c/artifactId\u003e\n        \u003cversion\u003e0.9.2\u003c/version\u003e\n    \u003c/dependency\u003e\n\n  \u003cdiv align=\"right\" style=\"font-size:9px\"\u003e\n\n\u003ca href=\"https://mvnrepository.com/artifact/org.fluentcodes.projects.elasticobjects/eo-calls\"\u003emvn repository\u003c/font\u003e\u003c/a\u003e\u003c/div\u003e\n\n\n### eo-calls Examples\n\u003cp\u003e\nThe call classes implementing the\n\u003cnobreak\u003e\u003ca href=\"eo-calls/src/test/java/org/fluentcodes/projects/elasticobjects/calls/Call.java\"\u003e \u003cimg src=\"example-springboot/src/main/resources/static/pics/github.png\" height=\"12\" width=\"12\" \" style=\"margin:0px 4px 0px 6px;\"/\u003e\u0026nbsp;Call\u003c/a\u003e\u003c/nobreak\u003e\ninterface offer functionality. A bunch of calls including file access or\ntemplates you find in\n\u003cnobreak\u003e\u003ca href=\"eo-calls/src/main/java/org/fluentcodes/projects/elasticobjects/calls\"\u003e \u003cimg src=\"example-springboot/src/main/resources/static/pics/github.png\" height=\"12\" width=\"12\" \" style=\"margin:0px 4px 0px 6px;\"/\u003e\u0026nbsp;eo-calls\u003c/a\u003e\u003c/nobreak\u003e.\n\u003c/p\u003e\n\n\u003cp\u003e\n The following examples using\n \u003cnobreak\u003e\u003ca\n href=\"eo-calls/src/main/java/org/fluentcodes/projects/elasticobjects/values/SinusValueCall.java\"\u003e \u003cimg\n src=\"example-springboot/src/main/resources/static/pics/github.png\" height=\"12\" width=\"12\" \" style=\"margin:0px 4px 0px 6px;\"\n /\u003e\u0026nbsp;SinusValueCall\u003c/a\u003e\u003c/nobreak\u003e\nare found in\n\u003cnobreak\u003e\u003ca href=\"eo-calls/src/test/java/org/fluentcodes/projects/elasticobjects/documentation/EOReadmeTest.java\"\u003e \u003cimg src=\"example-springboot/src/main/resources/static/pics/github.png\" height=\"12\" width=\"12\" \" style=\"margin:0px 4px 0px 6px;\"/\u003e\u0026nbsp;EOReadmeTest\u003c/a\u003e\u003c/nobreak\u003e.\n\u003c/p\u003e\n\n#### Java Example\n\n\u003cp\u003e\nThe generic execute method has EO as input.\nHere we set the field key \"squareDegree\" to 2.1 and directly call\n \u003cnobreak\u003e\u003ca\n href=\"eo-calls/src/main/java/org/fluentcodes/projects/elasticobjects/calls/values/SinusValueCall.java\"\u003e \u003cimg\n src=\"example-springboot/src/main/resources/static/pics/github.png\" height=\"12\" width=\"12\" \" style=\"margin:0px 4px 0px 6px;\"\n /\u003e\u0026nbsp;SinusValueCall\u003c/a\u003e\u003c/nobreak\u003e.\n\u003c/p\u003e\n\n        final Call call = new SinusValueCall();\n        EoRoot root = EoRoot.ofValue(CONFIG_MAPS, new HashMap());\n        EOInterfaceScalar child = root.set(2.1, \"squareDegree\");\n        assertEquals(2.1, child.get());\n\n        assertEquals(Double.valueOf(0.8632093666488737), call.execute(child));\n\n#### JSON Example\n\nThis call could be also embedded in some arbitrary json using the [≡sourcePath](https://www.elasticobjects.org/config/FieldConfig/sourcePath) as input. The result will stored to the [≡targetPath](https://www.elasticobjects.org/config/FieldConfig/targetPath) \"sinusValue\".\n\n        EoRoot root = EoRoot.ofValue(CONFIG_MAPS, \"{\\n\" +\n                \"  \\\"(Double)squareDegree\\\":1,\\n\" +\n                \"  \\\"(SinusValueCall)sinusValue\\\": {\\n\" +\n                \"    \\\"sourcePath\\\": \\\"/squareDegree\\\"\\n\" +\n                \"  }\\n\" +\n                \"}\");\n        root.execute();\n        assertEquals(\"{\\n\" +\n                \"  \\\"squareDegree\\\": 1.0,\\n\" +\n                \"  \\\"sinusValue\\\": 0.8414709848078965\\n\" +\n                \"}\", root.toJson(JSONSerializationType.STANDARD));\n\nInteractive example: https://www.elasticobjects.org/examples/SinusValueCall.html.\n\n#### Template Example\n\nThis json will be interpreted in an arbitrary text file via template call with the \"@{...}\" pattern. Here the target _asString will return the result to the template instead of setting the target in json.\n\n        EoRoot root = EoRoot.of(CONFIG_MAPS);\n        String template = \"START - @{\\n\" +\n                \"  \\\"(Double)source\\\":1,\\n\" +\n                \"  \\\"(SinusValueCall)_asString\\\": {\\n\" +\n                \"    \\\"sourcePath\\\": \\\"/source\\\"\\n\" +\n                \"  }\\n\" +\n                \"}. - END\";\n        Call call = new TemplateCall(template);\n        assertEquals(\"START -0.8414709848078965 - END\", call.execute(root));\n\nInteractive example: https://www.elasticobjects.org/examples/SinusValueCallTemplate.html.\n\n##### Other Template forms\nCalls could be included in an attribute and command form. This will be demonstrated by the following examples:\n* https://www.elasticobjects.org/examples/SinusValueCallCommandTemplate.html\n* https://www.elasticobjects.org/examples/SinusValueCallAttributeTemplate.html\n\n#### Files\nhttp://localhost:8080/examples/FileCall.html\nhttp://localhost:8080/examples/JsonCall.html\n\n#### Templates\nInteractive Examples: http://localhost:8080/examples/TemplateExamples.html\n\n## Csv (eo-csv)\n[eo-csv](eo-csv) offers calls and configurations for reading and writing csv files  using [OpenCsv](https://mvnrepository.com/artifact/com.opencsv/opencsv).\n\n    \u003cdependency\u003e\n        \u003cgroupId\u003eorg.fluentcodes.projects.elasticobjects\u003c/groupId\u003e\n        \u003cartifactId\u003eeo-csv\u003c/artifactId\u003e\n        \u003cversion\u003e0.9.4\u003c/version\u003e\n    \u003c/dependency\u003e\n\n\u003cdiv align=\"right\" style=\"font-size:9px\"\u003e\n\u003ca href=\"https://mvnrepository.com/artifact/org.fluentcodes.projects.elasticobjects/eo-csv\"\u003emvn repository\u003c/a\u003e\n\u003c/div\u003e\n\nInteractive examples: http://localhost:8080/examples/ListCall.html\n\n## Database (eo-db)\n[eo-db](eo-db)\nis experimental providing the execution of sql configurations as list or as query.\n\n    \u003cdependency\u003e\n        \u003cgroupId\u003eorg.fluentcodes.projects.elasticobjects\u003c/groupId\u003e\n        \u003cartifactId\u003eeo-db\u003c/artifactId\u003e\n        \u003cversion\u003e0.9.4\u003c/version\u003e\n    \u003c/dependency\u003e\n\n\u003cdiv align=\"right\"\u003e\n\u003ca href=\"https://mvnrepository.com/artifact/org.fluentcodes.projects.elasticobjects/eo-db\" style=\"font-size:9px;\"\u003emvn repository\u003c/font\u003e\u003c/a\u003e\u003c/div\u003e\n\nInteractive examples: https://www.elasticobjects.org/examples/DbCall.html.\n\n## Excel (eo-xlsx)\n[eo-xlsx](eo-xlsx) offers calls and configurations for reading and writing xlsx files using [Apache POI](https://mvnrepository.com/artifact/org.apache.poi/poi).\n\n    \u003cdependency\u003e\n        \u003cgroupId\u003eorg.fluentcodes.projects.elasticobjects\u003c/groupId\u003e\n        \u003cartifactId\u003eeo-xlsx\u003c/artifactId\u003e\n        \u003cversion\u003e0.9.4\u003c/version\u003e\n    \u003c/dependency\u003e\n\nInteractive examples: http://localhost:8080/examples/ExcelCall.html\n\n## Other Modules\n### elastic-objects-test\n[elastic-objects-test](elastic-objects-test) provide tests for the [elastic-objects](elastic-objects) module.  The main package providing test helper and test objects to other modules.\n\nSince it has just test purposes there is actual no package on [mvn central](https://mvnrepository.com/artifact/org.fluentcodes.projects.elasticobjects/).\n\n### examples-springboot\n[examples-springboot](example-springboot)\nare the sources for the spring boot web example on\n[http://www.elasticobjects.org](http://www.elasticobjects.org).\n\nSince it has just demo purposes there is actual no package on [mvn central](https://mvnrepository.com/artifact/org.fluentcodes.projects.elasticobjects/).\n\n## Background\n\n### Elastic Objects\n\u003cp\u003e\n    Elastic Objects is a generic object wrapper skin\n    with \u003cstrong\u003etyped\u003c/strong\u003e path methods to an java object skeleton.\n    Typed objects are embedded in an untyped map structure.\n\u003c/p\u003e\n\u003cimg src=\"example-springboot/src/main/resources/static/pics/eoTree.svg\" width=\"200\" style=\"margin:20px;\"/\u003e\n\n\u003cp\u003e\nSome code examples you will find in \u003ca href=\"http://elasticobjects.org/eo/EO.html\"\u003ehttp://elasticobjects.org/eo/EO.html\u003c/a\u003e.\n\u003c/p\u003e\n\n### Model Configurations\n\nFor the access to the embedded java objects EO\n    is provided by preloaded \u003ca href=\"http://elasticobjects.org/configs/ModelConfig.html\"\u003emodel configurations\u003c/a\u003e in JSON.\n\u003c/p\u003e\n\u003cimg src=\"example-springboot/src/main/resources/static/pics/eoModel.svg\" width=\"200\" style=\"margin:20px;\"/\u003e\n\n### Call Types\n\u003cp\u003eA special\n\u003cnobreak\u003e\u003ca target=\"github\" href=\"elastic-objects/src/main/java/org/fluentcodes/projects/elasticobjects/calls/Call.java\"\u003e \u003cimg src=\"example-springboot/src/main/resources/static/pics/github.png\" height=\"12\" width=\"12\" \" style=\"margin:0px 4px 0px 6px;\"/\u003eCall\u003c/a\u003e\n bean with a\n    generic execution method offers \u003cstrong\u003efunctionality\u003c/strong\u003e. Its has the following important fields: \u003c/p\u003e\n\n\u003cul\u003e\n    \u003cli\u003e\n\u003ca href=\"http://elasticobjects.org/config/FieldConfig/sourcePath\"\u003e≡sourcePath\u003c/a\u003e\n for the location of the input\u003c/li\u003e\n    \u003cli\u003e\n\u003ca href=\"http://elasticobjects.org/config/FieldConfig/targetPath\"\u003e≡targetPath\u003c/a\u003e\n for storing the output\u003c/li\u003e\n    \u003cli\u003e\n\u003ca href=\"http://elasticobjects.org/config/FieldConfig/condition\"\u003e≡condition\u003c/a\u003e\n\u003c/li\u003e\n\u003c/ul\u003e\n\u003cimg src=\"example-springboot/src/main/resources/static/pics/eoCall.svg\" width=\"200\" style=\"margin:20px;\"/\u003e\n\n\u003c!--###  A CSV Example\n\n\u003cp\u003e\nThis example is executable on\n\u003ca href=\"https://www.elasticobjects.org/Home.html#templateResourceCallHtml\"\u003eelasticobjects.org\u003c/a\u003e.\n\u003c/p\u003e\n\n    {\n    \"data\": {\n        \"(CsvSimpleReadCall)csv\":{\n             \"configKey\"=\"AnObject.csv\"\n        },\n        \"(TemplateResourceCall)abc\":{\n            \"configKey\":\"table.tpl\",\n            \"sourcePath\":\"/data/csv\",\n            \"targetPath\":\"/_asTemplate\"\n        }\n    },\n    \"asTemplate\":true\n    }\n\n\n### Elements\n\n\u003cul\u003e\n    \u003cli\u003e\n\u003cnobreak\u003e\u003ca target=\"github\" href=\"elastic-objects/src/main/java/org/fluentcodes/projects/elasticobjects/calls/lists/CsvSimpleReadCall.java\"\u003e \u003cimg src=\"example-springboot/src/main/resources/static/pics/github.png\" height=\"12\" width=\"12\" \" style=\"margin:0px 4px 0px 6px;\"/\u003eCsvSimpleReadCall\u003c/a\u003e\n reads\n\u003cnobreak\u003e\u003ca target=\"github\" href=\"elastic-objects-test/src/main/resources/input/assets/bt/AnObject.csv\"\u003e \u003cimg src=\"example-springboot/src/main/resources/static/pics/github.png\" height=\"12\" width=\"12\" \" style=\"margin:0px 4px 0px 6px;\"/\u003eAnObject.csv\u003c/a\u003e\n and store it under the path \"/data/csv\"\u003c/li\u003e\n    \u003cli\u003e\n\u003cnobreak\u003e\u003ca target=\"github\" href=\"elastic-objects/src/main/java/org/fluentcodes/projects/elasticobjects/calls/templates/TemplateResourceCall.java\"\u003e \u003cimg src=\"example-springboot/src/main/resources/static/pics/github.png\" height=\"12\" width=\"12\" \" style=\"margin:0px 4px 0px 6px;\"/\u003eTemplateResourceCall\u003c/a\u003e\n use /data/csv as input\n\u003cnobreak\u003e\u003ca target=\"github\" href=\"example-springboot/src/main/resources/templates/table.tpl\"\u003e \u003cimg src=\"example-springboot/src/main/resources/static/pics/github.png\" height=\"12\" width=\"12\" \" style=\"margin:0px 4px 0px 6px;\"/\u003etable.tpl\u003c/a\u003e\n and store it under the path \"_asTemplate\"\u003c/li\u003e\n\u003c/ul\u003e\n\u003ca href=\"http://elasticobjects.org/config/ModelConfig/TemplateResourceCall\"\u003e≡TemplateResourceCall\u003c/a\u003e\n is part of the core module.\n    Templates are just files with certain placeholders .\n\u003c/p\u003e\n\n\n\n\n\n### Sending Template\n\n\u003cp\u003e\n    The following example is executable on\n    \u003ca href=\"https://www.elasticobjects.org/Home.html#templateCall\"\u003eelasticobjects.org\u003c/a\u003e\n\u003c/p\u003e\n\n    \u003ch1\u003eAn Example Template\u003c/h1\u003e\n    \n    \u003ch2\u003eCSV\u003c/h2\u003e\n    #{CsvSimpleReadCall-\u003eAnObject.csv, data/csv}.\n    #{TemplateResourceCall-\u003etable.tpl, data/csv}.\n    \n    \u003ch2\u003eExcel\u003c/h2\u003e\n    #{XlsxReadCall-\u003eAnObject.xlsx:test, data/xlsx}.\n    #{TemplateResourceCall-\u003etable.tpl, data/xlsx}.\n    \n    \u003ch2\u003eDB\u003c/h2\u003e\n    #{DbSqlReadCall-\u003eh2:mem:basic, h2:mem:basic:AnObject, data/db}.\n    #{TemplateResourceCall-\u003etable.tpl, data/db}.\n\n\n#### Short Form\n\n\u003cp\u003eIn the template a short form of one call JSON is used:\n\n     #{CsvSimpleReadCall-\u003eAnObject.csv, data/csv}.\n\nis equivalent to\n\n    @{\"(CsvSimpleReadCall)\":{\n         \"fileConfigKey\":\"AnObject.csv\",\n         \"targetPath\":\"data/csv\"     \n    }}.\n\nand\n\n    #{TemplateResourceCall-\u003etable.tpl, data/csv}.\n\nis equivalent to\n\n    @{\"(TemplateResourceCall)\":{\n         \"fileConfigKey\"=\"table.tpl\",\n         \"sourcePath\": \"data/csv\"    \n    }}.\n \u003c/p\u003e\n\n\n#### Elements\n\n\u003cp\u003e\n   On elasticobjects.org a second endpoint is defined for receiving templates via\n   \u003ca target=\"github\" href=\"example-springboot/src/main/java/org/fluentcodes/projects/elasticobjects/web/WebEo.java\"\u003e \u003cimg src=\"example-springboot/src/main/resources/static/pics/github.png\" height=\"12\" width=\"12\" \" style=\"margin:0px 4px 0px 6px;\"/\u003eWebEo.java\u003c/a\u003e.\n\u003c/p\u003e\n\u003cul\u003e\n    \u003cli\u003e\n\u003cnobreak\u003e\u003ca target=\"github\" href=\"elastic-objects/src/main/java/org/fluentcodes/projects/elasticobjects/calls/lists/CsvSimpleReadCall.java\"\u003e \u003cimg src=\"example-springboot/src/main/resources/static/pics/github.png\" height=\"12\" width=\"12\" \" style=\"margin:0px 4px 0px 6px;\"/\u003eCsvSimpleReadCall\u003c/a\u003e\n with\n\u003cnobreak\u003e\u003ca target=\"github\" href=\"elastic-objects-test/src/main/resources/input/assets/bt/AnObject.csv\"\u003e \u003cimg src=\"example-springboot/src/main/resources/static/pics/github.png\" height=\"12\" width=\"12\" \" style=\"margin:0px 4px 0px 6px;\"/\u003eAnObject.csv\u003c/a\u003e\n\u003c/li\u003e\n    \u003cli\u003e\n\u003cnobreak\u003e\u003ca target=\"github\" href=\"eo-xlsx/src/main/java/org/fluentcodes/projects/elasticobjects/calls/xlsx/XlsxReadCall.java\"\u003e \u003cimg src=\"example-springboot/src/main/resources/static/pics/github.png\" height=\"12\" width=\"12\" \" style=\"margin:0px 4px 0px 6px;\"/\u003eXlsxReadCall\u003c/a\u003e\n with\n\u003cnobreak\u003e\u003ca target=\"github\" href=\"example-springboot/input/data/lists/AnObject.xlsx\"\u003e \u003cimg src=\"example-springboot/src/main/resources/static/pics/github.png\" height=\"12\" width=\"12\" \" style=\"margin:0px 4px 0px 6px;\"/\u003eAnObject.xlsx:test\u003c/a\u003e\n\u003c/li\u003e\n    \u003cli\u003e\n\u003cnobreak\u003e\u003ca target=\"github\" href=\"eo-db/src/main/java/org/fluentcodes/projects/elasticobjects/calls/db/DbQueryCall.java\"\u003e \u003cimg src=\"example-springboot/src/main/resources/static/pics/github.png\" height=\"12\" width=\"12\" \" style=\"margin:0px 4px 0px 6px;\"/\u003eDbQueryCall\u003c/a\u003e\n with\n\u003cnobreak\u003e\u003ca target=\"github\" href=\"eo-db/src/main/resources//DbSqlConfig.json\"\u003e \u003cimg src=\"example-springboot/src/main/resources/static/pics/github.png\" height=\"12\" width=\"12\" \" style=\"margin:0px 4px 0px 6px;\"/\u003eDbSqlConfig.json\u003c/a\u003e\u003c/nobreak\u003e\u003c/li\u003e\n\u003c/ul\u003e\n\u003cp\u003e\n    After each read call the\n\u003cnobreak\u003e\u003ca target=\"github\" href=\"elastic-objects-test/src/main/java/org/fluentcodes/projects/elasticobjects/domain/test/AnObject.java\"\u003e \u003cimg src=\"example-springboot/src/main/resources/static/pics/github.png\" height=\"12\" width=\"12\" \" style=\"margin:0px 4px 0px 6px;\"/\u003eAnObject\u003c/a\u003e\n example data a\n\u003cnobreak\u003e\u003ca target=\"github\" href=\"elastic-objects/src/main/java/org/fluentcodes/projects/elasticobjects/calls/templates/TemplateResourceCall.java\"\u003e \u003cimg src=\"example-springboot/src/main/resources/static/pics/github.png\" height=\"12\" width=\"12\" \" style=\"margin:0px 4px 0px 6px;\"/\u003eTemplateResourceCall\u003c/a\u003e\n will render this\n    data with\n\u003cnobreak\u003e\u003ca target=\"github\" href=\"example-springboot/src/main/resources/templates/table.tpl\"\u003e \u003cimg src=\"example-springboot/src/main/resources/static/pics/github.png\" height=\"12\" width=\"12\" \" style=\"margin:0px 4px 0px 6px;\"/\u003etable.tpl\u003c/a\u003e\n again.\n\u003c/p\u003e--\u003e\n\n## Conclusion\n\nThe project has now version 0.9.4.\n\nAs a tool for creating and manipulating java objects it offers a lot of benefits.\n\nFor productive use in a flexible microservice architecture it's good enough for a proof of concept.\n\n\n## Links\n* https://tech.signavio.com/2017/json-type-information\n* https://www.json.org/json-en.html\n* https://de.wikipedia.org/wiki/JSON-LD\n* http://restcookbook.com/Mediatypes/json/\n* https://gkulshrestha.wordpress.com/2013/11/16/embedding-type-information-in-json-posted-to-web-api/\n* https://www.newtonsoft.com/json/help/html/T_Newtonsoft_Json_TypeNameHandling.htm\n* https://de.wikipedia.org/wiki/JavaScript_Object_Notation\n* http://jsonp.eu/\n* https://github.com/json-path/JsonPath","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffluentcodes%2Felasticobjects","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffluentcodes%2Felasticobjects","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffluentcodes%2Felasticobjects/lists"}