-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Added
ajson_multi_file_clusters_data_adapter
- Updated `SmartClusters` class with an `init` method - Refined `SourceClustersAdapter` to dynamically determine the number of clusters based on available sources, improving adaptability.
- Loading branch information
Brian Joseph Petro
committed
Dec 22, 2024
1 parent
ce3a388
commit bc49fe1
Showing
4 changed files
with
51 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import { AjsonMultiFileCollectionDataAdapter, AjsonMultiFileItemDataAdapter } from 'smart-collections/adapters/ajson_multi_file.js'; | ||
|
||
/** | ||
* @class AjsonMultiFileGroupsDataAdapter | ||
* @extends AjsonMultiFileCollectionDataAdapter | ||
* @description | ||
* Similar to the sources adapter, but for groups (directories). | ||
* Handles load/save/delete operations for directory groups. | ||
*/ | ||
export class AjsonMultiFileClustersDataAdapter extends AjsonMultiFileCollectionDataAdapter { | ||
ItemDataAdapter = AjsonMultiFileClusterDataAdapter; | ||
get_data_file_name(key) { | ||
return 'clusters'; | ||
} | ||
} | ||
|
||
/** | ||
* @class AjsonMultiFileGroupDataAdapter | ||
* @extends AjsonMultiFileItemDataAdapter | ||
* @description | ||
* Handles individual directory group items stored in append-only AJSON files. | ||
*/ | ||
export class AjsonMultiFileClusterDataAdapter extends AjsonMultiFileItemDataAdapter { | ||
|
||
} | ||
|
||
export default { | ||
collection: AjsonMultiFileClustersDataAdapter, | ||
item: AjsonMultiFileClusterDataAdapter | ||
}; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,11 @@ | ||
import { SmartClusters } from "./smart_clusters.js"; | ||
import { SmartCluster } from "./smart_cluster.js"; | ||
import source_cluster_group_adapter from "./adapters/source.js"; | ||
import ajson_multi_file_clusters_data_adapter from "./adapters/data/ajson_multi_file.js"; | ||
|
||
export { SmartClusters, SmartCluster, source_cluster_group_adapter }; | ||
export { | ||
SmartClusters, | ||
SmartCluster, | ||
source_cluster_group_adapter, | ||
ajson_multi_file_clusters_data_adapter | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters