Package org.woped.pnml

Examples of org.woped.pnml.TextType


    // }
    // }
   
    private void saveTextualDescription(NetType iNet, ModelElementContainer elementContainer){
     
      TextType textType = null;
      if(iNet.isSetText()){
        iNet.unsetText();
      }

      //table has values
      int tableSize = elementContainer.getParaphrasingModel().getTableSize();
      if(tableSize > 0){
       
        textType = iNet.addNewText();
       
        //write every row of the table to the file
        for(int i = 0; i < tableSize; i++){
          String[] row = elementContainer.getParaphrasingModel().getElementByRow(i);
          Phrase phrase = textType.addNewPhrase();
          phrase.setIds(row[0].trim());
          phrase.setStringValue(row[1].trim());
          LoggerManager.debug(Constants.FILE_LOGGER, "   ... Description (ID:" + row[0] + ") set");

        }       
View Full Code Here


              
      if(pnmlTag.getNetArray().length > 0){
        NetType netTag = pnmlTag.getNetArray(0);
         
          if(netTag.isSetText()){
            TextType textTag = netTag.getText();
           
              if(textTag.getPhraseArray().length > 0){
                PhraseType[] phraseTag = textTag.getPhraseArray();
                 
                  this.result = new String[phraseTag.length][2];         
                  for(int i = 0; i < phraseTag.length; i++){
                    this.result[i][0] = phraseTag[i].getIds().trim();
                    this.result[i][1] = phraseTag[i].getStringValue().trim()
View Full Code Here

 
 
  private void importTextualDescription(NetType currentNet,
      ModelElementContainer currentContainer) throws Exception{
   
    TextType text = currentNet.getText();
   
    if(currentNet.getText() != null){
     
      try{
        Phrase[] phraseArray = text.getPhraseArray();
        for(int z = 0; z < phraseArray.length; z++){
         
          String[] description = new String[2];
          description[0] = phraseArray[z].getIds().trim();
          description[1] = phraseArray[z].getStringValue().trim();
View Full Code Here

TOP

Related Classes of org.woped.pnml.TextType

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.