phelps.doc
Class RobustLocation
public
class
RobustLocation
extends Object
System support for robust locations.
Kinds of locations: id, absolute position in text (sticky pointers), tree walk, perhaps later query/search.
See
Robust Locations paper.
To do
- fix locations at end of structural unit
Version: $Revision: 1.6 $ $Date: 2003/06/01 08:07:10 $
Method Summary |
static Mark | attach(Map<String,Object> attachme, INode toroot) Given Hastable of descriptors, return corresponding node/offset, robust to change
Returns null if couldn't attach (may throw exception in the future) |
static Mark | attachContent(Node subroot, String content, String pre, String post) |
static Node | attachId(String id, String idkey, Node root)
Search tree rooted at root for ID attribute matching id (stored under key idkey, which is usually "id" or "idref"). |
static void | attachTree(Node n, String[] names, int[] posns, int ni, int fuzz, int depth, RobustLocation.Report sub) |
static void | descriptorFor(Node keepme, int offset, Node docroot, Map<String,Object> map)
Given node, write multiple, redundant location descriptors into passed Map.
|
public static final String ATTR_CONTEXT
public static final String ATTR_ID
public static final String ATTR_LENGTH
public static final String ATTR_TREE
public static
Mark attach(Map<String,Object> attachme,
INode toroot)
Given Hastable of descriptors, return corresponding node/offset, robust to change
Returns null if couldn't attach (may throw exception in the future)
public static
Mark attachContent(
Node subroot, String content, String pre, String post)
public static
Node attachId(String id, String idkey,
Node root)
Search tree rooted at root for ID attribute matching id (stored under key idkey, which is usually "id" or "idref").
public static void attachTree(
Node n, String[] names, int[] posns, int ni, int fuzz, int depth, RobustLocation.Report sub)
public static void descriptorFor(
Node keepme, int offset,
Node docroot, Map<String,Object> map)
Given node, write multiple, redundant location descriptors into passed Map.
Result can be mapped back to tree by
RobustLocation.