FDO SDK API Reference
    Preparing search index...

    Interface CompleteLocalFDORecord

    Represents a single FDO record that has a registered PID and a localID LocalID.

    A record consists of attributes, each with one or more values. Each attribute is uniquely identified by its PID.

    interface CompleteLocalFDORecord {
        localID: `LOCAL/${string}`;
        PID: string;
        addAttribute(attribute: string, value: AttributeAnyType): void;
        addAttribute<Attr extends DefaultAttributeDef>(
            attribute: Attr,
            value: AttrTypeWithCardinality<Attr>,
        ): void;
        addData<Attr extends DefaultAttributeDef>(
            attribute: string | Attr,
            value?: Attr extends DefaultAttributeDef
                ? AttrTypeWithCardinality<Attr>
                : AttributeAnyType | AttributeAnyType[],
        ): void;
        addProfile<UsedProfile extends ProfileDef<readonly DefaultAttributeDef[]>>(
            profile: UsedProfile,
            attributes: UsedProfile extends ProfileDef<Attrs>
                ? { [K in string]: WithMarkers<AttrsToObj<Attrs>>[K] }
                : never,
        ): void;
        addRecord(record: FDORecord): void;
        addReference(
            fromAttribute:
                | string
                | AttributeDef<
                    string,
                    string
                    | ReferenceMarker,
                    `${number}..${number}` | `${number}..*`,
                >,
            toRecord: string | IdentifiableFDORecord,
        ): void;
        addReferenceBidi(
            fromAttribute:
                | string
                | AttributeDef<
                    string,
                    string
                    | ReferenceMarker,
                    `${number}..${number}` | `${number}..*`,
                >,
            inverseAttribute:
                | string
                | AttributeDef<
                    string,
                    string
                    | ReferenceMarker,
                    `${number}..${number}` | `${number}..*`,
                >,
            toRecord: string | IdentifiableFDORecord,
        ): void;
        addType<Attr extends DefaultAttributeDef>(
            attribute: Attr,
            value?: AttrTypeWithCardinality<Attr>,
        ): void;
        get(attribute: string): AttributeAnyType | undefined;
        get<A extends DefaultAttributeDef>(
            attribute: A,
        ): AttrTypeWithCardinality<A> | undefined;
        getAll(): Map<string, AttributeAnyType | AttributeAnyType[]>;
        getData(): string | string[];
        getProfile(): string | ReferenceMarker | (string | ReferenceMarker)[];
        getReferences(): ReferenceDeclaration[];
        getType(): string | string[];
        has(attribute: string | DefaultAttributeDef): boolean;
        remove(attribute: string | DefaultAttributeDef): void;
        set(attribute: string, value: AttributeAnyType | AttributeAnyType[]): void;
        set<A extends DefaultAttributeDef>(
            attribute: A,
            value: AttrTypeWithCardinality<A>,
        ): void;
        toJSON(): Record<string, AttrTypeWithCardinality<DefaultAttributeDef>>;
        toString(): string;
    }

    Hierarchy (View Summary)

    Index
    localID: `LOCAL/${string}`

    The locally unique identifier of this record

    PID: string

    The globally unique and registered identifier of this record.

    • Add a unidirectional reference from this record to another record. The target record must either be known locally or be resolvable via its PID

      Parameters

      • fromAttribute:
            | string
            | AttributeDef<
                string,
                string
                | ReferenceMarker,
                `${number}..${number}` | `${number}..*`,
            >

        The attribute of this record where the reference will be placed

      • toRecord: string | IdentifiableFDORecord

        the record that should be referenced, or a local ID (LocalID) or PID of the referenced record. Must either be known locally or be resolvable via its PID

      Returns void

      FDORecord.addReferenceBidi for bidirectional references

    • Add a bidirectional reference from this record to another record and back. The target record must be in the current local or remote graph in order to create the back-reference

      Parameters

      • fromAttribute:
            | string
            | AttributeDef<
                string,
                string
                | ReferenceMarker,
                `${number}..${number}` | `${number}..*`,
            >

        The attribute of this record where the reference will be placed

      • inverseAttribute:
            | string
            | AttributeDef<
                string,
                string
                | ReferenceMarker,
                `${number}..${number}` | `${number}..*`,
            >

        The attribute of the target record where the back-reference will be placed

      • toRecord: string | IdentifiableFDORecord

        the record that should be referenced, or a local ID (LocalID) or PID of the referenced record. Must either be known locally or be resolvable via its PID

      Returns void

      FDORecord.addReference for unidirectional references

    • This attribute is the entry point to find the data associated with an FDO. If the identified resource is physical or conceptual, the string "self" is used. If the resource it digital, this attribute points to the Attribute that references the digital resource.

      Returns string | string[]