1 4 5 9 10 package org.openlaszlo.compiler; 11 12 import org.jdom.Namespace; 13 14 17 20 public class ElementWithLocationInfo extends org.jdom.Element { 21 SourceLocator locator = new SourceLocator(); 22 String mHTMLContent = null; 23 NodeModel model = null; 25 26 public static SourceLocator getSourceLocator(org.jdom.Element elt) { 27 try { 28 return ((ElementWithLocationInfo) elt).getSourceLocator(); 29 } catch (ClassCastException e) { 30 return null; 31 } 32 } 33 34 public ElementWithLocationInfo (String name) { 35 super(name); 36 } 37 38 public ElementWithLocationInfo (String name, Namespace ns) { 39 super(name, ns); 40 } 41 42 public ElementWithLocationInfo (String name, String uri) { 43 super(name, uri); 44 } 45 46 public ElementWithLocationInfo (String name, String prefix, String uri) { 47 super(name, prefix, uri); 48 } 49 50 public void initSourceLocator(SourceLocator locator) { 51 this.locator = locator; 52 } 53 54 public SourceLocator getSourceLocator() { 55 return this.locator; 56 } 57 58 public void setHTMLContent(String s) { 59 mHTMLContent = s; 60 } 61 62 public String getHTMLContent() { 63 return mHTMLContent; 64 } 65 66 } 67 | Popular Tags |