Skip to main content

@cognizone/ng-application-profile

Enumerations​

Classes​

Interfaces​

Type aliases​

ApplicationProfileOrApName​

Ƭ ApplicationProfileOrApName: ApplicationProfile | string

Since Aps are usually loaded on application boot, we usually store them in the state and refer to them by their unique name. With that in mind, most services we created that deals with Aps can receive as parameter either the Ap itself or a reference to it, which is its name.

Defined in​

application-profile/src/lib/models/application-profile.ts:85


ClassIdRule​

Ƭ ClassIdRule: Rule<"classId", string>

Defined in​

application-profile/src/lib/models/rule.ts:4


DataTypeRule​

Ƭ DataTypeRule: Rule<"datatype", string>

Defined in​

application-profile/src/lib/models/rule.ts:3


JsonModelFlat​

Ƭ JsonModelFlat<T>: { [key in keyof T]: T[key] extends JsonModel ? string : T[key] extends JsonModel | undefined ? string | undefined : T[key] extends JsonModel[] ? string[] : T[key] extends JsonModel[] | undefined ? string[] | undefined : T[key] }

Type parameters​

NameType
TJsonModel

Defined in​

ng-application-profile/src/lib/models/json-model.ts:29


JsonModelType​

Ƭ JsonModelType<T>: T extends string ? Many<string> | T | [T, ...string[]] : Many<string>

Type parameters​

NameType
Textends Many<string> = string

Defined in​

ng-application-profile/src/lib/models/json-model.ts:19


MaxCardinalityRule​

Ƭ MaxCardinalityRule: Rule<"maxCardinality", number>

Defined in​

application-profile/src/lib/models/rule.ts:10


MinCardinalityRule​

Ƭ MinCardinalityRule: Rule<"minCardinality", number>

Defined in​

application-profile/src/lib/models/rule.ts:9


OrClassIdRule​

Ƭ OrClassIdRule: OrRule<ClassIdRule>

Defined in​

application-profile/src/lib/models/rule.ts:6


OrDataTypeRule​

Ƭ OrDataTypeRule: OrRule<DataTypeRule>

Defined in​

application-profile/src/lib/models/rule.ts:7


OrRule​

Ƭ OrRule<T>: Rule<"or", T[]>

Type parameters​

NameType
Textends Rule

Defined in​

application-profile/src/lib/models/rule.ts:2


RangeRule​

Ƭ RangeRule: Rule<"range", ClassIdRule | DataTypeRule | OrClassIdRule | OrDataTypeRule>

Defined in​

application-profile/src/lib/models/rule.ts:8


RdfTypesRule​

Ƭ RdfTypesRule: Rule<"rdfTypes", string[]>

Defined in​

application-profile/src/lib/models/rule.ts:11


ResourceAttributeRaw​

Ƭ ResourceAttributeRaw: Object

Index signature​

â–ª [dataType: string]: Many<unknown>

Defined in​

application-profile/src/lib/models/resource.ts:10


ResourceGraphRaw​

Ƭ ResourceGraphRaw: Object

Type declaration​

NameType
dataResourceRaw
facets?Object
included?ResourceRaw[]

Defined in​

application-profile/src/lib/models/resource-graph.ts:9


Rule​

Ƭ Rule<T, U>: Object

Type parameters​

NameType
Textends string = string
Uunknown

Type declaration​

NameType
nameT
valueU

Defined in​

application-profile/src/lib/models/rule.ts:1


SubClassOfRule​

Ƭ SubClassOfRule: Rule<"subClassOf", string>

Defined in​

application-profile/src/lib/models/rule.ts:5


Uri​

Ƭ Uri<T>: string & { @@meta_type_placeholder@@?: T }

experimental

Type parameters​

NameType
Textends JsonModel

Defined in​

ng-application-profile/src/lib/models/json-model.ts:7

Variables​

AP_LOADER_TOKEN​

• AP_LOADER_TOKEN: InjectionToken<ApLoader[]>

