Skip to content

Commit

Permalink
Merge pull request #107 from vitrivr/dev
Browse files Browse the repository at this point in the history
v2.5: Angular 13, Metadata Specification, Bugfixes
  • Loading branch information
silvanheller authored Dec 8, 2021
2 parents 2dcc4c0 + 9b16072 commit 829bf05
Show file tree
Hide file tree
Showing 103 changed files with 27,825 additions and 15,203 deletions.
52 changes: 52 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{
"root": true,
"ignorePatterns": [
"projects/**/*"
],
"overrides": [
{
"files": [
"*.ts"
],
"parserOptions": {
"project": [
"tsconfig.json",
"e2e/tsconfig.json"
],
"createDefaultProgram": true
},
"extends": [
"plugin:@angular-eslint/recommended",
"plugin:@angular-eslint/template/process-inline-templates"
],
"rules": {
"max-len": 0,
"@angular-eslint/component-selector": [
"error",
{
"prefix": "app",
"style": "kebab-case",
"type": "element"
}
],
"@angular-eslint/directive-selector": [
"error",
{
"prefix": "app",
"style": "camelCase",
"type": "attribute"
}
]
}
},
{
"files": [
"*.html"
],
"extends": [
"plugin:@angular-eslint/template/recommended"
],
"rules": {}
}
]
}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ src/app/core/openapi/**
!.vscode/extensions.json

# misc
/.angular/cache
/.sass-cache
/connect.lock
/coverage
Expand Down
40 changes: 20 additions & 20 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"aot": true,
"outputPath": "dist",
"index": "src/index.html",
"main": "src/main.ts",
Expand All @@ -21,14 +20,25 @@
"src/assets",
"src/favicon.ico",
"src/config.json",
"src/evaluation.json"
"src/evaluation.json",
{
"glob": "**/*",
"input": "node_modules/leaflet/dist/images/",
"output": "."
}
],
"styles": [
"node_modules/leaflet/dist/leaflet.css",
"node_modules/leaflet-geosearch/dist/geosearch.css",
"src/vitrivr-theme.scss"
],
"scripts": []
"scripts": [],
"vendorChunk": true,
"extractLicenses": false,
"buildOptimizer": false,
"sourceMap": true,
"optimization": false,
"namedChunks": true
},
"configurations": {
"production": {
Expand All @@ -42,7 +52,6 @@
"outputHashing": "all",
"sourceMap": false,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
Expand All @@ -53,7 +62,8 @@
}
]
}
}
},
"defaultConfiguration": ""
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
Expand Down Expand Up @@ -92,13 +102,12 @@
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"builder": "@angular-eslint/builder:lint",
"options": {
"tsConfig": [
"src/tsconfig.app.json",
"src/tsconfig.spec.json"
],
"exclude": []
"lintFilePatterns": [
"src/**/*.ts",
"src/**/*.html"
]
}
}
}
Expand All @@ -114,15 +123,6 @@
"protractorConfig": "./protractor.conf.js",
"devServerTarget": "vitrivr-ng:serve"
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"e2e/tsconfig.e2e.json"
],
"exclude": []
}
}
}
}
Expand Down
3 changes: 3 additions & 0 deletions openapi/cineast/.openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
README.md
api.module.ts
api\api.ts
api\default.service.ts
api\metadata.service.ts
api\misc.service.ts
api\object.service.ts
Expand All @@ -21,6 +22,8 @@ model\distinctElementsResult.ts
model\extractionContainerMessage.ts
model\extractionItemContainer.ts
model\featuresAllCategoriesQueryResult.ts
model\featuresByCategoryQueryResult.ts
model\featuresByEntityQueryResult.ts
model\featuresTextCategoryQueryResult.ts
model\idList.ts
model\mediaObjectDescriptor.ts
Expand Down
4 changes: 2 additions & 2 deletions openapi/cineast/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## @cineast-openapi/api@v1-SNAPSHOT.202110251516
## @cineast-openapi/api@v1-SNAPSHOT.202111151700

### Building

Expand All @@ -19,7 +19,7 @@ Navigate to the folder of your consuming project and run one of next commands.
_published:_

```
npm install @cineast-openapi/api@v1-SNAPSHOT.202110251516 --save
npm install @cineast-openapi/api@v1-SNAPSHOT.202111151700 --save
```

_without publishing (not recommended):_
Expand Down
1 change: 1 addition & 0 deletions openapi/cineast/api.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { NgModule, ModuleWithProviders, SkipSelf, Optional } from '@angular/core
import { Configuration } from './configuration';
import { HttpClient } from '@angular/common/http';

