KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > cocoon > transformation > pagination > ItemGroup


1 /*
2  * Copyright 1999-2004 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16
17 package org.apache.cocoon.transformation.pagination;
18
19 /**
20  * Container class for the immutable pagination rules for each page.
21  *
22  * @author <a HREF="mailto:stefano@apache.org">Stefano Mazzocchi</a>
23  * @version CVS $Id: ItemGroup.java 30932 2004-07-29 17:35:38Z vgritsenko $
24  */

25 public class ItemGroup {
26     
27     private String JavaDoc name;
28     private String JavaDoc elementName;
29     private String JavaDoc elementURI;
30     
31     public ItemGroup (String JavaDoc name, String JavaDoc elementURI, String JavaDoc elementName) {
32         this.name = name;
33         this.elementURI = elementURI;
34         this.elementName = elementName;
35     }
36     
37     public boolean match(String JavaDoc elementName, String JavaDoc elementURI) {
38         return (this.elementName.equals(elementName) && this.elementURI.equals(elementURI));
39     }
40
41     public boolean match(String JavaDoc elementURI) {
42         return this.elementURI.equals(elementURI);
43     }
44
45     public String JavaDoc getName() {
46         return this.name;
47     }
48
49     public String JavaDoc getElementURI() {
50         return this.elementURI;
51     }
52     
53     public String JavaDoc getElementName() {
54         return this.elementName;
55     }
56 }
57
Popular Tags