skos:ConceptScheme
describes a knowledge organization system, a container of concepts. Usually, a concept exists in at most one scheme, since for example skos:notation
is supposed to provide a value for the concept in its scheme (for equivalent concepts in different schemes, there are specific mapping relations).
Your usage is incorrect, since skos:hasTopConcept
is used on a concept scheme, with a concept as its object. It means that the concept is in some way the most generic, the broadest, i.e. there is nothing broader in that scheme (but there could be in general, in other schemes). The inverse is skos:topConceptOf
, which implies skos:inScheme
.
Assuming your scheme is used for denoting relations between specific classes, you probably intended to model it in this way:
ex:ClassRelations a skos:ConceptScheme ;
skos:hasTopConcept ex:Class .
ex:Class a skos:Concept ;
skos:topConceptOf ex:ClassRelations . # redundant since the inverse was already specified (inScheme is sufficient)
ex:Superclass a skos:Concept ;
skos:broader ex:Class .
However I don't think this is a good use of SKOS here. We are modelling class relations here, and while "is superclass of" makes sense, it is not more specific than "is class of", since that makes no sense. Specifying a plain old RDF property works just as well.
Going with the "class hierarchy" concepts in some programming language, it would be more suited for an actual hierarchy, like types, reference/value types, interfaces etc., or specific classes/types like Object, String, Collection, List etc.