Package org.jibx.schema.types

Examples of org.jibx.schema.types.Count


       
        // handle base class prevalidation first so values will be available
        super.prevalidate(vctx);
       
        // check added constraints for <b>all</b>
        Count count = getMaxOccurs();
        if (count != null && (count.isUnbounded() || count.getCount() != 1)) {
            vctx.addError("The <all> element only allows 'maxOccurs' of '1'", this);
        }
        count =getMinOccurs();
        if (count != null && (count.isUnbounded() || count.getCount() > 1)) {
            vctx.addError("The <all> element only allows 'minOccurs' of '0' or '1'", this);
        }
    }
View Full Code Here


     * @param part compositor being added as a particle
     * @param comp target compositor for add
     */
    private static void addCompositorPart(CommonCompositorDefinition part, CommonCompositorDefinition comp)  {
        FilteredSegmentList parts = part.getParticleList();
        Count maxo = part.getMaxOccurs();
        Count mino = part.getMinOccurs();
        if (parts.size() == 1 && (maxo == null || maxo.isEqual(1)) && (mino == null || mino.isEqual(1))) {
            comp.getParticleList().add(parts.get(0));
        } else if (parts.size() > 1) {
            comp.getParticleList().add(part);
        }
    }
View Full Code Here

     *
     * @param part particle to be checked
     * @return <code>true</code> if repeated, <code>false</code> if not
     */
    public static boolean isRepeated(IArity part) {
        Count max = part.getMaxOccurs();
        return (max != null && (max.isGreaterThan(1)));
    }
View Full Code Here

TOP

Related Classes of org.jibx.schema.types.Count

Copyright © 2018 www.massapicom. 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.