Hi Cédric, my remarks bellow


-----Message d'origine-----
De : [email protected] 
[mailto:[email protected]] De la part de Topcased user 
list where issues are discussed
Envoyé : mercredi 9 mars 2011 15:52
À : [email protected]
Objet : [Topcased-users] [requirement] support for import



Hello



I've got the following requirement pattern to import :

REQ_XXXX_YYY_0203 requirement title

<html>

Requirement Text in html

Blabla

<blbablba>

#EndText

#Link_to REQ_XXXX_YYY_0203, REQ_XXXX_YYY_0204  #Compliance OK

#Verify Analysis

#Function Software



And I want to import the following requirement metamodel

REQ

      ID -> String

      Text -> String

      Link_To -> Set{REQ reference}

      Compliance -> String

      Verify -> String

      Function -> String



I've managed to capture ID and First line of text with following Regexp :

^(REQ_\w*_\w*_\d*)\s*?.*|^# -> To capture requirement ID



^REQ_\w*_\w*_\d*\s*?(.*|^#) -> To capture Text...



^#Link_to\s*?(.*|^#)



I've got 2 issues

1 - How can I do to capture the whole requirement text... Is there a tip to add 
multiple lines to the requirement



No, It is a current limitation, doc2model (back end technology for importing 
data currently only works using paragraphs visitor)



anyway to manage text you can use extension point from the technology to 
intercept event creation, you can create a plugin subscribing to the extension 
point using :


<extension
      point="org.topcased.doc2model.parser.checker">
   <checker
         instance="MyChecker">
   </checker>
</extension>


And referencing a class able to match your Text Regex, be careful the checker 
will be called for each import so you need to work on the condition.



To retrieve the latest object created by the import tool and to create new Text 
elements :
EObject eobject = process.getLatestCreatedElement();
if (eobject instanceof ttm.Requirement)
 {
      ttm.Requirement req = (ttm.Requirement) eobject;
Text createText = TtmFactory.eINSTANCE.createText();
createText.setValue(buffer.toString());
req.getTexts().add(createText);
}



2 -   How can I set the Link_To references after having imported the upstream 
document of this document ?





Sorry I don’t understand the question, Are you talking about Creation of 
current requirement from a model element ? If yes I recommend you to consult 
Requirement tutorial : 
http://gforge.enseeiht.fr/docman/view.php/112/4346/TPC_4.3_Requirement_tutorial.pdf





      Is it possible to set multiple reference for Link_To attribute ?



Yes the tool allows it



Any help would be very appreciable

Kind regards



Kind regards

Tristan FAURE



Cédric Gava











_______________________________________________

Topcased-users mailing list

[email protected]

http://lists.gforge.enseeiht.fr/mailman/listinfo/topcased-users

________________________________

Ce message et les pièces jointes sont confidentiels et réservés à l'usage 
exclusif de ses destinataires. Il peut également être protégé par le secret 
professionnel. Si vous recevez ce message par erreur, merci d'en avertir 
immédiatement l'expéditeur et de le détruire. L'intégrité du message ne pouvant 
être assurée sur Internet, la responsabilité du groupe Atos Origin ne pourra 
être recherchée quant au contenu de ce message. Bien que les meilleurs efforts 
soient faits pour maintenir cette transmission exempte de tout virus, 
l'expéditeur ne donne aucune garantie à cet égard et sa responsabilité ne 
saurait être recherchée pour tout dommage résultant d'un virus transmis.

This e-mail and the documents attached are confidential and intended solely for 
the addressee; it may also be privileged. If you receive this e-mail in error, 
please notify the sender immediately and destroy it. As its integrity cannot be 
secured on the Internet, the Atos Origin group liability cannot be triggered 
for the message content. Although the sender endeavours to maintain a computer 
virus-free network, the sender does not warrant that this transmission is 
virus-free and will not be liable for any damages resulting from any virus 
transmitted.
_______________________________________________
Topcased-users mailing list
[email protected]
http://lists.gforge.enseeiht.fr/mailman/listinfo/topcased-users

Reply via email to