Describes a relationship between a data/FeatureSource!FeatureSource and another source.

interface Relationship {
    cardinality: Cardinality;
    id: string;
    itemType: string;
    relatedSource: FeatureSource;
    relationshipType: string;
    source: FeatureSource;
    title: string;
    assignProperties(properties: Partial<RelationshipProperties>): void;
    assignPropertiesAsync(properties: Partial<RelationshipProperties>): Promise<void>;
    finishAssignProperties(): Promise<void>;
    getAllRelatedFeatures(features: FeatureSet | FeatureStream | Feature[]): Promise<Map<Feature, FeatureSet>>;
    getDefault<K>(key: K): RelationshipProperties[K];
    getDefaults(): Partial<RelationshipProperties>;
    getRelatedFeatures(feature: Feature, options?: FetchRelatedFeaturesOptions): Promise<FeatureSet>;
    getSerializableProperties(serializeMode?: SerializeMode): PropertyDefs<RelationshipProperties>;
    toItemUri(): string;
    toJSON(serializeMode?: SerializeMode): Partial<RelationshipProperties>;
}

Hierarchy (view full)

Implemented by

Properties

cardinality: Cardinality

The cardinality of the relationship.

id: string

The unique ID for this entity.

itemType: string

The item type for this entity when it participates in an App.

relatedSource: FeatureSource

The feature source with related data, if available.

relationshipType: string

The type of relationship.

The feature source that owns this relationship.

title: string

The human-readable name for the relationship.

Methods

  • Sets the properties for this item.

    Parameters

    • properties: Partial<RelationshipProperties>

      A plain object containing property values to set, keyed by property name.

    Returns void

  • Sets the properties for this item.

    This version will also await any asynchronous logic that is needed to set the properties.

    Parameters

    • properties: Partial<RelationshipProperties>

      A plain object containing property values to set, keyed by property name.

    Returns Promise<void>

  • Waits for all deserialization logic initiated thus far to finish, whether invoked by passing properties into the constructor, or by invoking assignProperties() or assignPropertiesAsync().

    Returns Promise<void>

  • Creates an item:// URI reference to this entity.

    Returns string