Package com.volantis.mcs.xml.schema.impl.validation

Examples of com.volantis.mcs.xml.schema.impl.validation.ElementValidator


    public void addSchema(Schema schema) {
        for (Iterator i = schema.elements(); i.hasNext();) {
            ElementSchema element = (ElementSchema) i.next();
            ElementType type = element.getElementType();
            ElementValidator elementValidator = builder.build(element);
            validatorPrototypes.put(type, elementValidator);
        }
    }
View Full Code Here


        ElementSchema schema =
                new ElementSchemaImpl(containingElement, model);

        ValidatorPrototypeBuilder builder =
                new ValidatorPrototypeBuilder(validatorFactoryMock);
        ElementValidator validator = builder.build(schema);
        assertEquals(
                "Validator should match", elementValidatorMock, validator);
    }
View Full Code Here

        ElementSchema schema =
                new ElementSchemaImpl(containingElement, choice);

        ValidatorPrototypeBuilder builder =
                new ValidatorPrototypeBuilder(validatorFactoryMock);
        ElementValidator validator = builder.build(schema);
        assertEquals(
                "Element validator should match", elementValidatorMock,
                validator);
    }
View Full Code Here

        ElementSchema schema =
                new ElementSchemaImpl(containingElement, bounded);

        ValidatorPrototypeBuilder builder =
                new ValidatorPrototypeBuilder(validatorFactoryMock);
        ElementValidator validator = builder.build(schema);
        assertEquals(
                "Element validator should match", elementValidatorMock,
                validator);
    }
View Full Code Here

        ElementSchema schema =
                new ElementSchemaImpl(containingElement, bounded);

        ValidatorPrototypeBuilder builder =
                new ValidatorPrototypeBuilder(validatorFactoryMock);
        ElementValidator validator = builder.build(schema);
        assertEquals(
                "Element validator should match", elementValidatorMock,
                validator);
    }
View Full Code Here

        ElementSchema schema =
                new ElementSchemaImpl(containingElement, sequence);

        ValidatorPrototypeBuilder builder =
                new ValidatorPrototypeBuilder(validatorFactoryMock);
        ElementValidator validator = builder.build(schema);
        assertEquals(
                "Element validator should match", elementValidatorMock,
                validator);
    }
View Full Code Here

                new ElementSchemaImpl(containingElement, aReferenceMock);


        // Create validators for the same model so the element validator
        // should be the same.
        ElementValidator validator1 = builder.build(schema1);

        assertEquals(
                "Element validator should match", elementValidatorMock,
                validator1);

        // Create validator for a different model but using part of the
        // previous model so the content validator should be reused.
        ContentModel bounded = new BoundedContentImpl(aReferenceMock);
        ElementSchema schema2 =
                new ElementSchemaImpl(containingElement, bounded);
        ElementValidator validator3 = builder.build(schema2);

        assertEquals(
                "Second element validator should match", elementValidator2Mock,
                validator3);
View Full Code Here

TOP

Related Classes of com.volantis.mcs.xml.schema.impl.validation.ElementValidator

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.