Multivalent API

phelps.doc
Class RobustLocation

java.lang.Object
  extended by phelps.doc.RobustLocation

public class RobustLocation
extends java.lang.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.

Version:
$Revision: 1.6 $ $Date: 2003/06/01 08:07:10 $

Field Summary
static java.lang.String ATTR_CONTEXT
           
static java.lang.String ATTR_ID
           
static java.lang.String ATTR_LENGTH
           
static java.lang.String ATTR_TREE
           
 
Method Summary
static Mark attach(java.util.Map<java.lang.String,java.lang.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, java.lang.String content, java.lang.String pre, java.lang.String post)
           
static Node attachId(java.lang.String id, java.lang.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, java.lang.String[] names, int[] posns, int ni, int fuzz, int depth, phelps.doc.RobustLocation.Report sub)
           
static void descriptorFor(Node keepme, int offset, Node docroot, java.util.Map<java.lang.String,java.lang.Object> map)
          Given node, write multiple, redundant location descriptors into passed Map.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ATTR_CONTEXT

public static final java.lang.String ATTR_CONTEXT
See Also:
Constant Field Values

ATTR_TREE

public static final java.lang.String ATTR_TREE
See Also:
Constant Field Values

ATTR_ID

public static final java.lang.String ATTR_ID
See Also:
Constant Field Values

ATTR_LENGTH

public static final java.lang.String ATTR_LENGTH
See Also:
Constant Field Values
Method Detail

descriptorFor

public static void descriptorFor(Node keepme,
                                 int offset,
                                 Node docroot,
                                 java.util.Map<java.lang.String,java.lang.Object> map)
Given node, write multiple, redundant location descriptors into passed Map. Result can be mapped back to tree by attach(Map, INode).


attach

public static Mark attach(java.util.Map<java.lang.String,java.lang.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)


attachContent

public static Mark attachContent(Node subroot,
                                 java.lang.String content,
                                 java.lang.String pre,
                                 java.lang.String post)

attachId

public static Node attachId(java.lang.String id,
                            java.lang.String idkey,
                            Node root)
Search tree rooted at root for ID attribute matching id (stored under key idkey, which is usually "id" or "idref").


attachTree

public static void attachTree(Node n,
                              java.lang.String[] names,
                              int[] posns,
                              int ni,
                              int fuzz,
                              int depth,
                              phelps.doc.RobustLocation.Report sub)

Multivalent API