public int length(XSDTypeDefinition definition) { try { XSDSimpleTypeDefinition simple = (XSDSimpleTypeDefinition) definition; XSDLengthFacet facet = simple.getLengthFacet(); if (facet == null) { return Integer.MAX_VALUE; } return Integer.parseInt(facet.getLexicalValue()); } catch (NumberFormatException ignore) { return Integer.MIN_VALUE; } }
@Override public Object caseXSDLengthFacet(XSDLengthFacet xsdLengthFacet) { extendedMetaData.setLengthFacet(eDataType, xsdLengthFacet.getValue()); return this; } @Override
if (lengthFacet != null) currentLength = lengthFacet.getLexicalValue(); lengthFacet.setLexicalValue(max); xsdSimpleType.getFacetContents().add(lengthFacet); xsdSimpleType.getFacetContents().remove(maxLengthFacet); xsdSimpleType.getFacetContents().add(lengthFacet); lengthFacet.setLexicalValue(max); xsdSimpleType.getFacetContents().remove(minLengthFacet); lengthFacet.setLexicalValue(min); xsdSimpleType.getFacetContents().add(lengthFacet); xsdSimpleType.getFacetContents().remove(maxLengthFacet); xsdSimpleType.getFacetContents().add(lengthFacet); lengthFacet.setLexicalValue(min); xsdSimpleType.getFacetContents().remove(maxLengthFacet);
int length = lengthFacet.getValue(); if (length >= 0 && lengthFacet.getRootContainer() == xsdSchema)
xsdLengthFacet.setLexicalValue(Integer.toString(eStructuralFeature.getLowerBound())); xsdRestrictedTypeDefinition.getFacetContents().add(xsdLengthFacet);
public static XSDLengthFacet createLengthFacet(Node node) { if (XSDConstants.nodeType(node) == XSDConstants.LENGTH_ELEMENT) { XSDLengthFacet xsdLengthFacet = XSDFactory.eINSTANCE.createXSDLengthFacet(); xsdLengthFacet.setElement((Element)node); return xsdLengthFacet; } return null; }
@Override public Object caseXSDLengthFacet(XSDLengthFacet xsdLengthFacet) { extendedMetaData.setLengthFacet(eDataType, xsdLengthFacet.getValue()); return this; } @Override
xsdLengthFacet.setLexicalValue(Integer.toString(eStructuralFeature.getLowerBound())); xsdRestrictedTypeDefinition.getFacetContents().add(xsdLengthFacet);
public static XSDLengthFacet createLengthFacet(Node node) { if (XSDConstants.nodeType(node) == XSDConstants.LENGTH_ELEMENT) { XSDLengthFacet xsdLengthFacet = XSDFactory.eINSTANCE.createXSDLengthFacet(); xsdLengthFacet.setElement((Element)node); return xsdLengthFacet; } return null; }
public int length(XSDTypeDefinition definition) { try { XSDSimpleTypeDefinition simple = definition.getSimpleType(); XSDLengthFacet facet = simple.getLengthFacet(); if (facet == null) { return Integer.MAX_VALUE; } return Integer.parseInt(facet.getLexicalValue()); } catch (NumberFormatException ignore) { return Integer.MIN_VALUE; } }
@Override protected void validateRestriction(XSDFixedFacet xsdFixedFacet) { if (getValue() != ((XSDLengthFacet)xsdFixedFacet).getValue()) { XSDDiagnostic xsdDiagnostic = reportConstraintViolation (XSDConstants.PART2, "length-valid-restriction", getElement(), XSDConstants.VALUE_ATTRIBUTE, new Object [] { new Integer(getValue()), xsdFixedFacet.getEffectiveValue(), xsdFixedFacet.getSimpleTypeDefinition().getURI() }); xsdDiagnostic.getComponents().add(xsdFixedFacet); } }
xsdLengthFacet.setLexicalValue(Integer.toString(length)); xsdSimpleTypeDefinition.getFacetContents().add(xsdLengthFacet);
@Override public String getText(Object object) { XSDLengthFacet xsdLengthFacet = ((XSDLengthFacet)object); String result = xsdLengthFacet.getLexicalValue(); return result == null ? "" : result; }
@Override protected void validateRestriction(XSDFixedFacet xsdFixedFacet) { if (getValue() != ((XSDLengthFacet)xsdFixedFacet).getValue()) { XSDDiagnostic xsdDiagnostic = reportConstraintViolation (XSDConstants.PART2, "length-valid-restriction", getElement(), XSDConstants.VALUE_ATTRIBUTE, new Object [] { getValue(), xsdFixedFacet.getEffectiveValue(), xsdFixedFacet.getSimpleTypeDefinition().getURI() }); xsdDiagnostic.getComponents().add(xsdFixedFacet); } }
public int length(XSDTypeDefinition definition) { try { XSDSimpleTypeDefinition simple = (XSDSimpleTypeDefinition) definition; XSDLengthFacet facet = simple.getLengthFacet(); if (facet == null) { return Integer.MAX_VALUE; } return Integer.parseInt(facet.getLexicalValue()); } catch (NumberFormatException ignore) { return Integer.MIN_VALUE; } }
XSDLengthFacet length = type.getLengthFacet(); if (list.length != length.getValue()) {
public int length(XSDTypeDefinition definition) { try { XSDSimpleTypeDefinition simple = (XSDSimpleTypeDefinition) definition; XSDLengthFacet facet = simple.getLengthFacet(); if (facet == null) { return Integer.MAX_VALUE; } return Integer.parseInt(facet.getLexicalValue()); } catch (NumberFormatException ignore) { return Integer.MIN_VALUE; } }
XSDLengthFacet length = type.getLengthFacet(); if (list.length != length.getValue()) {
public int length(XSDTypeDefinition definition) { try { XSDSimpleTypeDefinition simple = (XSDSimpleTypeDefinition) definition; XSDLengthFacet facet = simple.getLengthFacet(); if (facet == null) { return Integer.MAX_VALUE; } return Integer.parseInt(facet.getLexicalValue()); } catch (NumberFormatException ignore) { return Integer.MIN_VALUE; } }
if ( list.length != length.getValue() ) {