root/SPARQLBuilderWWW2016/src/java/org/biohackathon/SPARQLBuilder/OWL/SClass.java @ 273

リビジョン 272, 2.3 KB (コミッタ: nori, 9 年 前)

SClassにendpointURI, graphURIを追加

行番号 
1package org.biohackathon.SPARQLBuilder.OWL;
2
3import java.util.HashSet;
4
5public class SClass {
6
7        private String classURI;
8        private int numOfInstances;
9        private HashSet<Label> labels;
10        private String endpointURI = null;
11        private String graphURI = null;
12
13        /**
14         * 繧、繝ウ繧ケ繧ソ繝ウ繧ケ縺ョURI縺ィ縺昴�繧、繝ウ繧ケ繧ソ繝ウ繧ケ縺悟ア槭@縺ヲ縺�k縺吶∋縺ヲ縺ョ繧ッ繝ゥ繧ケ繧剃ク弱∴繧区ァ区�蟄�
15         *
16         * @param instanceURI
17         *            縲€繧、繝ウ繧ケ繧ソ繝ウ繧ケ縺ョURI
18         * @param classURIs
19         *            縲€蠖楢ゥイ繧、繝ウ繧ケ繧ソ繝ウ繧ケ縺悟ア槭@縺ヲ縺�k縺吶∋縺ヲ縺ョ繧ッ繝ゥ繧ケ縺ョURI縺ョ驟榊�
20         * @throws Exception
21         * @since 28.01.2014
22         */
23        public SClass(String classURI, Label[] labels, int numOfInstances, String endpointURI, String graphURI) {
24                this.classURI = classURI;
25                this.numOfInstances = numOfInstances;
26                setLabels(labels);
27                this.endpointURI = endpointURI;
28                this.graphURI = graphURI;
29        }
30
31        /**
32         * 譁�ュ怜�陦ィ險倥r蜿門セ励☆繧�
33         *
34         * @since 28.01.2014
35         */
36        public String toString() {
37                StringBuffer sb = new StringBuffer();
38                sb.append(classURI);
39                sb.append("[");
40                boolean f = false;
41                if (labels != null) {
42                        for (Label label : labels) {
43                                if (f) {
44                                        sb.append(", ");
45                                }
46                                f = true;
47                                sb.append(label.toString());
48                        }
49                }
50                sb.append("], ");
51                sb.append(numOfInstances);
52                return sb.toString();
53        }
54
55        public final String getClassURI() {
56                return classURI;
57        }
58
59        public final void setClassURI(String classURI) {
60                this.classURI = classURI;
61        }
62
63        public final int getNumOfInstances() {
64                return numOfInstances;
65        }
66
67        public final void setNumOfInstances(int numOfInstances) {
68                this.numOfInstances = numOfInstances;
69        }
70
71        public final Label[] getLabels() {
72                return labels.toArray(new Label[0]);
73        }
74
75        public final void setLabels(Label[] labelArrays) {
76                labels = new HashSet<Label>();
77                if (labelArrays != null) {
78                        for (Label label : labelArrays) {
79                                labels.add(label);
80                        }
81                }
82        }
83
84        public void addLabel(Label label) {
85                labels.add(label);
86        }
87
88        public final String getEndpointURI() {
89                return endpointURI;
90        }
91
92        public final void setEndpointURI(String endpointURI) {
93                this.endpointURI = endpointURI;
94        }
95
96        public final String getGraphURI() {
97                return graphURI;
98        }
99
100        public final void setGraphURI(String graphURI) {
101                this.graphURI = graphURI;
102        }
103
104       
105       
106}
Note: リポジトリブラウザについてのヘルプは TracBrowser を参照してください。