| 109 | * A Resource can only be created with a ResourceSpace! |
| 110 | * All the Resources referred from a Resource are represented by ResourceRefs. |
| 111 | * All the sub-resources that are owned by a Resource (The Resource is their parent) are contained in the children list. It is possible to have outer resources refered from it but they are not in that children list. |
| 112 | * The resource name is unique for the level in the Resource's hierarchy it is. The siblings of the Resource in the Resource tree have to have different names. The name is set from the ResourceSpace at the resource's creation. |
| 113 | * ResourceSpace : |
| 114 | * It is responsible for the creation of a resource. Resource can be created in three ways: |
| 115 | * By it's class => In that case the Resource's name is generated by it's id and the Resource location is set in the temporary sophie 2 resource location with path the newly generated name. |
| 116 | * By it's class and name => In that case the Resource is created in the temporary sophie 2 resource location with the passed name. |
| 117 | * By it's class, passed name and Resource parent => in that case the resource is nested in the parent. It's location is in the parent's location with path the passed name and the name is validated to be unique against it's siblings in the parent. |
| 118 | * The ResourceSpace keeps the location and the entity id of it's reosurce. |
| 119 | * The ResourceSpace gives unique ids for all the ProObjects in it (They are fields in it's Resource or are fields in such ProObjects). |
| 120 | * The ResourceSpace can get all the Resources in the tree of it's Resource |
| 121 | * The ResourceSpace is able to clone Resource -> in this case the Resource tree is copied and all the resources have new entity ids and their inner ResourceRefs are redirected in the tree. The outer ResourceRef are kept. |
| 122 | * The ResourceSpace is able to copy a Resource into another Resource, and that is the way to add a Resource to another location. |
| 123 | * Deleting resources will be designed and implemented in the next revision. |
| 124 | |
| 125 | The Resource and the ResourceSpace are unseparateble, they represent the sophie 2 resources and will be able to execute all the operations on a resource and to maintain it.[[BR]] |
| 126 | [[BR]] |
| 127 | [[BR]] |
| 128 | |