Search in sources :

Example 1 with KnowledgeSource

use of org.camunda.bpm.model.dmn.instance.KnowledgeSource in project camunda-dmn-model by camunda.

the class KnowledgeSourceImpl method registerType.

public static void registerType(ModelBuilder modelBuilder) {
    ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(KnowledgeSource.class, DMN_ELEMENT_KNOWLEDGE_SOURCE).namespaceUri(DMN11_NS).extendsType(DrgElement.class).instanceProvider(new ModelTypeInstanceProvider<KnowledgeSource>() {

        public KnowledgeSource newInstance(ModelTypeInstanceContext instanceContext) {
            return new KnowledgeSourceImpl(instanceContext);
        }
    });
    locationUriAttribute = typeBuilder.stringAttribute(DMN_ATTRIBUTE_LOCATION_URI).build();
    SequenceBuilder sequenceBuilder = typeBuilder.sequence();
    authorityRequirementCollection = sequenceBuilder.elementCollection(AuthorityRequirement.class).build();
    typeChild = sequenceBuilder.element(Type.class).build();
    ownerRef = sequenceBuilder.element(OwnerReference.class).uriElementReference(OrganizationUnit.class).build();
    typeBuilder.build();
}
Also used : OwnerReference(org.camunda.bpm.model.dmn.instance.OwnerReference) DrgElement(org.camunda.bpm.model.dmn.instance.DrgElement) KnowledgeSource(org.camunda.bpm.model.dmn.instance.KnowledgeSource) SequenceBuilder(org.camunda.bpm.model.xml.type.child.SequenceBuilder) ModelElementTypeBuilder(org.camunda.bpm.model.xml.type.ModelElementTypeBuilder) ModelTypeInstanceContext(org.camunda.bpm.model.xml.impl.instance.ModelTypeInstanceContext)

Aggregations

DrgElement (org.camunda.bpm.model.dmn.instance.DrgElement)1 KnowledgeSource (org.camunda.bpm.model.dmn.instance.KnowledgeSource)1 OwnerReference (org.camunda.bpm.model.dmn.instance.OwnerReference)1 ModelTypeInstanceContext (org.camunda.bpm.model.xml.impl.instance.ModelTypeInstanceContext)1 ModelElementTypeBuilder (org.camunda.bpm.model.xml.type.ModelElementTypeBuilder)1 SequenceBuilder (org.camunda.bpm.model.xml.type.child.SequenceBuilder)1