Lawtext core references / core/src/data/loaders/common / Loader
Class: Loader
core/src/data/loaders/common.Loader
Hierarchy
-
Loader
Table of contents
Constructors
Properties
Methods
- cacheLawListStruct
- getLawInfoByLawID
- getLawInfoByLawIDOrLawNum
- getLawInfoByLawNum
- loadBaseLawInfosFromCSV
- loadLawInfosStruct
- loadLawXMLStructByInfo
- makeLawListFromBaseLawInfos
Constructors
constructor
• new Loader(): Loader
Returns
Properties
_cache
• Protected
_cache: Object
Type declaration
Name | Type |
---|---|
lawListStruct | null | LawInfosStruct |
Defined in
core/src/data/loaders/common.ts:23 (opens in a new tab)
Methods
cacheLawListStruct
▸ cacheLawListStruct(): Promise
<LawInfosStruct
>
Returns
Promise
<LawInfosStruct
>
Defined in
core/src/data/loaders/common.ts:27 (opens in a new tab)
getLawInfoByLawID
▸ getLawInfoByLawID(lawID
): Promise
<null
| LawInfo
>
Parameters
Name | Type |
---|---|
lawID | string |
Returns
Promise
<null
| LawInfo
>
Defined in
core/src/data/loaders/common.ts:49 (opens in a new tab)
getLawInfoByLawIDOrLawNum
▸ getLawInfoByLawIDOrLawNum(lawIDOrLawNum
): Promise
<null
| LawInfo
>
Parameters
Name | Type |
---|---|
lawIDOrLawNum | string |
Returns
Promise
<null
| LawInfo
>
Defined in
core/src/data/loaders/common.ts:62 (opens in a new tab)
getLawInfoByLawNum
▸ getLawInfoByLawNum(lawNum
): Promise
<null
| LawInfo
>
Parameters
Name | Type |
---|---|
lawNum | string |
Returns
Promise
<null
| LawInfo
>
Defined in
core/src/data/loaders/common.ts:36 (opens in a new tab)
loadBaseLawInfosFromCSV
▸ loadBaseLawInfosFromCSV(): Promise
<BaseLawInfo
[]>
Returns
Promise
<BaseLawInfo
[]>
Defined in
core/src/data/loaders/common.ts:20 (opens in a new tab)
loadLawInfosStruct
▸ loadLawInfosStruct(): Promise
<LawInfosStruct
>
Returns
Promise
<LawInfosStruct
>
Defined in
core/src/data/loaders/common.ts:19 (opens in a new tab)
loadLawXMLStructByInfo
▸ loadLawXMLStructByInfo(info
): Promise
<LawXMLStruct
>
Parameters
Name | Type |
---|---|
info | BaseLawInfo |
Returns
Promise
<LawXMLStruct
>
Defined in
core/src/data/loaders/common.ts:21 (opens in a new tab)
makeLawListFromBaseLawInfos
▸ makeLawListFromBaseLawInfos(baseLawInfos
, onProgress?
): Promise
<LawList
>
Parameters
Name | Type |
---|---|
baseLawInfos | BaseLawInfo [] |
onProgress | (ratio : number , message : string ) => void |
Returns
Promise
<LawList
>