Defined in​

ng-application-profile/src/lib/services/ap-loader.ts:11


KNOWN_PREFIXES​

• KNOWN_PREFIXES: Prefixes

Defined in​

application-profile/src/lib/models/prefixes.ts:5


MICRO_ATTRIBUTE_MAPPER_TOKEN​

• MICRO_ATTRIBUTE_MAPPER_TOKEN: InjectionToken<MicroAttributeMapper<unknown, unknown>>

Defined in​

ng-application-profile/src/lib/services/mappers/micro-attribute-mapper.ts:3

Functions​

createMicroValidatorProvider​

â–¸ createMicroValidatorProvider(service): Provider

Parameters​

NameType
serviceType<MicroValidatorBuilder>

Returns​

Provider

Defined in​

ng-application-profile/src/lib/services/ap-form-builder.service.ts:86


getConcreteType​

â–¸ getConcreteType(ap, classIds): string

Extract from classIds the id id of the class that is the "most concrete". By most concrete, we mean that the set of classes that are given are all related to one another by inheritance, and we want to find the furthest down in the inheritance chain. So if we have a case were A is the parent of B and B is the parent of C, then the most concrete class of ['B', 'A', 'C'] will be C.

Depending on the information available in the Ap, this function will internally use either getConcreteTypeFromRdfTypesRule or getConcreteTypeFromSubClassOfRules, where the later is the safest.

Parameters​

NameTypeDescription
apApplicationProfilethe Ap in which were are searching for the different classes definitions
classIdsMany<string>the set of class ids from which we need to extract the most concrete type

Returns​

string

the classId of the most concrete type.

Defined in​

application-profile/src/lib/utils/get-concrete-type.ts:22


getConcreteTypeFromRdfTypesRule​

â–¸ getConcreteTypeFromRdfTypesRule(ap, classIds): string

Parameters​

NameType
apApplicationProfile
classIdsstring[]

Returns​

string

Defined in​

application-profile/src/lib/utils/get-concrete-type.ts:46


getConcreteTypeFromSubClassOfRules​

â–¸ getConcreteTypeFromSubClassOfRules(ap, classIds): string

Parameters​

NameTypeDescription
apApplicationProfilethe Ap in which we are searching for the most concrete type
classIdsstring[]

Returns​

string

Defined in​

application-profile/src/lib/utils/get-concrete-type.ts:70


getUri​

â–¸ getUri(o): string

Parameters​

NameType
ostring | JsonModel | JsonModelFlat<JsonModel>

Returns​

string

Defined in​

ng-application-profile/src/lib/utils/get-uri.ts:3


isClassIdRule​

â–¸ isClassIdRule(o): o is ClassIdRule

Parameters​

NameType
ounknown

Returns​

o is ClassIdRule

Defined in​

application-profile/src/lib/models/rule.ts:22


isDataTypeRule​

â–¸ isDataTypeRule(o): o is DataTypeRule

Parameters​

NameType
ounknown

Returns​

o is DataTypeRule

Defined in​

application-profile/src/lib/models/rule.ts:42


isJsonModel​

â–¸ isJsonModel(o): o is JsonModel

Parameters​

NameType
ounknown

Returns​

o is JsonModel

Defined in​

ng-application-profile/src/lib/models/json-model.ts:21


isJsonModelFlatOfType​

â–¸ isJsonModelFlatOfType<T>(model, type): model is JsonModelFlat<T>

Type parameters​

Name
T

Parameters​

NameType
modelunknown
typestring

Returns​

model is JsonModelFlat<T>

Defined in​

ng-application-profile/src/lib/utils/is-of-type.ts:15


isJsonModelFlatOfTypeCurr​

â–¸ isJsonModelFlatOfTypeCurr<T>(type): (model: unknown) => model is JsonModelFlat<T>

Type parameters​

Name
T

Parameters​

NameType
typestring

Returns​

fn

â–¸ (model): model is JsonModelFlat<T>

