OWLSObjListImpl.java revision 2
78N/A// The MIT License
78N/A//
78N/A// Copyright (c) 2004 Evren Sirin
78N/A//
78N/A// Permission is hereby granted, free of charge, to any person obtaining a copy
78N/A// of this software and associated documentation files (the "Software"), to
78N/A// deal in the Software without restriction, including without limitation the
78N/A// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
78N/A// sell copies of the Software, and to permit persons to whom the Software is
78N/A// furnished to do so, subject to the following conditions:
78N/A//
78N/A// The above copyright notice and this permission notice shall be included in
78N/A// all copies or substantial portions of the Software.
78N/A//
78N/A// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
78N/A// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
78N/A// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
78N/A// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
78N/A// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
78N/A// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
2342N/A// IN THE SOFTWARE.
78N/A
78N/A/*
78N/A * Created on Dec 23, 2004
78N/A */
1438N/Apackage impl.owls.generic.list;
618N/A
78N/A
1438N/Aimport impl.owl.list.RDFListImpl;
844N/A
1438N/Aimport org.mindswap.owl.OWLIndividual;
78N/Aimport org.mindswap.owl.OWLValue;
1258N/Aimport org.mindswap.owl.list.RDFList;
78N/Aimport org.mindswap.owls.generic.list.OWLSObjList;
2899N/Aimport org.mindswap.owls.vocabulary.OWLS;
2899N/A
78N/A
78N/A/**
78N/A * @author Evren Sirin
78N/A *
2342N/A */
2342N/Apublic class OWLSObjListImpl extends RDFListImpl implements OWLSObjList {
2342N/A public OWLSObjListImpl(OWLIndividual ind) {
1438N/A super(ind);
1438N/A
78N/A setVocabulary(OWLS.ObjList);
78N/A }
78N/A
1438N/A public RDFList getRest() {
78N/A return (OWLSObjList) getProperty(vocabulary.rest()).castTo(OWLSObjList.class);
78N/A }
78N/A
78N/A public RDFList insert(OWLValue item) {
1438N/A OWLSObjList list = new OWLSObjListImpl( getOntology().createInstance( vocabulary.List() ) );
1438N/A list.setFirst( item );
1438N/A list.setRest( this );
1438N/A
1438N/A return list;
1438N/A }
1438N/A}
1438N/A