20 lines
1.0 KiB
Plaintext
20 lines
1.0 KiB
Plaintext
fragment {
|
|||
|
|
import interface GutenbergCatalog;
|
||
|
|
import package GutenbergRuntime;
|
||
|
|
atom GutenbergCatalogObject id "atom:gutenberg:catalog";
|
||
|
|
conform GutenbergCatalogObject as GutenbergCatalog id "reading:books:catalog" {
|
||
|
|
private state CatalogName id "reading:books:name" on Self : string policy register;
|
||
|
|
initialize {name to state CatalogName;};
|
||
|
|
bind name.get to state CatalogName.read;
|
||
|
|
bind create.call to package GutenbergRuntime.create with {catalog to creation GutenbergCatalogObject with {GutenbergCatalog from input;};};
|
||
|
|
bind search.call to package GutenbergRuntime.search;
|
||
|
|
bind readBook.call to package GutenbergRuntime.readBook;
|
||
|
|
}
|
||
|
|
conform ReadingLibrary as GutenbergCatalog id "reading:books:source" {
|
||
|
|
bind name.get to interface LanguageReader.name.get;
|
||
|
|
bind create.call to package GutenbergRuntime.create with {catalog to creation GutenbergCatalogObject with {GutenbergCatalog from input;};};
|
||
|
|
bind search.call to package GutenbergRuntime.search;
|
||
|
|
bind readBook.call to package GutenbergRuntime.readBook;
|
||
|
|
}
|
||
|
|
}
|