Compare commits

..
Author SHA1 Message Date
ろむねこ f055c89039 Merge pull request #8 from lacerta-doc/develop
最新Developに追従
2023-12-22 10:48:49 +09:00
ろむねこ d30eded211 Merge pull request #6 from lacerta-doc/develop
最新Developに追従
2023-12-20 10:18:04 +09:00
ろむねこ 7a82d64efd Merge pull request #3 from lacerta-doc/develop
ベータリリース準備: 最新に更新
2023-12-19 11:18:37 +09:00
45 changed files with 62 additions and 1329 deletions

No files matched your search

@@ -1,17 +0,0 @@
---
name: 不具合用テンプレート
about: 不具合用テンプレート
title: "[BUG]: "
labels: バグ
assignees: ''
---
# 概要
<!-- Issueの概要 -->
# 詳細
<!-- バグの詳細 -->
# 影響箇所
<!-- 予想される影響箇所(省略可) -->
@@ -1,17 +0,0 @@
---
name: 改善用テンプレート
about: 改善用テンプレート
title: "[IMPROVE]"
labels: ''
assignees: ''
---
# 概要
<!-- Issueの概要 -->
# 詳細
<!-- 改善内容の詳細 -->
# 影響箇所
<!-- 予想される影響箇所(省略可) -->
@@ -1,20 +1,10 @@
---
name: 新機能用テンプレート
about: 新規能用テンプレート
about: 新規開発Issue用テンプレート
title: ''
labels: 新機能
labels: ''
assignees: ''
---
# 概要
<!-- Issueの概要 -->
# 詳細
<!-- 機能の詳細 -->
# 関連Issue
<!-- 関連するIssueがあれば -->
# 影響箇所
<!-- 予想される影響箇所(省略可) -->
WIP
-18
View File
@@ -1,18 +0,0 @@
# 概要
<!-- PRの概要 -->
# 関連Issue
- #000 <!-- 関連するIssueを指定(なければ省略可) -->
# 詳細
<!-- 詳細 -->
# 影響箇所
<!-- 予想される影響箇所 -->
# チェック
<!-- 参考用, 全てにチェックがついている必要があるわけではありません -->
- [ ] 機能として完成している
- [ ] WIP(Work in progress: 作業中)
- [ ] 正常にビルド/起動ができる
- [ ] 既存の機能を壊していない
+17
View File
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="deploymentTargetDropDown">
<runningDeviceTargetSelectedWithDropDown>
<Target>
<type value="RUNNING_DEVICE_TARGET" />
<deviceKey>
<Key>
<type value="SERIAL_NUMBER" />
<value value="ZY227DCBHN" />
</Key>
</deviceKey>
</Target>
</runningDeviceTargetSelectedWithDropDown>
<timeTargetWasSelectedWithDropDown value="2023-12-21T04:53:14.729902700Z" />
</component>
</project>
-6
View File
@@ -7,12 +7,6 @@
android:required="false" />
<uses-permission android:name="android.permission.CAMERA" />
<queries>
<intent>
<action android:name="android.media.action.IMAGE_CAPTURE" />
</intent>
</queries>
<application
android:allowBackup="true"
android:dataExtractionRules="@xml/data_extraction_rules"
-9
View File
@@ -1,6 +1,5 @@
plugins {
alias(libs.plugins.com.android.library)
id 'com.google.dagger.hilt.android'
}
android {
@@ -34,16 +33,8 @@ dependencies {
androidTestImplementation libs.androidx.test.ext.junit
androidTestImplementation libs.androidx.test.espresso.core
// Hilt (DI)
implementation libs.com.google.dagger.hilt.android
annotationProcessor libs.com.google.dagger.hilt.compiler
implementation 'com.websitebeaver:documentscanner:1.0.0'
implementation project(':shared:ui')
implementation project(':model')
implementation project(':processor')
implementation project(':utils')
}
@@ -25,32 +25,15 @@ import android.widget.Toast;
import java.io.File;
import java.io.IOException;
import java.text.SimpleDateFormat;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.ArrayList;
import java.util.Date;
import java.util.Locale;
import java.util.UUID;
import javax.inject.Inject;
import dagger.hilt.android.AndroidEntryPoint;
import one.nem.lacerta.model.document.DocumentDetail;
import one.nem.lacerta.model.document.DocumentMeta;
import one.nem.lacerta.model.document.path.DocumentPath;
import one.nem.lacerta.processor.DocumentProcessor;
import one.nem.lacerta.processor.factory.DocumentProcessorFactory;
import one.nem.lacerta.utils.LacertaLogger;
import one.nem.lacerta.utils.repository.DeviceInfoUtils;
/**
* A simple {@link Fragment} subclass.
* Use the {@link ScannerDataManagerStubFragment#newInstance} factory method to
* create an instance of this fragment.
*/
@AndroidEntryPoint
public class ScannerDataManagerStubFragment extends Fragment {
// TODO-rca: 時間があったらcacheを使うようにする?
@@ -60,19 +43,6 @@ public class ScannerDataManagerStubFragment extends Fragment {
private Uri photoURI;
private DocumentDetail documentDetail;
private DocumentProcessor documentProcessor;
@Inject
DocumentProcessorFactory documentProcessorFactory;
@Inject
LacertaLogger logger;
@Inject
DeviceInfoUtils deviceInfoUtils;
private final ActivityResultLauncher<Intent> cameraLauncher = registerForActivityResult(
new ActivityResultContracts.StartActivityForResult(),
result -> {
@@ -150,82 +120,6 @@ public class ScannerDataManagerStubFragment extends Fragment {
}
updateResults();
});
view.findViewById(R.id.button_create_documnent).setOnClickListener(v -> {
Log.d("ScannerDataManagerStubFragment", "button_create_documnent clicked");
Toast.makeText(getActivity(), "button_create_documnent clicked", Toast.LENGTH_LONG).show();
this.documentDetail = createSampleDocumentDetail();
});
view.findViewById(R.id.button_init_document_processor).setOnClickListener(v -> {
Log.d("ScannerDataManagerStubFragment", "button_init_document_processor clicked");
Toast.makeText(getActivity(), "button_init_document_processor clicked", Toast.LENGTH_LONG).show();
// TODO-rca: ここでDocumentProcessorを初期化する
if (this.documentDetail == null) {
Toast.makeText(getActivity(), "documentDetail is null", Toast.LENGTH_LONG).show();
return;
}
this.documentProcessor = documentProcessorFactory.create(this.documentDetail);
Toast.makeText(getActivity(), "documentProcessor created", Toast.LENGTH_LONG).show();
try {
this.documentProcessor.init();
} catch (Exception e) {
Toast.makeText(getActivity(), "Error occurred while initializing documentProcessor", Toast.LENGTH_LONG).show();
Log.e("ScannerDataManagerStubFragment", "Error occurred while initializing documentProcessor", e);
}
Toast.makeText(getActivity(), "documentProcessor initialized", Toast.LENGTH_LONG).show();
});
view.findViewById(R.id.button_add_page).setOnClickListener(v -> {
Log.d("ScannerDataManagerStubFragment", "button_add_page clicked");
Toast.makeText(getActivity(), "button_add_page clicked", Toast.LENGTH_LONG).show();
if (this.documentProcessor == null) {
Toast.makeText(getActivity(), "documentProcessor is null", Toast.LENGTH_LONG).show();
return;
}
Bitmap[] bitmaps = new Bitmap[results.size()];
for (int i = 0; i < results.size(); i++) {
bitmaps[i] = results.get(i).getBitmap();
}
try {
this.documentProcessor.addNewPagesToLast(bitmaps);
} catch (Exception e) {
Toast.makeText(getActivity(), "Error occurred while adding pages", Toast.LENGTH_LONG).show();
Log.e("ScannerDataManagerStubFragment", "Error occurred while adding pages", e);
}
Toast.makeText(getActivity(), "pages added", Toast.LENGTH_LONG).show();
try {
this.documentProcessor.close();
} catch (Exception e) {
Toast.makeText(getActivity(), "Error occurred while closing documentProcessor", Toast.LENGTH_LONG).show();
Log.e("ScannerDataManagerStubFragment", "Error occurred while closing documentProcessor", e);
}
});
}
public DocumentDetail createSampleDocumentDetail() {
String id = UUID.randomUUID().toString();
Toast.makeText(getActivity(), "Generated id: " + id, Toast.LENGTH_LONG).show();
//logger.debug("CreateSample", "Generated id: " + id);
DocumentMeta meta = new DocumentMeta(
id,
"Sample" + DateTimeFormatter.ofPattern("yyyyMMddHHmmss").format(LocalDateTime.now()),
new Date(),
new Date());
DocumentPath path = new DocumentPath(
deviceInfoUtils.getExternalStorageDirectoryString(),
"Sample" + DateTimeFormatter.ofPattern("yyyyMMddHHmmss").format(LocalDateTime.now()));
return new DocumentDetail(meta, path, "SampleAuthor", "SampleDefaultBranch");
}
@Override
@@ -11,7 +11,6 @@
android:id="@+id/action_button_container"
android:layout_width="match_parent"
android:layout_height="0dp"
android:weightSum="2"
android:orientation="horizontal"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
@@ -20,7 +19,7 @@
<com.google.android.material.button.MaterialButton
android:id="@+id/button_call_camera"
style="@style/Widget.Material3.Button.IconButton.Filled"
android:layout_width="match_parent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="16px"
android:layout_weight="1"
@@ -28,58 +27,6 @@
</LinearLayout>
<LinearLayout
android:id="@+id/init_button_container"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:orientation="horizontal"
android:weightSum="2"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/action_button_container">
<com.google.android.material.button.MaterialButton
android:id="@+id/button_create_documnent"
style="@style/Widget.Material3.Button.IconButton.Filled"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="16px"
android:layout_weight="1"
android:text="Create Doc Obj" />
<com.google.android.material.button.MaterialButton
android:id="@+id/button_init_document_processor"
style="@style/Widget.Material3.Button.IconButton.Filled"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="16px"
android:layout_weight="1"
android:text="Init Processor" />
</LinearLayout>
<LinearLayout
android:id="@+id/doc_button_container"
android:layout_width="match_parent"
android:layout_height="0dp"
android:weightSum="2"
android:orientation="horizontal"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/init_button_container">
<com.google.android.material.button.MaterialButton
android:id="@+id/button_add_page"
style="@style/Widget.Material3.Button.IconButton.Filled"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="16px"
android:layout_weight="1"
android:text="Add page to last" />
</LinearLayout>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/result_recycler_view"
android:layout_width="match_parent"
@@ -88,6 +35,6 @@
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/doc_button_container" />
app:layout_constraintTop_toBottomOf="@id/action_button_container" />
</androidx.constraintlayout.widget.ConstraintLayout>
-3
View File
@@ -65,7 +65,4 @@ dependencies {
// Scanner
implementation project(':component:scanner')
// Processor
implementation project(':processor')
}
@@ -10,16 +10,16 @@ import android.view.ViewGroup;
/**
* A simple {@link Fragment} subclass.
* Use the {@link DebugMenuDocProcessorTesterFragment#newInstance} factory method to
* Use the {@link DebugMenuMetaDataFragment#newInstance} factory method to
* create an instance of this fragment.
*/
public class DebugMenuDocProcessorTesterFragment extends Fragment {
public DebugMenuDocProcessorTesterFragment() {
public class DebugMenuMetaDataFragment extends Fragment {
public DebugMenuMetaDataFragment() {
// Required empty public constructor
}
public static DebugMenuDocProcessorTesterFragment newInstance() {
DebugMenuDocProcessorTesterFragment fragment = new DebugMenuDocProcessorTesterFragment();
public static DebugMenuMetaDataFragment newInstance() {
DebugMenuMetaDataFragment fragment = new DebugMenuMetaDataFragment();
Bundle args = new Bundle();
fragment.setArguments(args);
return fragment;
@@ -28,17 +28,12 @@ public class DebugMenuDocProcessorTesterFragment extends Fragment {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
View view = inflater.inflate(R.layout.fragment_debug_menu_doc_processor_tester, container, false);
return view;
return inflater.inflate(R.layout.fragment_debug_menu_meta_data, container, false);
}
}
@@ -12,7 +12,6 @@ import android.view.ViewGroup;
import java.util.ArrayList;
import java.util.List;
import dagger.hilt.android.AndroidEntryPoint;
import one.nem.lacerta.feature.debug.common.adapter.DebugMenuListItemAdapter;
import one.nem.lacerta.feature.debug.common.model.DebugMenuListItem;
@@ -21,7 +20,6 @@ import one.nem.lacerta.feature.debug.common.model.DebugMenuListItem;
* Use the {@link DebugMenuTopFragment#newInstance} factory method to
* create an instance of this fragment.
*/
@AndroidEntryPoint
public class DebugMenuTopFragment extends Fragment {
public DebugMenuTopFragment() {
// Required empty public constructor
@@ -48,6 +46,7 @@ public class DebugMenuTopFragment extends Fragment {
recyclerView.setLayoutManager(new androidx.recyclerview.widget.LinearLayoutManager(getContext()));
List<DebugMenuListItem> debugMenuListItems = new ArrayList<>();
debugMenuListItems.add(new DebugMenuListItem("Meta Data", "View meta data", R.id.action_debugMenuTopFragment_to_debugMenuMetaDataFragment, true));
debugMenuListItems.add(new DebugMenuListItem("Document Tester", "placeholder", R.id.action_debugMenuTopFragment_to_debugMenuDocumentTesterTopFragment, true));
debugMenuListItems.add(new DebugMenuListItem("Scanner", "placeholder", R.id.action_debugMenuTopFragment_to_scannerDataManagerStubFragment, true));
@@ -1,36 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:theme="@style/Theme.Lacerta"
tools:context=".DebugMenuDocProcessorTesterFragment" >
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="1dp"
android:layout_marginTop="1dp"
android:layout_marginEnd="1dp"
android:orientation="vertical"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<com.google.android.material.button.MaterialButton
android:id="@+id/button_gen_random_img"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Generate random image" />
</LinearLayout>
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".DebugMenuMetaDataFragment">
<!-- TODO: Update blank fragment layout -->
</FrameLayout>
@@ -10,6 +10,9 @@
android:name="one.nem.lacerta.feature.debug.DebugMenuTopFragment"
android:label="fragment_debug_menu_top"
tools:layout="@layout/fragment_debug_menu_top" >
<action
android:id="@+id/action_debugMenuTopFragment_to_debugMenuMetaDataFragment"
app:destination="@id/debugMenuMetaDataFragment" />
<action
android:id="@+id/action_debugMenuTopFragment_to_debugMenuDocumentTesterTopFragment"
app:destination="@id/debugMenuDocumentTesterTopFragment" />
@@ -17,6 +20,11 @@
android:id="@+id/action_debugMenuTopFragment_to_scannerDataManagerStubFragment"
app:destination="@id/scannerDataManagerStubFragment" />
</fragment>
<fragment
android:id="@+id/debugMenuMetaDataFragment"
android:name="one.nem.lacerta.feature.debug.DebugMenuMetaDataFragment"
android:label="fragment_debug_menu_meta_data"
tools:layout="@layout/fragment_debug_menu_meta_data" />
<fragment
android:id="@+id/debugMenuDocumentTesterTopFragment"
android:name="one.nem.lacerta.feature.debug.DebugMenuDocumentTesterTopFragment"
-5
View File
@@ -1,6 +1,5 @@
plugins {
id 'com.android.library'
id 'com.google.dagger.hilt.android'
}
android {
@@ -47,9 +46,5 @@ dependencies {
implementation project(':shared:ui')
implementation project(':model')
implementation project(':data')
}
@@ -10,18 +10,12 @@ import androidx.recyclerview.widget.RecyclerView;
import java.util.List;
import one.nem.lacerta.model.document.DocumentMeta;
public class DocumentAdapter extends RecyclerView.Adapter<DocumentAdapter.DocumentViewHolder> {
private List<DocumentMeta> documentMetas;
private List<String> documentList;
public DocumentAdapter(List<DocumentMeta> documentMetas) {
// nullの場合に例外を発生させる
if (documentMetas == null) {
throw new IllegalArgumentException("DocumentMetas list cannot be null or empty");
}
this.documentMetas = documentMetas;
public DocumentAdapter(List<String> documentList) {
this.documentList = documentList;
}
@NonNull
@@ -33,15 +27,12 @@ public class DocumentAdapter extends RecyclerView.Adapter<DocumentAdapter.Docume
@Override
public void onBindViewHolder(@NonNull DocumentViewHolder holder, int position) {
DocumentMeta documentMeta = documentMetas.get(position);
if (documentMeta != null) {
holder.title.setText(documentMeta.getTitle());
}
holder.title.setText(documentList.get(position));
}
@Override
public int getItemCount() {
return documentMetas.size();
return documentList.size();
}
class DocumentViewHolder extends RecyclerView.ViewHolder {
@@ -49,7 +40,7 @@ public class DocumentAdapter extends RecyclerView.Adapter<DocumentAdapter.Docume
DocumentViewHolder(View itemView) {
super(itemView);
title = itemView.findViewById(R.id.debug_menu_item_title); // 適切な id に変更する
title = itemView.findViewById(R.id.debug_menu_item_title);
}
}
}
}
@@ -8,9 +8,6 @@ import android.widget.TextView;
import androidx.appcompat.app.AppCompatActivity;
// LibraryArchiveFragment.java
//画面変移用のコード
//Fragmentへのデータの受け渡し機能
public class LibraryArchiveFragment extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
@@ -8,7 +8,6 @@ import android.widget.TextView;
import androidx.fragment.app.Fragment;
//Fragmentにデータを受け渡す機能
public class LibraryDocFragment extends Fragment {
private TextView textView; // フィールドとして TextView を定義
@@ -13,29 +13,17 @@ import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.ListView;
import android.widget.TextView;
import android.widget.Toast;
import java.util.ArrayList;
import java.util.List;
import javax.inject.Inject;
import dagger.hilt.android.AndroidEntryPoint;
import one.nem.lacerta.data.Document;
import one.nem.lacerta.model.document.DocumentMeta;
import one.nem.lacerta.model.document.tag.DocumentTag;
/**
* A simple {@link Fragment} subclass.
* Use the {@link LibraryTopFragment#newInstance} factory method to
* create an instance of this fragment.
*/
@AndroidEntryPoint
public class LibraryTopFragment extends Fragment {
@Inject
Document document;
// TODO: Rename parameter arguments, choose names that match
// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
private static final String ARG_PARAM1 = "param1";
@@ -88,14 +76,13 @@ public class LibraryTopFragment extends Fragment {
LinearLayoutManager layoutManager = new LinearLayoutManager(getContext());
documentRecyclerView.setLayoutManager(layoutManager);
//データを取得
List<DocumentMeta> metas = document.getAllDocumentMetas(100);
Toast.makeText(getContext(), "Documents: " + Integer.toString(metas.size()), Toast.LENGTH_LONG).show();
List<String> documentList = new ArrayList<>();
documentList.add("Document A");
documentList.add("Document B");
documentList.add("Document C");
// Create and set the adapter
DocumentAdapter adapter = new DocumentAdapter(metas);
DocumentAdapter adapter = new DocumentAdapter(documentList);
documentRecyclerView.setAdapter(adapter);
// Use a LinearLayoutManager to specify the layout
@@ -1,73 +0,0 @@
package one.nem.lacerta.model.document.internal;
import java.util.ArrayList;
public class XmlMetaModel {
String title;
String author;
String description;
// Date created;
// Date updated;
String defaultBranch;
ArrayList<XmlMetaPageModel> pages;
// Constructor
public XmlMetaModel() {
}
public XmlMetaModel(String title, String author, String description, String defaultBranch, ArrayList<XmlMetaPageModel> pages) {
this.title = title;
this.author = author;
this.description = description;
this.defaultBranch = defaultBranch;
this.pages = pages;
}
// Getter
public String getTitle() {
return title;
}
public String getAuthor() {
return author;
}
public String getDescription() {
return description;
}
public String getDefaultBranch() {
return defaultBranch;
}
public ArrayList<XmlMetaPageModel> getPages() {
return pages;
}
// Setter
public void setTitle(String title) {
this.title = title;
}
public void setAuthor(String author) {
this.author = author;
}
public void setDescription(String description) {
this.description = description;
}
public void setDefaultBranch(String defaultBranch) {
this.defaultBranch = defaultBranch;
}
public void setPages(ArrayList<XmlMetaPageModel> pages) {
this.pages = pages;
}
}
@@ -1,27 +0,0 @@
package one.nem.lacerta.model.document.internal;
public class XmlMetaPageModel {
String filename;
// Constructor
public XmlMetaPageModel() {
}
public XmlMetaPageModel(String filename) {
this.filename = filename;
}
// Getter
public String getFilename() {
return filename;
}
// Setter
public void setFilename(String filename) {
this.filename = filename;
}
}
-12
View File
@@ -32,16 +32,4 @@ dependencies {
testImplementation libs.junit
androidTestImplementation libs.androidx.test.ext.junit
androidTestImplementation libs.androidx.test.espresso.core
// DI
implementation libs.com.google.dagger.hilt.android
annotationProcessor libs.com.google.dagger.hilt.compiler
// JGit
implementation 'org.eclipse.jgit:org.eclipse.jgit:6.8.0.202311291450-r'
implementation project(':model')
implementation project(':source')
implementation project(':utils')
implementation project(':data')
}
@@ -1,24 +0,0 @@
package one.nem.lacerta.processor;
import android.graphics.Bitmap;
public interface DocumentProcessor {
// ページ操作
void addNewPageToLast(Bitmap bitmap) throws Exception;
void addNewPagesToLast(Bitmap[] bitmaps) throws Exception;
void addNewPageAfterIndex(Bitmap bitmap, int index) throws Exception;
void addNewPageBeforeIndex(Bitmap bitmap, int index) throws Exception;
void removePageAtIndex(int index) throws Exception;
// 更新
void updatePageAtIndex(Bitmap bitmap, int index);
// ページ取得
Bitmap getPageAtIndex(int index);
int getPageCount();
void close() throws Exception;
void init() throws Exception; // TODO-rca: 例外処理
}
@@ -1,10 +0,0 @@
package one.nem.lacerta.processor.factory;
import dagger.assisted.AssistedFactory;
import one.nem.lacerta.model.document.DocumentDetail;
import one.nem.lacerta.processor.impl.DocumentProcessorImpl;
@AssistedFactory
public interface DocumentProcessorFactory {
DocumentProcessorImpl create(DocumentDetail documentDetail);
}
@@ -1,175 +0,0 @@
package one.nem.lacerta.processor.impl;
import android.graphics.Bitmap;
import java.nio.file.Path;
import java.util.ArrayList;
import java.util.UUID;
import dagger.assisted.Assisted;
import dagger.assisted.AssistedInject;
import one.nem.lacerta.model.document.internal.XmlMetaPageModel;
import one.nem.lacerta.processor.DocumentProcessor;
import one.nem.lacerta.model.document.DocumentDetail;
import one.nem.lacerta.model.document.internal.XmlMetaModel;
import one.nem.lacerta.source.file.FileManager;
import one.nem.lacerta.source.file.factory.FileManagerFactory;
import one.nem.lacerta.utils.LacertaLogger;
import one.nem.lacerta.utils.XmlMetaParser;
public class DocumentProcessorImpl implements DocumentProcessor{
// Magic Numbers
private static final String DEFAULT_SAVE_DIR = "raw";
// Variables
private final DocumentDetail documentDetail;
private XmlMetaModel xmlMetaModel;
private Path documentRootPath;
private FileManager fileManager;
// Injection
private final FileManagerFactory fileManagerFactory;
private final LacertaLogger logger;
private final XmlMetaParser xmlMetaParser;
@AssistedInject
public DocumentProcessorImpl(FileManagerFactory fileManagerFactory, LacertaLogger logger, XmlMetaParser xmlMetaParser, @Assisted DocumentDetail documentDetail) {
this.fileManagerFactory = fileManagerFactory;
this.logger = logger;
this.xmlMetaParser = xmlMetaParser;
if (documentDetail == null) {
throw new IllegalArgumentException("documentDetail must not be null");
}
this.documentDetail = documentDetail;
}
@Override
public void init() throws Exception{
logger.debug("init", "called");
// Init Variables
this.documentRootPath = this.documentDetail.getPath().getFullPath();
logger.debug("init", "documentRootPath: " + this.documentRootPath);
this.fileManager = fileManagerFactory.create(this.documentRootPath).enableAutoCreateParent(); //Initialize FileManager
FileManager initFileManager = this.fileManager.getNewInstance();
logger.debug("init", "fileManager created");
// xmlファイルの読み込み
if (initFileManager.isExist("meta.xml")) {
logger.debug("init", "meta.xml found");
try {
this.xmlMetaModel = xmlMetaParser.deserialize(this.fileManager.loadXml("meta.xml"));
logger.debug("init", "meta.xml parsed");
} catch (Exception e) {
logger.debug("init", "meta.xml parse failed");
logger.trace("init", e.getMessage());
}
} else {
logger.debug("init", "meta.xml not found");
xmlMetaModel = new XmlMetaModel();
xmlMetaModel.setTitle(this.documentDetail.getMeta().getTitle());
xmlMetaModel.setAuthor(this.documentDetail.getAuthor());
xmlMetaModel.setDescription(""); // FIXME-rca:
xmlMetaModel.setDefaultBranch(this.documentDetail.getDefaultBranch());
xmlMetaModel.setPages(new ArrayList<>());
try {
initFileManager.createFileIfNotExist("meta.xml").saveXml(xmlMetaParser.serialize(xmlMetaModel), "meta.xml");
logger.debug("init", "meta.xml saved");
} catch (Exception e) {
logger.error("init", "meta.xml save failed");
logger.trace("init", e.getMessage());
}
}
logger.info("init", "finished");
}
@Override
public void addNewPageToLast(Bitmap bitmap) throws Exception{
logger.debug("addNewPageToLast", "called");
String filename = UUID.randomUUID().toString() + ".png"; // TODO-rca: 拡張子を動的にする
this.fileManager.getNewInstance().createDirectoryIfNotExist(DEFAULT_SAVE_DIR).resolve(DEFAULT_SAVE_DIR).saveBitmap(bitmap, filename);
XmlMetaPageModel xmlMetaPageModel = new XmlMetaPageModel();
xmlMetaPageModel.setFilename(filename);
xmlMetaModel.getPages().add(xmlMetaPageModel);
logger.info("addNewPageToLast", "finished");
logger.info("addNewPageToLast", "filename: " + filename);
}
@Override
public void addNewPagesToLast(Bitmap[] bitmaps) throws Exception{
logger.debug("addNewPagesToLast", "called");
for (Bitmap bitmap : bitmaps) {
addNewPageToLast(bitmap);
} // TODO-rca: 効率悪いので改善する
}
@Override
public void addNewPageAfterIndex(Bitmap bitmap, int index) throws Exception {
logger.debug("addNewPageAfterIndex", "called");
String filename = UUID.randomUUID().toString() + ".png"; // TODO-rca: 拡張子を動的にする
this.fileManager.getNewInstance().createDirectoryIfNotExist(DEFAULT_SAVE_DIR).resolve(DEFAULT_SAVE_DIR).saveBitmap(bitmap, filename);
XmlMetaPageModel xmlMetaPageModel = new XmlMetaPageModel();
xmlMetaPageModel.setFilename(filename);
xmlMetaModel.getPages().add(index, xmlMetaPageModel);
}
@Override
public void addNewPageBeforeIndex(Bitmap bitmap, int index) throws Exception {
logger.debug("addNewPageBeforeIndex", "called");
String filename = UUID.randomUUID().toString() + ".png"; // TODO-rca: 拡張子を動的にする
this.fileManager.getNewInstance().createDirectoryIfNotExist(DEFAULT_SAVE_DIR).resolve(DEFAULT_SAVE_DIR).saveBitmap(bitmap, filename);
XmlMetaPageModel xmlMetaPageModel = new XmlMetaPageModel();
xmlMetaPageModel.setFilename(filename);
xmlMetaModel.getPages().add(index - 1, xmlMetaPageModel);
}
@Override
public void removePageAtIndex(int index) {
}
@Override
public void updatePageAtIndex(Bitmap bitmap, int index) {
}
@Override
public Bitmap getPageAtIndex(int index) {
return null;
}
@Override
public int getPageCount() {
return 0;
}
@Override
public void close() throws Exception{
logger.debug("close", "called");
try {
this.fileManager.getNewInstance().createFileIfNotExist("meta.xml").saveXml(xmlMetaParser.serialize(xmlMetaModel), "meta.xml");
logger.debug("close", "meta.xml saved");
} catch (Exception e) {
logger.error("close", "meta.xml save failed");
logger.trace("close", e.getMessage());
}
}
}
Whitespace-only changes.
@@ -1,16 +0,0 @@
package one.nem.lacerta.processor.module;
import dagger.assisted.Assisted;
import dagger.assisted.AssistedInject;
import one.nem.lacerta.model.document.DocumentDetail;
public class DocumentProcessorModule {
private final DocumentDetail documentDetail;
@AssistedInject
public DocumentProcessorModule(@Assisted DocumentDetail documentDetail) {
this.documentDetail = documentDetail;
}
}
Whitespace-only changes.
Whitespace-only changes.
@@ -1,4 +0,0 @@
<resources>
<!-- TODO: Remove or change this placeholder text -->
<string name="hello_blank_fragment">Hello blank fragment</string>
</resources>
@@ -1,65 +0,0 @@
package one.nem.lacerta.source.file;
import android.graphics.Bitmap;
import org.w3c.dom.Document;
import java.io.File;
import java.io.IOException;
import java.lang.reflect.Field;
import java.nio.file.Path;
import java.util.List;
/** @noinspection unused*/
public interface FileManager {
File getFileRef();
boolean isExist(String name) throws IOException;
boolean isExist();
boolean isDirectory();
boolean isFile();
boolean isWritable();
boolean isReadable();
// Get current instance
FileManager getCurrentInstance();
FileManager getNewInstance();
// Configure
FileManager enableAutoCreateParent();
FileManager disableRootDirCheck();
FileManager setRootDir(Path rootDir);
FileManager setPath(Path path);
FileManager resolve(String path) throws IOException;
// Create
FileManager createFile() throws IOException;
FileManager createFile(String fileName) throws IOException;
FileManager createFileIfNotExist() throws IOException;
FileManager createFileIfNotExist(String fileName) throws IOException;
FileManager createDirectory() throws IOException;
FileManager createDirectory(String directoryName) throws IOException;
FileManager createDirectoryIfNotExist() throws IOException;
FileManager createDirectoryIfNotExist(String directoryName) throws IOException;
// Save
// XML
void saveXml(Document document, String fileName) throws IOException;
void saveXml(Document document) throws IOException;
// Bitmap
void saveBitmap(Bitmap bitmap, String fileName) throws IOException; // TODO-rca: パラメータに対応させる
void saveBitmap(Bitmap bitmap) throws IOException; // TODO-rca: パラメータに対応させる
// Load
// XML
Document loadXml(String fileName) throws IOException;
Document loadXml() throws IOException;
// Bitmap
Bitmap loadBitmap(String fileName) throws IOException;
Bitmap loadBitmap() throws IOException;
}
@@ -1,11 +0,0 @@
package one.nem.lacerta.source.file.factory;
import java.nio.file.Path;
import dagger.assisted.AssistedFactory;
import one.nem.lacerta.source.file.impl.FileManagerImpl;
@AssistedFactory
public interface FileManagerFactory {
FileManagerImpl create(Path rootDir);
}
Whitespace-only changes.
@@ -1,364 +0,0 @@
package one.nem.lacerta.source.file.impl;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import org.w3c.dom.Document;
import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;
import dagger.assisted.Assisted;
import dagger.assisted.AssistedInject;
import one.nem.lacerta.source.file.FileManager;
import one.nem.lacerta.utils.LacertaLogger;
public class FileManagerImpl implements FileManager {
// variables
private Path rootDir;
private Path path;
private boolean autoCreateParent = false;
private boolean disableRootDirCheck = false;
// Injection
private final LacertaLogger logger;
@AssistedInject
public FileManagerImpl(LacertaLogger logger, @Assisted Path rootDir) {
this.logger = logger;
this.rootDir = rootDir;
}
// for generate new instance
public FileManagerImpl(LacertaLogger logger, Path rootDir, Path path, boolean autoCreateParent, boolean disableRootDirCheck) {
this.logger = logger;
this.rootDir = rootDir;
this.path = path;
this.autoCreateParent = autoCreateParent;
this.disableRootDirCheck = disableRootDirCheck;
}
// Internal
private Path resolveStringPath(String path) throws IOException{
String[] pathArray = path.split("/");
Path resolvedPath = this.path;
for (String pathPart : pathArray) {
if (pathPart.equals("..")) {
resolvedPath = resolvedPath.getParent();
continue;
}
try {
resolvedPath = resolvedPath.resolve(pathPart);
} catch (Exception e) {
throw new IOException("Invalid path: " + path);
}
}
logger.debug("resolveStringPath", "resolvedPath: " + resolvedPath);
return resolvedPath;
}
private FileManager newInstance(Path rootDir, Path path, boolean autoCreateParent, boolean disableRootDirCheck) {
logger.debug("newInstance", "Generating new instance");
logger.debug("newInstance", "Path: " + path);
return new FileManagerImpl(this.logger, rootDir, path, autoCreateParent, disableRootDirCheck);
}
@Override
public File getFileRef() {
if (this.isExist()) {
return this.path.toFile();
} else {
return null;
}
}
@Override
public boolean isExist(String name) throws IOException {
Path resolvedPath = this.resolveStringPath(name);
return Files.exists(resolvedPath);
}
@Override
public boolean isExist(){
return Files.exists(this.path);
}
@Override
public boolean isDirectory() {
if (this.isExist()) {
File file = this.path.toFile();
return file.isDirectory();
} else {
return false;
}
}
@Override
public boolean isFile() {
if (this.isExist()) {
File file = this.path.toFile();
return file.isFile();
} else {
return false;
}
}
@Override
public boolean isReadable() {
if (this.isExist()) {
File file = this.path.toFile();
return file.canRead();
} else {
return false;
}
}
@Override
public boolean isWritable() {
if (this.isExist()) {
File file = this.path.toFile();
return file.canWrite();
} else {
return false;
}
}
@Override
public FileManager getCurrentInstance() {
return this;
}
@Override
public FileManager getNewInstance() {
return this.newInstance(this.rootDir, this.rootDir, this.autoCreateParent, this.disableRootDirCheck);
}
@Override
public FileManager enableAutoCreateParent() {
this.autoCreateParent = true;
return this;
}
@Override
public FileManager disableRootDirCheck() {
this.disableRootDirCheck = true;
return this;
}
@Override
public FileManager setRootDir(Path rootDir) {
return this.newInstance(rootDir, this.path, this.autoCreateParent, this.disableRootDirCheck);
}
@Override
public FileManager setPath(Path path) {
Path resolvedPath;
if (this.disableRootDirCheck) {
resolvedPath = path;
} else {
if (path.startsWith(this.rootDir)) {
resolvedPath = path;
} else {
throw new IllegalArgumentException("path must be in rootDir");
}
}
logger.debug("setPath", "resolvedPath: " + resolvedPath);
return this.newInstance(this.rootDir, resolvedPath, this.autoCreateParent, this.disableRootDirCheck);
}
@Override
public FileManager resolve(String path) throws IOException{
Path resolvedPath;
try {
resolvedPath = resolveStringPath(path);
} catch (IOException e) {
logger.error("resolve", e.getMessage());
throw new IOException("Invalid path: " + path);
}
return this.setPath(resolvedPath);
}
// Internal
private void createFileInternal(Path path) throws IOException {
try {
if (this.autoCreateParent) {
if (!path.getParent().toFile().exists()) {
Files.createDirectories(path.getParent());
}
}
Files.createFile(path);
} catch (Exception e) {
logger.error("createFileInternal", e.getMessage());
throw new IOException("Failed to create file");
}
}
@Override
public FileManager createFile() throws IOException {
this.createFileInternal(this.path);
return this;
}
@Override
public FileManager createFile(String fileName) throws IOException { // pathが書き換わってしまうのは想像できない挙動かも?
this.createFileInternal(this.resolveStringPath(fileName));
return this;
}
@Override
public FileManager createFileIfNotExist() throws IOException {
if (!this.isExist()) {
this.createFile();
}
return this;
}
@Override
public FileManager createFileIfNotExist(String fileName) throws IOException {
if (!this.isExist(fileName)) {
this.createFile(fileName);
}
return this;
}
// Internal
private void createDirectoryInternal(Path path) throws IOException {
try {
if (this.autoCreateParent) {
if (!path.getParent().toFile().exists()) {
Files.createDirectories(path.getParent());
}
}
Files.createDirectory(path);
} catch (Exception e) {
logger.error("createDirectoryInternal", e.getMessage());
throw new IOException("Failed to create directory");
}
}
@Override
public FileManager createDirectory() throws IOException {
this.createDirectoryInternal(this.path);
return this;
}
@Override
public FileManager createDirectory(String directoryName) throws IOException {
this.createDirectoryInternal(this.resolveStringPath(directoryName));
return this;
}
@Override
public FileManager createDirectoryIfNotExist() throws IOException {
if (!this.isExist()) {
this.createDirectory();
}
return this;
}
@Override
public FileManager createDirectoryIfNotExist(String directoryName) throws IOException {
if (!this.isExist(directoryName)) {
this.createDirectory(directoryName);
}
return this;
}
// Internal
private void saveXmlInternal(Document document, Path path) throws IOException {
try {
TransformerFactory transformerFactory = TransformerFactory.newInstance();
Transformer transformer = transformerFactory.newTransformer();
DOMSource source = new DOMSource(document);
StreamResult result = new StreamResult(path.toFile());
transformer.transform(source, result);
} catch (Exception e) {
logger.error("saveXmlInternal", e.getMessage());
e.printStackTrace();
throw new IOException("Failed to save xml");
}
}
private void saveBitmapInternal(Bitmap bitmap, Path path) throws IOException {
try {
logger.debug("saveBitmapInternal", "path: " + path);
bitmap.compress(Bitmap.CompressFormat.PNG, 100, Files.newOutputStream(path));
} catch (Exception e) {
logger.error("saveBitmapInternal", e.getMessage());
throw new IOException("Failed to save bitmap");
}
}
@Override
public void saveXml(Document document, String fileName) throws IOException {
this.saveXmlInternal(document, this.resolveStringPath(fileName));
}
@Override
public void saveXml(Document document) throws IOException {
this.saveXmlInternal(document, this.path);
}
@Override
public void saveBitmap(Bitmap bitmap, String fileName) throws IOException {
this.saveBitmapInternal(bitmap, this.resolveStringPath(fileName));
}
@Override
public void saveBitmap(Bitmap bitmap) throws IOException {
this.saveBitmapInternal(bitmap, this.path);
}
// Internal
private Document loadXmlInternal(Path path) throws IOException {
try {
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
DocumentBuilder builder = factory.newDocumentBuilder();
return builder.parse(Files.newInputStream(path));
} catch (Exception e) {
logger.error("loadXmlInternal", e.getMessage());
throw new IOException("Failed to load xml");
}
}
private Bitmap loadBitmapInternal(Path path) throws IOException {
try {
return BitmapFactory.decodeFile(path.toString());
} catch (Exception e) {
logger.error("loadBitmapInternal", e.getMessage());
throw new IOException("Failed to load bitmap");
}
}
@Override
public Document loadXml(String fileName) throws IOException {
return this.loadXmlInternal(this.resolveStringPath(fileName));
}
@Override
public Document loadXml() throws IOException {
return this.loadXmlInternal(this.path);
}
@Override
public Bitmap loadBitmap(String fileName) throws IOException {
return this.loadBitmapInternal(this.resolveStringPath(fileName));
}
@Override
public Bitmap loadBitmap() throws IOException {
return this.loadBitmapInternal(this.path);
}
}
Whitespace-only changes.
@@ -1,20 +0,0 @@
package one.nem.lacerta.source.file.module;
import java.nio.file.Path;
import dagger.assisted.Assisted;
import dagger.assisted.AssistedInject;
public class FileManagerModule {
private final Path rootDir;
@AssistedInject
public FileManagerModule(@Assisted Path rootDir) {
this.rootDir = rootDir;
}
public Path getRootDir() {
return rootDir;
}
}
Whitespace-only changes.
+1 -2
View File
@@ -37,6 +37,5 @@ dependencies {
implementation libs.com.google.dagger.hilt.android
annotationProcessor libs.com.google.dagger.hilt.compiler
// model
implementation project(':model')
//
}
@@ -1,7 +1,5 @@
package one.nem.lacerta.utils;
import one.nem.lacerta.utils.model.KeyValueLog;
public interface LacertaLogger {
void info(String tag, String message);
@@ -11,7 +9,4 @@ public interface LacertaLogger {
void trace(String tag, String message);
void fatal(String tag, String message);
String buildKVMessage(KeyValueLog... logs);
// With name
String buildKVMessage(String name, KeyValueLog... logs);
}
@@ -1,13 +0,0 @@
package one.nem.lacerta.utils;
import org.w3c.dom.Document;
import one.nem.lacerta.model.document.internal.XmlMetaModel;
public interface XmlMetaParser {
XmlMetaModel deserialize(Document document);
Document serialize(XmlMetaModel meta);
}
@@ -5,8 +5,6 @@ import android.util.Log;
import javax.inject.Inject;
import one.nem.lacerta.utils.LacertaLogger;
import one.nem.lacerta.utils.model.KeyValueLog;
public class LacertaLoggerImpl implements LacertaLogger{
@Inject
@@ -42,30 +40,4 @@ public class LacertaLoggerImpl implements LacertaLogger{
public void fatal(String tag, String message) {
Log.wtf(tag, message);
}
@Override
public String buildKVMessage(KeyValueLog... logs) {
StringBuilder builder = new StringBuilder();
for (KeyValueLog log : logs) {
builder.append(log.getKey());
builder.append(": ");
builder.append(log.getValue());
builder.append("\n");
}
return builder.toString();
}
@Override
public String buildKVMessage(String name, KeyValueLog... logs) {
StringBuilder builder = new StringBuilder();
builder.append(name);
builder.append("\n");
for (KeyValueLog log : logs) {
builder.append(log.getKey());
builder.append(": ");
builder.append(log.getValue());
builder.append("\n");
}
return builder.toString();
}
}
@@ -1,96 +0,0 @@
package one.nem.lacerta.utils.impl;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import java.util.ArrayList;
import javax.inject.Inject;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import one.nem.lacerta.model.document.internal.XmlMetaModel;
import one.nem.lacerta.model.document.internal.XmlMetaPageModel;
import one.nem.lacerta.utils.XmlMetaParser;
import one.nem.lacerta.utils.LacertaLogger;
public class XmlMetaParserImpl implements XmlMetaParser{
@Inject
LacertaLogger logger;
@Inject
public XmlMetaParserImpl() {
}
@Override
public XmlMetaModel deserialize(Document document) {
logger.debug("deserialize", "called");
try {
Element rootElement = document.getDocumentElement();
XmlMetaModel meta = new XmlMetaModel();
meta.setTitle(rootElement.getElementsByTagName("title").item(0).getTextContent());
meta.setAuthor(rootElement.getElementsByTagName("author").item(0).getTextContent());
meta.setDescription(rootElement.getElementsByTagName("description").item(0).getTextContent());
meta.setDefaultBranch(rootElement.getElementsByTagName("defaultBranch").item(0).getTextContent());
ArrayList<XmlMetaPageModel> pages = new ArrayList<>();
for(int i = 0; i < rootElement.getElementsByTagName("pages").getLength(); i++) {
Element pageElement = (Element) rootElement.getElementsByTagName("page").item(i);
XmlMetaPageModel page = new XmlMetaPageModel();
page.setFilename(pageElement.getElementsByTagName("filename").item(0).getTextContent());
pages.add(page);
}
meta.setPages(pages);
return meta;
} catch (Exception e) {
logger.error("deserialize", "something wrong");
logger.trace("deserialize", e.getMessage());
}
return null;
}
@Override
public Document serialize(XmlMetaModel meta) {
logger.debug("serialize", "called");
try {
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
DocumentBuilder builder = factory.newDocumentBuilder();
Document document = builder.newDocument();
Element rootElement = document.createElement("meta");
appendElement(document, rootElement, "title", meta.getTitle());
appendElement(document, rootElement, "author", meta.getAuthor());
appendElement(document, rootElement, "description", meta.getDescription());
appendElement(document, rootElement, "defaultBranch", meta.getDefaultBranch());
Element pagesElement = document.createElement("pages");
for(XmlMetaPageModel page : meta.getPages()) {
Element pageElement = document.createElement("page");
appendElement(document, pageElement, "filename", page.getFilename());
pagesElement.appendChild(pageElement);
}
rootElement.appendChild(pagesElement);
document.appendChild(rootElement);
return document;
} catch (Exception e) {
logger.error("serialize", "something wrong");
logger.trace("serialize", e.getMessage());
}
return null;
}
// Internal Methods
private void appendElement(Document document, Element rootElement, String name, String textContent) {
Element element = document.createElement(name);
element.setTextContent(textContent);
rootElement.appendChild(element);
}
}
@@ -1,31 +0,0 @@
package one.nem.lacerta.utils.model;
public class KeyValueLog {
String key;
String value;
public KeyValueLog(String key, String value) {
this.key = key;
this.value = value;
}
// Getter
public String getKey() {
return key;
}
public String getValue() {
return value;
}
// Setter
public void setKey(String key) {
this.key = key;
}
public void setValue(String value) {
this.value = value;
}
}
@@ -1,17 +0,0 @@
package one.nem.lacerta.utils.module;
import dagger.Binds;
import dagger.Module;
import dagger.hilt.InstallIn;
import dagger.hilt.components.SingletonComponent;
import one.nem.lacerta.utils.XmlMetaParser;
import one.nem.lacerta.utils.impl.XmlMetaParserImpl;
@Module
@InstallIn(SingletonComponent.class)
abstract public class XmlMetaParserModule {
@Binds
public abstract XmlMetaParser bindXmlMetaParser(XmlMetaParserImpl impl);
}