How to describe file structure?

3.7k Views Asked by At

At the current point of time, I am modeling the project and I have a really serious question: how to describe the structure of the file(archive)?

What I mean: in this project, we will have our custom file extension, let's call it "anlib", it will be a rar archive with a pre-defined structure like jar.

But how to describe it in UML? Neither component diagram nor deployment diagram support aggregation or composition.

1

There are 1 best solutions below

0
On

UML diagram describe the system structure (components, classes) and its behaviors (interactions, activities, states). UML doesn't represent files or other system resources. But you can represent these indirectly:

  • a class that represents the data that is contained by such a file (class diagram)
  • a class that acts as proxy for a certain category of files and that can manage such files (class diagram)
  • an object that instantiates an existing file as a file stream class (e.g. lifeline on a sequence diagram)

If the file is part of the system configuration and needs to be deployed to make the system usable, then you can represent it as an artifact in a deployment diagram