Examples of MaxLengthFacet


Examples of com.sun.msv.datatype.xsd.MaxLengthFacet

      int n;  // compute # of items into this value.
   
      if(lf!=null) {
        n = lf.length;
      } else {
        MaxLengthFacet xlf = (MaxLengthFacet)dti.getFacetObject(XSDatatype.FACET_MAXLENGTH);
        int max = (xlf!=null)?xlf.maxLength:16;
        MinLengthFacet nlf = (MinLengthFacet)dti.getFacetObject(XSDatatype.FACET_MINLENGTH);
        int min = (nlf!=null)?nlf.minLength:0;
       
        n = random.nextInt(max-min)+min;
View Full Code Here

Examples of org.apache.isis.core.metamodel.facets.maxlen.MaxLengthFacet

    }

    @Override
    protected void addPropertiesSpecificToFeature() {
        representation.mapPut("optional", !getObjectFeature().isMandatory());
        final MaxLengthFacet maxLength = getObjectFeature().getFacet(MaxLengthFacet.class);
        if (maxLength != null && !maxLength.isNoop()) {
            representation.mapPut("maxLength", maxLength.value());
        }
    }
View Full Code Here

Examples of org.apache.isis.core.metamodel.facets.maxlen.MaxLengthFacet

    @Override
    protected void addPropertiesSpecificToFeature() {
        representation.mapPut("name", getObjectFeature().getName());
        representation.mapPut("number", getObjectFeature().getNumber());
        representation.mapPut("optional", getObjectFeature().isOptional());
        final MaxLengthFacet maxLength = getObjectFeature().getFacet(MaxLengthFacet.class);
        if (maxLength != null && !maxLength.isNoop()) {
            representation.mapPut("maxLength", maxLength.value());
        }
    }
View Full Code Here

Examples of org.apache.isis.core.metamodel.facets.maxlen.MaxLengthFacet

        return !facet.preventWrapping();
    }

    @Override
    public int getMaximumLength() {
        final MaxLengthFacet facet = getFacet(MaxLengthFacet.class);
        return facet.value();
    }
View Full Code Here

Examples of org.apache.isis.core.metamodel.facets.maxlen.MaxLengthFacet

                if (fieldSpecifications[i].isParseable()) {
                    final MultiLineFacet multilineFacet = fld.getFacet(MultiLineFacet.class);
                    noLines[i] = multilineFacet.numberOfLines();
                    wraps[i] = !multilineFacet.preventWrapping();

                    final MaxLengthFacet maxLengthFacet = fld.getFacet(MaxLengthFacet.class);
                    maxLength[i] = maxLengthFacet.value();

                    final TypicalLengthFacet typicalLengthFacet = fld.getFacet(TypicalLengthFacet.class);
                    typicalLength[i] = typicalLengthFacet.value();
                }
            }
View Full Code Here

Examples of org.apache.isis.core.metamodel.facets.maxlen.MaxLengthFacet

        final ScalarModel scalarModel = getModel();
        final AbstractTextComponent<String> textField = getTextField();

        final ObjectSpecification facetHolder = scalarModel.getTypeOfSpecification();

        final MaxLengthFacet maxLengthFacet = facetHolder.getFacet(MaxLengthFacet.class);
        if (maxLengthFacet != null) {
            textField.add(StringValidator.maximumLength(maxLengthFacet.value()));
        }
    }
View Full Code Here

Examples of org.apache.isis.core.metamodel.facets.maxlen.MaxLengthFacet

        return !facet.preventWrapping();
    }

    @Override
    public int getMaximumLength() {
        final MaxLengthFacet facet = getFacet(MaxLengthFacet.class);
        return facet.value();
    }
View Full Code Here

Examples of org.apache.isis.core.metamodel.facets.maxlen.MaxLengthFacet

        final ScalarModel scalarModel = getModel();
        final TextField<String> textField = getTextField();

        final ObjectSpecification facetHolder = scalarModel.getTypeOfSpecification();

        final MaxLengthFacet maxLengthFacet = facetHolder.getFacet(MaxLengthFacet.class);
        if (maxLengthFacet != null) {
            textField.add(StringValidator.maximumLength(maxLengthFacet.value()));
        }
    }
View Full Code Here

Examples of org.apache.isis.core.metamodel.facets.maxlen.MaxLengthFacet

        final TypicalLengthFacet typicalLengthFacet = noSpec.getFacet(TypicalLengthFacet.class);
        if (typicalLengthFacet != null) {
            return typicalLengthFacet.value();
        }
        final MaxLengthFacet maxLengthFacet = noSpec.getFacet(MaxLengthFacet.class);
        if (maxLengthFacet != null) {
            return maxLengthFacet.value();
        }
        return -1;
    }
View Full Code Here

Examples of org.apache.isis.core.metamodel.facets.maxlen.MaxLengthFacet

                if (fieldSpecifications[i].isParseable()) {
                    final MultiLineFacet multilineFacet = fld.getFacet(MultiLineFacet.class);
                    noLines[i] = multilineFacet.numberOfLines();
                    wraps[i] = !multilineFacet.preventWrapping();

                    final MaxLengthFacet maxLengthFacet = fld.getFacet(MaxLengthFacet.class);
                    maxLength[i] = maxLengthFacet.value();

                    final TypicalLengthFacet typicalLengthFacet = fld.getFacet(TypicalLengthFacet.class);
                    typicalLength[i] = typicalLengthFacet.value();
                }
            }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.