public static IntEntity create(String id, char[] val) { WstxInputLocation loc = WstxInputLocation.getEmptyLocation(); return new IntEntity(loc, id, null, val, loc); }
protected Location getLocation() { return new WstxInputLocation(null, mPublicId, mSystemId, mInputProcessed + mInputPtr - 1, mInputRow, mInputPtr - mInputRowStart); }
public String toString() { if (mDesc == null) { StringBuffer sb; if (mContext != null) { sb = new StringBuffer(200); } else { sb = new StringBuffer(80); } appendDesc(sb); mDesc = sb.toString(); } return mDesc; }
public boolean equals(Object o) { if (!(o instanceof WstxInputLocation)) { return false; } WstxInputLocation other = (WstxInputLocation) o; // char offset should be good enough, without row/col: if (other.getCharacterOffsetLong() != getCharacterOffsetLong()) { return false; } String otherPub = other.getPublicId(); if (otherPub == null) { otherPub = ""; } if (!otherPub.equals(mPublicId)) { return false; } String otherSys = other.getSystemId(); if (otherSys == null) { otherSys = ""; } return otherSys.equals(mSystemId); }
public boolean equals(Object o) { if (!(o instanceof Location)) { return false; } Location other = (Location) o; // char offset should be good enough, without row/col: if (other.getCharacterOffset() != getCharacterOffset()) { return false; } String otherPub = other.getPublicId(); if (otherPub == null) { otherPub = ""; } if (!otherPub.equals(mPublicId)) { return false; } String otherSys = other.getSystemId(); if (otherSys == null) { otherSys = ""; } return otherSys.equals(mSystemId); }
public boolean equals(Object o) { if (!(o instanceof WstxInputLocation)) { return false; } WstxInputLocation other = (WstxInputLocation) o; // char offset should be good enough, without row/col: if (other.getCharacterOffsetLong() != getCharacterOffsetLong()) { return false; } String otherPub = other.getPublicId(); if (otherPub == null) { otherPub = ""; } if (!otherPub.equals(mPublicId)) { return false; } String otherSys = other.getSystemId(); if (otherSys == null) { otherSys = ""; } return otherSys.equals(mSystemId); }
public boolean equals(Object o) { if (!(o instanceof Location)) { return false; } Location other = (Location) o; // char offset should be good enough, without row/col: if (other.getCharacterOffset() != getCharacterOffset()) { return false; } String otherPub = other.getPublicId(); if (otherPub == null) { otherPub = ""; } if (!otherPub.equals(mPublicId)) { return false; } String otherSys = other.getSystemId(); if (otherSys == null) { otherSys = ""; } return otherSys.equals(mSystemId); }
protected Location getLocation() { /* Ok; for fixed-size multi-byte encodings, need to divide numbers * to get character locations. For variable-length encodings the * good thing is that xml declaration only uses shortest codepoints, * ie. char count == byte count. */ int total = mInputProcessed + mInputPtr; int col = mInputPtr - mInputRowStart; if (mBytesPerChar > 1) { total /= mBytesPerChar; col /= mBytesPerChar; } return new WstxInputLocation(null, mPublicId, mSystemId, total - 1, // 0-based mInputRow, col); }
(oldInput, id, null, null, resolver, mConfig, xmlVersion); if (mCfgTreatCharRefsAsEntities) { return new IntEntity(WstxInputLocation.getEmptyLocation(), newInput.getEntityId(), newInput.getSource(), new char[]{}, WstxInputLocation.getEmptyLocation());
StringUtil.appendLF(sb); sb.append(" from "); mContext.appendDesc(sb);
@Override public boolean equals(Object o) { if (!(o instanceof WstxInputLocation)) { return false; } WstxInputLocation other = (WstxInputLocation) o; // char offset should be good enough, without row/col: if (other.getCharacterOffsetLong() != getCharacterOffsetLong()) { return false; } String otherPub = other.getPublicId(); if (otherPub == null) { otherPub = ""; } if (!otherPub.equals(mPublicId)) { return false; } String otherSys = other.getSystemId(); if (otherSys == null) { otherSys = ""; } return otherSys.equals(mSystemId); }
public boolean equals(Object o) { if (!(o instanceof Location)) { return false; } Location other = (Location) o; // char offset should be good enough, without row/col: if (other.getCharacterOffset() != getCharacterOffset()) { return false; } String otherPub = other.getPublicId(); if (otherPub == null) { otherPub = ""; } if (!otherPub.equals(mPublicId)) { return false; } String otherSys = other.getSystemId(); if (otherSys == null) { otherSys = ""; } return otherSys.equals(mSystemId); }
public XMLStreamLocation2 getLocation() { return new WstxInputLocation(null, // no parent null, (String) null, // pub/sys ids not yet known mWriter.getAbsOffset(), mWriter.getRow(), mWriter.getColumn()); }
public static IntEntity create(String id, char[] val) { WstxInputLocation loc = WstxInputLocation.getEmptyLocation(); return new IntEntity(loc, id, null, val, loc); }
public String toString() { if (mDesc == null) { StringBuffer sb; if (mContext != null) { sb = new StringBuffer(200); } else { sb = new StringBuffer(80); } appendDesc(sb); mDesc = sb.toString(); } return mDesc; }
@Override public boolean equals(Object o) { if (!(o instanceof WstxInputLocation)) { return false; } WstxInputLocation other = (WstxInputLocation) o; // char offset should be good enough, without row/col: if (other.getCharacterOffsetLong() != getCharacterOffsetLong()) { return false; } String otherPub = other.getPublicId(); if (otherPub == null) { otherPub = ""; } if (!otherPub.equals(mPublicId)) { return false; } String otherSys = other.getSystemId(); if (otherSys == null) { otherSys = ""; } return otherSys.equals(mSystemId); }
public final WstxInputLocation getLocation(long total, int row, int col) { WstxInputLocation pl; if (mParent == null) { pl = null; } else { /* 13-Apr-2005, TSa: We can actually reuse parent location, since * it can not change during lifetime of this child context... */ pl = mParentLocation; if (pl == null) { mParentLocation = pl = mParent.getLocation(); } pl = mParent.getLocation(); } /* !!! 15-Apr-2005, TSa: This will cause overflow for total count, * but since StAX 1.0 API doesn't have any way to deal with that, * let's just let that be... */ return new WstxInputLocation(pl, getPublicId(), getSystemId(), total, row, col); } }
public static IntEntity create(String id, char[] val) { WstxInputLocation loc = WstxInputLocation.getEmptyLocation(); return new IntEntity(loc, id, null, val, loc); }
public String toString() { if (mDesc == null) { StringBuffer sb; if (mContext != null) { sb = new StringBuffer(200); } else { sb = new StringBuffer(80); } appendDesc(sb); mDesc = sb.toString(); } return mDesc; }
@Override public boolean equals(Object o) { if (!(o instanceof WstxInputLocation)) { return false; } WstxInputLocation other = (WstxInputLocation) o; // char offset should be good enough, without row/col: if (other.getCharacterOffsetLong() != getCharacterOffsetLong()) { return false; } String otherPub = other.getPublicId(); if (otherPub == null) { otherPub = ""; } if (!otherPub.equals(mPublicId)) { return false; } String otherSys = other.getSystemId(); if (otherSys == null) { otherSys = ""; } return otherSys.equals(mSystemId); }