1 20 package org.objectweb.modfact.corba.xmiio.importer; 21 22 27 public abstract class XMIImport { 28 29 30 protected org.omg.CORBA.ORB _orb; 31 32 36 public void setORB(org.omg.CORBA.ORB orb) { 37 _orb = orb; 38 } 39 40 45 public boolean readBooleanType(String value) { 46 return value.trim().equalsIgnoreCase("true"); 47 } 48 49 54 public String readStringType(String value) { 55 return value.trim(); 56 } 57 58 64 public boolean nodeNameCorrespondsTo(org.w3c.dom.Element node, String tag) { 65 String nodeName = node.getNodeName().trim(); 66 int index = nodeName.lastIndexOf("."); 67 if (index != -1) { 68 nodeName = nodeName.substring(index + 1); 69 } else { 70 index = nodeName.lastIndexOf(":"); 71 if (index != -1) 72 nodeName = nodeName.substring(index + 1); 73 } 74 return nodeName.equalsIgnoreCase(tag); 75 } 76 77 78 } 79 | Popular Tags |