01: /*****************************************************************************
02: * Source code information
03: * -----------------------
04: * Original author Ian Dickinson, HP Labs Bristol
05: * Author email ian.dickinson@hp.com
06: * Package Jena 2
07: * Web http://sourceforge.net/projects/jena/
08: * Created 04-Dec-2003
09: * Filename $RCSfile: SimpleXMLPathComponent.java,v $
10: * Revision $Revision: 1.6 $
11: * Release status $State: Exp $
12: *
13: * Last modified on $Date: 2008/01/02 12:09:42 $
14: * by $Author: andy_seaborne $
15: *
16: * (c) Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Hewlett-Packard Development Company, LP
17: * [See end of file]
18: *****************************************************************************/package com.hp.hpl.jena.util.xml;
19:
20: // Imports
21: ///////////////
22: import org.w3c.dom.*;
23:
24: import java.util.*;
25:
26: /**
27: * <p>
28: * General interface for components of a simple XML path structure.
29: * </p>
30: *
31: * @author Ian Dickinson, HP Labs (<a href="mailto:Ian.Dickinson@hp.com" >email</a>)
32: * @version CVS $Id: SimpleXMLPathComponent.java,v 1.6 2008/01/02 12:09:42 andy_seaborne Exp $
33: */
34: public interface SimpleXMLPathComponent {
35: // Constants
36: //////////////////////////////////
37:
38: // External signature methods
39: //////////////////////////////////
40:
41: /**
42: * <p>Answer an iterator over all of the values of this path component when
43: * evaluated with respect to the given node.</p>
44: * @param node The parent node to evaluate against
45: * @return An iterator over all of the objects that correspond to evaluating
46: * this path against the given node.
47: */
48: public Iterator getAll(Node node);
49:
50: /**
51: * <p>Answer the first value for this path expression against the given node.</p>
52: * @param node The parent node to evalauate against
53: * @return The first object that corresponds to evaluating
54: * this path against the given node, or null if there is no such value
55: */
56: public Object getFirst(Node node);
57: }
58:
59: /*
60: * (c) Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Hewlett-Packard Development Company, LP
61: * All rights reserved.
62: *
63: * Redistribution and use in source and binary forms, with or without
64: * modification, are permitted provided that the following conditions
65: * are met:
66: * 1. Redistributions of source code must retain the above copyright
67: * notice, this list of conditions and the following disclaimer.
68: * 2. Redistributions in binary form must reproduce the above copyright
69: * notice, this list of conditions and the following disclaimer in the
70: * documentation and/or other materials provided with the distribution.
71: * 3. The name of the author may not be used to endorse or promote products
72: * derived from this software without specific prior written permission.
73: *
74: * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
75: * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
76: * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
77: * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
78: * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
79: * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
80: * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
81: * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
82: * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
83: * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
84: */
|