Alfresco to Nuxeo data model mapping investigation and prototype #3664
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Comprehensive investigation and working prototype for migrating Alfresco content models to Nuxeo, including automated mapping of types, aspects, properties, associations, and constraints with documented limitations.
Investigation Document
docs/investigation/ALFRESCO_NUXEO_DATA_MODEL_MAPPING.md(28KB)Prototype Implementation
Model Representations (
org.alfresco.repo.nuxeo.model)NuxeoDocumentType,NuxeoSchema,NuxeoFacet,NuxeoField- Target Nuxeo entitiesMappers (
org.alfresco.repo.nuxeo.mapper)AlfrescoToNuxeoTypeMapper- Preserves type hierarchy, maps mandatory aspects to facetsAlfrescoToNuxeoAspectMapper- Aspects → Facet+Schema pairs (addresses dynamic application limitation)AlfrescoToNuxeoPropertyMapper- Property conversion with data loss warnings (mltext, noderef, qname)AlfrescoToNuxeoAssociationMapper- Child associations → containment, peer → relationsCore Infrastructure
DataTypeConverter- Type mappings with data loss detectionNuxeoDataModelMapper- Main orchestrator, generates JSON outputMappingContext- Configuration and warning aggregationUsage Example
Test Coverage
58 test cases across 5 test classes covering type hierarchy mapping, data type conversion, aspect transformation, and end-to-end integration scenarios.
Real-World Example
Complete invoice management model (
examples/) demonstrating:Known Limitations
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
artifacts.alfresco.com/usr/lib/jvm/temurin-17-jdk-amd64/bin/java /usr/lib/jvm/temurin-17-jdk-amd64/bin/java --enable-native-access=ALL-UNNAMED -classpath /usr/share/apache-maven-3.9.11/boot/plexus-classworlds-2.9.0.jar -Dclassworlds.conf=/usr/share/apache-maven-3.9.11/bin/m2.conf -Dmaven.home=/usr/share/apache-maven-3.9.11 -Dlibrary.jansi.path=/usr/share/apache-maven-3.9.11/lib/jansi-native -Dmaven.multiModuleProjectDirectory=/home/REDACTED/work/alfresco-community-repo/alfresco-community-repo/data-model org.codehaus.plexus.classworlds.launcher.Launcher clean test -DskipTests -q(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
Problem Statement
Create a comprehensive investigation comparing Alfresco Data Model with Nuxeo Data Model, including:
Acceptance Criteria
✅ Analysis of Alfresco Data Model and Nuxeo Data Model is completed
✅ Key differences, required mapping and unresolved issues are identified
✅ Findings are documented in a Confluence-style page (markdown format)
✅ Confluence page includes tables describing entity relationships and field mapping
✅ A prototype code exists that performs mapping between Alfresco Data model and corresponding Nuxeo data model entities
✅ Mapping logic is documented in the confluence page
Reference Documentation
Alfresco Data Model
data-model/folder in alfresco-community-repoNuxeo Data Model
Deliverables
1. Investigation Document
Create
docs/investigation/ALFRESCO_NUXEO_DATA_MODEL_MAPPING.mdwith:2. Mapping Tables
Include comprehensive tables for:
3. Prototype Implementation
Create prototype Java code in
data-model/src/main/java/org/alfresco/repo/datamodel/nuxeo/:Core Mapper Classes:
NuxeoDataModelMapper.java- Main mapper orchestrating transformationsAlfrescoToNuxeoTypeMapper.java- Maps Alfresco Types to Nuxeo Document TypesAlfrescoToNuxeoAspectMapper.java- Maps Alfresco Aspects to Nuxeo Schemas/FacetsAlfrescoToNuxeoPropertyMapper.java- Maps Alfresco Properties to Nuxeo FieldsAlfrescoToNuxeoAssociationMapper.java- Maps Alfresco Associations to Nuxeo RelationsDataTypeConverter.java- Converts between Alfresco and Nuxeo data typesModel Classes:
NuxeoDocumentType.java- Represents Nuxeo document typeNuxeoSchema.java- Represents Nuxeo schemaNuxeoFacet.java- Represents Nuxeo facetNuxeoField.java- Represents Nuxeo fieldMappingContext.java- Context holder for mapping configurationConfiguration:
mapping-config.properties- Configuration for custom mappings and rules4. Test Cases
Create comprehensive tests in
data-model/src/test/java/org/alfresco/repo/datamodel/nuxeo/:NuxeoDataModelMapperTest.java- Integration testsAlfrescoToNuxeoTypeMapperTest.java- Type mapping testsAlfrescoToNuxeoAspectMapperTest.java- Aspect mapping testsAlfrescoToNuxeoPropertyMapperTest.java- Property mapping testsDataTypeConverterTest.java- Data type conversion tests5. Example Mappings
Create example XML/JSON files showing real mapping scenarios:
examples/alfresco-content-model.xml- Sample Alfresco modelexamples/nuxeo-document-type.json- Corresponding Nuxeo outputexamples/mapping-report.md- Detailed mapping reportImplementation Guidelines
Alfresco Data Model Key Points:
Nuxeo Data Model Key Points (from documentation):
Mapping Strategy:
This pull request was created as a result of the following prompt from Copilot chat.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.