@cognizone/ng-application-profile
Enumerations​
Classes​
- ApFormBuilder
- ApHelper
- ApService
- ArrayMapper
- BooleanMapper
- CardinalityValidatorService
- DateMapper
- DateTimeMapper
- DefaultMapper
- IdGenerator
- JsonModelService
- MicroAsyncValidatorBuilder
- MicroValidatorBuilder
- NgApplicationProfileModule
- PrefixCcService
- ResourceGraphService
- ResourceMapper
Interfaces​
- ApLoader
- ApplicationProfile
- ApplicationProfileRaw
- AttributeMapper
- AttributeProfile
- AttributeProfileRaw
- JsonModel
- JsonModelFlatGraph
- JsonModels
- MicroAttributeMapper
- Prefixes
- Resource
- ResourceAttribute
- ResourceGraph
- ResourceRaw
- TypeProfile
- TypeProfileRaw
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​
Name | Type |
---|---|
T | JsonModel |
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​
Name | Type |
---|---|
T | extends 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​
Name | Type |
---|---|
T | extends 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​
Name | Type |
---|---|
data | ResourceRaw |
facets? | Object |
included? | ResourceRaw [] |
Defined in​
application-profile/src/lib/models/resource-graph.ts:9
Rule​
Ƭ Rule<T
, U
>: Object
Type parameters​
Name | Type |
---|---|
T | extends string = string |
U | unknown |
Type declaration​
Name | Type |
---|---|
name | T |
value | U |
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​
Name | Type |
---|---|
T | extends 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​
Name | Type |
---|---|
service | Type <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​
Name | Type | Description |
---|---|---|
ap | ApplicationProfile | the Ap in which were are searching for the different classes definitions |
classIds | Many <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​
Name | Type |
---|---|
ap | ApplicationProfile |
classIds | string [] |
Returns​
string
Defined in​
application-profile/src/lib/utils/get-concrete-type.ts:46
getConcreteTypeFromSubClassOfRules​
â–¸ getConcreteTypeFromSubClassOfRules(ap
, classIds
): string
Parameters​
Name | Type | Description |
---|---|---|
ap | ApplicationProfile | the Ap in which we are searching for the most concrete type |
classIds | string [] |
Returns​
string
Defined in​
application-profile/src/lib/utils/get-concrete-type.ts:70
getUri​
â–¸ getUri(o
): string
Parameters​
Name | Type |
---|---|
o | string | JsonModel | JsonModelFlat <JsonModel > |
Returns​
string
Defined in​
ng-application-profile/src/lib/utils/get-uri.ts:3
isClassIdRule​
â–¸ isClassIdRule(o
): o is ClassIdRule
Parameters​
Name | Type |
---|---|
o | unknown |
Returns​
o is ClassIdRule
Defined in​
application-profile/src/lib/models/rule.ts:22
isDataTypeRule​
â–¸ isDataTypeRule(o
): o is DataTypeRule
Parameters​
Name | Type |
---|---|
o | unknown |
Returns​
o is DataTypeRule
Defined in​
application-profile/src/lib/models/rule.ts:42
isJsonModel​
â–¸ isJsonModel(o
): o is JsonModel
Parameters​
Name | Type |
---|---|
o | unknown |
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​
Name | Type |
---|---|
model | unknown |
type | string |
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​
Name | Type |
---|---|
type | string |
Returns​
fn
â–¸ (model
): model is JsonModelFlat<T>
Parameters​
Name | Type |
---|---|
model | unknown |
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​
Name | Type |
---|---|
T | extends JsonModel |
Parameters​
Name | Type |
---|---|
model | JsonModel |
type | string |
Returns​
model is T
Defined in​
ng-application-profile/src/lib/utils/is-of-type.ts:11
isMaxCardinalityRule​
â–¸ isMaxCardinalityRule(o
): o is MaxCardinalityRule
Parameters​
Name | Type |
---|---|
o | unknown |
Returns​
o is MaxCardinalityRule
Defined in​
application-profile/src/lib/models/rule.ts:34
isMinCardinalityRule​
â–¸ isMinCardinalityRule(o
): o is MinCardinalityRule
Parameters​
Name | Type |
---|---|
o | unknown |
Returns​
o is MinCardinalityRule
Defined in​
application-profile/src/lib/models/rule.ts:38
isOfType​
â–¸ isOfType(model
, type
): boolean
Parameters​
Name | Type |
---|---|
model | JsonModel | Many <string > |
type | string |
Returns​
boolean
Defined in​
ng-application-profile/src/lib/utils/is-of-type.ts:5
isOrClassIdRule​
â–¸ isOrClassIdRule(o
): o is OrClassIdRule
Parameters​
Name | Type |
---|---|
o | unknown |
Returns​
o is OrClassIdRule
Defined in​
application-profile/src/lib/models/rule.ts:26
isOrDataTypeRule​
â–¸ isOrDataTypeRule(o
): o is OrClassIdRule
Parameters​
Name | Type |
---|---|
o | unknown |
Returns​
o is OrClassIdRule
Defined in​
application-profile/src/lib/models/rule.ts:30
isOrRule​
â–¸ isOrRule(o
): o is OrRule<Rule<string, unknown>>
Parameters​
Name | Type |
---|---|
o | unknown |
Returns​
o is OrRule<Rule<string, unknown>>
Defined in​
application-profile/src/lib/models/rule.ts:18
isRangeRule​
â–¸ isRangeRule(o
): o is RangeRule
Parameters​
Name | Type |
---|---|
o | unknown |
Returns​
o is RangeRule
Defined in​
application-profile/src/lib/models/rule.ts:46
isRdfTypesRule​
â–¸ isRdfTypesRule(o
): o is RdfTypesRule
Parameters​
Name | Type |
---|---|
o | unknown |
Returns​
o is RdfTypesRule
Defined in​
application-profile/src/lib/models/rule.ts:50
isRule​
â–¸ isRule(o
): o is Rule<string, unknown>
Parameters​
Name | Type |
---|---|
o | unknown |
Returns​
o is Rule<string, unknown>
Defined in​
application-profile/src/lib/models/rule.ts:13
isSubClassOfRule​
â–¸ isSubClassOfRule(o
): o is SubClassOfRule
Parameters​
Name | Type |
---|---|
o | unknown |
Returns​
o is SubClassOfRule
Defined in​
application-profile/src/lib/models/rule.ts:54
keys​
â–¸ keys<T
>(obj
): keyof T
[]
Type parameters​
Name | Type |
---|---|
T | extends Object |
Parameters​
Name | Type |
---|---|
obj | T |
Returns​
keyof T
[]
Defined in​
ng-application-profile/src/lib/utils/keys.ts:1
provideApLoader​
â–¸ provideApLoader(clazz
): Provider
Parameters​
Name | Type |
---|---|
clazz | Type <ApLoader > |
Returns​
Provider
Defined in​
ng-application-profile/src/lib/services/ap-loader.ts:13
provideMicroAttributeMapper​
â–¸ provideMicroAttributeMapper(service
): Provider
Parameters​
Name | Type |
---|---|
service | Type <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​
Name | Type |
---|---|
T | extends Object |
Parameters​
Name | Type |
---|---|
obj | T |
Returns​
StringKeys
<T
>[]