@dasch-swiss/dsp-js
Version:
JavaScript library that handles API requests to Knora
27 lines (26 loc) • 1.18 kB
TypeScript
import { Cardinality } from "../../../models/v2/ontologies/class-definition";
import { ResourceClassDefinition } from "../ontologies/resource-class-definition";
/**
* Utility methods to facilitate the handling of a property's cardinality.
*
* @category Model V2
*/
export declare namespace CardinalityUtil {
const cardinalities: Map<Cardinality, string>;
/**
* Determines if a value can be created for a given property.
*
* @param propertyIri Iri of the property.
* @param numberOfInstances number of existing values of the property in question.
* @param entityInfo class information.
*/
const createValueForPropertyAllowed: (propertyIri: string, numberOfInstances: number, entityInfo: ResourceClassDefinition) => boolean;
/**
* Determines if a value can be deleted for a given property.
*
* @param propertyIri Iri of the property.
* @param numberOfInstances number of existing values of the property in question.
* @param entityInfo class information.
*/
const deleteValueForPropertyAllowed: (propertyIri: string, numberOfInstances: number, entityInfo: ResourceClassDefinition) => boolean;
}