Parameters​
NameType
modelunknown
Returns​

model is JsonModelFlat<T>

Defined in​

ng-application-profile/src/lib/utils/is-of-type.ts:19


isJsonModelOfType​

â–¸ isJsonModelOfType<T>(model, type): model is T

Type parameters​

NameType
Textends JsonModel

Parameters​

NameType
modelJsonModel
typestring

Returns​

model is T

Defined in​

ng-application-profile/src/lib/utils/is-of-type.ts:11


isMaxCardinalityRule​

â–¸ isMaxCardinalityRule(o): o is MaxCardinalityRule

Parameters​

NameType
ounknown

Returns​

o is MaxCardinalityRule

Defined in​

application-profile/src/lib/models/rule.ts:34


isMinCardinalityRule​

â–¸ isMinCardinalityRule(o): o is MinCardinalityRule

Parameters​

NameType
ounknown

Returns​

o is MinCardinalityRule

Defined in​

application-profile/src/lib/models/rule.ts:38


isOfType​

â–¸ isOfType(model, type): boolean

Parameters​

NameType
modelJsonModel | Many<string>
typestring

Returns​

boolean

Defined in​

ng-application-profile/src/lib/utils/is-of-type.ts:5


isOrClassIdRule​

â–¸ isOrClassIdRule(o): o is OrClassIdRule

Parameters​

NameType
ounknown

Returns​

o is OrClassIdRule

Defined in​

application-profile/src/lib/models/rule.ts:26


isOrDataTypeRule​

â–¸ isOrDataTypeRule(o): o is OrClassIdRule

Parameters​

NameType
ounknown

Returns​

o is OrClassIdRule

Defined in​

application-profile/src/lib/models/rule.ts:30


isOrRule​

â–¸ isOrRule(o): o is OrRule<Rule<string, unknown>>

Parameters​

NameType
ounknown

Returns​

o is OrRule<Rule<string, unknown>>

Defined in​

application-profile/src/lib/models/rule.ts:18


isRangeRule​

â–¸ isRangeRule(o): o is RangeRule

Parameters​

NameType
ounknown

Returns​

o is RangeRule

Defined in​

application-profile/src/lib/models/rule.ts:46


isRdfTypesRule​

â–¸ isRdfTypesRule(o): o is RdfTypesRule

Parameters​

NameType
ounknown

Returns​

o is RdfTypesRule

Defined in​

application-profile/src/lib/models/rule.ts:50


isRule​

â–¸ isRule(o): o is Rule<string, unknown>

Parameters​

NameType
ounknown

Returns​

o is Rule<string, unknown>

Defined in​

application-profile/src/lib/models/rule.ts:13


isSubClassOfRule​

â–¸ isSubClassOfRule(o): o is SubClassOfRule

Parameters​

NameType
ounknown

Returns​

o is SubClassOfRule

Defined in​

application-profile/src/lib/models/rule.ts:54


keys​

â–¸ keys<T>(obj): keyof T[]

Type parameters​

NameType
Textends Object

Parameters​

NameType
objT

Returns​

keyof T[]

Defined in​

ng-application-profile/src/lib/utils/keys.ts:1


provideApLoader​

â–¸ provideApLoader(clazz): Provider

Parameters​

NameType
clazzType<ApLoader>

Returns​

Provider

Defined in​

ng-application-profile/src/lib/services/ap-loader.ts:13


provideMicroAttributeMapper​

â–¸ provideMicroAttributeMapper(service): Provider

Parameters​

NameType
serviceType<MicroAttributeMapper<unknown, unknown>>

Returns​

Provider

Defined in​

ng-application-profile/src/lib/services/mappers/micro-attribute-mapper.ts:18


stringKeys​

â–¸ stringKeys<T>(obj): StringKeys<T>[]

Type parameters​

NameType
Textends Object

Parameters​

NameType
objT

Returns​

StringKeys<T>[]

Defined in​

ng-application-profile/src/lib/utils/keys.ts:5