class DefinitionsChildId extends GenericId {

    @Override
    public int compareTo(GenericId o1) {
        if (o1 instanceof DefinitionsChildId) {
            int res = this.getClass().getName().compareTo(o1.getClass().getName());
            if (res == 0) {
                DefinitionsChildId o = (DefinitionsChildId) o1;
                res = VersionUtils.getNameWithoutVersion(this).compareTo(VersionUtils.getNameWithoutVersion(o));
                if (res == 0) {
                    res = VersionUtils.getVersion(this).compareTo(VersionUtils.getVersion(o));
                }
                if (res == 0) {
                    res = this.getNamespace().compareTo(o.getNamespace());
                }
            }
            return res;
        } else {
            // comparing TOSCAcomponentIDs with non-TOSCAcomponentIDs is not
            // possible
            throw new IllegalStateException();
        }
    }

    public  DefinitionsChildId(Namespace namespace, XmlId xmlId);
    public  DefinitionsChildId(String ns, String id, boolean URLencoded);
    public  DefinitionsChildId(QName qname);

}