Chạy module này để cào dữ liệu pháp luật từ Pháp Điển Việt Nam và Văn bản quy phạm pháp luật. Bước này là optional cho hệ thống, bạn có thể bỏ qua nếu không cần dữ liệu ban đầu.
Lấy dữ liệu từ Pháp Điển Việt Nam, tải file zip và giải nén vào thư mục này.
- Tạo 2 file json từ file jsonData.json gốc:
- chude.json: chứa các chủ đề
- demuc.json: chứa các đề mục
- treeNode: chứa các node là các Phần, Chương, Mục, Tiểu mục, Điều.
- Cuối cùng thư mục của bạn sẽ có cấu trúc như sau:
phap-dien
├── chude.json
├── demuc.json
├── treeNode.json
├── demuc/
│ ├── 1/...
│ ├── 2/...
- Cài đặt các thư viện cần thiết:
crawl |_.gitignore |_.idea |_.gitignore |_compiler.xml |_dataSources.xml |_encodings.xml |_jarRepositories.xml |_misc.xml |_modules.xml |_vcs.xml |_.mvn |_wrapper |_maven-wrapper.jar |_maven-wrapper.properties |_mvnw |_mvnw.cmd |_pom.xml |_README.md |_src |_main |_java |_Controller |_CrawlController.java |_CrawlDocumentController.java |_SplitDocumentController.java |_CrawlApplication.java |_helpers |_Helpers.java |_law_direction |_Subjects.json |_Topics.json |_TreeNodes.json |_models |_Indexvbqppl.java |_Pdarticle.java |_Pdchapter.java |_Pdfile.java |_Pdrelation.java |_Pdsubject.java |_Pdtable.java |_Pdtopic.java |_Vbqppl.java |_repositories |_HibernateUtil.java |_resources |_META-INF |_persistence.xml |_target |_classes |_Controller |_CrawlController$1.class |_CrawlController.class |_CrawlDocumentController.class |_SplitDocumentController.class |_CrawlApplication.class |_helpers |_Helpers.class |_law_direction |_Subjects.json |_Topics.json |_TreeNodes.json |_META-INF |_persistence.xml |_models |_Indexvbqppl.class |_Pdarticle.class |_Pdchapter.class |_Pdfile.class |_Pdrelation.class |_Pdsubject.class |_Pdtable.class |_Pdtopic.class |_Vbqppl.class |_repositories |_HibernateUtil.class |_test-classes
Sau khi chạy xong, dữ liệu VBQPPL và các điều sẽ được lưu vào DB, bạn có thể export ra bằng PHPAdmin dưới dạng .sql để dùng lại.