/** * Retrieves the object associated to a key on a this node. The object * must first have been set to this node by calling * <code>setUserData</code> with the same key. * @param key The key the object is associated to. * @return Returns the <code>DOMObject</code> associated to the given key * on this node, or <code>null</code> if there was none. * @since DOM Level 3 */ public Object getUserData(String key) { return getOwnerDocument().getUserData( key); }
/** * Retrieves the object associated to a key on a this node. The object * must first have been set to this node by calling * <code>setUserData</code> with the same key. * @param key The key the object is associated to. * @return Returns the <code>DOMObject</code> associated to the given key * on this node, or <code>null</code> if there was none. * @since DOM Level 3 */ public Object getUserData(String key) { return getOwnerDocument().getUserData( key); }
/** * Retrieves the object associated to a key on a this node. The object * must first have been set to this node by calling * <code>setUserData</code> with the same key. * @param key The key the object is associated to. * @return Returns the <code>DOMObject</code> associated to the given key * on this node, or <code>null</code> if there was none. * @since DOM Level 3 */ public Object getUserData(String key) { return getOwnerDocument().getUserData( key); }
/** * Retrieves the object associated to a key on a this node. The object * must first have been set to this node by calling * <code>setUserData</code> with the same key. * @param key The key the object is associated to. * @return Returns the <code>DOMObject</code> associated to the given key * on this node, or <code>null</code> if there was none. * @since DOM Level 3 */ public Object getUserData(String key) { return getOwnerDocument().getUserData( key); }
public Object getUserData(String key) { return getOwnerDocument().getUserData( key); }
/** * Retrieves the object associated to a key on a this node. The object * must first have been set to this node by calling * <code>setUserData</code> with the same key. * @param key The key the object is associated to. * @return Returns the <code>DOMObject</code> associated to the given key * on this node, or <code>null</code> if there was none. * @since DOM Level 3 */ public Object getUserData(String key) { return getOwnerDocument().getUserData( key); }
/** * Retrieves the object associated to a key on a this node. The object * must first have been set to this node by calling * <code>setUserData</code> with the same key. * @param key The key the object is associated to. * @return Returns the <code>DOMObject</code> associated to the given key * on this node, or <code>null</code> if there was none. * @since DOM Level 3 */ public Object getUserData(String key) { return getOwnerDocument().getUserData( key); }
public Object getUserData(String key) { return getOwnerDocument().getUserData( key); }
/** * Handle an error condition as consequence of parsing. * * @param node that is the context of the warning. * @param msg associated with the error. */ public static void handleError(final Node node, final String msg) { final ErrorHandler handler = (ErrorHandler)node.getOwnerDocument().getUserData(ERROR_HANDLER_KEY); if (handler == null) { throw new IllegalStateException("ERROR: " + formatLocationInfo(node) + msg); } else { handler.error(formatLocationInfo(node) + msg); } }
/** * Handle a warning condition as a consequence of parsing. * * @param node as the context for the warning. * @param msg associated with the warning. */ public static void handleWarning(final Node node, final String msg) { final ErrorHandler handler = (ErrorHandler)node.getOwnerDocument().getUserData(ERROR_HANDLER_KEY); if (handler == null) { throw new IllegalStateException("WARNING: " + formatLocationInfo(node) + msg); } else { handler.warning(formatLocationInfo(node) + msg); } }
/** * Get the length of the original version of the document * @param doc * @return */ private static int getOriginalLength(Document doc) { Integer length = (Integer)doc.getUserData(ORIGINAL_LENGTH); if (length == null) return -1; return length; }
/** * Retrieves the object associated to a key on a this node. The object * must first have been set to this node by calling * <code>setUserData</code> with the same key. * @param key The key the object is associated to. * @return Returns the <code>DOMObject</code> associated to the given key * on this node, or <code>null</code> if there was none. * @since DOM Level 3 */ public Object getUserData(String key) { return getOwnerDocument().getUserData( key); }
/** * Retrieves the object associated to a key on a this node. The object * must first have been set to this node by calling * <code>setUserData</code> with the same key. * @param key The key the object is associated to. * @return Returns the <code>DOMObject</code> associated to the given key * on this node, or <code>null</code> if there was none. * @since DOM Level 3 */ public Object getUserData(String key) { return getOwnerDocument().getUserData( key); }
/** * Retrieves the object associated to a key on a this node. The object * must first have been set to this node by calling * <code>setUserData</code> with the same key. * @param key The key the object is associated to. * @return Returns the <code>DOMObject</code> associated to the given key * on this node, or <code>null</code> if there was none. * @since DOM Level 3 */ public Object getUserData(String key) { return getOwnerDocument().getUserData( key); }
/** * Retrieves the object associated to a key on a this node. The object * must first have been set to this node by calling * <code>setUserData</code> with the same key. * @param key The key the object is associated to. * @return Returns the <code>DOMObject</code> associated to the given key * on this node, or <code>null</code> if there was none. * @since DOM Level 3 */ public Object getUserData(String key) { return getOwnerDocument().getUserData( key); }
/** * Call the attached serializer and output the document * @param doc * @return */ public static String serialize(Document doc) { return ((HtmlSerializer) doc.getUserData(KEY)).serialize(doc); }
/** * Retrieves the object associated to a key on a this node. The object * must first have been set to this node by calling * <code>setUserData</code> with the same key. * @param key The key the object is associated to. * @return Returns the <code>DOMObject</code> associated to the given key * on this node, or <code>null</code> if there was none. * @since DOM Level 3 */ public Object getUserData(String key) { return getOwnerDocument().getUserData( key); }
/** * Copy serializer from one document to another. Note this requires that * serializers are thread safe */ static void copySerializer(Document from, Document to) { Integer length = (Integer)from.getUserData(ORIGINAL_LENGTH); if (length != null) to.setUserData(ORIGINAL_LENGTH, length, null); to.setUserData(KEY, from.getUserData(KEY), null); }
/** * Copy serializer from one document to another. Note this requires that * serializers are thread safe */ static void copySerializer(Document from, Document to) { Integer length = (Integer)from.getUserData(ORIGINAL_LENGTH); if (length != null) to.setUserData(ORIGINAL_LENGTH, length, null); to.setUserData(KEY, from.getUserData(KEY), null); }
/** * Runs the test case. * @throws Throwable Any uncaught exception causes test to fail */ public void runTest() throws Throwable { Document doc; Object userData; doc = (Document) load("hc_staff", false); userData = doc.getUserData("key1"); assertNull("nodegetuserdata02", userData); } /**