RAMEN Core
    Preparing search index...

    Class RamenModel

    Adds the RAMEN vocabulary and annotation rules to shared generic editing.

    Hierarchy

    Index
    • Returns an advisor or explains why the current model cannot provide suggestions.

      Returns RamenAdvisor

      When the current project is invalid and cannot provide modelling suggestions.

    • Returns the annotation shapes declared directly by the project model.

      Returns readonly AnnotationShape[]

      When the annotation section is malformed; no partial list is returned.

    • Returns a detached declared data type, or undefined when absent. Built-in types have no declaration.

      Parameters

      Returns DataType | undefined

    • Returns detached snapshots of the current model and every transitive dependency.

      Returns readonly Model[]

    • Returns the node that refines every selected node, or undefined for separate branches.

      Parameters

      Returns Node | undefined

    • Returns a detached local or imported node, or undefined when absent. Ambiguous local IDs require a qualified reference.

      Parameters

      Returns Node | undefined

    • Returns detached project information, independently of the selected model level.

      Returns ProjectMetadata | undefined

    • Lists all shared and shape-owned properties of one annotation shape.

      Parameters

      Returns readonly PropertyOption[]

    • Returns a detached local or imported relation, or undefined when absent.

      Parameters

      Returns Relation | undefined

    • Lists existing relationships with exact endpoints, including permitted predecessor definitions. Returns an empty list for no matches and all matches for parallel relationships; never edits the model. Requires valid node references and a valid model snapshot.

      Parameters

      Returns readonly RelationSelection[]

    • Lists current-level relations allowed by one annotation shape, including its cardinality rules.

      Parameters

      Returns readonly RelationOption[]

    • Opens an imported RAMEN project level for editing; the packaged reference model stays read-only.

      Parameters

      • modelId: string

      Returns RamenModel

      When the model is missing or is not an editable RAMEN project level, including the packaged reference model.

    • Shows the chosen next level and every later level that imports it.

      Parameters

      • modelId: string

      Returns ModelRemovalPreview

    • Shows nodes, relationships and annotation declarations affected by removing a node.

      Parameters

      • nodeId: string

      Returns RamenNodeRemovalPreview

    • Removes a locally declared annotation and validates the complete project.

      Parameters

      • annotationId: string

      Returns ModelChange<AnnotationShape>

      When the local shape is missing or its annotation section is malformed.

    • Removes an attribute by stable identifier and validates the resulting project.

      Parameters

      • nodeId: string
      • attributeId: string

      Returns ModelChange<Attribute>

    • Removes one rule by ID from a local element while preserving its other rules.

      Parameters

      Returns ModelChange<Constraint>

      When the owner is unavailable, ambiguous or imported, or does not declare this constraint ID.

    • Removes a local data type; unresolved references remain visible in validation diagnostics.

      Parameters

      • dataTypeId: string

      Returns ModelChange<DataType>

    • Removes one literal; an empty data type becomes unrestricted again.

      Parameters

      • dataTypeId: string
      • literalId: string

      Returns ModelChange<Literal>

    • Removes a next level; cascade also removes every level that depends on it.

      Parameters

      • modelId: string
      • options: { cascade?: boolean } = {}

      Returns ModelRemovalPreview

      When the level is not an immediate successor, or later levels depend on it and cascade is disabled.

    • Removes an unused node, or atomically removes its dependent definitions with cascade.

      Parameters

      • nodeId: string
      • options: { cascade?: boolean } = {}

      Returns ModelChange<Node>

      When the node is not local, dependants exist without cascade, or malformed domain-specific declarations prevent safe removal.

    • Removes an unused relation, or its dependants with explicit cascade.

      Parameters

      • relationId: string
      • options: { cascade?: boolean } = {}

      Returns ModelChange<Relation>

      When the relation is not local, dependants exist without cascade, or malformed domain-specific declarations prevent safe removal.

    • Captures the entire editable RAMEN workspace, including sibling levels, as an independent state.

      Returns RamenModel

    • Lists local and imported node types that this level can refine.

      Returns readonly NodeSuggestion[]

    • Updates a local annotation shape, resolving endpoint selections or preserving supplied references, then validates the project.

      Parameters

      Returns ModelChange<AnnotationShape>

      When the local shape is missing, its section or replacement is malformed, or a selected node, property or relation is unavailable or ambiguous.

    • Updates a level that directly imports this model.

      Parameters

      Returns Model

    • Checks one property input for an annotation shape without requiring recorded nodes or links. Throws if the type or property is unavailable. Cross-record rules require validateInstances().

      Parameters

      Returns ValidationResult

    • Checks one local or inherited attribute input. Custom evaluators must work without a data graph. Invalid projects and values return diagnostics.

      Parameters

      Returns ValidationResult

      When the node is unavailable or ambiguous, or the named attribute is not visible on it.

    • Checks one value against a built-in or declared data type, including literals and value rules. Invalid projects and values return diagnostics.

      Parameters

      Returns ValidationResult

      When the selected data type is unavailable or its reference is ambiguous.

    • Creates another model level that imports an existing RAMEN project model.

      Parameters

      Returns RamenModel

    • Restores an editable project from a shared graph and validates every model level.

      Parameters

      • input: unknown

      Returns RamenModel

      When the file format is unsupported, the document or RAMEN project is invalid, or the selected root cannot be restored.

    • Loads a project with all models needed to resolve its imports. Content errors remain available through validate().

      Parameters

      • model: Model
      • dependencies: readonly Model[] = ...

      Returns RamenModel

      When the model does not declare the RAMEN project schema.