Mercurial > hg > ng2-query-ismi
diff app/query.service.ts @ 5:b06a5d61afed
new query state stuff.
author | Robert Casties <casties@mpiwg-berlin.mpg.de> |
---|---|
date | Wed, 13 Jan 2016 18:57:31 +0100 |
parents | c741a00d38de |
children | 9f5473536a98 |
line wrap: on
line diff
--- a/app/query.service.ts Wed Jan 13 16:01:47 2016 +0100 +++ b/app/query.service.ts Wed Jan 13 18:57:31 2016 +0100 @@ -4,17 +4,23 @@ import 'rxjs/Rx'; // import all RxJS operators import {QueryMode} from './query-mode'; +import {QueryState} from './query-state'; +import {QueryStep} from './query-step'; @Injectable() export class QueryService { + public queryState: QueryState; + public ismiObjectTypes; public QUERY_MODES: QueryMode[] = [ {id: 'type_is', label:'Object type is'}, {id: 'att_contains', label: 'Attribute contains'}]; - constructor(private _http: Http) {} + constructor(private _http: Http) { + this.queryState = {'queries': [], 'results': [], numResults: 0}; + } getQueryModes(): QueryMode[] { return this.QUERY_MODES; @@ -27,7 +33,8 @@ } else if (queryMode.id === 'type_is') { options = this.ismiObjectTypes; } - return Promise.resolve(options); + console.debug("getQueryOptions returns: ", options); + return options; } setupIsmiObjectTypes() {