@Override
	public void checkAllRestrictions(ModelSubInstance m)
			throws RestrictionException {
		ModelInstance meta = ModelInstance.getInstance();
		
		Iterator<Map.Entry<Integer, ClassInstance>> it = meta.instanced_classes.entrySet().iterator();
		while(it.hasNext()) {
			ClassInstance c = it.next().getValue();
			if(c.meta.name.equals("SubFeatureGroup")) {
				for(int i = 0; i < c.attributes.size(); ++i) {
					if(c.attributes.get(i).meta.name.equals("GroupNecessity") && c.attributes.get(i).value.equals("Required")) {
						if(!searchModelSubForClass(c, m))
							throw new RestrictionException("Subfeagutre group " + c.instance_name + " is required!");
					}
				}
			}
		}
		
		Iterator<Map.Entry<Integer, ClassSubInstance>> it2 = m.classes.entrySet().iterator();
		while(it.hasNext()) {
			ClassSubInstance c = it2.next().getValue();
			if(c.meta.meta.name.equals("SubFeatureGroup")) {
				searchForAssocs(c, m);
			}
		}
	}