001: /*
002: * The contents of this file are subject to the
003: * Mozilla Public License Version 1.1 (the "License");
004: * you may not use this file except in compliance with the License.
005: * You may obtain a copy of the License at http://www.mozilla.org/MPL/
006: *
007: * Software distributed under the License is distributed on an "AS IS"
008: * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied.
009: * See the License for the specific language governing rights and
010: * limitations under the License.
011: *
012: * The Initial Developer of the Original Code is Simulacra Media Ltd.
013: * Portions created by Simulacra Media Ltd are Copyright (C) Simulacra Media Ltd, 2004.
014: *
015: * All Rights Reserved.
016: *
017: * Contributor(s):
018: */
019: package org.openharmonise.vfs.search;
020:
021: /**
022: * This class holds the information for a VirtualFileSystem search
023: * order.
024: *
025: * @author Matthew Large
026: * @version $Revision: 1.1 $
027: *
028: */
029: public class Order {
030:
031: /**
032: * Namespace of property to order on.
033: */
034: private String m_sPropNamespace = null;
035:
036: /**
037: * Name of property to order on.
038: */
039: private String m_sPropName = null;
040:
041: /**
042: * Direction to order in.
043: */
044: private String m_sDirection = "ASC";
045:
046: /**
047: * Ascending order direction identifier.
048: */
049: public static final String ASC = "asc";
050:
051: /**
052: * descending order direction identifier.
053: */
054: public static final String DESC = "desc";
055:
056: /**
057: * Construcs a new order.
058: *
059: * @param sPropNamespace Namespace of property to order on
060: * @param sPropName Name of property to order on
061: */
062: public Order(String sPropNamespace, String sPropName) {
063: super ();
064: this .m_sPropNamespace = sPropNamespace;
065: this .m_sPropName = sPropName;
066: }
067:
068: /**
069: * Construcs a new order.
070: *
071: * @param sPropNamespace Namespace of property to order on
072: * @param sPropName Name of property to order on
073: * @param direction Direction to order in
074: * @see Order#ASC
075: * @see Order#DESC
076: */
077: public Order(String sPropNamespace, String sPropName,
078: String direction) {
079: super ();
080: this .m_sPropNamespace = sPropNamespace;
081: this .m_sPropName = sPropName;
082: this .m_sDirection = direction;
083: }
084:
085: /**
086: * Returns the namespace of the property to order by.
087: *
088: * @return Namespace
089: */
090: public String getPropNamespaceURI() {
091: return this .m_sPropNamespace;
092: }
093:
094: /**
095: * Returns the name of the property to order by.
096: *
097: * @return Name
098: */
099: public String getPropName() {
100: return this .m_sPropName;
101: }
102:
103: /**
104: * Returns the order direction identifier.
105: *
106: * @return Order direction
107: */
108: public String getDirection() {
109: return this.m_sDirection;
110: }
111:
112: }
|