1 /*
2 * $Id: MySpaceFileType.java,v 1.2 2004/06/14 23:08:52 jdt Exp $
3 *
4 * Copyright 2003 AstroGrid. All rights reserved.
5 *
6 * This software is published under the terms of the AstroGrid Software License,
7 * a copy of which has been included with this distribution in the LICENSE.txt file.
8 */
9
10 package org.astrogrid.store.delegate.myspace;
11
12 import java.util.Hashtable;
13 import org.astrogrid.util.TypeSafeEnumerator;
14
15 /***
16 * File Types for MySpace. Enumerated, indexed by the string returned
17 * by the getDataHolding methods
18 *
19 * @author mch
20 */
21
22
23 public class MySpaceFileType extends TypeSafeEnumerator
24 {
25 private static Hashtable holdingIdx = new Hashtable();
26
27 public static final MySpaceFileType UNKNOWN = new MySpaceFileType("0", "Unknown");
28 public static final MySpaceFileType FOLDER = new MySpaceFileType("1", "Folder");
29 public static final MySpaceFileType VOTABLE = new MySpaceFileType("2", "Folder");
30 public static final MySpaceFileType QUERY = new MySpaceFileType("3", "Folder");
31 public static final MySpaceFileType WORKFLOW = new MySpaceFileType("4", "Workflow");
32 public static final MySpaceFileType XML = new MySpaceFileType("5", "Workflow");
33
34
35 private MySpaceFileType(String holdingRef, String userDesc)
36 {
37 super(userDesc);
38 holdingIdx.put(holdingRef, this);
39 }
40
41 public static MySpaceFileType getForHoldingRef(String holdingRef)
42 {
43 return (MySpaceFileType) holdingIdx.get(holdingRef);
44 }
45
46
47 }
48
49 /*
50 $Log: MySpaceFileType.java,v $
51 Revision 1.2 2004/06/14 23:08:52 jdt
52 Merge from branches
53 ClientServerSplit_JDT
54 and
55 MySpaceClientServerSplit_JDT
56
57 MySpace now split into a client/delegate jar
58 astrogrid-myspace-<version>.jar
59 and a server/manager war
60 astrogrid-myspace-server-<version>.war
61
62 Revision 1.1.2.1 2004/06/14 22:33:20 jdt
63 Split into delegate jar and server war.
64 Delegate: astrogrid-myspace-SNAPSHOT.jar
65 Server/Manager: astrogrid-myspace-server-SNAPSHOT.war
66
67 Package names unchanged.
68 If you regenerate the axis java/wsdd/wsdl files etc you'll need
69 to move some files around to ensure they end up in the client
70 or the server as appropriate.
71 As of this check-in the tests/errors/failures is 162/1/22 which
72 matches that before the split.
73
74 Revision 1.3 2004/05/03 08:55:53 mch
75 Fixes to getFiles(), introduced getSize(), getOwner() etc to StoreFile
76
77 Revision 1.2 2004/04/23 11:38:19 mch
78 Fixes to return correct AGSL plus change to File model for It05 delegate
79
80 Revision 1.1 2004/03/04 12:51:31 mch
81 Moved delegate implementations into subpackages
82
83 Revision 1.2 2004/03/01 22:50:08 mch
84 added finals, oops
85
86 Revision 1.1 2004/02/24 15:59:56 mch
87 Moved It04.1 Datacenter VoSpaceClient stuff to myspace as StoreClient stuff
88
89 Revision 1.1 2004/02/15 23:16:06 mch
90 New-style VoSpace delegates. Not agreed so private to datacenter for the moment
91
92 */
93