LuxImport Technical Documentation
Overview
LuxImport is a modular system designed for importing, indexing, and managing digital collections efficiently. It integrates with the Luxoria ecosystem and provides functionalities for handling structured asset collections.
Features
Event-driven architecture with
IEventBus
integrationAsynchronous operations for improved performance
Modular and scalable design
Progress tracking through event notifications
Parallel processing for asset loading
Architecture
Core Components
LuxImport
Module
LuxImport
ModuleImplements
IModule
Handles initialization, execution, and shutdown
Listens to
OpenCollectionEvent
and triggers import process
ImportService
ImportService
Manages the actual import process
Tracks progress and sends updates via event notifications
Loads assets into memory
ManifestRepository
ManifestRepository
Handles metadata storage and retrieval
Ensures collection initialization and integrity
LuxConfigRepository
LuxConfigRepository
Stores per-asset configuration
Manages LuxCfg models in
.lux/assets
ImageDataHelper
ImageDataHelper
Loads image assets efficiently
Uses SkiaSharp for image decoding
How to Use
Prerequisites
Ensure that the Luxoria ecosystem is installed and configured properly.
Your project should reference the necessary LuxImport libraries.
Implement and register
IEventBus
for event-driven interactions.
Installation
Clone or download the LuxImport module.
Add the project reference in your Luxoria-based application.
Implement
IModule
interface in your module system.
Running the Module
Initialize the module using
Initialize()
.Subscribe to the
OpenCollectionEvent
.When an import request is triggered, LuxImport processes the collection.
Once completed,
CollectionUpdatedEvent
is published.
Example Usage
Initialization
Subscribes to
OpenCollectionEvent
Initializes logger and context
Import Process
1. Collection Validation
Checks if the collection path is valid and initialized
2. Indexing & Asset Processing
Reads metadata from
manifest.json
Hashes and stores asset references
Uses parallel processing for efficiency
3. Asset Loading
Loads assets into memory
Uses
ImageDataHelper
for efficient decoding
4. Completion & Event Publishing
Publishes
CollectionUpdatedEvent
upon successful import
Event Handling
OpenCollectionEvent
Listener
OpenCollectionEvent
ListenerTriggers collection import
Sends progress updates
CollectionUpdatedEvent
Publisher
CollectionUpdatedEvent
PublisherNotifies the system of import completion
Error Handling & Logging
Uses
ILoggerService
for structured logsException handling ensures robust error reporting
Performance Optimizations
Uses parallel processing in
LoadAssets
Minimizes blocking I/O operations
Implements batch logging to prevent log spam
Future Enhancements
Cache system for faster re-imports
Support for more file formats
UI integration for progress monitoring
Conclusion
LuxImport is designed for efficient, modular asset importation and indexing within the Luxoria ecosystem. Its event-driven design and asynchronous processing make it highly scalable and reliable.
Last updated