/** * Copy an existing Locator or Locator2 object. * If the object implements Locator2, values of the * <em>encoding</em> and <em>version</em>strings are copied, * otherwise they set to <em>null</em>. * * @param locator The existing Locator object. */ public Locator2Impl (Locator locator) { super (locator); if (locator instanceof Locator2) { Locator2 l2 = (Locator2) locator; version = l2.getXMLVersion (); encoding = l2.getEncoding (); } }
private void attempt() throws Eureka { if(loc==null) return; if (loc instanceof Locator2) { Locator2 loc2 = (Locator2) loc; String e = loc2.getEncoding(); if(e!=null) throw new Eureka(e); } } });
public String getXMLVersion() { if (fLocator2 != null) { return fLocator2.getXMLVersion(); } return null; }
private void realignElement() { String realignment = ""; for (int i = 0; i < locator.getLineNumber() - currentFlushedLine; i++) { realignment += System.getProperty("line.separator"); } write(realignment); }
private String getEncoding() { if (locator == null) { return null; } if (locator instanceof Locator2) { return ((Locator2) locator).getEncoding(); } // couldn't determine encoding, returning null... return null; }
public String getXMLVersion() { if (fLocator2 != null) { return fLocator2.getXMLVersion(); } return null; }
/** * Copy an existing Locator or Locator2 object. * If the object implements Locator2, values of the * <em>encoding</em> and <em>version</em>strings are copied, * otherwise they set to <em>null</em>. * * @param locator The existing Locator object. */ public Locator2Impl (Locator locator) { super (locator); if (locator instanceof Locator2) { Locator2 l2 = (Locator2) locator; version = l2.getXMLVersion (); encoding = l2.getEncoding (); } }
private String getEncoding() { if (locator == null) { return null; } if (locator instanceof Locator2) { return ((Locator2) locator).getEncoding(); } // couldn't determine encoding, returning null... return null; }
public String getXMLVersion() { if (fLocator2 != null) { return fLocator2.getXMLVersion(); } return null; }
/** * Copy an existing Locator or Locator2 object. * If the object implements Locator2, values of the * <em>encoding</em> and <em>version</em>strings are copied, * otherwise they set to <em>null</em>. * * @param locator The existing Locator object. */ public Locator2Impl (Locator locator) { super (locator); if (locator instanceof Locator2) { Locator2 l2 = (Locator2) locator; version = l2.getXMLVersion (); encoding = l2.getEncoding (); } }
public String getEncoding() { if (fLocator2 != null) { return fLocator2.getEncoding(); } return null; }
private void setDocumentInfo() { //try to set document version if (locator == null) return; try{ _document.setXmlVersion(((Locator2)locator).getXMLVersion()); }catch(ClassCastException e){} }
/** * Copy an existing Locator or Locator2 object. * If the object implements Locator2, values of the * <em>encoding</em> and <em>version</em>strings are copied, * otherwise they set to <em>null</em>. * * @param locator The existing Locator object. */ public Locator2Impl (Locator locator) { super (locator); if (locator instanceof Locator2) { Locator2 l2 = (Locator2) locator; version = l2.getXMLVersion (); encoding = l2.getEncoding (); } }
private String getEncoding() { if (locator == null) { return null; } if (locator instanceof Locator2) { return ((Locator2) locator).getEncoding(); } // couldn't determine encoding, returning null... return null; }
protected void setDocumentInfo() { if (m_locator == null) return; try{ String strVersion = ((Locator2)m_locator).getXMLVersion(); if (strVersion != null) setVersion(strVersion); /*String strEncoding = ((Locator2)m_locator).getEncoding(); if (strEncoding != null) setEncoding(strEncoding); */ }catch(ClassCastException e){} }
/** * Copy an existing Locator or Locator2 object. * If the object implements Locator2, values of the * <em>encoding</em> and <em>version</em>strings are copied, * otherwise they set to <em>null</em>. * * @param locator The existing Locator object. */ public Locator2Impl (Locator locator) { super (locator); if (locator instanceof Locator2) { Locator2 l2 = (Locator2) locator; version = l2.getXMLVersion (); encoding = l2.getEncoding (); } }
private String getEncoding() { if (locator == null) { return null; } if (locator instanceof Locator2) { return ((Locator2) locator).getEncoding(); } // couldn't determine encoding, returning null... return null; }
protected void setDocumentInfo() { if (m_locator == null) return; try{ String strVersion = ((Locator2)m_locator).getXMLVersion(); if (strVersion != null) setVersion(strVersion); /*String strEncoding = ((Locator2)m_locator).getEncoding(); if (strEncoding != null) setEncoding(strEncoding); */ }catch(ClassCastException e){} }
/** * Copy an existing Locator or Locator2 object. * If the object implements Locator2, values of the * <em>encoding</em> and <em>version</em>strings are copied, * otherwise they set to <em>null</em>. * * @param locator The existing Locator object. */ public Locator2Impl (Locator locator) { super (locator); if (locator instanceof Locator2) { Locator2 l2 = (Locator2) locator; version = l2.getXMLVersion (); encoding = l2.getEncoding (); } }
private void attempt() throws Eureka { if(loc==null) return; if (loc instanceof Locator2) { Locator2 loc2 = (Locator2) loc; String e = loc2.getEncoding(); if(e!=null) throw new Eureka(e); } } });