01: /**
02: * @copyright
03: * ====================================================================
04: * Copyright (c) 2003-2004 CollabNet. All rights reserved.
05: *
06: * This software is licensed as described in the file COPYING, which
07: * you should have received as part of this distribution. The terms
08: * are also available at http://subversion.tigris.org/license-1.html.
09: * If newer versions of this license are posted there, you may use a
10: * newer version instead, at your option.
11: *
12: * This software consists of voluntary contributions made by many
13: * individuals. For exact contribution history, see the revision
14: * history and logs, available at http://subversion.tigris.org/.
15: * ====================================================================
16: * @endcopyright
17: */package org.tigris.subversion.javahl;
18:
19: /**
20: * Poor mans enum for svn_node_kind_t
21: */
22: public final class NodeKind {
23: /* absent */
24: public static final int none = 0;
25:
26: /* regular file */
27: public static final int file = 1;
28:
29: /* directory */
30: public static final int dir = 2;
31:
32: /* something's here, but we don't know what */
33: public static final int unknown = 3;
34:
35: /**
36: * mapping for the constants to text
37: */
38: private static final String[] statusNames = { "none", "file",
39: "dir ", "unknown", };
40:
41: /**
42: * Returns the textual representation for a NodeKind
43: * @param kind kind of node
44: * @return english text
45: */
46: public static final String getNodeKindName(int kind) {
47: return statusNames[kind];
48: }
49: }
|