for(IClass c: source.getDisjointClasses()){
cls.addDisjointClass((IClass)convertResource(ont,c));
}
// copy necessary restrictions
ILogicExpression exp = source.getNecessaryRestrictions();
if(exp.getExpressionType() == ILogicExpression.OR){
cls.addSuperClass(ont.createClass((ILogicExpression) convertResource(ont,exp)));
}else{
for(Object c: exp){
if(c instanceof IRestriction)
cls.addNecessaryRestriction((IRestriction)convertResource(ont,c));
else if(c instanceof IClass)
cls.addSuperClass((IClass) convertResource(ont,c));
else if(c instanceof ILogicExpression)
cls.addSuperClass(ont.createClass((ILogicExpression) convertResource(ont,exp)));
}
}
// copy equivalent restrictions
exp = source.getEquivalentRestrictions();
if(exp.getExpressionType() == ILogicExpression.OR){
cls.addEquivalentClass(ont.createClass((ILogicExpression) convertResource(ont,exp)));
}else{
for(Object c: exp){
if(c instanceof IRestriction)
cls.addEquivalentRestriction((IRestriction)convertResource(ont,c));