All Downloads are FREE. Search and download functionalities are using the official Maven repository.

ingenias.editor.persistence.RelationshipSave Maven / Gradle / Ivy




/** 
 * Copyright (C) 2010  Jorge J. Gomez-Sanz over original code from Ruben Fuentes
 * 
 *  
 * 
 * This file is part of the INGENME tool. INGENME is an open source meta-editor
 * which produces customized editors for user-defined modeling languages
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation version 3 of the License
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see 
 **/
 
package ingenias.editor.persistence;
import java.lang.reflect.*;
import javax.swing.tree.*;
import org.apache.xerces.parsers.DOMParser;
import org.xml.sax.InputSource;
import java.awt.Color;
import java.awt.Point;
import java.awt.Rectangle;
import java.io.OutputStreamWriter;
import java.io.*;
import javax.swing.tree.DefaultMutableTreeNode;
import java.util.*;
import java.util.Map;
import java.util.Hashtable;
import java.util.ArrayList;
import javax.xml.parsers.*;
import org.jgraph.JGraph;
import org.jgraph.graph.*;
import org.w3c.dom.*;
import org.w3c.dom.Document;
import org.w3c.dom.DOMImplementation;/** 
 * Copyright (C) 2010  Jorge J. Gomez-Sanz over original code from Ruben Fuentes
 * 
 *   Modifications over original code from jgraph.sourceforge.net
 * 
 * This file is part of the INGENME tool. INGENME is an open source meta-editor
 * which produces customized editors for user-defined modeling languages
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation version 3 of the License
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see 
 **/
import ingenias.editor.entities.*;
import ingenias.exception.*;
import ingenias.editor.cell.*;
import ingenias.editor.*;



public class RelationshipSave extends RelationshipSaveAbs{
  

  protected  void saveRole(ingenias.editor.entities.RoleEntity en,
                               OutputStreamWriter os) throws
      IOException {
//    os.write("\n");
    Enumeration enumeration = null;


    
     if (en.getClass().equals(ingenias.editor.entities.NREdgeConnectorsourceRole.class)){
      ingenias.editor.entities.NREdgeConnectorsourceRole nen=(ingenias.editor.entities.NREdgeConnectorsourceRole)en;
      
      


    }
    
     if (en.getClass().equals(ingenias.editor.entities.NREdgeConnectortargetRole.class)){
      ingenias.editor.entities.NREdgeConnectortargetRole nen=(ingenias.editor.entities.NREdgeConnectortargetRole)en;
      
      


    }
    


    Hashtable ht = new Hashtable();

    en.toMap(ht);
    ObjectSave.saveMap(ht, os);
//    os.write("\n");
  }

 

}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy