{"id":25089641,"url":"https://github.com/aborroy/alf-tengine-xml","last_synced_at":"2025-04-01T17:23:27.178Z","repository":{"id":275109355,"uuid":"924647520","full_name":"aborroy/alf-tengine-xml","owner":"aborroy","description":"Custom Alfresco TEngine to extract-metadata from an XML file","archived":false,"fork":false,"pushed_at":"2025-02-04T13:15:21.000Z","size":21,"stargazers_count":1,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-07T11:18:06.588Z","etag":null,"topics":["alfresco","docker","spring-boot"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aborroy.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":"2025-01-30T11:57:44.000Z","updated_at":"2025-02-04T14:50:03.000Z","dependencies_parsed_at":"2025-01-31T09:22:59.989Z","dependency_job_id":"a6c3fe16-11e4-48d6-8f92-de384e524b79","html_url":"https://github.com/aborroy/alf-tengine-xml","commit_stats":null,"previous_names":["aborroy/alf-tengine-xml"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aborroy%2Falf-tengine-xml","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aborroy%2Falf-tengine-xml/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aborroy%2Falf-tengine-xml/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aborroy%2Falf-tengine-xml/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aborroy","download_url":"https://codeload.github.com/aborroy/alf-tengine-xml/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246679069,"owners_count":20816402,"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":["alfresco","docker","spring-boot"],"created_at":"2025-02-07T11:18:14.966Z","updated_at":"2025-04-01T17:23:27.156Z","avatar_url":"https://github.com/aborroy.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Alfresco Metadata Extract Transform Engine for XML\n\nThis project provides a *sample* Metadata Extract Transform Engine for XML, designed to be used with Alfresco Transform Service 3.0.0+.\n\n## Features\n\n- Extracts metadata from XML files and maps it to Alfresco properties.\n- Compatible with Alfresco Community and Enterprise versions (23.x).\n- Provides a test HTML interface for local validation.\n- Supports Docker deployment for easy integration.\n\n---\n\n## 🛠 Local Testing\n\n### Requirements\n\nEnsure you have the following dependencies installed:\n\n- **Java** 17+\n- **Maven** 3.5+\n\n### Building the Application\n\nTo build the JAR package, run:\n\n```bash\nmvn clean package\n```\n\n### Running the Application\n\nOnce built, execute the following command:\n\n```bash\njava -jar target/alf-tengine-xml-1.0.0.jar\n```\n\n### Testing with the HTML Interface\n\nAfter starting the service, open the test application at [http://localhost:8090](http://localhost:8090). Use the following input values:\n\n- **file**: Upload an XML file following the format specified in [`sample.xml`](src/main/resources/sample.xml).\n- **sourceMimetype**: `text/xml` (Alternatively, `application/xml` is also accepted).\n- **targetMimetype**: `alfresco-metadata-extract`.\n\nClick the **Transform** button to process the XML file. The extracted metadata will be returned as a JSON response.\n\n📌 *Metadata mapping is defined in* [`XmlMetadataExtractor_metadata_extract.properties`](src/main/resources/XmlMetadataExtractor_metadata_extract.properties).\n\n---\n\n## 🐳 Building the Docker Image\n\n### Requirements\n\n- **Docker** 4.30+\n\n### Building the Image\n\nFrom the project root directory, build the Docker image with:\n\n```bash\ndocker build . -t alfresco-tengine-xml\n```\n\nThis will create a Docker image named `alfresco-tengine-xml:latest` in your local Docker repository.\n\n---\n\n## 🚀 Deploying with Alfresco Community 23.x\n\nEnsure your `compose.yaml` file includes the following configuration:\n\n```yaml\nservices:\n  alfresco:\n    environment:\n      JAVA_OPTS : \u003e-\n        -DlocalTransform.core-aio.url=http://transform-core-aio:8090/\n        -DlocalTransform.xml.url=http://transform-xml:8090/\n\n  transform-core-aio:\n    image: alfresco/alfresco-transform-core-aio:5.1.6\n\n  transform-xml:\n    image: alfresco-tengine-xml:latest\n```\n\n✅ **Key Configuration Updates:**\n- Add `localTransform.xml.url` to the **Alfresco** service (`http://transform-xml:8090/` by default).\n- Define the **transform-xml** service using the custom-built image.\n\n📌 *Ensure you have built the Docker image (`alfresco-tengine-xml`) before running Docker Compose.*\n\n---\n\n## 🏢 Deploying with Alfresco Enterprise 23.x\n\nEnsure your `compose.yaml` file includes the following configuration:\n\n```yaml\nservices:\n  alfresco:\n    environment:\n      JAVA_OPTS : \u003e-\n        -Dtransform.service.enabled=true\n        -Dtransform.service.url=http://transform-router:8095\n        -Dsfs.url=http://shared-file-store:8099/\n\n  transform-router:\n    image: quay.io/alfresco/alfresco-transform-router:4.1.4\n    environment:\n      CORE_AIO_URL: \"http://transform-core-aio:8090\"\n      TRANSFORMER_URL_XML: \"http://transform-xml:8090\"\n      TRANSFORMER_QUEUE_XML: \"xml-engine-queue\"\n\n  transform-xml:\n    image: alfresco-tengine-xml:latest\n    environment:\n      ACTIVEMQ_URL: \"nio://activemq:61616\"\n      FILE_STORE_URL: \u003e-\n        http://shared-file-store:8099/alfresco/api/-default-/private/sfs/versions/1/file\n```\n\n✅ **Key Configuration Updates:**\n- Register the XML transformer with **transform-router**.\n    - URL: `http://transform-xml:8090/` (default).\n    - Queue Name: `xml-engine-queue` (defined in `application-default.yaml`).\n- Define the **transform-xml** service and link it to ActiveMQ and Shared File Store services.\n\n📌 *Ensure you have built the Docker image (`alfresco-tengine-xml`) before running Docker Compose.*\n\n---\n\n## 📂 Defining an XML Folder Rule in Alfresco Share\n\nTo automatically extract metadata from XML files uploaded to a specific folder, set up a folder rule in Alfresco Share:\n\n1. Open [http://localhost:8080/share/](http://localhost:8080/share/) in your browser.\n2. Navigate to the desired folder.\n3. Click **Manage Rules**.\n4. Create a new rule with the following settings:\n    - **When:** Items are created or enter this folder.\n    - **If all criteria are met:** Mimetype is `XML`.\n    - **Perform Action:** Extract common metadata fields.\n5. Save the rule.\n\nFrom now on, any XML file uploaded to the folder will be analyzed, and the extracted metadata will be mapped according to [`XmlMetadataExtractor_metadata_extract.properties`](src/main/resources/XmlMetadataExtractor_metadata_extract.properties).\n\n---\n\n## 🤝 Contributing\n\nContributions are welcome! To contribute:\n1. Fork this repository.\n2. Create a new branch (`feature-branch-name`).\n3. Commit your changes.\n4. Submit a pull request.\n\nFor major changes, please open an issue first to discuss your proposal.\n\n---\n\n## 📞 Support\n\nFor issues and feature requests, please open a GitHub issue in this repository.\n\nHappy coding! 🚀","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faborroy%2Falf-tengine-xml","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faborroy%2Falf-tengine-xml","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faborroy%2Falf-tengine-xml/lists"}