private static String string2GXL(String value, String key) { String gxl = "\t\t<attr name=\"" + key + "\">" + "\n\t\t\t<string>" + ingenias.generator.util.Conversor.replaceInvalidChar(value)+ "</string>\n" + "\t\t</attr>\n"; return gxl; }
public String toString(){ String value="<v id=\""+id+"\" entityID=\""+ingenias.generator.util.Conversor.replaceInvalidCharsForID(this.entityID)+"\" attID=\""+attID +"\" >"+ ingenias.generator.util.Conversor.replaceInvalidChar(this.value)+"</v>\n"; return value; } }
public static String convertTagToArroba(String containment){ String nstring=replace(containment,"<",SUBTAGCHAR); nstring=replace(nstring,">",SUBTAGCHAR); return restoreInvalidChar(nstring); }
public static String convertArrobaFormat(String containment) throws ingenias.exception.NotWellFormed { String result = convertArrobaToTag(replaceInvalidChar(containment)); return convertTaggedFormat(result); }
public static String convertTaggedFormat(String containment) throws ingenias.exception.NotWellFormed { int pos = getTagStart(0, containment); int lastPos = 0; StringBuffer result = new StringBuffer(); boolean endTagFlag=false; while (pos >=0 && (pos+1)<containment.length()) { String tagName = getTagAt(pos + 1, containment).toLowerCase().trim(); if (tagName.startsWith("/")){ tagName=tagName.substring(1,tagName.length()); nString=nString.trim(); result.append(nString); int endTag = getTagEnd(pos, containment); if (endTag<0){ System.err.println("Error in transforming file. End tag is negative when dealing with this part "); result.append("<"+restoreInvalidChar(containment.substring(pos+1, endTag).trim()) + ">"); lastPos = endTag + SUBTAGCHAR.length(); pos=lastPos; pos = getTagStart(pos , containment); result.append(replaceInvalidChar(containment.substring(lastPos, containment.length())));
public String toString(){ String result="<repeat id=\""+ingenias.generator.util.Conversor.replaceInvalidCharsForID(id)+"\">\n"; Enumeration enumeration=this.body.elements(); while (enumeration.hasMoreElements()){ Object elem=enumeration.nextElement(); result=result+elem.toString(); } result=result+"</repeat>\n"; return result; }
public static String decodeSpecialSymbols(String text){ try { String s=text; s=ingenias.generator.util.Conversor.restoreInvalidChar(text); return s; } catch (Exception uee){ uee.printStackTrace(); } return ""; }
public static void main(String args[]) throws Exception { ingenias.editor.Log.initInstance(new PrintWriter(System.err)); if (args.length<2) System.err.println("Wrong format!!!!\n Conversor (-a2t|-t2a) filename"); else{ FileInputStream fis = new FileInputStream(args[1]); int read = fis.read(); StringBuffer sb = new StringBuffer(); while (read != -1) { sb.append( (char) read); read = fis.read(); } fis.close(); if (args[0].equals("-a2t")) System.out.println(convertArrobaFormat(sb.toString())); else if (args[0].equals("-t2a")) System.out.println(convertTagToArroba(sb.toString())); } } }
public static void main(String[] args) throws Exception { ingenias.editor.Log.initInstance(new PrintWriter(System.err)); ObtainInstantiationStructure obtainInstantiationStructure1 = new ObtainInstantiationStructure(); if (args.length != 1) { System.err.println( "Wrong format!!!!\n ObtainInstantiationStructure filename"); } else { FileInputStream fis = new FileInputStream(args[0]); int read = fis.read(); StringBuffer sb = new StringBuffer(); while (read != -1) { sb.append( (char) read); read = fis.read(); } fis.close(); System.out.println(getStructure(Conversor.convertArrobaFormat(sb.toString()))); } }
Graph g = gs[k]; rp2 = new Repeat("graph"); rp2.add(new Var("name", ingenias.generator.util.Conversor.replaceInvalidCharsForID(g.getName()))); rp2.add(new Var("fname", this.toSafeName(g.getName()))); rp2.add(new Var("tipo", g.getType()));
public static String decodeSpecialSymbols(String text){ try { String s=text; s=ingenias.generator.util.Conversor.restoreInvalidChar(text); return s; } catch (Exception uee){ uee.printStackTrace(); } return ""; }
readFile = ingenias.generator.util.Conversor.convertArrobaFormat(readFile);
public TemplateDataVar(String id, String value, String entityID, String attID) { this.id = id; this.entityID=entityID; this.attID=attID; //this.fts=fts; try { value=ingenias.generator.util.Conversor.replaceInvalidChar(value); this.value = value; } catch (Exception e){ e.printStackTrace(); } }
TemplateTree tags = new TemplateTree(new Tag("root",0,0)); readFile = ingenias.generator.util.Conversor.convertArrobaFormat(readFile);
/** * Constructor for the TemplateDataVar object * *@param id Description of Parameter *@param value Description of Parameter */ public TemplateDataVar(String id, String value) { this.id = id; try { value=ingenias.generator.util.Conversor.replaceInvalidChar(value); this.value = value; } catch (Exception e){ e.printStackTrace(); } }
public static void saveMap(Hashtable ht, OutputStreamWriter fos) throws IOException { fos.write("<mapproperties>\n"); Enumeration keys = ht.keys(); while (keys.hasMoreElements()) { String key = keys.nextElement().toString(); fos.write( ("<key id=\"" + key + "\">" + ingenias.generator.util.Conversor.replaceInvalidChar(ht.get(key).toString()) + "</key>\n")); } fos.write("</mapproperties>\n"); }
s=ingenias.generator.util.Conversor.replaceInvalidChar(s);
s=ingenias.generator.util.Conversor.replaceInvalidChar(s);
File current = (File) v.elementAt(k); if (current!=null) fos.write(("<lastfile>" + ingenias.generator.util.Conversor.replaceInvalidChar(current.getPath()) + "</lastfile>\n").getBytes()); .replaceInvalidChar(ids.getCurrentImageFolder() .getPath()) + "</lastimage>\n") .getBytes());
/** * Description of the Method * * @param prop * Description of Parameter * @param fos * Description of Parameter * @exception java.io.IOException * Description of Exception */ private void saveProjectProperties(IDEState ids, OutputStreamWriter fos) throws java.io.IOException { fos.write("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project cid=\"" + Editor.idCounter + "\" version=\"1.2\">\n"); Enumeration ppenumeration = ids.prop.elements(); fos.write(("<projectproperties>\n")); while (ppenumeration.hasMoreElements()) { ProjectProperty pp = (ProjectProperty) ppenumeration.nextElement(); fos.write(pp.toXML()); } Vector<String> diagrams = ids.editor.getOpenedDiagrams(); for (String diagram : diagrams) { fos.write(" <openeddiagram>" + ingenias.generator.util.Conversor .replaceInvalidChar(diagram) + "</openeddiagram>"); } fos.write(("</projectproperties>\n")); }