<commit_before># A resource descriptor is a declarative configuration file that defines the semantic data,  
# states, and state transitions associated with a particular resource independent of protocol 
# media-type. Further, it also defines protocol specific templates for links that can be 
# and  included in the response and populated based on the associated state. By including  
# optional routes related metadata in the configuration, routes.rb mappings can be managed  
# DRYly in the resource descriptor file.
#
# The following sections facilitate a number of objectives including generating an ALPS profile 
# of the resource, generating human readable documents including sample representations, 
# decorating service responses, and scaffolding routes, controllers and models.

id: DRDs
version: v1.0.0
doc: Describes the semantics, states and state transitions associated with DRDs.
links:
  - rel: self
    href: alps_base/DRDs
  - rel: help
    href: documentation_base/Things/DRDs
 
# This section associates a simple state-machine DSL with the particular resource. It shows
# the state name and lists the data and application affordances available in that state, 
# conditions for inclusion of a transition in a response and what states are exposed by 
# following the transitions.

states:
  drds:
    collection:
      doc: The entry point state for interacting with DRDs.
      location: entry
      transitions:
        self:
          href: list
          next:
            - collection
        search:
          next:
            - navigation
        create:
          conditions:
            - can_create 
            - can_do_anything
          next:
            - activated
            - error   
    navigation:
      doc: Represents a filtered list of DRDs.
      transitions:
        self:
          href: search
          next:
            - navigation
        search:
          next:
            - navigation        
  drd:
    activated:  
      doc: The default state of a DRD.
      transistions:
        self:
          alias: show
          next:
            - item
        deactivate:
          conditions:
            - can_deactivate 
            - can_update 
            - can_do_anything
          next:
           - deactivated
        delete:
          conditions:
            - airlock_open 
            - can_delete 
            - can_do_anything
          next:
            - deleted
        leviathan:
          next:
            - http://alps.io/schema.org/Leviathans#leviathan
    deactivated:
      doc: The DRD is shut down.
      transistions:
        self:
          alias: show
          next:
            - item
        activate:
          conditions:
            - can_activate 
            - can_update 
            - can_do_anything
          next:
           - activated
        update:
          conditions:
            - can_update 
            - can_do_anything
          next:
            - deactivated
        delete:
          conditions:
            - airlock_open 
            - can_delete 
            - can_do_anything
          next:
            - deleted
        leviathan:
          next:
            - http://alps.io/schema.org/Leviathans#leviathan
    deleted:
      location: exit
    error:
      href: http://alps.io/schema.org/Error
      
# Semantic descriptors represent semantic definitions of data and thus in the context of ALPS 
# represent type='semantic' descriptors. Elements MAY include a sample value that can be used 
# to generate sample representations of the a resource in different media-types.
#
# Transition descriptors represent application affordances and in the context of ALPS 
# represent type='safe,unsafe,idempotent' descriptors. 

descriptors:
  - id: drds
    doc: 
      html: <p>A list of DRDs.</p>
    type: semantic
    links:
      - rel: self
        href: alps_base/DRDs#drds<commit_msg>Refactored states section of descriptor document to include ids<commit_after># A resource descriptor is a declarative configuration file that defines the semantic data,  
# states, and state transitions associated with a particular resource independent of protocol 
# media-type. Further, it also defines protocol specific templates for links that can be 
# and  included in the response and populated based on the associated state. By including  
# optional routes related metadata in the configuration, routes.rb mappings can be managed  
# DRYly in the resource descriptor file.
#
# The following sections facilitate a number of objectives including generating an ALPS profile 
# of the resource, generating human readable documents including sample representations, 
# decorating service responses, and scaffolding routes, controllers and models.

id: DRDs
version: v1.0.0
doc: Describes the semantics, states and state transitions associated with DRDs.
links:
  - rel: self
    href: alps_base/DRDs
  - rel: help
    href: documentation_base/Things/DRDs
 
# This section associates a simple state-machine DSL with the particular resource. It shows
# the state name and lists the data and application affordances available in that state, 
# conditions for inclusion of a transition in a response and what states are exposed by 
# following the transitions.

states:
  drds:
    - id: collection
      doc: The entry point state for interacting with DRDs.
      location: entry
      transitions:
        - id: list
          name: self
          next:
            - collection
        - id: search
          next:
            - navigation
        - id: create
          conditions:
            - can_create 
            - can_do_anything
          next:
            - activated
            - error   
    - id: navigation
      doc: Represents a filtered list of DRDs.
      transitions:
        - id: search
          name: self
          next:
            - navigation
        - id: search
          next:
            - navigation        
  drd:
    - id: activated 
      doc: The default state of a DRD.
      transistions:
        - id: show
          name: self
          next:
            - item
        - id: deactivate
          conditions:
            - can_deactivate 
            - can_update 
            - can_do_anything
          next:
           - deactivated
        - id: delete
          conditions:
            - airlock_open 
            - can_delete 
            - can_do_anything
          next:
            - deleted
        - id: leviathan
          next:
            - location: http://alps.io/schema.org/Leviathans#leviathan
    - id: deactivated
      doc: The DRD is shut down.
      transistions:
        - id: self
          alias: show
          next:
            - item
        - id: activate
          conditions:
            - can_activate 
            - can_update 
            - can_do_anything
          next:
           - activated
        - id: update
          conditions:
            - can_update 
            - can_do_anything
          next:
            - deactivated
        - id: delete
          conditions:
            - airlock_open 
            - can_delete 
            - can_do_anything
          next:
            - deleted
        - id: leviathan
          next:
            - location: http://alps.io/schema.org/Leviathans#leviathan
    - id: deleted
      doc: The DRD is now free-floating in space.
      location: exit
    - id: error
      doc: An error has occured.
      location: http://alps.io/schema.org/Error
      
# Semantic descriptors represent semantic definitions of data and thus in the context of ALPS 
# represent type='semantic' descriptors. Elements MAY include a sample value that can be used 
# to generate sample representations of the a resource in different media-types.
#
# Transition descriptors represent application affordances and in the context of ALPS 
# represent type='safe,unsafe,idempotent' descriptors. 

descriptors:
  - id: drds
    doc: 
      html: <p>A list of DRDs.</p>
    type: semantic
    links:
      - rel: self
        href: alps_base/DRDs#drds
{'fraction_non_alphanumeric': 0.054003724394785846, 'fraction_numerical': 0.0007448789571694599, 'mean_word_length': 1.7645847632120797, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6199674', 'n_tokens_mistral': 2094, 'n_tokens_neox': 1986, 'n_words': 764}