refactored resource type and type mapping

This commit is contained in:
lotte
2019-06-24 16:29:54 +02:00
parent b846384ba7
commit f980b55c1c
101 changed files with 440 additions and 427 deletions

View File

@@ -1,42 +1,31 @@
import { autoserialize, autoserializeAs } from 'cerialize';
import { ListableObject } from '../../shared/object-collection/shared/listable-object.model';
import { ResourceType } from './resource-type';
import { resourceType } from './resource-type.decorator';
import { TypedObject } from '../cache/object-cache.reducer';
import { ResourceType } from './resource-type';
/**
* Class object representing a browse entry
* This class is not normalized because browse entries do not have self links
*/
@resourceType(ResourceType.BrowseEntry)
export class BrowseEntry implements ListableObject, TypedObject {
/**
* The resource type of this browse entry
*/
@autoserialize
type: ResourceType;
static type = new ResourceType('browseEntry');
/**
* The authority string of this browse entry
*/
@autoserialize
authority: string;
/**
* The value of this browse entry
*/
@autoserialize
value: string;
/**
* The language of the value of this browse entry
*/
@autoserializeAs('valueLang')
language: string;
/**
* The count of this browse entry
*/
@autoserialize
count: number;
}