mirror of
https://github.com/lacerta-doc/Lacerta.git
synced 2024-11-26 17:53:14 +00:00
フォーマット
This commit is contained in:
parent
63009b1a9a
commit
84b9de17cf
|
@ -8,25 +8,27 @@ import java.util.List;
|
|||
import java.util.Map;
|
||||
|
||||
import one.nem.lacerta.model.document.DocumentMeta;
|
||||
|
||||
//フォルダ管理機能
|
||||
public class LibraryFolderFragment extends Fragment{
|
||||
public class LibraryFolderFragment extends Fragment {
|
||||
|
||||
private Map<String, List<DocumentMeta>> folderMap;
|
||||
private Map<String, List<DocumentMeta>> folderMap;
|
||||
|
||||
public LibraryFolderFragment() {
|
||||
folderMap = new HashMap<>();
|
||||
}
|
||||
|
||||
public void addDocumentToFolder(String folderName, DocumentMeta documentMeta) {
|
||||
if (!folderMap.containsKey(folderName)) {
|
||||
folderMap.put(folderName, new ArrayList<>());
|
||||
}
|
||||
|
||||
List<DocumentMeta> documents = folderMap.get(folderName);
|
||||
documents.add(documentMeta);
|
||||
}
|
||||
//フォルダに関連するドキュメントを取得するためのメソッド
|
||||
public List<DocumentMeta> getDocumentsInFolder(String folderName) {
|
||||
return folderMap.getOrDefault(folderName, new ArrayList<>());
|
||||
}
|
||||
public LibraryFolderFragment() {
|
||||
folderMap = new HashMap<>();
|
||||
}
|
||||
|
||||
public void addDocumentToFolder(String folderName, DocumentMeta documentMeta) {
|
||||
if (!folderMap.containsKey(folderName)) {
|
||||
folderMap.put(folderName, new ArrayList<>());
|
||||
}
|
||||
|
||||
List<DocumentMeta> documents = folderMap.get(folderName);
|
||||
documents.add(documentMeta);
|
||||
}
|
||||
|
||||
//フォルダに関連するドキュメントを取得するためのメソッド
|
||||
public List<DocumentMeta> getDocumentsInFolder(String folderName) {
|
||||
return folderMap.getOrDefault(folderName, new ArrayList<>());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -94,7 +94,7 @@ public class LibraryTopFragment extends Fragment {
|
|||
documentRecyclerView.setLayoutManager(layoutManager);
|
||||
|
||||
// ドキュメントのメタデータを取得
|
||||
List<DocumentMeta> metas = document.getAllDocumentMetas(100);
|
||||
List<DocumentMeta> metas = document.getAllDocumentMetas(100);
|
||||
|
||||
// ドキュメントをデフォルトフォルダに追加
|
||||
// フォルダごとにドキュメントを管理する
|
||||
|
|
Loading…
Reference in New Issue
Block a user