01: /*
02: * Copyright Aduna (http://www.aduna-software.com/) (c) 1997-2007.
03: *
04: * Licensed under the Aduna BSD-style license.
05: */
06: package org.openrdf.repository.manager;
07:
08: import java.net.URL;
09: import java.text.Collator;
10:
11: public class RepositoryInfo implements Comparable<RepositoryInfo> {
12:
13: private String id;
14:
15: private URL location;
16:
17: private String description;
18:
19: private boolean readable;
20:
21: private boolean writable;
22:
23: public String getId() {
24: return id;
25: }
26:
27: public void setId(String id) {
28: this .id = id;
29: }
30:
31: public URL getLocation() {
32: return location;
33: }
34:
35: public void setLocation(URL location) {
36: this .location = location;
37: }
38:
39: public String getDescription() {
40: return description;
41: }
42:
43: public void setDescription(String description) {
44: this .description = description;
45: }
46:
47: public boolean isReadable() {
48: return readable;
49: }
50:
51: public void setReadable(boolean readable) {
52: this .readable = readable;
53: }
54:
55: public boolean isWritable() {
56: return writable;
57: }
58:
59: public void setWritable(boolean writable) {
60: this .writable = writable;
61: }
62:
63: public int compareTo(RepositoryInfo o) {
64: int result = Collator.getInstance().compare(getDescription(),
65: o.getDescription());
66: if (result == 0) {
67: result = getId().compareTo(o.getId());
68: }
69: return result;
70: }
71: }
|