Examples of newSchema()


Examples of javax.xml.validation.SchemaFactory.newSchema()

    }
   
    private Schema createSchema(Source[] sources) throws SAXException {
        SchemaFactory factory = getOrCreateSchemaFactory();
        try {
            return factory.newSchema(sources);
        } finally {
            returnSchemaFactory(factory);
        }
    }
View Full Code Here

Examples of org.apache.syncope.core.util.AttributableUtil.newSchema()

        if (schemaDAO.find(schemaTO.getName(), attrUtil.schemaClass()) != null) {
            throw new EntityExistsException(attrUtil.schemaClass().getSimpleName()
                    + " '" + schemaTO.getName() + "'");
        }

        AbstractSchema schema = attrUtil.newSchema();
        binder.create(schemaTO, schema);
        schema = schemaDAO.save(schema);

        auditManager.audit(Category.schema, SchemaSubCategory.create, Result.success,
                "Successfully created schema: " + kind + "/" + schema.getName());
View Full Code Here

Examples of org.apache.xerces.jaxp.validation.XMLSchemaFactory.newSchema()

    }

    protected void runTest() throws Throwable {
        SchemaFactory factory = new XMLSchemaFactory();
        DocumentBuilder builder = dbf.newDocumentBuilder();
        Schema schema = factory.newSchema(new DOMSource(
                builder.parse(TestValidator.class.getResourceAsStream("ipo.xsd"))));
        Validator validator = schema.newValidator();
        validator.validate(new DOMSource(
                builder.parse(TestValidator.class.getResourceAsStream("ipo_1.xml"))));
    }
View Full Code Here

Examples of org.wso2.carbon.governance.api.schema.SchemaManager.newSchema()

public class SchemaTest extends BaseTestCase {
    public void testAddSchema() throws Exception {
        SchemaManager schemaManager = new SchemaManager(registry);

        Schema schema = schemaManager.newSchema("http://svn.wso2.org/repos/wso2/trunk/carbon/components/governance/org.wso2.carbon.governance.api/src/test/resources/test-resources/xsd/purchasing.xsd");
        schema.addAttribute("creator", "it is me");
        schema.addAttribute("version", "0.01");
        schemaManager.addSchema(schema);

        Schema newSchema = schemaManager.getSchema(schema.getId());
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.