ServerDataBase
SOFA remote data-base.
Constructor Summary
| Public Constructor | ||
| public |
constructor(options: Object) This is only a constructor, it does not load any thing. |
|
Method Summary
| Public Methods | ||
| public |
getDataSetDefinitions(sourceUrl: String): Promise.<Object | String> Get the data-set definitions of a given URL. |
|
| public |
getSourcePositions(sourceUrl: String): Promise<Array<Array.<Number>> | Error> Get all source positions of a given URL. |
|
| public |
Get URLs, possibly filtered. |
|
| public |
loadCatalogue(sourceUrl: String, destination: Object): Promise.<String | Error> Asynchronously load complete catalogue from the server, including the catalogue links found in any partial catalogue. |
|
Public Constructors
public constructor(options: Object) source
This is only a constructor, it does not load any thing.
Params:
| Name | Type | Attribute | Description |
| options | Object |
|
|
| options.serverUrl | String |
|
base URL of server, including
protocol, eg. 'http://bili2.ircam.fr'. Default protocol is |
Public Methods
public getDataSetDefinitions(sourceUrl: String): Promise.<Object | String> source
Get the data-set definitions of a given URL.
Params:
| Name | Type | Attribute | Description |
| sourceUrl | String | is the complete SOFA URL, with the server, like 'http://bili2.ircam.fr/SimpleFreeFieldHRIR/BILI/COMPENSATED/44100/IRC_1100_C_HRIR.sofa' |
Return:
| Promise.<Object | String> | The promise will resolve after
successfully loading, with definitions as * |
public getSourcePositions(sourceUrl: String): Promise<Array<Array.<Number>> | Error> source
Get all source positions of a given URL.
Params:
| Name | Type | Attribute | Description |
| sourceUrl | String | is the complete SOFA URL, with the server, like 'http://bili2.ircam.fr/SimpleFreeFieldHRIR/BILI/COMPENSATED/44100/IRC_1100_C_HRIR.sofa' |
public getUrls(options: Object): Array<String> source
Get URLs, possibly filtered.
Any filter can be partial, and is case-insensitive. The result must
match every supplied filter. Undefined filters are not applied. For
any filter, | is the or operator.
Params:
| Name | Type | Attribute | Description |
| options | Object |
|
optional filters |
| options.convention | String |
|
'HRIR' or 'SOS' |
| options.dataBase | String |
|
'LISTEN', 'BILI', etc. |
| options.equalisation | String |
|
'RAW','COMPENSATED' |
| options.sampleRate | String |
|
in Hertz |
| options.sosOrder | String |
|
'12order' or '24order' |
| options.freePattern | String |
|
any pattern matched globally. Use separators (spaces, tabs, etc.) to combine multiple patterns: '44100 listen' will restrict on URLs matching '44100' and 'listen'; '44100|48000 bili|listen' matches ('44100' or '48000') and ('bili' or 'listen'). |
public loadCatalogue(sourceUrl: String, destination: Object): Promise.<String | Error> source
Asynchronously load complete catalogue from the server, including the catalogue links found in any partial catalogue.
Params:
| Name | Type | Attribute | Description |
| sourceUrl | String |
|
URL of the root catalogue, including the server, like 'http://bili2.ircam.fr/catalog.xml'. Default is 'catalog.xml' at serverURL supplied at ServerDataBase#constructor. |
| destination | Object |
|
Catalogue to update. Default is internal. |
Return:
| Promise.<String | Error> | The promise will resolve (with sourceUrl) when every sub-catalogue will successfully load, or will reject (with an error) as soon as one transfer fails. |