Skip to main content

Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "CosmosResourceModelingComponent"

(Implementation (in progress))
(Nov 21st/2006 update)
Line 64: Line 64:
 
</li>
 
</li>
 
</ul>
 
</ul>
 +
 +
==== Nov 23rd/2006 update ====
 +
<p>
 +
Sheldon has completed the generic parser that allows multiple data structures to be created through one pass of an XML document.  The structures are registered and retrieved via a unique ID.  Also, the validator factory classes were revised after I discussed them with Sheldon.
 +
</p>
 +
 +
<p>
 +
I have completed the data structure builder for the directed reference graph that will be used as part of validating the acyclic extension.  A structure is also created to determine the types that are declared as acyclic.  A partial implementation of the acyclic validator is checked in.  Here's how it performs the validation:
 +
</p>
 +
<code>
 +
for every element i declared as acyclic  <br/>
 +
&nbsp;&nbsp;G = obtainReferenceGraph(i);<br/>
 +
&nbsp;&nbsp;backEdge = DFS(G);<br/>
 +
&nbsp;&nbsp;if (backEdge == null)<br/>
 +
&nbsp;&nbsp;&nbsp;&nbsp;no cycle found;<br/>
 +
&nbsp;&nbsp;else    <br/>
 +
&nbsp;&nbsp;&nbsp;&nbsp;use backEdge and tree edges to report the cycle detected;<br/>
 +
&nbsp;&nbsp;&nbsp;&nbsp;report error;<br/>
 +
</code>
 +
 
[[ COSMOS#Architecture | back to home]]
 
[[ COSMOS#Architecture | back to home]]

Revision as of 20:24, 23 November 2006

Resource Modeling

For information regarding SML look here.

Regular Meeting

To be set up.

Project Scope

  • Import from SML-IF
    • Import an SML-IF documentt to an existing document repository. The open source implementation of the document repository will be a file system structure.
  • Export to SML-IF
    • Create an SML-IF instance from existing document repositories. The open source implementation of the document repository will be a file system structure.
  • SML and SML-IF validation
    • Provide a common interface for handling and reporting errors
    • SML validation
      • Provide a common interface for handling and reporting errors
      • A default implementation for the XML validation phase
      • A default implementation for the SML extension validation phase
      • A default implementation for the Schematron validation phase, which will include displaying results to a predefined output based on report/assertion conditions
      • Create a default validation scheme for the SML extensions: sml:acyclic, sml:targetElement, sml:targetType, sml:key, sml:unique, and sml:keyref
    • SML-IF validation
      • A default implementation for the XML validation phase
      • A default implementation for the Schematron validation phase in the context of an SML-IF document; includes displaying results to a predefined output based on report/assertion conditions
    • Apply the SML validation extension in the context of an SML-IF document: sml:acyclic, sml:targetElement, sml:targetType, sml:key, sml:unique, and sml:keyref
    • An implementation of RFC 3986 to resolve inter-document references within an SML-IF document
    • Verify that the SML and SML-IF validation implementations cover the test cases of the SML workshop scenario

SML/SML-IF Validation & Editor

Design

The following attached document describes the validation of SML/SML-IF documents. It also includes description of embedded editors in Eclipse: Media: SML-Validation-v4.pdf

Implementation (in progress)

The following attached zip file is a copy of the source files: Media:Backup-v2.zip (your browser may not pick up the latest copy if a previous attachment has been cached)

Nov 21st/2006 update

An informal meeting between Valentina, Sheldon, and I (Ali) resulted in the following design decisions:

  • Sheldon already has a prototype of performing the first and last phase of the validation (i.e. XML validation against a schema and schematron).
  • I have completed the validation output, which will be dependent on the environment where the validation process will be performed. In Eclipse the validation output will be a set of markers that will be written to the problems view. In the standalone mode the user will have the option of either logging to a file or system output.
  • The second phase of the validation process was discussed. Some SML extensions require their own data structure to perform the validation. For example:
    • sml:acyclic will require a directed graph where nodes represent documents and edges represent the source and target element from/to the document that contains them.
    • sml:targetType will require an inheritance tree representing the relationship between the different element types.
  • Sheldon is working on a general SAX parser that will allow a set of content handlers to be registered to construct the different data structures required as part of the validation. This will allow us to generate multiple data structures by parsing the XML document once. Each data structure is registered with a class so that it can be retrieved and used by other SML extensions.
  • I'm currently working to generate the directed graph needed as part of the sml:acyclic validation.
  • Valentina is continuing with her tasks (validation of SML identity constraints: key, keyref, and unique)

Nov 23rd/2006 update

Sheldon has completed the generic parser that allows multiple data structures to be created through one pass of an XML document. The structures are registered and retrieved via a unique ID. Also, the validator factory classes were revised after I discussed them with Sheldon.

I have completed the data structure builder for the directed reference graph that will be used as part of validating the acyclic extension. A structure is also created to determine the types that are declared as acyclic. A partial implementation of the acyclic validator is checked in. Here's how it performs the validation:

for every element i declared as acyclic
  G = obtainReferenceGraph(i);
  backEdge = DFS(G);
  if (backEdge == null)
    no cycle found;
  else
    use backEdge and tree edges to report the cycle detected;
    report error;

back to home

Back to the top