Mercurial > hg > ng2-query-ismi
changeset 16:7d82ca32833c
omit some attributes from list.
author | Robert Casties <casties@mpiwg-berlin.mpg.de> |
---|---|
date | Thu, 21 Jan 2016 18:47:57 +0100 |
parents | f84ff6781e57 |
children | f6af2c8347de |
files | app/query.service.ts |
diffstat | 1 files changed, 16 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/app/query.service.ts Thu Jan 21 17:26:22 2016 +0100 +++ b/app/query.service.ts Thu Jan 21 18:47:57 2016 +0100 @@ -10,10 +10,11 @@ @Injectable() export class QueryService { - public neo4jBaseUrl = 'https://ismi-dev.mpiwg-berlin.mpg.de/neo4j-ismi/db/data'; - //public neo4jBaseUrl = 'http://localhost:7474/db/data'; + //public neo4jBaseUrl = 'https://ismi-dev.mpiwg-berlin.mpg.de/neo4j-ismi/db/data'; + public neo4jBaseUrl = 'http://localhost:7474/db/data'; public openMindBaseUrl = 'https://ismi-dev.mpiwg-berlin.mpg.de/om4-ismi/'; - //public openMindBaseUrl = 'http://localhost:18080/ismi-richfaces/': + //public openMindBaseUrl = 'http://localhost:18080/ismi-richfaces/'; + public excludedAttributes = {'type': true}; public state: QueryState; public ismiObjectTypes: any; @@ -168,7 +169,9 @@ updateQuery() { this.createCypherQuery(); this.state.resultInfo = 'loading...'; - // run query for result table + /* + * run query for result table + */ var resQuery = this.state.resultCypherQuery; var queryParams = this.state.cypherQueryParams; var resRes = this.fetchCypherResult(resQuery, queryParams); @@ -198,25 +201,30 @@ err => console.error("neo4j result error=", err), () => console.debug('neo4j result query Complete') ); - // run query for attribute list + /* + * run query for attribute list + */ if (this.state.attributesCypherQuery) { var attRes = this.fetchCypherResult(this.state.attributesCypherQuery, queryParams); attRes.subscribe( data => { console.debug("neo4j att data=", data); - this.state.nextQueryAttributes = data.results[0].data.map(elem => elem.row[0]).filter(elem => elem[0] != "_");; + this.state.nextQueryAttributes = data.results[0].data.map(elem => elem.row[0]) + .filter(elem => elem[0] != "_" && !this.excludedAttributes[elem]); }, err => console.error("neo4j att error=", err), () => console.debug('neo4j att query Complete') ); } - // run query for relations list + /* + * run query for relations list + */ if (this.state.relationsCypherQuery) { var attRes = this.fetchCypherResult(this.state.relationsCypherQuery, queryParams); attRes.subscribe( data => { console.debug("neo4j rel data=", data); - this.state.nextQueryRelations = data.results[0].data.map(elem => elem.row[0]).filter(elem => elem[0] != "_");; + this.state.nextQueryRelations = data.results[0].data.map(elem => elem.row[0]).filter(elem => elem[0] != "_"); }, err => console.error("neo4j rel error=", err), () => console.debug('neo4j rel query Complete')