import { DefaultService } from './api/default.service';
import { MetadataService } from './api/metadata.service';
import { MiscService } from './api/misc.service';
import { ObjectService } from './api/object.service';
Expand Down
4 changes: 3 additions & 1 deletion openapi/cineast/api/api.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
export * from './default.service';
import { DefaultService } from './default.service';
export * from './metadata.service';
import { MetadataService } from './metadata.service';
export * from './misc.service';
Expand All @@ -14,4 +16,4 @@ export * from './status.service';
import { StatusService } from './status.service';
export * from './tag.service';
import { TagService } from './tag.service';
export const APIS = [MetadataService, MiscService, ObjectService, SegmentService, SegmentsService, SessionService, StatusService, TagService];
export const APIS = [DefaultService, MetadataService, MiscService, ObjectService, SegmentService, SegmentsService, SessionService, StatusService, TagService];
2 changes: 1 addition & 1 deletion openapi/cineast/api/default.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import { Configuration } from '../configurat
})
export class DefaultService {

protected basePath = 'http://localhost:4567';
protected basePath = 'http://localhost';
public defaultHeaders = new HttpHeaders();
public configuration = new Configuration();
public encoder: HttpParameterCodec;
Expand Down
118 changes: 117 additions & 1 deletion openapi/cineast/api/metadata.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ import { CustomHttpParameterCodec } from '../encoder';
import { Observable } from 'rxjs';

import { FeaturesAllCategoriesQueryResult } from '../model/models';
import { FeaturesByCategoryQueryResult } from '../model/models';
import { FeaturesByEntityQueryResult } from '../model/models';
import { FeaturesTextCategoryQueryResult } from '../model/models';
import { IdList } from '../model/models';
import { MediaObjectMetadataQueryResult } from '../model/models';
Expand All @@ -35,7 +37,7 @@ import { Configuration } from '../configurat
})
export class MetadataService {

protected basePath = 'http://localhost:4567';
protected basePath = 'http://localhost';
public defaultHeaders = new HttpHeaders();
public configuration = new Configuration();
public encoder: HttpParameterCodec;
Expand Down Expand Up @@ -90,6 +92,120 @@ export class MetadataService {
return httpParams;
}

/**
* Find features for the given category for all (or specific) IDs
* Find features for the given category for all (or specific) IDs
* @param category
* @param idList
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
*/
public findFeaturesByCategory(category: string, idList?: IdList, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<FeaturesByCategoryQueryResult>;
public findFeaturesByCategory(category: string, idList?: IdList, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpResponse<FeaturesByCategoryQueryResult>>;
public findFeaturesByCategory(category: string, idList?: IdList, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<FeaturesByCategoryQueryResult>>;
public findFeaturesByCategory(category: string, idList?: IdList, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> {
if (category === null || category === undefined) {
throw new Error('Required parameter category was null or undefined when calling findFeaturesByCategory.');
}

let headers = this.defaultHeaders;

let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts: string[] = [
'application/json'
];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (httpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}


// to determine the Content-Type header
const consumes: string[] = [
'application/json'
];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected);
}

let responseType: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) {
responseType = 'text';
}

return this.httpClient.post<FeaturesByCategoryQueryResult>(`${this.configuration.basePath}/api/v1/find/feature/all/by/category/${encodeURIComponent(String(category))}`,
idList,
{
responseType: <any>responseType,
withCredentials: this.configuration.withCredentials,
headers: headers,
observe: observe,
reportProgress: reportProgress
}
);
}

/**
* Find features for the given entity name for all (or specific) IDs
* Find features for the given entity name for all (or specific) IDs
* @param entity
* @param idList
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
*/
public findFeaturesByEntity(entity: string, idList?: IdList, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<FeaturesByEntityQueryResult>;
public findFeaturesByEntity(entity: string, idList?: IdList, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpResponse<FeaturesByEntityQueryResult>>;
public findFeaturesByEntity(entity: string, idList?: IdList, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<FeaturesByEntityQueryResult>>;
public findFeaturesByEntity(entity: string, idList?: IdList, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> {
if (entity === null || entity === undefined) {
throw new Error('Required parameter entity was null or undefined when calling findFeaturesByEntity.');
}

let headers = this.defaultHeaders;

let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts: string[] = [
'application/json'
];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (httpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}


// to determine the Content-Type header
const consumes: string[] = [
'application/json'
];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected);
}

let responseType: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) {
responseType = 'text';
}

return this.httpClient.post<FeaturesByEntityQueryResult>(`${this.configuration.basePath}/api/v1/find/feature/all/by/entity/${encodeURIComponent(String(entity))}`,
idList,
{
responseType: <any>responseType,
withCredentials: this.configuration.withCredentials,
headers: headers,
observe: observe,
reportProgress: reportProgress
}
);
}

/**
* Find metadata for the given object id
* Find metadata by the given object id
Expand Down
2 changes: 1 addition & 1 deletion openapi/cineast/api/misc.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import { Configuration } from '../configurat
})
export class MiscService {

protected basePath = 'http://localhost:4567';
protected basePath = 'http://localhost';
public defaultHeaders = new HttpHeaders();
public configuration = new Configuration();
public encoder: HttpParameterCodec;
Expand Down
2 changes: 1 addition & 1 deletion openapi/cineast/api/object.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import { Configuration } from '../configurat
})
export class ObjectService {

protected basePath = 'http://localhost:4567';
protected basePath = 'http://localhost';
public defaultHeaders = new HttpHeaders();
public configuration = new Configuration();
public encoder: HttpParameterCodec;
Expand Down
2 changes: 1 addition & 1 deletion openapi/cineast/api/segment.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import { Configuration } from '../configurat
})
export class SegmentService {

protected basePath = 'http://localhost:4567';
protected basePath = 'http://localhost';
public defaultHeaders = new HttpHeaders();
public configuration = new Configuration();
public encoder: HttpParameterCodec;
Expand Down
2 changes: 1 addition & 1 deletion openapi/cineast/api/segments.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import { Configuration } from '../configurat
})
export class SegmentsService {

protected basePath = 'http://localhost:4567';
protected basePath = 'http://localhost';
public defaultHeaders = new HttpHeaders();
public configuration = new Configuration();
public encoder: HttpParameterCodec;
Expand Down
2 changes: 1 addition & 1 deletion openapi/cineast/api/session.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import { Configuration } from '../configurat
})
export class SessionService {

protected basePath = 'http://localhost:4567';
protected basePath = 'http://localhost';
public defaultHeaders = new HttpHeaders();
public configuration = new Configuration();
public encoder: HttpParameterCodec;
Expand Down
Loading

0 comments on commit 829bf05

Please sign in to comment.