Search in sources :

Example 1 with KnowledgeSource

use of org.kie.dmn.model.api.KnowledgeSource in project drools by kiegroup.

the class KnowledgeSourceConverter method writeChildren.

@Override
protected void writeChildren(HierarchicalStreamWriter writer, MarshallingContext context, Object parent) {
    super.writeChildren(writer, context, parent);
    KnowledgeSource ks = (KnowledgeSource) parent;
    for (AuthorityRequirement ar : ks.getAuthorityRequirement()) {
        writeChildrenNode(writer, context, ar, AUTHORITY_REQUIREMENT);
    }
    if (ks.getType() != null)
        writeChildrenNode(writer, context, ks.getType(), TYPE);
    if (ks.getOwner() != null)
        writeChildrenNode(writer, context, ks.getOwner(), OWNER);
}
Also used : TKnowledgeSource(org.kie.dmn.model.v1_1.TKnowledgeSource) KnowledgeSource(org.kie.dmn.model.api.KnowledgeSource) AuthorityRequirement(org.kie.dmn.model.api.AuthorityRequirement)

Example 2 with KnowledgeSource

use of org.kie.dmn.model.api.KnowledgeSource in project drools by kiegroup.

the class KnowledgeSourceConverter method writeChildren.

@Override
protected void writeChildren(HierarchicalStreamWriter writer, MarshallingContext context, Object parent) {
    super.writeChildren(writer, context, parent);
    KnowledgeSource ks = (KnowledgeSource) parent;
    for (AuthorityRequirement ar : ks.getAuthorityRequirement()) {
        writeChildrenNode(writer, context, ar, AUTHORITY_REQUIREMENT);
    }
    if (ks.getType() != null)
        writeChildrenNode(writer, context, ks.getType(), TYPE);
    if (ks.getOwner() != null)
        writeChildrenNode(writer, context, ks.getOwner(), OWNER);
}
Also used : TKnowledgeSource(org.kie.dmn.model.v1_2.TKnowledgeSource) KnowledgeSource(org.kie.dmn.model.api.KnowledgeSource) AuthorityRequirement(org.kie.dmn.model.api.AuthorityRequirement)

Example 3 with KnowledgeSource

use of org.kie.dmn.model.api.KnowledgeSource in project drools by kiegroup.

the class KnowledgeSourceConverter method writeAttributes.

@Override
protected void writeAttributes(HierarchicalStreamWriter writer, Object parent) {
    super.writeAttributes(writer, parent);
    KnowledgeSource ks = (KnowledgeSource) parent;
    if (ks.getLocationURI() != null)
        writer.addAttribute(LOCATION_URI, ks.getLocationURI());
}
Also used : KnowledgeSource(org.kie.dmn.model.api.KnowledgeSource) TKnowledgeSource(org.kie.dmn.model.v1_4.TKnowledgeSource)

Example 4 with KnowledgeSource

use of org.kie.dmn.model.api.KnowledgeSource in project drools by kiegroup.

the class KnowledgeSourceConverter method writeChildren.

@Override
protected void writeChildren(HierarchicalStreamWriter writer, MarshallingContext context, Object parent) {
    super.writeChildren(writer, context, parent);
    KnowledgeSource ks = (KnowledgeSource) parent;
    for (AuthorityRequirement ar : ks.getAuthorityRequirement()) {
        writeChildrenNode(writer, context, ar, AUTHORITY_REQUIREMENT);
    }
    if (ks.getType() != null)
        writeChildrenNode(writer, context, ks.getType(), TYPE);
    if (ks.getOwner() != null)
        writeChildrenNode(writer, context, ks.getOwner(), OWNER);
}
Also used : KnowledgeSource(org.kie.dmn.model.api.KnowledgeSource) TKnowledgeSource(org.kie.dmn.model.v1_4.TKnowledgeSource) AuthorityRequirement(org.kie.dmn.model.api.AuthorityRequirement)

Example 5 with KnowledgeSource

use of org.kie.dmn.model.api.KnowledgeSource in project drools by kiegroup.

the class KnowledgeSourceConverter method assignAttributes.

@Override
protected void assignAttributes(HierarchicalStreamReader reader, Object parent) {
    super.assignAttributes(reader, parent);
    KnowledgeSource ks = (KnowledgeSource) parent;
    String locationUri = reader.getAttribute(LOCATION_URI);
    ks.setLocationURI(locationUri);
}
Also used : KnowledgeSource(org.kie.dmn.model.api.KnowledgeSource) TKnowledgeSource(org.kie.dmn.model.v1_4.TKnowledgeSource)

Aggregations

KnowledgeSource (org.kie.dmn.model.api.KnowledgeSource)16 Artifact (org.kie.dmn.model.api.Artifact)4 Association (org.kie.dmn.model.api.Association)4 AuthorityRequirement (org.kie.dmn.model.api.AuthorityRequirement)4 BusinessContextElement (org.kie.dmn.model.api.BusinessContextElement)4 BusinessKnowledgeModel (org.kie.dmn.model.api.BusinessKnowledgeModel)4 DRGElement (org.kie.dmn.model.api.DRGElement)4 Decision (org.kie.dmn.model.api.Decision)4 Definitions (org.kie.dmn.model.api.Definitions)4 ElementCollection (org.kie.dmn.model.api.ElementCollection)4 Import (org.kie.dmn.model.api.Import)4 InputData (org.kie.dmn.model.api.InputData)4 ItemDefinition (org.kie.dmn.model.api.ItemDefinition)4 OrganizationUnit (org.kie.dmn.model.api.OrganizationUnit)4 PerformanceIndicator (org.kie.dmn.model.api.PerformanceIndicator)4 TextAnnotation (org.kie.dmn.model.api.TextAnnotation)4 DecisionService (org.kie.dmn.model.api.DecisionService)3 TKnowledgeSource (org.kie.dmn.model.v1_1.TKnowledgeSource)3 TKnowledgeSource (org.kie.dmn.model.v1_2.TKnowledgeSource)3 TKnowledgeSource (org.kie.dmn.model.v1_3.TKnowledgeSource)3