1 | package org.biohackathon.SPARQLBuilder.OWL;
|
---|
2 |
|
---|
3 | /**
|
---|
4 | * 繧ッ繝ゥ繧ケ縺ク縲√≠繧九>縺ッ繧ッ繝ゥ繧ケ縺九i縺ョ1繧ケ繝�ャ繝励Μ繝ウ繧ッ繧定ィ倩ソー縺吶k
|
---|
5 | * @author Norio KOBAYASHI
|
---|
6 | * @since 28.01.2014
|
---|
7 | * @version 29.01.2014
|
---|
8 | */
|
---|
9 | public class ClassLink {
|
---|
10 |
|
---|
11 | private String propertyURI = null;
|
---|
12 | private String linkedClassURI = null;
|
---|
13 | private Direction direction = null;
|
---|
14 | private int numOfLinks = 0;
|
---|
15 | private int numOfLinkedInstances = 0;
|
---|
16 | private int numOfOriginInstances = 0;
|
---|
17 | private int numOfOriginClassInstances = 0;
|
---|
18 | private int numOfLinkedClassInstances = 0;
|
---|
19 |
|
---|
20 | /**
|
---|
21 | * 繝励Ο繝代ユ繧」URI縲√Μ繝ウ繧ッ蜈茨シ亥��峨け繝ゥ繧ケ縲√Μ繝ウ繧ッ縺ョ蜷代″繧剃ク弱∴繧区ァ区�蟄� |
---|
22 | *
|
---|
23 | * @param propertyURI縲繝励Ο繝代ユ繧」縺ョURI
|
---|
24 | * @param linkedClassURI縲繝ェ繝ウ繧ッ縺ョ荳サ隱槭√√≠繧九>縺ッ繝ェ繝ウ繧ッ縺ョ逶ョ逧�ェ槭→縺ェ縺」縺ヲ縺�k繧ッ繝ゥ繧ケ縺ョURI
|
---|
25 | * @param direction 繝励Ο繝代ユ繧」縺ョ蜷代″縲〕inkedClassURI縺ョ繧ッ繝ゥ繧ケ縺後Μ繝ウ繧ッ蜈医↓縺ェ縺」縺ヲ縺�k縺ィ縺阪�Direction.forward,繝ェ繝ウ繧ッ蜈�↓縺ェ縺」縺ヲ縺�k縺ィ縺阪�Direction.reverse, 縺昴l繧我ク。譁ケ縺ョ譎ゅ�Direction.both繧呈欠螳壹☆繧�
|
---|
26 | * @param numOfLinks 蠖楢ゥイ繝励Ο繝代ユ繧」縺ァ荳。遶ッ繧ッ繝ゥ繧ケ縺ョ繧、繝ウ繧ケ繧ソ繝ウ繧ケ蜷悟」ォ繧偵▽縺ェ縺�〒縺�k繝ェ繝ウ繧ッ謨ー�医ヨ繝ェ繝励Ν謨ー�� |
---|
27 | * @throws Exception
|
---|
28 | * @since 28.01.2014
|
---|
29 | */
|
---|
30 | public ClassLink(String propertyURI, String linkedClassURI, Direction direction,
|
---|
31 | int numLinks, int numOfOriginInstances, int numOfLinkedInstances,
|
---|
32 | int numOfOriginClassInstances, int numofLinkedClassInstances){
|
---|
33 | this.propertyURI = propertyURI;
|
---|
34 | this.linkedClassURI = linkedClassURI;
|
---|
35 | this.direction = direction;
|
---|
36 | this.numOfLinks = numLinks;
|
---|
37 | this.numOfLinkedInstances = numOfLinkedInstances;
|
---|
38 | this.numOfOriginInstances = numOfOriginInstances;
|
---|
39 | this.numOfOriginClassInstances = numOfOriginClassInstances;
|
---|
40 | this.numOfLinkedClassInstances = numofLinkedClassInstances;
|
---|
41 | }
|
---|
42 |
|
---|
43 |
|
---|
44 | public int getNumOfLinks() {
|
---|
45 | return numOfLinks;
|
---|
46 | }
|
---|
47 |
|
---|
48 |
|
---|
49 |
|
---|
50 |
|
---|
51 | public void setNumOfLinks(int numOfLinks) {
|
---|
52 | this.numOfLinks = numOfLinks;
|
---|
53 | }
|
---|
54 |
|
---|
55 |
|
---|
56 |
|
---|
57 |
|
---|
58 | /**
|
---|
59 | * 譁�ュ怜�陦ィ險倥r蜿門セ励☆繧� |
---|
60 | *
|
---|
61 | * @since 28.01.2014
|
---|
62 | */
|
---|
63 | public String toString(){
|
---|
64 | StringBuffer sb = new StringBuffer();
|
---|
65 | sb.append(propertyURI);
|
---|
66 | if( direction == Direction.forward ){
|
---|
67 | sb.append(" --> ");
|
---|
68 | }else{
|
---|
69 | if( direction == Direction.reverse ){
|
---|
70 | sb.append(" <-- ");
|
---|
71 | }else{
|
---|
72 | sb.append(" <-> ");
|
---|
73 | }
|
---|
74 | }
|
---|
75 | sb.append(linkedClassURI);
|
---|
76 | sb.append(" [");
|
---|
77 | sb.append(numOfOriginInstances);
|
---|
78 | sb.append("/");
|
---|
79 | sb.append(numOfOriginClassInstances);
|
---|
80 | sb.append("]縲---");
|
---|
81 |
|
---|
82 |
|
---|
83 | sb.append(" [");
|
---|
84 | sb.append(numOfLinks);
|
---|
85 | sb.append("] --->");
|
---|
86 |
|
---|
87 | sb.append(" [");
|
---|
88 | sb.append(numOfLinkedInstances);
|
---|
89 | sb.append("/");
|
---|
90 | sb.append(numOfLinkedClassInstances);
|
---|
91 | sb.append("]");
|
---|
92 | return sb.toString();
|
---|
93 | }
|
---|
94 |
|
---|
95 | public String getPropertyURI() {
|
---|
96 | return propertyURI;
|
---|
97 | }
|
---|
98 | public void setPropertyURI(String propertyURI) {
|
---|
99 | this.propertyURI = propertyURI;
|
---|
100 | }
|
---|
101 | public String getLinkedClassURI() {
|
---|
102 | return linkedClassURI;
|
---|
103 | }
|
---|
104 | public void setLinkedClassURI(String linkedClassURI) {
|
---|
105 | this.linkedClassURI = linkedClassURI;
|
---|
106 | }
|
---|
107 | public Direction getDirection() {
|
---|
108 | return direction;
|
---|
109 | }
|
---|
110 | public void setDirection(Direction direction) {
|
---|
111 | this.direction = direction;
|
---|
112 | }
|
---|
113 |
|
---|
114 | public final int getNumOfLinkedInstances() {
|
---|
115 | return numOfLinkedInstances;
|
---|
116 | }
|
---|
117 |
|
---|
118 | public final void setNumOfLinkedInstances(int numOfLinkedInstances) {
|
---|
119 | this.numOfLinkedInstances = numOfLinkedInstances;
|
---|
120 | }
|
---|
121 |
|
---|
122 |
|
---|
123 | public final int getNumOfOriginInstances() {
|
---|
124 | return numOfOriginInstances;
|
---|
125 | }
|
---|
126 |
|
---|
127 |
|
---|
128 | public final void setNumOfOriginInstances(int numOfOriginInstances) {
|
---|
129 | this.numOfOriginInstances = numOfOriginInstances;
|
---|
130 | }
|
---|
131 |
|
---|
132 |
|
---|
133 | public final int getNumOfOriginClassInstances() {
|
---|
134 | return numOfOriginClassInstances;
|
---|
135 | }
|
---|
136 |
|
---|
137 |
|
---|
138 | public final void setNumOfOriginClassInstances(int numOfOriginClassInstances) {
|
---|
139 | this.numOfOriginClassInstances = numOfOriginClassInstances;
|
---|
140 | }
|
---|
141 |
|
---|
142 |
|
---|
143 | public final int getNumOfLinkedClassInstances() {
|
---|
144 | return numOfLinkedClassInstances;
|
---|
145 | }
|
---|
146 |
|
---|
147 |
|
---|
148 | public final void setNumOfLinkedClassInstances(int numOfLinkedClassInstances) {
|
---|
149 | this.numOfLinkedClassInstances = numOfLinkedClassInstances;
|
---|
150 | }
|
---|
151 |
|
---|
152 |
|
---|
153 |
|
---|
154 | // private String[] propertyDomainClassURIs = null;
|
---|
155 | // private String[] propertyRangeClassURIs = null;
|
---|
156 |
|
---|
157 |
|
---|
158 |
|
---|
159 | }
|
---|