package org.arachb.owlbuilder.lib;

import java.sql.SQLException;

import org.apache.log4j.Logger;
import org.arachb.arachadmin.AbstractConnection;
import org.arachb.arachadmin.TaxonBean;
import org.arachb.owlbuilder.Owlbuilder;
import org.semanticweb.owlapi.model.OWLObject;

public class Taxon implements AbstractNamedEntity{

	private static Logger log = Logger.getLogger(Taxon.class);
	private final TaxonBean bean;

	public Taxon(TaxonBean b){
		bean = b;
	}

	@Override
	public int getId() {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public OWLObject generateOWL(Owlbuilder b) throws Exception {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public void setGeneratedId(String id) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public String getGeneratedId() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public String getIriString() {
		return bean.getIriString();
	}

	@Override
	public String checkIriString() {
		if (bean.get_available_id() == null){
			throw new IllegalStateException("Term has neither assigned nor generated id");
		}
		else {
			return bean.get_available_id();
		}
	}

	public String getParentSourceId(){
		return bean.getParentSourceId();
	}

	@Override
	public void updateDB(AbstractConnection c) throws SQLException {
		// TODO Auto-generated method stub
		
	}

	public String getName() {
		return bean.getName();
	}

}

@@ -304,21 +304,18 @@
 nts 
-AbstractNamed
+Generating
 Enti
@@ -459,93 +459,8 @@
 %09%7D%0A%0A
-%09@Override%0A%09public int getId() %7B%0A%09%09// TODO Auto-generated method stub%0A%09%09return 0;%0A%09%7D%0A
 %0A%09@O
@@ -590,699 +590,85 @@
 %09%7D%0A%0A
-%09@Override%0A%09public void setGeneratedId(String id) %7B%0A%09%09// TODO Auto-generated method stub%0A%09%09%0A%09%7D%0A%0A%09@Override%0A%09public String getGeneratedId() %7B%0A%09%09// TODO Auto-generated method stub%0A%09%09return null;%0A%09%7D%0A%0A%09@Override%0A%09public String getIriString() %7B%0A%09%09return bean.getIriString();%0A%09%7D%0A%0A%09@Override%0A%09public String checkIriString() %7B%0A%09%09if (bean.get_available_id() == null)%7B%0A%09%09%09throw new IllegalStateException(%22Term has neither assigned nor generated id%22);%0A%09%09%7D%0A%09%09else %7B%0A%09%09%09return bean.get_available_id();%0A%09%09%7D%0A%09%7D%0A%0A%09public String getParentSourceId()%7B%0A%09%09return bean.getParentSourceId();%0A%09%7D%0A%0A%09@Override%0A%09public void updateDB(AbstractConnection c) throws SQLException %7B%0A%09%09// TODO Auto-generated method stub%0A%09%09%0A%09%7D
+%0A%0A%0A%09public String getParentSourceId()%7B%0A%09%09return bean.getParentSourceId();%0A%09%7D%0A
 %0A%0A%09p

switch from AbstractNamedEntity to GeneratingEntity (with appropriate method switches)