bcb4e51a409d94ae670de96afb8483a4f7855294Stephan Bosch// The MIT License
52ffa11d672a9bd150ae3e758a19f1cc4f01471bTimo Sirainen//
52ffa11d672a9bd150ae3e758a19f1cc4f01471bTimo Sirainen// Copyright (c) 2004 Evren Sirin
52ffa11d672a9bd150ae3e758a19f1cc4f01471bTimo Sirainen//
bdd36cfdba3ff66d25570a9ff568d69e1eb543cfTimo Sirainen// Permission is hereby granted, free of charge, to any person obtaining a copy
52ffa11d672a9bd150ae3e758a19f1cc4f01471bTimo Sirainen// of this software and associated documentation files (the "Software"), to
3ef05dbd1be6cb311e4d196bab87e73fdc660e19Timo Sirainen// deal in the Software without restriction, including without limitation the
52ffa11d672a9bd150ae3e758a19f1cc4f01471bTimo Sirainen// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
7ed711d973b319320da100d3e905ef7b99ed69d6Timo Sirainen// sell copies of the Software, and to permit persons to whom the Software is
7a60e1dc9e93ef3f7c7fe1af6385a0bfa1e31bc3Timo Sirainen// furnished to do so, subject to the following conditions:
52ffa11d672a9bd150ae3e758a19f1cc4f01471bTimo Sirainen//
7ed711d973b319320da100d3e905ef7b99ed69d6Timo Sirainen// The above copyright notice and this permission notice shall be included in
381daab1e3b56a0bc94d2191cf62beba0df51af9Pascal Volk// all copies or substantial portions of the Software.
52ffa11d672a9bd150ae3e758a19f1cc4f01471bTimo Sirainen//
52ffa11d672a9bd150ae3e758a19f1cc4f01471bTimo Sirainen// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
52ffa11d672a9bd150ae3e758a19f1cc4f01471bTimo Sirainen// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
52ffa11d672a9bd150ae3e758a19f1cc4f01471bTimo Sirainen// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
52ffa11d672a9bd150ae3e758a19f1cc4f01471bTimo Sirainen// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
52ffa11d672a9bd150ae3e758a19f1cc4f01471bTimo Sirainen// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
c68ba18d99f3e4fead1e259b9dc50cb139e0b1c7Timo Sirainen// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
4ee00532a265bdfb38539d811fcd12d51210ac35Timo Sirainen// IN THE SOFTWARE.
4ee00532a265bdfb38539d811fcd12d51210ac35Timo Sirainen
52ffa11d672a9bd150ae3e758a19f1cc4f01471bTimo Sirainen/*
52ffa11d672a9bd150ae3e758a19f1cc4f01471bTimo Sirainen * Created on Dec 28, 2004
52ffa11d672a9bd150ae3e758a19f1cc4f01471bTimo Sirainen */
f6b8ff28fe15eff03e0127f11cd122d3eb872e2eTimo Sirainenpackage impl.owl;
f6b8ff28fe15eff03e0127f11cd122d3eb872e2eTimo Sirainen
f6b8ff28fe15eff03e0127f11cd122d3eb872e2eTimo Sirainenimport java.net.MalformedURLException;
f6b8ff28fe15eff03e0127f11cd122d3eb872e2eTimo Sirainenimport java.net.URI;
f6b8ff28fe15eff03e0127f11cd122d3eb872e2eTimo Sirainenimport java.net.URL;
f6b8ff28fe15eff03e0127f11cd122d3eb872e2eTimo Sirainenimport java.util.Map;
f6b8ff28fe15eff03e0127f11cd122d3eb872e2eTimo Sirainenimport java.util.Set;
f6b8ff28fe15eff03e0127f11cd122d3eb872e2eTimo Sirainen
f6b8ff28fe15eff03e0127f11cd122d3eb872e2eTimo Sirainenimport org.mindswap.owl.OWLClass;
f6b8ff28fe15eff03e0127f11cd122d3eb872e2eTimo Sirainenimport org.mindswap.owl.OWLDataProperty;
678d0463849ba777106eb7875f27db07a5d8e3dfTimo Sirainenimport org.mindswap.owl.OWLDataValue;
c68ba18d99f3e4fead1e259b9dc50cb139e0b1c7Timo Sirainenimport org.mindswap.owl.OWLDataValueList;
f6b8ff28fe15eff03e0127f11cd122d3eb872e2eTimo Sirainenimport org.mindswap.owl.OWLIndividual;
f6b8ff28fe15eff03e0127f11cd122d3eb872e2eTimo Sirainenimport org.mindswap.owl.OWLIndividualList;
f6b8ff28fe15eff03e0127f11cd122d3eb872e2eTimo Sirainenimport org.mindswap.owl.OWLKnowledgeBase;
f6b8ff28fe15eff03e0127f11cd122d3eb872e2eTimo Sirainenimport org.mindswap.owl.OWLObject;
f6b8ff28fe15eff03e0127f11cd122d3eb872e2eTimo Sirainenimport org.mindswap.owl.OWLObjectProperty;
f6b8ff28fe15eff03e0127f11cd122d3eb872e2eTimo Sirainenimport org.mindswap.owl.OWLOntology;
f6b8ff28fe15eff03e0127f11cd122d3eb872e2eTimo Sirainenimport org.mindswap.owl.OWLProperty;
f6b8ff28fe15eff03e0127f11cd122d3eb872e2eTimo Sirainenimport org.mindswap.owl.OWLValue;
f6b8ff28fe15eff03e0127f11cd122d3eb872e2eTimo Sirainen
f6b8ff28fe15eff03e0127f11cd122d3eb872e2eTimo Sirainen/**
c68ba18d99f3e4fead1e259b9dc50cb139e0b1c7Timo Sirainen * @author Evren Sirin
c68ba18d99f3e4fead1e259b9dc50cb139e0b1c7Timo Sirainen *
678d0463849ba777106eb7875f27db07a5d8e3dfTimo Sirainen */
678d0463849ba777106eb7875f27db07a5d8e3dfTimo Sirainenpublic class WrappedIndividual extends OWLObjectImpl implements OWLIndividual {
c68ba18d99f3e4fead1e259b9dc50cb139e0b1c7Timo Sirainen protected OWLIndividual individual;
c68ba18d99f3e4fead1e259b9dc50cb139e0b1c7Timo Sirainen
c68ba18d99f3e4fead1e259b9dc50cb139e0b1c7Timo Sirainen public WrappedIndividual(OWLIndividual ind) {
c68ba18d99f3e4fead1e259b9dc50cb139e0b1c7Timo Sirainen individual = ind;
c68ba18d99f3e4fead1e259b9dc50cb139e0b1c7Timo Sirainen
f6b8ff28fe15eff03e0127f11cd122d3eb872e2eTimo Sirainen setNextView(ind.getNextView());
f6b8ff28fe15eff03e0127f11cd122d3eb872e2eTimo Sirainen ind.setNextView(this);
f6b8ff28fe15eff03e0127f11cd122d3eb872e2eTimo Sirainen }
f6b8ff28fe15eff03e0127f11cd122d3eb872e2eTimo Sirainen
f6b8ff28fe15eff03e0127f11cd122d3eb872e2eTimo Sirainen public Object getImplementation() {
f6b8ff28fe15eff03e0127f11cd122d3eb872e2eTimo Sirainen return individual.getImplementation();
f6b8ff28fe15eff03e0127f11cd122d3eb872e2eTimo Sirainen }
f6b8ff28fe15eff03e0127f11cd122d3eb872e2eTimo Sirainen
f6b8ff28fe15eff03e0127f11cd122d3eb872e2eTimo Sirainen public boolean hasProperty(OWLProperty prop) {
c68ba18d99f3e4fead1e259b9dc50cb139e0b1c7Timo Sirainen return individual.hasProperty(prop);
c68ba18d99f3e4fead1e259b9dc50cb139e0b1c7Timo Sirainen }
c68ba18d99f3e4fead1e259b9dc50cb139e0b1c7Timo Sirainen
52ffa11d672a9bd150ae3e758a19f1cc4f01471bTimo Sirainen public boolean hasProperty(OWLProperty prop, OWLValue value) {
52ffa11d672a9bd150ae3e758a19f1cc4f01471bTimo Sirainen return individual.hasProperty(prop, value);
52ffa11d672a9bd150ae3e758a19f1cc4f01471bTimo Sirainen }
52ffa11d672a9bd150ae3e758a19f1cc4f01471bTimo Sirainen
52ffa11d672a9bd150ae3e758a19f1cc4f01471bTimo Sirainen public Map getProperties() {
52ffa11d672a9bd150ae3e758a19f1cc4f01471bTimo Sirainen return individual.getProperties();
52ffa11d672a9bd150ae3e758a19f1cc4f01471bTimo Sirainen }
52ffa11d672a9bd150ae3e758a19f1cc4f01471bTimo Sirainen
52ffa11d672a9bd150ae3e758a19f1cc4f01471bTimo Sirainen public OWLIndividual getProperty(OWLObjectProperty prop) {
52ffa11d672a9bd150ae3e758a19f1cc4f01471bTimo Sirainen return individual.getProperty(prop);
52ffa11d672a9bd150ae3e758a19f1cc4f01471bTimo Sirainen }
52ffa11d672a9bd150ae3e758a19f1cc4f01471bTimo Sirainen
c03f712279c54fc29368a914375a4c66855d253bTimo Sirainen protected OWLIndividualList getPropertiesAs(OWLObjectProperty prop, Class result) {
52ffa11d672a9bd150ae3e758a19f1cc4f01471bTimo Sirainen return new CastingList(individual.getProperties(prop), result);
7a60e1dc9e93ef3f7c7fe1af6385a0bfa1e31bc3Timo Sirainen }
52ffa11d672a9bd150ae3e758a19f1cc4f01471bTimo Sirainen
c68ba18d99f3e4fead1e259b9dc50cb139e0b1c7Timo Sirainen protected OWLObject getPropertyAs(OWLObjectProperty prop, Class result) {
c68ba18d99f3e4fead1e259b9dc50cb139e0b1c7Timo Sirainen OWLObject value = individual.getProperty(prop);
c68ba18d99f3e4fead1e259b9dc50cb139e0b1c7Timo Sirainen return (value == null) ? null : value.castTo(result);
c68ba18d99f3e4fead1e259b9dc50cb139e0b1c7Timo Sirainen }
efe78d3ba24fc866af1c79b9223dc0809ba26cadStephan Bosch
52ffa11d672a9bd150ae3e758a19f1cc4f01471bTimo Sirainen protected OWLObject getPropertyAs(OWLDataProperty prop, Class result) {
2fa41e3cd6393ce4b5f7e6f6048d7706aa93ac0dTimo Sirainen OWLObject value = individual.getProperty(prop);
2fa41e3cd6393ce4b5f7e6f6048d7706aa93ac0dTimo Sirainen return (value == null) ? null : value.castTo(result);
52ffa11d672a9bd150ae3e758a19f1cc4f01471bTimo Sirainen }
ffcf7f97c7d82b895bbb745031042ee8c378c6b6Timo Sirainen
ffcf7f97c7d82b895bbb745031042ee8c378c6b6Timo Sirainen protected String getPropertyAsString(OWLDataProperty prop) {
e48f289d2e5b2546a2c5dcc90f7ab624cc58cca2Stephan Bosch OWLDataValue value = individual.getProperty(prop);
e48f289d2e5b2546a2c5dcc90f7ab624cc58cca2Stephan Bosch return (value == null) ? null : value.toString();
c68ba18d99f3e4fead1e259b9dc50cb139e0b1c7Timo Sirainen }
c68ba18d99f3e4fead1e259b9dc50cb139e0b1c7Timo Sirainen
2fa41e3cd6393ce4b5f7e6f6048d7706aa93ac0dTimo Sirainen protected String getPropertyAsString(OWLDataProperty prop, String lang) {
2fa41e3cd6393ce4b5f7e6f6048d7706aa93ac0dTimo Sirainen OWLDataValue value = individual.getProperty(prop, lang);
2fa41e3cd6393ce4b5f7e6f6048d7706aa93ac0dTimo Sirainen return (value == null) ? null : value.toString();
2fa41e3cd6393ce4b5f7e6f6048d7706aa93ac0dTimo Sirainen }
2fa41e3cd6393ce4b5f7e6f6048d7706aa93ac0dTimo Sirainen
2fa41e3cd6393ce4b5f7e6f6048d7706aa93ac0dTimo Sirainen protected URI getPropertyAsURI(OWLDataProperty prop) {
2fa41e3cd6393ce4b5f7e6f6048d7706aa93ac0dTimo Sirainen OWLDataValue value = individual.getProperty(prop);
c93aca832ee532010ead91b85fa9f614132e1be2Stephan Bosch return (value == null) ? null : URI.create(value.getLexicalValue().trim());
c93aca832ee532010ead91b85fa9f614132e1be2Stephan Bosch }
c03f712279c54fc29368a914375a4c66855d253bTimo Sirainen
c68ba18d99f3e4fead1e259b9dc50cb139e0b1c7Timo Sirainen protected URL getPropertyAsURL(OWLDataProperty prop) {
c68ba18d99f3e4fead1e259b9dc50cb139e0b1c7Timo Sirainen OWLDataValue value = individual.getProperty(prop);
21ca7aedc1bf136d9e3f9a63aacfa77c7e9c6af0Timo Sirainen
21ca7aedc1bf136d9e3f9a63aacfa77c7e9c6af0Timo Sirainen if(value != null) {
21ca7aedc1bf136d9e3f9a63aacfa77c7e9c6af0Timo Sirainen try {
21ca7aedc1bf136d9e3f9a63aacfa77c7e9c6af0Timo Sirainen return new URL(value.toString().trim());
21ca7aedc1bf136d9e3f9a63aacfa77c7e9c6af0Timo Sirainen } catch(MalformedURLException e) {
21ca7aedc1bf136d9e3f9a63aacfa77c7e9c6af0Timo Sirainen }
21ca7aedc1bf136d9e3f9a63aacfa77c7e9c6af0Timo Sirainen }
21ca7aedc1bf136d9e3f9a63aacfa77c7e9c6af0Timo Sirainen
21ca7aedc1bf136d9e3f9a63aacfa77c7e9c6af0Timo Sirainen return null;
21ca7aedc1bf136d9e3f9a63aacfa77c7e9c6af0Timo Sirainen }
21ca7aedc1bf136d9e3f9a63aacfa77c7e9c6af0Timo Sirainen
c68ba18d99f3e4fead1e259b9dc50cb139e0b1c7Timo Sirainen /* (non-Javadoc)
c68ba18d99f3e4fead1e259b9dc50cb139e0b1c7Timo Sirainen * @see org.mindswap.owl.OWLIndividual#getProperties(org.mindswap.owl.OWLObjectProperty)
c68ba18d99f3e4fead1e259b9dc50cb139e0b1c7Timo Sirainen */
c68ba18d99f3e4fead1e259b9dc50cb139e0b1c7Timo Sirainen public OWLIndividualList getProperties(OWLObjectProperty prop) {
c68ba18d99f3e4fead1e259b9dc50cb139e0b1c7Timo Sirainen return individual.getProperties(prop);
c68ba18d99f3e4fead1e259b9dc50cb139e0b1c7Timo Sirainen }
c68ba18d99f3e4fead1e259b9dc50cb139e0b1c7Timo Sirainen
52ffa11d672a9bd150ae3e758a19f1cc4f01471bTimo Sirainen /* (non-Javadoc)
c68ba18d99f3e4fead1e259b9dc50cb139e0b1c7Timo Sirainen * @see org.mindswap.owl.OWLIndividual#getProperty(org.mindswap.owl.OWLDataProperty)
52ffa11d672a9bd150ae3e758a19f1cc4f01471bTimo Sirainen */
52ffa11d672a9bd150ae3e758a19f1cc4f01471bTimo Sirainen public OWLDataValue getProperty(OWLDataProperty prop) {
c68ba18d99f3e4fead1e259b9dc50cb139e0b1c7Timo Sirainen return individual.getProperty(prop);
c68ba18d99f3e4fead1e259b9dc50cb139e0b1c7Timo Sirainen }
52ffa11d672a9bd150ae3e758a19f1cc4f01471bTimo Sirainen
52ffa11d672a9bd150ae3e758a19f1cc4f01471bTimo Sirainen /* (non-Javadoc)
c68ba18d99f3e4fead1e259b9dc50cb139e0b1c7Timo Sirainen * @see org.mindswap.owl.OWLIndividual#getProperty(org.mindswap.owl.OWLDataProperty, java.lang.String)
52ffa11d672a9bd150ae3e758a19f1cc4f01471bTimo Sirainen */
c68ba18d99f3e4fead1e259b9dc50cb139e0b1c7Timo Sirainen public OWLDataValue getProperty(OWLDataProperty prop, String lang) {
52ffa11d672a9bd150ae3e758a19f1cc4f01471bTimo Sirainen return individual.getProperty(prop, lang);
c68ba18d99f3e4fead1e259b9dc50cb139e0b1c7Timo Sirainen }
c68ba18d99f3e4fead1e259b9dc50cb139e0b1c7Timo Sirainen
52ffa11d672a9bd150ae3e758a19f1cc4f01471bTimo Sirainen public OWLDataValueList getProperties(OWLDataProperty prop) {
21ca7aedc1bf136d9e3f9a63aacfa77c7e9c6af0Timo Sirainen return individual.getProperties(prop);
c68ba18d99f3e4fead1e259b9dc50cb139e0b1c7Timo Sirainen }
52ffa11d672a9bd150ae3e758a19f1cc4f01471bTimo Sirainen
52ffa11d672a9bd150ae3e758a19f1cc4f01471bTimo Sirainen public OWLIndividualList getIncomingProperties() {
a7fc192e2177fd869bca779e9f6014f7149cda2dAki Tuomi return individual.getIncomingProperties();
381daab1e3b56a0bc94d2191cf62beba0df51af9Pascal Volk }
381daab1e3b56a0bc94d2191cf62beba0df51af9Pascal Volk
a7fc192e2177fd869bca779e9f6014f7149cda2dAki Tuomi public OWLIndividual getIncomingProperty(OWLObjectProperty prop) {
a7fc192e2177fd869bca779e9f6014f7149cda2dAki Tuomi return individual.getIncomingProperty(prop);
a7fc192e2177fd869bca779e9f6014f7149cda2dAki Tuomi }
a7fc192e2177fd869bca779e9f6014f7149cda2dAki Tuomi
a7fc192e2177fd869bca779e9f6014f7149cda2dAki Tuomi public OWLIndividualList getIncomingProperties(OWLObjectProperty prop) {
a7fc192e2177fd869bca779e9f6014f7149cda2dAki Tuomi return individual.getIncomingProperties(prop);
a7fc192e2177fd869bca779e9f6014f7149cda2dAki Tuomi }
a7fc192e2177fd869bca779e9f6014f7149cda2dAki Tuomi
a7fc192e2177fd869bca779e9f6014f7149cda2dAki Tuomi public void setProperty(OWLDataProperty prop, String value) {
381daab1e3b56a0bc94d2191cf62beba0df51af9Pascal Volk individual.setProperty(prop, value);
381daab1e3b56a0bc94d2191cf62beba0df51af9Pascal Volk }
381daab1e3b56a0bc94d2191cf62beba0df51af9Pascal Volk
a7fc192e2177fd869bca779e9f6014f7149cda2dAki Tuomi public void setProperty(OWLDataProperty prop, Object value) {
a7fc192e2177fd869bca779e9f6014f7149cda2dAki Tuomi individual.setProperty(prop, value);
a7fc192e2177fd869bca779e9f6014f7149cda2dAki Tuomi }
a7fc192e2177fd869bca779e9f6014f7149cda2dAki Tuomi
a7fc192e2177fd869bca779e9f6014f7149cda2dAki Tuomi public void setProperty(OWLDataProperty prop, OWLDataValue value) {
a7fc192e2177fd869bca779e9f6014f7149cda2dAki Tuomi individual.setProperty(prop, value);
381daab1e3b56a0bc94d2191cf62beba0df51af9Pascal Volk }
381daab1e3b56a0bc94d2191cf62beba0df51af9Pascal Volk
a7fc192e2177fd869bca779e9f6014f7149cda2dAki Tuomi public void addProperty(OWLDataProperty prop, OWLDataValue value) {
381daab1e3b56a0bc94d2191cf62beba0df51af9Pascal Volk individual.addProperty(prop, value);
381daab1e3b56a0bc94d2191cf62beba0df51af9Pascal Volk }
381daab1e3b56a0bc94d2191cf62beba0df51af9Pascal Volk
52ffa11d672a9bd150ae3e758a19f1cc4f01471bTimo Sirainen public void addProperty(OWLDataProperty prop, Object value) {
52ffa11d672a9bd150ae3e758a19f1cc4f01471bTimo Sirainen individual.addProperty(prop, value);
52ffa11d672a9bd150ae3e758a19f1cc4f01471bTimo Sirainen }
52ffa11d672a9bd150ae3e758a19f1cc4f01471bTimo Sirainen
52ffa11d672a9bd150ae3e758a19f1cc4f01471bTimo Sirainen public void addProperty(OWLDataProperty prop, String value) {
52ffa11d672a9bd150ae3e758a19f1cc4f01471bTimo Sirainen individual.addProperty(prop, value);
52ffa11d672a9bd150ae3e758a19f1cc4f01471bTimo Sirainen }
91770f85d9b2ac3e91b7aa74f57149412ae33c4cTimo Sirainen
52ffa11d672a9bd150ae3e758a19f1cc4f01471bTimo Sirainen public void removeProperties(OWLProperty prop) {
52ffa11d672a9bd150ae3e758a19f1cc4f01471bTimo Sirainen individual.removeProperties(prop);
52ffa11d672a9bd150ae3e758a19f1cc4f01471bTimo Sirainen }
bace943c67e6cd14ce6c994f533d82a3caad5bf1Timo Sirainen
bace943c67e6cd14ce6c994f533d82a3caad5bf1Timo Sirainen public void removeProperty(OWLProperty theProp, OWLValue theValue) {
52ffa11d672a9bd150ae3e758a19f1cc4f01471bTimo Sirainen individual.removeProperty(theProp,theValue);
52ffa11d672a9bd150ae3e758a19f1cc4f01471bTimo Sirainen }
52ffa11d672a9bd150ae3e758a19f1cc4f01471bTimo Sirainen
52ffa11d672a9bd150ae3e758a19f1cc4f01471bTimo Sirainen public void addProperty(OWLObjectProperty prop, OWLIndividual value) {
c68ba18d99f3e4fead1e259b9dc50cb139e0b1c7Timo Sirainen individual.addProperty(prop, value);
c68ba18d99f3e4fead1e259b9dc50cb139e0b1c7Timo Sirainen }
c03f712279c54fc29368a914375a4c66855d253bTimo Sirainen
c03f712279c54fc29368a914375a4c66855d253bTimo Sirainen public void setProperty(OWLObjectProperty prop, OWLIndividual value) {
c03f712279c54fc29368a914375a4c66855d253bTimo Sirainen individual.setProperty(prop, value);
c03f712279c54fc29368a914375a4c66855d253bTimo Sirainen }
52ffa11d672a9bd150ae3e758a19f1cc4f01471bTimo Sirainen
52ffa11d672a9bd150ae3e758a19f1cc4f01471bTimo Sirainen public void addType(OWLClass c) {
0f3d4fbcf88e2ffd674893aed8cc1288fe17d290Timo Sirainen individual.addType(c);
0f3d4fbcf88e2ffd674893aed8cc1288fe17d290Timo Sirainen }
0f3d4fbcf88e2ffd674893aed8cc1288fe17d290Timo Sirainen
0f3d4fbcf88e2ffd674893aed8cc1288fe17d290Timo Sirainen public void removeTypes() {
52ffa11d672a9bd150ae3e758a19f1cc4f01471bTimo Sirainen individual.removeTypes();
52ffa11d672a9bd150ae3e758a19f1cc4f01471bTimo Sirainen }
52ffa11d672a9bd150ae3e758a19f1cc4f01471bTimo Sirainen
52ffa11d672a9bd150ae3e758a19f1cc4f01471bTimo Sirainen public OWLClass getType() {
bbd2991d36c5d1d5e34eb274d1e52f0f799e2ee4Timo Sirainen return individual.getType();
bbd2991d36c5d1d5e34eb274d1e52f0f799e2ee4Timo Sirainen }
52ffa11d672a9bd150ae3e758a19f1cc4f01471bTimo Sirainen
52ffa11d672a9bd150ae3e758a19f1cc4f01471bTimo Sirainen public Set getTypes() {
3ef05dbd1be6cb311e4d196bab87e73fdc660e19Timo Sirainen return individual.getTypes();
52ffa11d672a9bd150ae3e758a19f1cc4f01471bTimo Sirainen }
52ffa11d672a9bd150ae3e758a19f1cc4f01471bTimo Sirainen
52ffa11d672a9bd150ae3e758a19f1cc4f01471bTimo Sirainen public boolean isType(OWLClass c) {
52ffa11d672a9bd150ae3e758a19f1cc4f01471bTimo Sirainen return individual.isType(c);
52ffa11d672a9bd150ae3e758a19f1cc4f01471bTimo Sirainen }
52ffa11d672a9bd150ae3e758a19f1cc4f01471bTimo Sirainen
52ffa11d672a9bd150ae3e758a19f1cc4f01471bTimo Sirainen public boolean isAnon() {
52ffa11d672a9bd150ae3e758a19f1cc4f01471bTimo Sirainen return individual.isAnon();
52ffa11d672a9bd150ae3e758a19f1cc4f01471bTimo Sirainen }
52ffa11d672a9bd150ae3e758a19f1cc4f01471bTimo Sirainen
52ffa11d672a9bd150ae3e758a19f1cc4f01471bTimo Sirainen /* (non-Javadoc)
52ffa11d672a9bd150ae3e758a19f1cc4f01471bTimo Sirainen * @see org.mindswap.owl.OWLObject#getURI()
52ffa11d672a9bd150ae3e758a19f1cc4f01471bTimo Sirainen */
52ffa11d672a9bd150ae3e758a19f1cc4f01471bTimo Sirainen public URI getURI() {
52ffa11d672a9bd150ae3e758a19f1cc4f01471bTimo Sirainen return individual.getURI();
52ffa11d672a9bd150ae3e758a19f1cc4f01471bTimo Sirainen }
52ffa11d672a9bd150ae3e758a19f1cc4f01471bTimo Sirainen
52ffa11d672a9bd150ae3e758a19f1cc4f01471bTimo Sirainen
52ffa11d672a9bd150ae3e758a19f1cc4f01471bTimo Sirainen
7ed711d973b319320da100d3e905ef7b99ed69d6Timo Sirainen /* (non-Javadoc)
7ed711d973b319320da100d3e905ef7b99ed69d6Timo Sirainen * @see org.mindswap.owl.OWLObject#getAnonID()
7ed711d973b319320da100d3e905ef7b99ed69d6Timo Sirainen */
7ed711d973b319320da100d3e905ef7b99ed69d6Timo Sirainen public Object getAnonID() {
7ed711d973b319320da100d3e905ef7b99ed69d6Timo Sirainen return individual.getAnonID();
7ed711d973b319320da100d3e905ef7b99ed69d6Timo Sirainen }
7ed711d973b319320da100d3e905ef7b99ed69d6Timo Sirainen
7ed711d973b319320da100d3e905ef7b99ed69d6Timo Sirainen /* (non-Javadoc)
7ed711d973b319320da100d3e905ef7b99ed69d6Timo Sirainen * @see org.mindswap.owl.OWLObject#getLabel()
7ed711d973b319320da100d3e905ef7b99ed69d6Timo Sirainen */
7ed711d973b319320da100d3e905ef7b99ed69d6Timo Sirainen public String getLabel() {
7ed711d973b319320da100d3e905ef7b99ed69d6Timo Sirainen return individual.getLabel();
7ed711d973b319320da100d3e905ef7b99ed69d6Timo Sirainen }
7ed711d973b319320da100d3e905ef7b99ed69d6Timo Sirainen
7ed711d973b319320da100d3e905ef7b99ed69d6Timo Sirainen /* (non-Javadoc)
7ed711d973b319320da100d3e905ef7b99ed69d6Timo Sirainen * @see org.mindswap.owl.OWLObject#getLabel(java.lang.String)
7ed711d973b319320da100d3e905ef7b99ed69d6Timo Sirainen */
7ed711d973b319320da100d3e905ef7b99ed69d6Timo Sirainen public String getLabel(String lang) {
7ed711d973b319320da100d3e905ef7b99ed69d6Timo Sirainen return individual.getLabel(lang);
7ed711d973b319320da100d3e905ef7b99ed69d6Timo Sirainen }
7ed711d973b319320da100d3e905ef7b99ed69d6Timo Sirainen
7ed711d973b319320da100d3e905ef7b99ed69d6Timo Sirainen /* (non-Javadoc)
7ed711d973b319320da100d3e905ef7b99ed69d6Timo Sirainen * @see org.mindswap.owl.OWLObject#getLabels()
7ed711d973b319320da100d3e905ef7b99ed69d6Timo Sirainen */
7ed711d973b319320da100d3e905ef7b99ed69d6Timo Sirainen public OWLDataValueList getLabels() {
7ed711d973b319320da100d3e905ef7b99ed69d6Timo Sirainen return individual.getLabels();
7ed711d973b319320da100d3e905ef7b99ed69d6Timo Sirainen }
7ed711d973b319320da100d3e905ef7b99ed69d6Timo Sirainen
52ffa11d672a9bd150ae3e758a19f1cc4f01471bTimo Sirainen /* (non-Javadoc)
52ffa11d672a9bd150ae3e758a19f1cc4f01471bTimo Sirainen * @see org.mindswap.owl.OWLObject#setLabel(java.lang.String)
52ffa11d672a9bd150ae3e758a19f1cc4f01471bTimo Sirainen */
a75d470c9223a75801418fcdda258885c36317e0Timo Sirainen public void setLabel(String label) {
52ffa11d672a9bd150ae3e758a19f1cc4f01471bTimo Sirainen individual.setLabel(label);
7ed711d973b319320da100d3e905ef7b99ed69d6Timo Sirainen }
7ed711d973b319320da100d3e905ef7b99ed69d6Timo Sirainen
7ed711d973b319320da100d3e905ef7b99ed69d6Timo Sirainen /* (non-Javadoc)
7ed711d973b319320da100d3e905ef7b99ed69d6Timo Sirainen * @see org.mindswap.owl.OWLObject#setLabel(java.lang.String, java.lang.String)
7ed711d973b319320da100d3e905ef7b99ed69d6Timo Sirainen */
7ed711d973b319320da100d3e905ef7b99ed69d6Timo Sirainen public void setLabel(String label, String lang) {
52ffa11d672a9bd150ae3e758a19f1cc4f01471bTimo Sirainen individual.setLabel(label, lang);
52ffa11d672a9bd150ae3e758a19f1cc4f01471bTimo Sirainen }
a75d470c9223a75801418fcdda258885c36317e0Timo Sirainen
7ed711d973b319320da100d3e905ef7b99ed69d6Timo Sirainen /* (non-Javadoc)
7ed711d973b319320da100d3e905ef7b99ed69d6Timo Sirainen * @see org.mindswap.owl.OWLObject#getAnnotation(java.net.URI)
52ffa11d672a9bd150ae3e758a19f1cc4f01471bTimo Sirainen */
7ed711d973b319320da100d3e905ef7b99ed69d6Timo Sirainen public OWLDataValue getAnnotation(URI prop) {
52ffa11d672a9bd150ae3e758a19f1cc4f01471bTimo Sirainen return individual.getAnnotation(prop);
52ffa11d672a9bd150ae3e758a19f1cc4f01471bTimo Sirainen }
52ffa11d672a9bd150ae3e758a19f1cc4f01471bTimo Sirainen
381daab1e3b56a0bc94d2191cf62beba0df51af9Pascal Volk /* (non-Javadoc)
381daab1e3b56a0bc94d2191cf62beba0df51af9Pascal Volk * @see org.mindswap.owl.OWLObject#getAnnotation(java.net.URI, java.lang.String)
bbd2991d36c5d1d5e34eb274d1e52f0f799e2ee4Timo Sirainen */
bbd2991d36c5d1d5e34eb274d1e52f0f799e2ee4Timo Sirainen public OWLDataValue getAnnotation(URI prop, String lang) {
3ef05dbd1be6cb311e4d196bab87e73fdc660e19Timo Sirainen return individual.getAnnotation(prop, lang);
bbd2991d36c5d1d5e34eb274d1e52f0f799e2ee4Timo Sirainen }
bbd2991d36c5d1d5e34eb274d1e52f0f799e2ee4Timo Sirainen
bbd2991d36c5d1d5e34eb274d1e52f0f799e2ee4Timo Sirainen /* (non-Javadoc)
bbd2991d36c5d1d5e34eb274d1e52f0f799e2ee4Timo Sirainen * @see org.mindswap.owl.OWLObject#getAnnotations(java.net.URI)
bbd2991d36c5d1d5e34eb274d1e52f0f799e2ee4Timo Sirainen */
bbd2991d36c5d1d5e34eb274d1e52f0f799e2ee4Timo Sirainen public OWLDataValueList getAnnotations(URI prop) {
bbd2991d36c5d1d5e34eb274d1e52f0f799e2ee4Timo Sirainen return individual.getAnnotations(prop);
bbd2991d36c5d1d5e34eb274d1e52f0f799e2ee4Timo Sirainen }
bbd2991d36c5d1d5e34eb274d1e52f0f799e2ee4Timo Sirainen
bbd2991d36c5d1d5e34eb274d1e52f0f799e2ee4Timo Sirainen /* (non-Javadoc)
bbd2991d36c5d1d5e34eb274d1e52f0f799e2ee4Timo Sirainen * @see org.mindswap.owl.OWLObject#addAnnotation(java.net.URI, org.mindswap.owl.OWLDataValue)
c68ba18d99f3e4fead1e259b9dc50cb139e0b1c7Timo Sirainen */
c68ba18d99f3e4fead1e259b9dc50cb139e0b1c7Timo Sirainen public void addAnnotation(URI prop, OWLDataValue value) {
c68ba18d99f3e4fead1e259b9dc50cb139e0b1c7Timo Sirainen individual.addAnnotation(prop, value);
c68ba18d99f3e4fead1e259b9dc50cb139e0b1c7Timo Sirainen }
bbd2991d36c5d1d5e34eb274d1e52f0f799e2ee4Timo Sirainen
bbd2991d36c5d1d5e34eb274d1e52f0f799e2ee4Timo Sirainen /* (non-Javadoc)
bbd2991d36c5d1d5e34eb274d1e52f0f799e2ee4Timo Sirainen * @see org.mindswap.owl.OWLObject#addAnnotation(java.net.URI, java.lang.String)
c68ba18d99f3e4fead1e259b9dc50cb139e0b1c7Timo Sirainen */
7ed711d973b319320da100d3e905ef7b99ed69d6Timo Sirainen public void addAnnotation(URI prop, String value) {
7ed711d973b319320da100d3e905ef7b99ed69d6Timo Sirainen individual.addAnnotation(prop, value);
7ed711d973b319320da100d3e905ef7b99ed69d6Timo Sirainen }
7ed711d973b319320da100d3e905ef7b99ed69d6Timo Sirainen
c68ba18d99f3e4fead1e259b9dc50cb139e0b1c7Timo Sirainen /* (non-Javadoc)
c68ba18d99f3e4fead1e259b9dc50cb139e0b1c7Timo Sirainen * @see org.mindswap.owl.OWLObject#addAnnotation(java.net.URI, java.lang.String, java.lang.String)
c68ba18d99f3e4fead1e259b9dc50cb139e0b1c7Timo Sirainen */
99819adc9638200bc2ec1b68da9d2c68e8435740Aki Tuomi public void addAnnotation(URI prop, String value, String lang) {
52ffa11d672a9bd150ae3e758a19f1cc4f01471bTimo Sirainen individual.addAnnotation(prop, value, lang);
99819adc9638200bc2ec1b68da9d2c68e8435740Aki Tuomi }
52ffa11d672a9bd150ae3e758a19f1cc4f01471bTimo Sirainen
c68ba18d99f3e4fead1e259b9dc50cb139e0b1c7Timo Sirainen /* (non-Javadoc)
52ffa11d672a9bd150ae3e758a19f1cc4f01471bTimo Sirainen * @see org.mindswap.owl.OWLObject#setAnnotation(java.net.URI, org.mindswap.owl.OWLDataValue)
efe78d3ba24fc866af1c79b9223dc0809ba26cadStephan Bosch */
99819adc9638200bc2ec1b68da9d2c68e8435740Aki Tuomi public void setAnnotation(URI prop, OWLDataValue value) {
99819adc9638200bc2ec1b68da9d2c68e8435740Aki Tuomi individual.setAnnotation(prop, value);
99819adc9638200bc2ec1b68da9d2c68e8435740Aki Tuomi }
99819adc9638200bc2ec1b68da9d2c68e8435740Aki Tuomi
52ffa11d672a9bd150ae3e758a19f1cc4f01471bTimo Sirainen /* (non-Javadoc)
678d0463849ba777106eb7875f27db07a5d8e3dfTimo Sirainen * @see org.mindswap.owl.OWLObject#setAnnotation(java.net.URI, java.lang.String)
52ffa11d672a9bd150ae3e758a19f1cc4f01471bTimo Sirainen */
2839c7cdfc759d21084cc009f2b60fa28ea77da1Timo Sirainen public void setAnnotation(URI prop, String value) {
2839c7cdfc759d21084cc009f2b60fa28ea77da1Timo Sirainen individual.setAnnotation(prop, value);
2839c7cdfc759d21084cc009f2b60fa28ea77da1Timo Sirainen }
2839c7cdfc759d21084cc009f2b60fa28ea77da1Timo Sirainen
2839c7cdfc759d21084cc009f2b60fa28ea77da1Timo Sirainen /* (non-Javadoc)
2839c7cdfc759d21084cc009f2b60fa28ea77da1Timo Sirainen * @see org.mindswap.owl.OWLObject#setAnnotation(java.net.URI, java.lang.String, java.lang.String)
52ffa11d672a9bd150ae3e758a19f1cc4f01471bTimo Sirainen */
52ffa11d672a9bd150ae3e758a19f1cc4f01471bTimo Sirainen public void setAnnotation(URI prop, String value, String lang) {
7ed711d973b319320da100d3e905ef7b99ed69d6Timo Sirainen individual.addAnnotation(prop, value, lang);
c68ba18d99f3e4fead1e259b9dc50cb139e0b1c7Timo Sirainen }
c68ba18d99f3e4fead1e259b9dc50cb139e0b1c7Timo Sirainen
c68ba18d99f3e4fead1e259b9dc50cb139e0b1c7Timo Sirainen /* (non-Javadoc)
c68ba18d99f3e4fead1e259b9dc50cb139e0b1c7Timo Sirainen * @see org.mindswap.owl.OWLObject#removeAnnotations(java.net.URI)
6176f3618240943f3cb41cb7063ecef56b1dd7dfTimo Sirainen */
6176f3618240943f3cb41cb7063ecef56b1dd7dfTimo Sirainen public void removeAnnotations(URI prop) {
9360b14e30ad27711acda9afe8346a58629d0d66Timo Sirainen individual.removeAnnotations(prop);
7ed711d973b319320da100d3e905ef7b99ed69d6Timo Sirainen }
7ed711d973b319320da100d3e905ef7b99ed69d6Timo Sirainen
c68ba18d99f3e4fead1e259b9dc50cb139e0b1c7Timo Sirainen /* (non-Javadoc)
c68ba18d99f3e4fead1e259b9dc50cb139e0b1c7Timo Sirainen * @see org.mindswap.owl.OWLObject#getModel()
52ffa11d672a9bd150ae3e758a19f1cc4f01471bTimo Sirainen */
52ffa11d672a9bd150ae3e758a19f1cc4f01471bTimo Sirainen public OWLKnowledgeBase getKB() {
52ffa11d672a9bd150ae3e758a19f1cc4f01471bTimo Sirainen return individual.getKB();
52ffa11d672a9bd150ae3e758a19f1cc4f01471bTimo Sirainen }
52ffa11d672a9bd150ae3e758a19f1cc4f01471bTimo Sirainen
99819adc9638200bc2ec1b68da9d2c68e8435740Aki Tuomi /* (non-Javadoc)
99819adc9638200bc2ec1b68da9d2c68e8435740Aki Tuomi * @see org.mindswap.owl.OWLObject#debugString()
99819adc9638200bc2ec1b68da9d2c68e8435740Aki Tuomi */
99819adc9638200bc2ec1b68da9d2c68e8435740Aki Tuomi public String debugString() {
99819adc9638200bc2ec1b68da9d2c68e8435740Aki Tuomi return individual.debugString();
99819adc9638200bc2ec1b68da9d2c68e8435740Aki Tuomi }
99819adc9638200bc2ec1b68da9d2c68e8435740Aki Tuomi
99819adc9638200bc2ec1b68da9d2c68e8435740Aki Tuomi /* (non-Javadoc)
99819adc9638200bc2ec1b68da9d2c68e8435740Aki Tuomi * @see org.mindswap.owl.OWLValue#isDataValue()
52ffa11d672a9bd150ae3e758a19f1cc4f01471bTimo Sirainen */
public boolean isDataValue() {
return false;
}
/* (non-Javadoc)
* @see org.mindswap.owl.OWLValue#isIndividual()
*/
public boolean isIndividual() {
return true;
}
/* (non-Javadoc)
* @see org.mindswap.owl.OWLObject#getOntology()
*/
public OWLOntology getOntology() {
return individual.getOntology();
}
public String toString() {
return individual.toString();
}
public String getLocalName() {
return individual.getLocalName();
}
public String getQName() {
return individual.getQName();
}
public String toRDF() {
return individual.toRDF();
}
public String toRDF(boolean withRDFTag) {
return individual.toRDF(withRDFTag);
}
public String toRDF(boolean withRDFTag, boolean keepNamespaces) {
return individual.toRDF(withRDFTag, keepNamespaces);
}
public OWLOntology getSourceOntology() {
return individual.getSourceOntology();
}
/**
* @deprecated Use getOntology() instead
*/
public org.mindswap.owls.OWLSOntology getOWLSOntology() {
return individual.getOWLSOntology();
}
public boolean isSameAs(OWLIndividual other) {
return individual.isSameAs( other );
}
public OWLIndividualList getSameIndividuals() {
return individual.getSameIndividuals();
}
public boolean isDifferentFrom(OWLIndividual other) {
return individual.isDifferentFrom( other );
}
public OWLIndividualList getDifferentIndividuals() {
return individual.getDifferentIndividuals();
}
public String toPrettyString() {
return individual.toPrettyString();
}
public void delete() {
individual.delete();
}
public String getNamespace() {
return individual.getNamespace();
}
}