| 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 |
|
|---|
| 16 | /**
|
|---|
| 17 | * 繝励Ο繝代ユ繧」URI縲√Μ繝ウ繧ッ蜈茨シ亥��峨け繝ゥ繧ケ縲√Μ繝ウ繧ッ縺ョ蜷代″繧剃ク弱∴繧区ァ区�蟄� |
|---|
| 18 | *
|
|---|
| 19 | * @param propertyURI縲繝励Ο繝代ユ繧」縺ョURI
|
|---|
| 20 | * @param linkedClassURI縲繝ェ繝ウ繧ッ縺ョ荳サ隱槭√√≠繧九>縺ッ繝ェ繝ウ繧ッ縺ョ逶ョ逧�ェ槭→縺ェ縺」縺ヲ縺�k繧ッ繝ゥ繧ケ縺ョURI
|
|---|
| 21 | * @param direction 繝励Ο繝代ユ繧」縺ョ蜷代″縲〕inkedClassURI縺ョ繧ッ繝ゥ繧ケ縺後Μ繝ウ繧ッ蜈医↓縺ェ縺」縺ヲ縺�k縺ィ縺阪�Direction.forward,繝ェ繝ウ繧ッ蜈�↓縺ェ縺」縺ヲ縺�k縺ィ縺阪�Direction.reverse, 縺昴l繧我ク。譁ケ縺ョ譎ゅ�Direction.both繧呈欠螳壹☆繧�
|
|---|
| 22 | * @param numOfLinks 蠖楢ゥイ繝励Ο繝代ユ繧」縺ァ荳。遶ッ繧ッ繝ゥ繧ケ縺ョ繧、繝ウ繧ケ繧ソ繝ウ繧ケ蜷悟」ォ繧偵▽縺ェ縺�〒縺�k繝ェ繝ウ繧ッ謨ー�医ヨ繝ェ繝励Ν謨ー�� |
|---|
| 23 | * @throws Exception
|
|---|
| 24 | * @since 28.01.2014
|
|---|
| 25 | */
|
|---|
| 26 | public ClassLink(String propertyURI, String linkedClassURI, Direction direction, int numLinks){
|
|---|
| 27 | this.propertyURI = propertyURI;
|
|---|
| 28 | this.linkedClassURI = linkedClassURI;
|
|---|
| 29 | this.direction = direction;
|
|---|
| 30 | this.numOfLinks = numLinks;
|
|---|
| 31 | }
|
|---|
| 32 |
|
|---|
| 33 |
|
|---|
| 34 | public int getNumOfLinks() {
|
|---|
| 35 | return numOfLinks;
|
|---|
| 36 | }
|
|---|
| 37 |
|
|---|
| 38 |
|
|---|
| 39 |
|
|---|
| 40 |
|
|---|
| 41 | public void setNumOfLinks(int numOfLinks) {
|
|---|
| 42 | this.numOfLinks = numOfLinks;
|
|---|
| 43 | }
|
|---|
| 44 |
|
|---|
| 45 |
|
|---|
| 46 |
|
|---|
| 47 |
|
|---|
| 48 | /**
|
|---|
| 49 | * 譁�ュ怜�陦ィ險倥r蜿門セ励☆繧� |
|---|
| 50 | *
|
|---|
| 51 | * @since 28.01.2014
|
|---|
| 52 | */
|
|---|
| 53 | public String toString(){
|
|---|
| 54 | StringBuffer sb = new StringBuffer();
|
|---|
| 55 | sb.append(propertyURI);
|
|---|
| 56 | if( direction == Direction.forward ){
|
|---|
| 57 | sb.append(" --> ");
|
|---|
| 58 | }else{
|
|---|
| 59 | if( direction == Direction.reverse ){
|
|---|
| 60 | sb.append(" <-- ");
|
|---|
| 61 | }else{
|
|---|
| 62 | sb.append(" <-> ");
|
|---|
| 63 | }
|
|---|
| 64 | }
|
|---|
| 65 | sb.append(linkedClassURI);
|
|---|
| 66 | return sb.toString();
|
|---|
| 67 | }
|
|---|
| 68 |
|
|---|
| 69 | public String getPropertyURI() {
|
|---|
| 70 | return propertyURI;
|
|---|
| 71 | }
|
|---|
| 72 | public void setPropertyURI(String propertyURI) {
|
|---|
| 73 | this.propertyURI = propertyURI;
|
|---|
| 74 | }
|
|---|
| 75 | public String getLinkedClassURI() {
|
|---|
| 76 | return linkedClassURI;
|
|---|
| 77 | }
|
|---|
| 78 | public void setLinkedClassURI(String linkedClassURI) {
|
|---|
| 79 | this.linkedClassURI = linkedClassURI;
|
|---|
| 80 | }
|
|---|
| 81 | public Direction getDirection() {
|
|---|
| 82 | return direction;
|
|---|
| 83 | }
|
|---|
| 84 | public void setDirection(Direction direction) {
|
|---|
| 85 | this.direction = direction;
|
|---|
| 86 | }
|
|---|
| 87 |
|
|---|
| 88 | // private String[] propertyDomainClassURIs = null;
|
|---|
| 89 | // private String[] propertyRangeClassURIs = null;
|
|---|
| 90 |
|
|---|
| 91 |
|
|---|
| 92 | }
|
|---|