01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: */
17: package org.apache.jetspeed.page.document;
18:
19: import java.util.Iterator;
20:
21: /**
22: * <p>
23: * NodeSet
24: * </p>
25: * <p>
26: *
27: * </p>
28: * @author <a href="mailto:weaver@apache.org">Scott T. Weaver</a>
29: * @version $Id: NodeSet.java 516448 2007-03-09 16:25:47Z ate $
30: *
31: */
32: public interface NodeSet {
33:
34: void add(Node node);
35:
36: /**
37: * <p>
38: * get
39: * </p>
40: * Returns a Node based on <code>name</code>. <code>name</code>
41: * can either be the fully quallified path, <code>folder1/folder2/myPage.psml</code>
42: * as returned by Node.getPath(), or the page name relative the <code>Node.getParent().getPath()</code>
43: * as return by Node.getName()that this DocumentSet was generated for.
44: *
45: * @param name
46: * @return
47: */
48: Node get(String name);
49:
50: Iterator iterator();
51:
52: NodeSet subset(String type);
53:
54: NodeSet inclusiveSubset(String regex);
55:
56: NodeSet exclusiveSubset(String regex);
57:
58: int size();
59:
60: boolean contains(Node node);
61:
62: boolean isEmpty();
63: }
|