private long getChar4OtherEncoding(long offset) throws NavExceptionHuge{ if (encoding <= FORMAT_WIN_1258){ int temp = decode(offset); if (temp == '\r') { if (XMLDoc.byteAt(offset + 1) == '\n') { return '\n'|(2L<<32); } else { return '\n'|(1L<<32); } } return temp|(1L<<32); } throw new NavExceptionHuge("Unknown Encoding"); } /**
public Map<String, Object> next() { if (!hasNext()) return null; Map<String, Object> row = new HashMap<String, Object>(); try { for (String fieldName : navigators.keySet()) { FieldValueSource navi = navigators.get(fieldName); Object fieldValue = navi.getFieldValue(); row.put(fieldName, fieldValue); } row.put(JulieXMLConstants.VTD_INDEX, index); index = ap.evalXPath(); return row; } catch (XPathEvalExceptionHuge e) { e.printStackTrace(); } catch (NavExceptionHuge e) { e.printStackTrace(); } catch (Exception e) { e.printStackTrace(); } return null; }
break; default: throw new NavExceptionHuge("UTF 8 encoding error: should never happen"); temp = XMLDoc.byteAt(offset + a - i); if ((temp & 0xc0) != 0x80) throw new NavExceptionHuge( "UTF 8 encoding error: should never happen"); val = val | ((temp & 0x3f) << ((i << 2) + (i << 1)));
break; default: throw new NavExceptionHuge("UTF 8 encoding error: should never happen"); temp = XMLDoc.byteAt(offset + a - i); if ((temp & 0xc0) != 0x80) throw new NavExceptionHuge( "UTF 8 encoding error: should never happen"); val = val | ((temp & 0x3f) << ((i << 2) + (i << 1)));
break; default: throw new NavExceptionHuge("UTF 8 encoding error: should never happen"); temp = XMLDoc.byteAt(offset + a - i); if ((temp & 0xc0) != 0x80) throw new NavExceptionHuge( "UTF 8 encoding error: should never happen"); val = val | ((temp & 0x3f) << ((i << 2) + (i << 1)));
private long getChar4OtherEncoding(long offset) throws NavExceptionHuge{ if (encoding <= FORMAT_WIN_1258){ int temp = decode(offset); if (temp == '\r') { if (XMLDoc.byteAt(offset + 1) == '\n') { return '\n'|(2L<<32); } else { return '\n'|(1L<<32); } } return temp|(1L<<32); } throw new NavExceptionHuge("Unknown Encoding"); } /**
private long getChar4OtherEncoding(long offset) throws NavExceptionHuge{ if (encoding <= FORMAT_WIN_1258){ int temp = decode(offset); if (temp == '\r') { if (XMLDoc.byteAt(offset + 1) == '\n') { return '\n'|(2L<<32); } else { return '\n'|(1L<<32); } } return temp|(1L<<32); } throw new NavExceptionHuge("Unknown Encoding"); } /**
/** * Test whether the URL is defined in the scope. Null is allowed to * indicate the name space is undefined. Creation date: (11/16/03 7:54:01 * PM) * * @param URL * java.lang.String * @exception com.ximpleware.extended.NavExceptionHuge * When there is any encoding conversion error or unknown * entity. */ final protected int lookupNS() throws NavExceptionHuge { if (context[0]==-1) throw new NavExceptionHuge("Can't lookup NS for document node"); int i = getTokenLength((context[0] != 0) ? context[context[0]] : rootIndex); long offset = getTokenOffset((context[0] != 0) ? context[context[0]] : rootIndex); int preLen = (i >> 16) & 0xffff; return lookupNS(offset, preLen); //return resolveNS(URL, offset, preLen); }
/** * Test whether the URL is defined in the scope. Null is allowed to * indicate the name space is undefined. Creation date: (11/16/03 7:54:01 * PM) * * @param URL * java.lang.String * @exception com.ximpleware.extended.NavExceptionHuge * When there is any encoding conversion error or unknown * entity. */ final protected int lookupNS() throws NavExceptionHuge { if (context[0]==-1) throw new NavExceptionHuge("Can't lookup NS for document node"); int i = getTokenLength((context[0] != 0) ? context[context[0]] : rootIndex); long offset = getTokenOffset((context[0] != 0) ? context[context[0]] : rootIndex); int preLen = (i >> 16) & 0xffff; return lookupNS(offset, preLen); //return resolveNS(URL, offset, preLen); }
/** * Test whether the URL is defined in the scope. Null is allowed to * indicate the name space is undefined. Creation date: (11/16/03 7:54:01 * PM) * * @param URL * java.lang.String * @exception com.ximpleware.extended.NavExceptionHuge * When there is any encoding conversion error or unknown * entity. */ final protected int lookupNS() throws NavExceptionHuge { if (context[0]==-1) throw new NavExceptionHuge("Can't lookup NS for document node"); int i = getTokenLength((context[0] != 0) ? context[context[0]] : rootIndex); long offset = getTokenOffset((context[0] != 0) ? context[context[0]] : rootIndex); int preLen = (i >> 16) & 0xffff; return lookupNS(offset, preLen); //return resolveNS(URL, offset, preLen); }
} else { if (temp<0xd800 || temp>0xdbff) throw new NavExceptionHuge("UTF 16 LE encoding error: should never happen"); val = temp; temp = if (temp < 0xdc00 || temp > 0xdfff) { throw new NavExceptionHuge("UTF 16 LE encoding error: should never happen");
} else { if (temp<0xd800 || temp>0xdbff) throw new NavExceptionHuge("UTF 16 LE encoding error: should never happen"); val = temp; temp = if (temp < 0xdc00 || temp > 0xdfff) { throw new NavExceptionHuge("UTF 16 LE encoding error: should never happen");
} else { if (temp<0xd800 || temp>0xdbff) throw new NavExceptionHuge("UTF 16 BE encoding error: should never happen"); val = temp; temp = if (temp < 0xdc00 || temp > 0xdfff) { throw new NavExceptionHuge("UTF 16 BE encoding error: should never happen");
} else { if (temp<0xd800 || temp>0xdbff) throw new NavExceptionHuge("UTF 16 LE encoding error: should never happen"); val = temp; temp = if (temp < 0xdc00 || temp > 0xdfff) { throw new NavExceptionHuge("UTF 16 LE encoding error: should never happen");
} else { if (temp<0xd800 || temp>0xdbff) throw new NavExceptionHuge("UTF 16 BE encoding error: should never happen"); val = temp; temp = if (temp < 0xdc00 || temp > 0xdfff) { throw new NavExceptionHuge("UTF 16 BE encoding error: should never happen");
} else { if (temp<0xd800 || temp>0xdbff) throw new NavExceptionHuge("UTF 16 BE encoding error: should never happen"); val = temp; temp = if (temp < 0xdc00 || temp > 0xdfff) { throw new NavExceptionHuge("UTF 16 BE encoding error: should never happen");
break; } else throw new NavExceptionHuge("Illegal char in a char reference"); break; } else throw new NavExceptionHuge("Illegal char in char reference"); val = '&'; } else throw new NavExceptionHuge("illegal builtin reference"); } else if (ch == 'p') { if (getCharUnit(offset + 1) == 'o' val = '\''; } else throw new NavExceptionHuge("illegal builtin reference"); } else throw new NavExceptionHuge("illegal builtin reference"); break; val = '\"'; } else throw new NavExceptionHuge("illegal builtin reference"); break; case 'l' : val = '<'; } else
break; } else throw new NavExceptionHuge("Illegal char in a char reference"); break; } else throw new NavExceptionHuge("Illegal char in char reference"); val = '&'; } else throw new NavExceptionHuge("illegal builtin reference"); } else if (ch == 'p') { if (getCharUnit(offset + 1) == 'o' val = '\''; } else throw new NavExceptionHuge("illegal builtin reference"); } else throw new NavExceptionHuge("illegal builtin reference"); break; val = '\"'; } else throw new NavExceptionHuge("illegal builtin reference"); break; case 'l' : val = '<'; } else
break; } else throw new NavExceptionHuge("Illegal char in a char reference"); break; } else throw new NavExceptionHuge("Illegal char in char reference"); val = '&'; } else throw new NavExceptionHuge("illegal builtin reference"); } else if (ch == 'p') { if (getCharUnit(offset + 1) == 'o' val = '\''; } else throw new NavExceptionHuge("illegal builtin reference"); } else throw new NavExceptionHuge("illegal builtin reference"); break; val = '\"'; } else throw new NavExceptionHuge("illegal builtin reference"); break; case 'l' : val = '<'; } else
throw new NavExceptionHuge("illegal navigation options");