{"id":32035329,"url":"https://github.com/inqwise/inqwise-walker","last_synced_at":"2026-04-19T03:02:36.120Z","repository":{"id":318873787,"uuid":"1028876561","full_name":"inqwise/inqwise-walker","owner":"inqwise","description":"A convenient and powerful object walker for Java, designed to traverse complex object graphs with ease. It provides a simple, event-driven API for navigating nested structures, making it ideal for data processing, validation, and transformation tasks.","archived":false,"fork":false,"pushed_at":"2026-04-13T12:31:41.000Z","size":229,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-13T14:24:27.502Z","etag":null,"topics":["event-driven","java","library","object-traversal","object-walker","reactive","vertx"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/inqwise.png","metadata":{"files":{"readme":"README.adoc","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2025-07-30T07:35:01.000Z","updated_at":"2026-04-13T12:31:37.000Z","dependencies_parsed_at":"2025-12-15T20:08:02.987Z","dependency_job_id":null,"html_url":"https://github.com/inqwise/inqwise-walker","commit_stats":null,"previous_names":["inqwise/inqwise-walker"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/inqwise/inqwise-walker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inqwise%2Finqwise-walker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inqwise%2Finqwise-walker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inqwise%2Finqwise-walker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inqwise%2Finqwise-walker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/inqwise","download_url":"https://codeload.github.com/inqwise/inqwise-walker/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inqwise%2Finqwise-walker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31992822,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T20:23:30.271Z","status":"online","status_checked_at":"2026-04-19T02:00:07.110Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["event-driven","java","library","object-traversal","object-walker","reactive","vertx"],"created_at":"2025-10-17T06:18:44.468Z","updated_at":"2026-04-19T03:02:36.083Z","avatar_url":"https://github.com/inqwise.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"= Inqwise Walker - Object Traversal Framework\n:toc:\n:toclevels: 3\n:source-highlighter: highlight.js\n:icons: font\n\nimage:https://github.com/inqwise/inqwise-walker/actions/workflows/ci.yml/badge.svg[CI, link=https://github.com/inqwise/inqwise-walker/actions/workflows/ci.yml]\nimage:https://github.com/inqwise/inqwise-walker/actions/workflows/release.yml/badge.svg[Release, link=https://github.com/inqwise/inqwise-walker/actions/workflows/release.yml]\nimage:https://github.com/inqwise/inqwise-walker/actions/workflows/codeql.yml/badge.svg[CodeQL, link=https://github.com/inqwise/inqwise-walker/actions/workflows/codeql.yml]\nimage:https://codecov.io/gh/inqwise/inqwise-walker/branch/main/graph/badge.svg[Codecov, link=https://codecov.io/gh/inqwise/inqwise-walker]\nimage:https://snyk.io/test/github/inqwise/inqwise-walker/badge.svg[Snyk Security, link=https://snyk.io/test/github/inqwise/inqwise-walker]\nimage:https://img.shields.io/maven-central/v/com.inqwise/inqwise-walker.svg?label=Maven%20Central[Maven Central, link=https://search.maven.org/search?q=g:%22com.inqwise%22%20AND%20a:%22inqwise-walker%22]\nimage:https://img.shields.io/badge/License-MIT-yellow.svg[License: MIT, link=https://opensource.org/licenses/MIT]\nimage:https://img.shields.io/badge/Java-21%2B-blue.svg[Java Version, link=https://openjdk.java.net/projects/jdk/21/]\n\nA powerful and flexible Java library for traversing complex object hierarchies with event-driven processing.\n\n== Overview\n\nInqwise Walker provides a framework for walking through object structures with customizable event handlers, flow control, and extensible walker implementations. It's particularly useful for processing JSON data, nested objects, and implementing visitor patterns.\n\n=== Key Features\n\n* 🔄 **Event-driven processing** with customizable handlers\n* 🏗️ **Extensible architecture** - create custom walkers for any object type\n* 🎮 **Flow control** - pause, resume, and early termination\n* 🛡️ **Error handling** with success/failure callbacks\n* 📍 **Path tracking** - know exactly where you are in the object hierarchy\n* 🧵 **Thread-safe operations** for concurrent access\n* 📊 **Context data sharing** between processing stages\n\n== Quick Start\n\n=== Maven Dependency\n\n[source,xml]\n----\n\u003cdependency\u003e\n    \u003cgroupId\u003ecom.inqwise\u003c/groupId\u003e\n    \u003cartifactId\u003einqwise-walker\u003c/artifactId\u003e\n    \u003cversion\u003e${latest.version}\u003c/version\u003e\n\u003c/dependency\u003e\n----\n\n=== Basic Usage\n\n[source,java]\n----\nimport com.inqwise.walker.*;\nimport io.vertx.core.json.JsonObject;\nimport io.vertx.core.json.JsonArray;\n\n// Create a JSON structure\nJsonObject person = new JsonObject()\n    .put(\"name\", \"John Doe\")\n    .put(\"age\", 30)\n    .put(\"address\", new JsonObject()\n        .put(\"street\", \"123 Main St\")\n        .put(\"city\", \"New York\"))\n    .put(\"hobbies\", new JsonArray()\n        .add(\"reading\")\n        .add(\"swimming\"));\n\n// Create walker with nested support\nJsonObjectWalker walker = JsonObjectWalker.instance();\n\n// Add event handler\nwalker.handler(event -\u003e {\n    String path = event.meta().get(ObjectWalker.Keys.PATH).toString();\n    Object value = event.indicatedObject();\n    System.out.println(\"Path: \" + path + \" -\u003e Value: \" + value);\n});\n\n// Start walking\nObjectWalkingContext context = walker.handle(person);\nSystem.out.println(\"Success: \" + context.success());\n----\n\n== Architecture\n\n=== Core Components\n\n==== ObjectWalker (Abstract Base Class)\nThe foundation of the framework providing:\n\n* Walker registration and delegation\n* Event handler management  \n* Flow control coordination\n* Error handling infrastructure\n\n==== Built-in Walkers\n\n[cols=\"1,3\"]\n|===\n|Walker |Description\n\n|`JsonObjectWalker`\n|Traverses Vert.x JsonObject instances with path tracking\n\n|`JsonArrayWalker` \n|Processes JsonArray elements with indexed paths\n\n|`DifferencesWalker`\n|Handles difference objects from inqwise-difference library\n|===\n\n==== Context Management\n\n* **ObjectWalkingContext**: Manages walking state, flow control, and data storage\n* **ObjectWalkingEvent**: Provides event information and control methods\n* **IndicatedItem**: Wraps objects with metadata during processing\n\n=== Processing Flow\n\n[source]\n----\nObjectWalker.handle(object)\n    ↓\nCreate ObjectWalkingContext\n    ↓\nFor each object in hierarchy:\n    ↓\nGenerate ObjectWalkingEvent\n    ↓\nCall registered event handlers\n    ↓\nDelegate to appropriate walker\n    ↓\nContinue until complete or terminated\n----\n\n== Advanced Features\n\n=== Custom Walker Implementation\n\nCreate walkers for your own data types:\n\n[source,java]\n----\npublic class PersonWalker extends ObjectWalker {\n    public PersonWalker() {\n        super(null);\n    }\n    \n    @Override\n    protected Class\u003c?\u003e type() {\n        return Person.class;\n    }\n    \n    @Override\n    protected Iterator\u003cIndicatedItem\u003e createObjectIterator(\n            IndicatedItem item, ObjectWalkingContext context) {\n        Person person = (Person) item.value();\n        String basePath = item.meta().getOrDefault(Keys.PATH, \".\").toString();\n        \n        return List.of(\n            item.newSubItem(person.getName()).put(Keys.PATH, basePath + \".name\"),\n            item.newSubItem(person.getAge()).put(Keys.PATH, basePath + \".age\")\n        ).iterator();\n    }\n}\n----\n\n=== Flow Control\n\n[source,java]\n----\nwalker.handler(event -\u003e {\n    String path = event.meta().get(ObjectWalker.Keys.PATH).toString();\n    \n    // Pause processing\n    if (path.equals(\".metadata\")) {\n        event.context().pause();\n        // Do some async work...\n        event.context().resume();\n    }\n    \n    // Early termination\n    if (path.equals(\".stop-here\")) {\n        event.end();\n    }\n});\n----\n\n=== Context Data Sharing\n\n[source,java]\n----\nwalker.handler(event -\u003e {\n    String path = event.meta().get(ObjectWalker.Keys.PATH).toString();\n    Object value = event.indicatedObject();\n    \n    // Store data in context\n    if (path.contains(\"user\")) {\n        event.context().put(\"userCount\", \n            (Integer) event.context().get(\"userCount\") + 1);\n    }\n});\n\n// Access shared data after walking\nInteger userCount = context.get(\"userCount\");\n----\n\n=== Error Handling\n\n[source,java]\n----\nwalker.handler(event -\u003e {\n    // Processing that might throw exceptions\n    if (someCondition) {\n        throw new RuntimeException(\"Processing error\");\n    }\n});\n\nwalker.errorHandler(context -\u003e {\n    System.err.println(\"Error: \" + context.cause().getMessage());\n    System.err.println(\"Failed at level: \" + context.levelIndex());\n});\n\nwalker.endHandler(context -\u003e {\n    if (context.success()) {\n        System.out.println(\"Walking completed successfully\");\n    }\n});\n----\n\n== Use Cases\n\n=== Data Validation\nWalk through complex objects to validate structure and values:\n\n[source,java]\n----\nwalker.handler(event -\u003e {\n    String path = event.meta().get(ObjectWalker.Keys.PATH).toString();\n    Object value = event.indicatedObject();\n    \n    if (path.endsWith(\".email\") \u0026\u0026 !isValidEmail(value.toString())) {\n        throw new ValidationException(\"Invalid email at \" + path);\n    }\n});\n----\n\n=== Data Transformation\nConvert objects from one format to another:\n\n[source,java]\n----\nMap\u003cString, Object\u003e result = new HashMap\u003c\u003e();\n\nwalker.handler(event -\u003e {\n    String path = event.meta().get(ObjectWalker.Keys.PATH).toString();\n    Object value = event.indicatedObject();\n    \n    // Transform field names and values\n    String transformedPath = transformPath(path);\n    Object transformedValue = transformValue(value);\n    \n    result.put(transformedPath, transformedValue);\n});\n----\n\n=== Metrics Collection\nGather statistics about object structures:\n\n[source,java]\n----\nAtomicInteger fieldCount = new AtomicInteger(0);\nAtomicInteger arrayCount = new AtomicInteger(0);\nAtomicInteger objectCount = new AtomicInteger(0);\n\nwalker.handler(event -\u003e {\n    fieldCount.incrementAndGet();\n    \n    if (event.hasWalker()) {\n        if (event.getWalker() instanceof JsonArrayWalker) {\n            arrayCount.incrementAndGet();\n        } else if (event.getWalker() instanceof JsonObjectWalker) {\n            objectCount.incrementAndGet();\n        }\n    }\n});\n----\n\n== Building and Testing\n\n=== Prerequisites\n* Java 21+\n* Maven 3.6.3+\n\n=== Build Commands\n\n[source,bash]\n----\n# Compile the project\nmvn compile\n\n# Run tests\nmvn test\n\n# Create JAR\nmvn package\n\n# Install to local repository\nmvn install\n----\n\n=== Running Examples\n\n[source,bash]\n----\n# Compile and run usage examples\nmvn exec:java -Dexec.mainClass=\"com.inqwise.walker.example.WalkerUsageExample\"\n----\n\n== Contributing\n\nWe welcome contributions! Please see our link:CONTRIBUTING.md[contributing guidelines] for details on:\n\n* Code style and conventions\n* Submitting issues and feature requests\n* Creating pull requests\n* Running tests locally\n\n== License\n\nThis project is licensed under the MIT License - see the link:LICENSE[LICENSE] file for details.\n\n== Support\n\n* **Documentation**: Check this README and the link:WalkerUsageExample.java[usage examples]\n* **Issues**: Report bugs and request features on link:https://github.com/inqwise/inqwise-walker/issues[GitHub Issues]\n* **Discussions**: Ask questions on link:https://github.com/inqwise/inqwise-walker/discussions[GitHub Discussions]\n\n---\n\nBuilt with ❤️ by the link:https://www.inqwise.com[Inqwise] team.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finqwise%2Finqwise-walker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finqwise%2Finqwise-walker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finqwise%2Finqwise-walker/lists"}