KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > openharmonise > vfs > search > Order


1 /*
2  * The contents of this file are subject to the
3  * Mozilla Public License Version 1.1 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at http://www.mozilla.org/MPL/
6  *
7  * Software distributed under the License is distributed on an "AS IS"
8  * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied.
9  * See the License for the specific language governing rights and
10  * limitations under the License.
11  *
12  * The Initial Developer of the Original Code is Simulacra Media Ltd.
13  * Portions created by Simulacra Media Ltd are Copyright (C) Simulacra Media Ltd, 2004.
14  *
15  * All Rights Reserved.
16  *
17  * Contributor(s):
18  */

19 package org.openharmonise.vfs.search;
20
21 /**
22  * This class holds the information for a VirtualFileSystem search
23  * order.
24  *
25  * @author Matthew Large
26  * @version $Revision: 1.1 $
27  *
28  */

29 public class Order {
30
31     /**
32      * Namespace of property to order on.
33      */

34     private String JavaDoc m_sPropNamespace = null;
35     
36     /**
37      * Name of property to order on.
38      */

39     private String JavaDoc m_sPropName = null;
40     
41     /**
42      * Direction to order in.
43      */

44     private String JavaDoc m_sDirection = "ASC";
45     
46     /**
47      * Ascending order direction identifier.
48      */

49     public static final String JavaDoc ASC = "asc";
50
51     /**
52      * descending order direction identifier.
53      */

54     public static final String JavaDoc DESC = "desc";
55
56     /**
57      * Construcs a new order.
58      *
59      * @param sPropNamespace Namespace of property to order on
60      * @param sPropName Name of property to order on
61      */

62     public Order(String JavaDoc sPropNamespace, String JavaDoc sPropName) {
63         super();
64         this.m_sPropNamespace = sPropNamespace;
65         this.m_sPropName = sPropName;
66     }
67
68     /**
69      * Construcs a new order.
70      *
71      * @param sPropNamespace Namespace of property to order on
72      * @param sPropName Name of property to order on
73      * @param direction Direction to order in
74      * @see Order#ASC
75      * @see Order#DESC
76      */

77     public Order(String JavaDoc sPropNamespace, String JavaDoc sPropName, String JavaDoc direction) {
78         super();
79         this.m_sPropNamespace = sPropNamespace;
80         this.m_sPropName = sPropName;
81         this.m_sDirection = direction;
82     }
83     
84     /**
85      * Returns the namespace of the property to order by.
86      *
87      * @return Namespace
88      */

89     public String JavaDoc getPropNamespaceURI() {
90         return this.m_sPropNamespace;
91     }
92     
93     /**
94      * Returns the name of the property to order by.
95      *
96      * @return Name
97      */

98     public String JavaDoc getPropName() {
99         return this.m_sPropName;
100     }
101     
102     /**
103      * Returns the order direction identifier.
104      *
105      * @return Order direction
106      */

107     public String JavaDoc getDirection() {
108         return this.m_sDirection;
109     }
110
111 }
112
Popular Tags