*/
public void subClass(Resource c, schema.type type, Context ctx) {
OntModel ont = (OntModel) c.getModel();
Resource superclass = null;
XMLBean b = get_baseType(ont,ctx);
if (b!=null && b instanceof simpleType)
superclass = ((simpleType) b).toOWL(ctx);
else if (b!=null && b instanceof complexType)
superclass = ((complexType) b).toOWL(null,true,ctx);
else if (base != null) {
String t = expandQName(ctx.getDefaultNS(),base, ont);
if (t.startsWith(schema.XSD_URI)) {
if (type==schema.type.simpleType) superclass = schema.toOWL(ont,t);
}
// extension as superclass can only be done in a context where classes are defined by intersection
else superclass = ont.getResource(t);
}
// this ignores xs:anyType extensions which are null
if (superclass!=null) c.addProperty(RDFS.subClassOf,superclass);
// is this consistent
if (!ctx.checkConsistency(c,ont.getBaseModel())) {
schema.removeSubClass(ont,c,superclass);
String subject = c.getLocalName();
if (subject==null) subject = "anonymous";
Gloze.logger.warn(subject+" invalid subClassOf "+superclass.getLocalName());
}