OWLSObjListImpl.java revision 18
164105f6563d98b832f603e28e506dbabed22cf3Michael H. Warfield// The MIT License
164105f6563d98b832f603e28e506dbabed22cf3Michael H. Warfield// Copyright (c) 2004 Evren Sirin
164105f6563d98b832f603e28e506dbabed22cf3Michael H. Warfield// Permission is hereby granted, free of charge, to any person obtaining a copy
164105f6563d98b832f603e28e506dbabed22cf3Michael H. Warfield// of this software and associated documentation files (the "Software"), to
164105f6563d98b832f603e28e506dbabed22cf3Michael H. Warfield// deal in the Software without restriction, including without limitation the
164105f6563d98b832f603e28e506dbabed22cf3Michael H. Warfield// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
164105f6563d98b832f603e28e506dbabed22cf3Michael H. Warfield// sell copies of the Software, and to permit persons to whom the Software is
164105f6563d98b832f603e28e506dbabed22cf3Michael H. Warfield// furnished to do so, subject to the following conditions:
164105f6563d98b832f603e28e506dbabed22cf3Michael H. Warfield// The above copyright notice and this permission notice shall be included in
164105f6563d98b832f603e28e506dbabed22cf3Michael H. Warfield// all copies or substantial portions of the Software.
164105f6563d98b832f603e28e506dbabed22cf3Michael H. Warfield// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
164105f6563d98b832f603e28e506dbabed22cf3Michael H. Warfield// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
164105f6563d98b832f603e28e506dbabed22cf3Michael H. Warfield// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
164105f6563d98b832f603e28e506dbabed22cf3Michael H. Warfield// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
164105f6563d98b832f603e28e506dbabed22cf3Michael H. Warfield// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
164105f6563d98b832f603e28e506dbabed22cf3Michael H. Warfield// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
164105f6563d98b832f603e28e506dbabed22cf3Michael H. Warfield// IN THE SOFTWARE.
164105f6563d98b832f603e28e506dbabed22cf3Michael H. Warfield * Created on Dec 23, 2004
b4f7af7a520b23c873e404562ec518a576e63d4cMichael H. Warfieldimport org.mindswap.owls.generic.list.OWLSObjList;
b4f7af7a520b23c873e404562ec518a576e63d4cMichael H. Warfieldimport org.mindswap.owls.vocabulary.OWLS;
b4f7af7a520b23c873e404562ec518a576e63d4cMichael H. Warfield * @author Evren Sirin
b4f7af7a520b23c873e404562ec518a576e63d4cMichael H. Warfield * @author Michael D�nzer, University of Zurich
b4f7af7a520b23c873e404562ec518a576e63d4cMichael H. Warfieldpublic class OWLSObjListImpl extends RDFListImpl implements OWLSObjList {
b4f7af7a520b23c873e404562ec518a576e63d4cMichael H. Warfield public OWLSObjListImpl(OWLIndividual ind) {
b4f7af7a520b23c873e404562ec518a576e63d4cMichael H. Warfield return (OWLSObjList) getProperty(vocabulary.rest()).castTo(OWLSObjList.class);
b4f7af7a520b23c873e404562ec518a576e63d4cMichael H. Warfield // TODO returning an instance of the superclass as replacement for the instance this operation was called is really bad.
b4f7af7a520b23c873e404562ec518a576e63d4cMichael H. Warfield OWLSObjListImpl list = new OWLSObjListImpl(getOntology().createInstance( vocabulary.List()));
b4f7af7a520b23c873e404562ec518a576e63d4cMichael H. Warfield OWLSObjList bag = (OWLSObjList) getRest();
826cde7c2100e1f4419a54b5c930c0854e01e87eMichael H. Warfield bag.setFirst(getRest().getFirstValue());
826cde7c2100e1f4419a54b5c930c0854e01e87eMichael H. Warfield bag.setRest((OWLSObjList) getRest().getRest());