XML format

The Component-Watch projects are saved as XML. This XML is designed to be easily readable, modifiable and have a structure close to what you see in application.

This XML contains only the editable data (i.e. the content of the "Definition" tabs in the detail viewer), all the data generated during analysis (the classes, the relations, the jar list ...) are not saved and re-created at each analysis.

The XML data is described by a XML schema: ComponentWatch.xsd.

The 4 concepts appearing in the XML are the 4 editable objects of Component-Watch:

  • The project : represent the analysed application; it is the main object of the Component-Watch model, containing all the others.
  • The components : a component is a set of classes and can also define sub-components.
  • The rules : represent the rules applied on the project during the analysis.
  • The diagrams : A selection of components with hints to represent them graphically.

The project

The project is mapped to the main XML tag, the relevant part of the XML is:

        <?xml version="1.0" encoding="UTF-8"?>
        <project xmlns="componentwatch.sf.net/project/1.0" name="Self-analyse">
                An example analysing the Component-Watch application itself
                to demonstrate how the tool can help to analyse and represent
                an application structure starting from scratch in 10 minutes.

If, in the project definition, you choose Maven as jar files location rather than Directory, then the <directoryClassLocation> element is replaced by a <mavenClassLocation> as following.


The components

TODO: description

                <component name="sfac-utils">
                        Component created from the Jar sfac-utils-0.6.jar

The rules

TODO: description

                                <shortDescription>Three-tier layering</shortDescription>
                                        Each component must respect the general 3-tier layering of Web applications.
                                        The tiers enforce strict layering, meaning that the 'user interface' tier cannot directly access the 'data access' tier.
                                        <layerName>user interface</layerName>
                                        <layerName>data access</layerName>

The diagrams

TODO: description

                <diagram name="Silos and Layers">
                        <cellGroup name="Silos and layers" base="BOX">
                        <cellLayout cellId="GUI" x="390" y="30" width="50" height="170"/>
                        <cellLayout cellId="External components" x="50" y="150" width="290" height="30"/>
                        <cellLayout cellId="Model" x="470" y="30" width="50" height="170"/>
                        <cellLayout cellId="Analysed libraries" x="50" y="100" width="290" height="30"/>
                        <cellLayout cellId="Component Watch" x="50" y="50" width="290" height="30"/>