RDFListImpl.java revision 18
// The MIT License
//
// Copyright (c) 2004 Evren Sirin
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to
// deal in the Software without restriction, including without limitation the
// sell copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
// IN THE SOFTWARE.
/*
* Created on Dec 23, 2004
*/
/**
* @author Evren Sirin
* @author Michael D�nzer, University of Zurich
*/
protected ListVocabulary vocabulary;
private class RDFListIterator implements Iterator {
}
public void remove() {
throw new UnsupportedOperationException("Cannot remove from ObjList iterator");
}
public boolean hasNext() {
}
throw new NoSuchElementException();
throw new InvalidListException();
return result;
}
}
super(ind);
}
}
}
public void setRestToNil() {
}
public OWLIndividual getFirst() {
return (OWLIndividual) getFirstValue();
}
public OWLValue getFirstValue() {
return value;
}
if (isEmpty())
throw new RuntimeException( "Cannot modify empty list (list:nil)" );
else if (value instanceof OWLDataValue )
else
}
public OWLIndividualList getAll() {
return result;
}
public List getAllValues() {
return result;
}
}
if(isEmpty())
throw new IndexOutOfBoundsException();
}
if (isEmpty())
else
return this;
}
return list;
}
if( index == 0 )
throw new IndexOutOfBoundsException();
}
return this;
return remove();
int i = 0;
return removeAt(i);
i++;
}
return this;
}
if (index == 0)
return remove();
throw new IndexOutOfBoundsException();
return this;
}
if (size() > 1) {
} else {
}
individual.delete();
return list;
}
return list;
}
public void delete() {
removeAll();
individual.delete();
}
if( isEmpty() )
throw new UnsupportedOperationException( "Cannot modify empty list (list:nil)" );
throw new IndexOutOfBoundsException();
else {
for(int i = 0; i < index; i++)
}
}
return new RDFListIterator(this);
}
public int size() {
}
public boolean isEmpty() {
return equals(vocabulary.nil()) || (getFirstValue() != null && getFirstValue().equals(vocabulary.nil()));
}
public ListVocabulary getVocabulary() {
return vocabulary;
}
this.vocabulary = vocabulary;
}
}