Search in sources :

Example 1 with AxiomModelStatementSource

use of com.evolveum.axiom.lang.antlr.AxiomModelStatementSource in project midpoint by Evolveum.

the class MidPointPrismContextFactory method registerAxiomSchemas.

private void registerAxiomSchemas(SchemaRegistryImpl schemaRegistry) {
    if (schemaRegistry instanceof AxiomEnabledSchemaRegistry) {
        AxiomEnabledSchemaRegistry axiomRegistry = (AxiomEnabledSchemaRegistry) schemaRegistry;
        AxiomModelStatementSource commonMetadata;
        try {
            commonMetadata = AxiomModelStatementSource.fromResource("xml/ns/public/common/common-metadata-3.axiom");
        } catch (AxiomSyntaxException | IOException e) {
            throw new RuntimeException(e);
        }
        axiomRegistry.addAxiomSource(commonMetadata);
    }
}
Also used : AxiomModelStatementSource(com.evolveum.axiom.lang.antlr.AxiomModelStatementSource) AxiomSyntaxException(com.evolveum.axiom.lang.spi.AxiomSyntaxException) IOException(java.io.IOException) AxiomEnabledSchemaRegistry(com.evolveum.midpoint.prism.impl.schema.axiom.AxiomEnabledSchemaRegistry)

Aggregations

AxiomModelStatementSource (com.evolveum.axiom.lang.antlr.AxiomModelStatementSource)1 AxiomSyntaxException (com.evolveum.axiom.lang.spi.AxiomSyntaxException)1 AxiomEnabledSchemaRegistry (com.evolveum.midpoint.prism.impl.schema.axiom.AxiomEnabledSchemaRegistry)1 IOException (java.io.IOException)1