private static void initRestrictions(XSSimpleType xsSimpleType,
			SimpleTypeRestriction t) {
		XSRestrictionSimpleType restriction = xsSimpleType.asRestriction();
		if (restriction != null) {
			Vector<String> enumeration = new Vector<String>();
			Iterator<? extends XSFacet> i = restriction.getDeclaredFacets()
					.iterator();
			while (i.hasNext()) {
				XSFacet facet = i.next();
				if (facet.getName().equals(XSFacet.FACET_ENUMERATION)) {
					enumeration.add(facet.getValue().value);
				}
				if (facet.getName().equals(XSFacet.FACET_MAXINCLUSIVE)) {
					t.maxValue = facet.getValue().value;
				}
				if (facet.getName().equals(XSFacet.FACET_MININCLUSIVE)) {
					t.minValue = facet.getValue().value;
				}
				if (facet.getName().equals(XSFacet.FACET_MAXEXCLUSIVE)) {
					t.maxValue = String.valueOf(Integer.parseInt(facet
							.getValue().value) - 1);
				}
				if (facet.getName().equals(XSFacet.FACET_MINEXCLUSIVE)) {
					t.minValue = String.valueOf(Integer.parseInt(facet
							.getValue().value) + 1);
				}
				if (facet.getName().equals(XSFacet.FACET_LENGTH)) {
					t.length = facet.getValue().value;
				}
				if (facet.getName().equals(XSFacet.FACET_MAXLENGTH)) {
					t.maxLength = facet.getValue().value;
				}
				if (facet.getName().equals(XSFacet.FACET_MINLENGTH)) {
					t.minLength = facet.getValue().value;
				}
				if (facet.getName().equals(XSFacet.FACET_PATTERN)) {
					t.pattern = facet.getValue().value;
				}
				if (facet.getName().equals(XSFacet.FACET_TOTALDIGITS)) {
					t.totalDigits = facet.getValue().value;
				}

			}
			if (enumeration.size() > 0) {
				t.enumeration = enumeration.toArray(new String[] {});
			}
			t.baseType = restriction.getBaseType().getName();
		}

	}