Search in sources :

Example 1 with ReaderInputStream

use of org.apache.tools.ant.util.ReaderInputStream in project kie-wb-common by kiegroup.

the class DMNMarshallerStandaloneTest method roundTripUnmarshalMarshalThenUnmarshalDMNexpectingErrors.

private ErrorsAndDMNModelAsSerialized roundTripUnmarshalMarshalThenUnmarshalDMNexpectingErrors(InputStream dmnXmlInputStream) throws IOException {
    String xml = null;
    try (BufferedReader buffer = new BufferedReader(new InputStreamReader(dmnXmlInputStream))) {
        xml = buffer.lines().collect(Collectors.joining("\n"));
    } catch (Exception e) {
        throw new RuntimeException("test utility method roundTripUnmarshalMarshalThenUnmarshalDMN failed to read XML content.", e);
    }
    LOG.debug("ORIGINAL xml:\n{}\n", xml);
    final List<Message> messages0 = kieBuilderMessagesUsingDMNXML(xml);
    assertTrue("The DMN XML content did NOT result in compilation errors and this test method expected errors to be detected. If this was intentional use test method roundTripUnmarshalMarshalThenUnmarshalDMN", messages0.stream().filter(m -> m.getLevel().equals(Message.Level.ERROR)).count() > 0);
    DMNMarshallerStandalone m = getDMNMarshaller();
    // first unmarshal from DMN XML to Stunner DMN Graph
    @SuppressWarnings("unchecked") Graph<?, Node<?, ?>> g = m.unmarshall(createMetadata(), new ReaderInputStream(new StringReader(xml)));
    // round trip to Stunner DMN Graph back to DMN XML
    DiagramImpl diagram = createDiagram();
    diagram.setGraph(g);
    String mString = m.marshall(diagram);
    LOG.debug("MARSHALLED ROUNDTRIP RESULTING xml:\n{}\n", mString);
    // now unmarshal once more, from the marshalled just done above, into a DMNRuntime
    final List<Message> result = kieBuilderMessagesUsingDMNXML(mString);
    assertTrue("The DMN XML content did NOT result in compilation errors and this test method expected errors to be detected. If this was intentional use test method roundTripUnmarshalMarshalThenUnmarshalDMN", messages0.stream().filter(msg -> msg.getLevel().equals(Message.Level.ERROR)).count() > 0);
    Definitions definitions = DMNMarshallerFactory.newDefaultMarshaller().unmarshal(mString);
    return new ErrorsAndDMNModelAsSerialized(result, definitions);
}
Also used : Arrays(java.util.Arrays) DMNMessage(org.kie.dmn.api.core.DMNMessage) Edge(org.kie.workbench.common.stunner.core.graph.Edge) TInputData(org.kie.dmn.model.v1_2.TInputData) StringUtils(org.apache.commons.lang3.StringUtils) Collections.singletonList(java.util.Collections.singletonList) BigDecimal(java.math.BigDecimal) Bounds(org.kie.dmn.model.api.dmndi.Bounds) Arrays.asList(java.util.Arrays.asList) Map(java.util.Map) TItemDefinition(org.kie.dmn.model.v1_2.TItemDefinition) NamespaceContext(javax.xml.namespace.NamespaceContext) Namespace(org.kie.workbench.common.dmn.api.definition.model.DMNModelInstrumentedBase.Namespace) StringInputStream(org.apache.tools.ant.filters.StringInputStream) Mockito.doReturn(org.mockito.Mockito.doReturn) Diagram(org.kie.workbench.common.stunner.core.diagram.Diagram) HasComponentWidths(org.kie.workbench.common.dmn.api.definition.HasComponentWidths) Point2D(org.kie.workbench.common.stunner.core.graph.content.view.Point2D) BusinessKnowledgeModel(org.kie.workbench.common.dmn.api.definition.model.BusinessKnowledgeModel) Results(org.kie.api.builder.Results) Child(org.kie.workbench.common.stunner.core.graph.content.relationship.Child) ItemDefinition(org.kie.workbench.common.dmn.api.definition.model.ItemDefinition) FunctionKind(org.kie.dmn.model.api.FunctionKind) ArgumentMatchers.anyList(org.mockito.ArgumentMatchers.anyList) BusinessKnowledgeModelNode(org.kie.dmn.api.core.ast.BusinessKnowledgeModelNode) DMNGraphFactoryImpl(org.kie.workbench.common.dmn.api.factory.DMNGraphFactoryImpl) Stream(java.util.stream.Stream) Assert.assertFalse(org.junit.Assert.assertFalse) DMNContext(org.kie.dmn.api.core.DMNContext) KieHelper(org.kie.dmn.core.util.KieHelper) QName(javax.xml.namespace.QName) DMNDiagramUtils(org.kie.workbench.common.dmn.api.graph.DMNDiagramUtils) MockitoJUnitRunner(org.mockito.junit.MockitoJUnitRunner) Mockito.mock(org.mockito.Mockito.mock) DMNDefinitionSet(org.kie.workbench.common.dmn.api.DMNDefinitionSet) XPath(javax.xml.xpath.XPath) DMNStyle(org.kie.dmn.model.api.dmndi.DMNStyle) Point(org.kie.dmn.model.api.dmndi.Point) Connection(org.kie.workbench.common.stunner.core.graph.content.view.Connection) Mock(org.mockito.Mock) RunWith(org.junit.runner.RunWith) Color(org.kie.dmn.model.api.dmndi.Color) Mockito.spy(org.mockito.Mockito.spy) Definitions(org.kie.dmn.model.api.Definitions) ArrayList(java.util.ArrayList) Id(org.kie.workbench.common.dmn.api.property.dmn.Id) Name(org.kie.workbench.common.dmn.api.property.dmn.Name) DMNMarshallerFactory(org.kie.dmn.backend.marshalling.v1x.DMNMarshallerFactory) BiConsumer(java.util.function.BiConsumer) Message(org.kie.api.builder.Message) StreamSupport(java.util.stream.StreamSupport) DMNRuntime(org.kie.dmn.api.core.DMNRuntime) MapIndexBuilder(org.kie.workbench.common.stunner.core.graph.processing.index.map.MapIndexBuilder) MatcherAssert.assertThat(org.hamcrest.MatcherAssert.assertThat) Context(org.kie.workbench.common.dmn.api.definition.model.Context) FunctionDefinition(org.kie.workbench.common.dmn.api.definition.model.FunctionDefinition) CoreMatchers.nullValue(org.hamcrest.CoreMatchers.nullValue) Before(org.junit.Before) BindableAdapterUtils(org.kie.workbench.common.stunner.core.definition.adapter.binding.BindableAdapterUtils) Assert.assertTrue(org.junit.Assert.assertTrue) IOException(java.io.IOException) Test(org.junit.Test) InputData(org.kie.workbench.common.dmn.api.definition.model.InputData) UUID(org.uberfire.commons.uuid.UUID) InputStreamReader(java.io.InputStreamReader) InputDataConverter(org.kie.workbench.common.dmn.backend.definition.v1_1.InputDataConverter) Association(org.kie.workbench.common.dmn.api.definition.model.Association) TDecision(org.kie.dmn.model.v1_2.TDecision) DecisionService(org.kie.workbench.common.dmn.api.definition.model.DecisionService) Graph(org.kie.workbench.common.stunner.core.graph.Graph) Assert.assertNull(org.junit.Assert.assertNull) StringReader(java.io.StringReader) BufferedReader(java.io.BufferedReader) DRGElement(org.kie.dmn.model.api.DRGElement) Assert(org.junit.Assert) Expression(org.kie.workbench.common.dmn.api.definition.model.Expression) MagnetConnection(org.kie.workbench.common.stunner.core.graph.content.view.MagnetConnection) Assert.assertEquals(org.junit.Assert.assertEquals) CoreMatchers.is(org.hamcrest.CoreMatchers.is) TextAnnotation(org.kie.workbench.common.dmn.api.definition.model.TextAnnotation) DecisionTable(org.kie.dmn.model.api.DecisionTable) DecisionConverter(org.kie.workbench.common.dmn.backend.definition.v1_1.DecisionConverter) DefinitionUtils(org.kie.workbench.common.stunner.core.util.DefinitionUtils) XPathExpressionException(javax.xml.xpath.XPathExpressionException) DMNResult(org.kie.dmn.api.core.DMNResult) Spliterators(java.util.Spliterators) LiteralExpression(org.kie.workbench.common.dmn.api.definition.model.LiteralExpression) Assertions.assertThat(org.assertj.core.api.Assertions.assertThat) LoggerFactory(org.slf4j.LoggerFactory) Scanner(java.util.Scanner) DMNEdge(org.kie.dmn.model.api.dmndi.DMNEdge) ViewImpl(org.kie.workbench.common.stunner.core.graph.content.view.ViewImpl) EdgeImpl(org.kie.workbench.common.stunner.core.graph.impl.EdgeImpl) TextAnnotationConverter(org.kie.workbench.common.dmn.backend.definition.v1_1.TextAnnotationConverter) DMNElement(org.kie.workbench.common.dmn.api.definition.model.DMNElement) DMNModel(org.kie.dmn.api.core.DMNModel) DecisionEvaluationStatus(org.kie.dmn.api.core.DMNDecisionResult.DecisionEvaluationStatus) InformationRequirement(org.kie.workbench.common.dmn.api.definition.model.InformationRequirement) DMNMarshallerProducer(org.kie.workbench.common.dmn.backend.producers.DMNMarshallerProducer) TTextAnnotation(org.kie.dmn.model.v1_2.TTextAnnotation) ContextEntry(org.kie.workbench.common.dmn.api.definition.model.ContextEntry) Collections.emptyList(java.util.Collections.emptyList) Collection(java.util.Collection) Import(org.kie.dmn.model.api.Import) DMNDiagram(org.kie.workbench.common.dmn.api.definition.model.DMNDiagram) Collectors(java.util.stream.Collectors) DMNRuntimeUtil(org.kie.dmn.core.util.DMNRuntimeUtil) Metadata(org.kie.workbench.common.stunner.core.diagram.Metadata) DiagramElement(org.kie.dmn.model.api.dmndi.DiagramElement) List(java.util.List) DMNShape(org.kie.dmn.model.api.dmndi.DMNShape) InformationItem(org.kie.workbench.common.dmn.api.definition.model.InformationItem) DMNImportTypes(org.kie.workbench.common.dmn.api.editors.included.DMNImportTypes) BuiltInType(org.kie.workbench.common.dmn.api.property.dmn.types.BuiltInType) Optional(java.util.Optional) MappingContextSingleton(org.jboss.errai.marshalling.server.MappingContextSingleton) Spliterator(java.util.Spliterator) Node(org.kie.workbench.common.stunner.core.graph.Node) DMNDecisionResult(org.kie.dmn.api.core.DMNDecisionResult) ArgumentMatchers.any(org.mockito.ArgumentMatchers.any) PMMLDocumentMetadata(org.kie.workbench.common.dmn.api.editors.included.PMMLDocumentMetadata) ControlPoint(org.kie.workbench.common.stunner.core.graph.content.view.ControlPoint) HashMap(java.util.HashMap) OptionalInt(java.util.OptionalInt) View(org.kie.workbench.common.stunner.core.graph.content.view.View) Level(org.kie.api.builder.Message.Level) ImportPMML(org.kie.workbench.common.dmn.api.definition.model.ImportPMML) Bound(org.kie.workbench.common.stunner.core.graph.content.Bound) ReaderInputStream(org.apache.tools.ant.util.ReaderInputStream) KieServices(org.kie.api.KieServices) DiagramImpl(org.kie.workbench.common.stunner.core.diagram.DiagramImpl) KnowledgeRequirement(org.kie.workbench.common.dmn.api.definition.model.KnowledgeRequirement) Assume(org.junit.Assume) InputSource(org.xml.sax.InputSource) Logger(org.slf4j.Logger) Iterator(java.util.Iterator) XMLEncoderDiagramMetadataMarshaller(org.kie.workbench.common.stunner.core.backend.service.XMLEncoderDiagramMetadataMarshaller) Assert.assertNotNull(org.junit.Assert.assertNotNull) KieContainer(org.kie.api.runtime.KieContainer) DMNMarshallerImportsHelperStandalone(org.kie.workbench.common.dmn.backend.common.DMNMarshallerImportsHelperStandalone) StunnerTestingGraphBackendAPI(org.kie.workbench.common.stunner.core.backend.StunnerTestingGraphBackendAPI) DMNMarshallerStandalone.getDmnElementRef(org.kie.workbench.common.dmn.backend.DMNMarshallerStandalone.getDmnElementRef) Mockito.when(org.mockito.Mockito.when) DefinitionSet(org.kie.workbench.common.stunner.core.graph.content.definition.DefinitionSet) ViewConnector(org.kie.workbench.common.stunner.core.graph.content.view.ViewConnector) AuthorityRequirement(org.kie.workbench.common.dmn.api.definition.model.AuthorityRequirement) Mockito.verify(org.mockito.Mockito.verify) Consumer(java.util.function.Consumer) DMNModelInstrumentedBase(org.kie.workbench.common.dmn.api.definition.model.DMNModelInstrumentedBase) XPathFactory(javax.xml.xpath.XPathFactory) AbstractMap(java.util.AbstractMap) ImportDMN(org.kie.workbench.common.dmn.api.definition.model.ImportDMN) KnowledgeSource(org.kie.workbench.common.dmn.api.definition.model.KnowledgeSource) Decision(org.kie.workbench.common.dmn.api.definition.model.Decision) Collections(java.util.Collections) InputStream(java.io.InputStream) InputStreamReader(java.io.InputStreamReader) DMNMessage(org.kie.dmn.api.core.DMNMessage) Message(org.kie.api.builder.Message) DiagramImpl(org.kie.workbench.common.stunner.core.diagram.DiagramImpl) BusinessKnowledgeModelNode(org.kie.dmn.api.core.ast.BusinessKnowledgeModelNode) Node(org.kie.workbench.common.stunner.core.graph.Node) Definitions(org.kie.dmn.model.api.Definitions) IOException(java.io.IOException) XPathExpressionException(javax.xml.xpath.XPathExpressionException) ReaderInputStream(org.apache.tools.ant.util.ReaderInputStream) BufferedReader(java.io.BufferedReader) StringReader(java.io.StringReader)

Example 2 with ReaderInputStream

use of org.apache.tools.ant.util.ReaderInputStream in project intellij-community by JetBrains.

the class GradleResourceFileProcessor method transform.

private static InputStream transform(List<ResourceRootFilter> filters, FileInputStream original, Ref<File> outputFileRef, CompileContext context) {
    final InputStreamReader streamReader = new InputStreamReader(original);
    final Reader newReader = new ChainingFilterTransformer(context, filters, outputFileRef).transform(streamReader);
    return streamReader == newReader ? original : new ReaderInputStream(newReader);
}
Also used : ReaderInputStream(org.apache.tools.ant.util.ReaderInputStream)

Example 3 with ReaderInputStream

use of org.apache.tools.ant.util.ReaderInputStream in project ant by apache.

the class Redirector method createStreams.

/**
 * Create the input, error and output streams based on the configuration
 * options.
 */
public void createStreams() {
    synchronized (outMutex) {
        outStreams();
        if (alwaysLogOut || outputStream == null) {
            final OutputStream outputLog = new LogOutputStream(managingTask, Project.MSG_INFO);
            outputStream = (outputStream == null) ? outputLog : new TeeOutputStream(outputLog, outputStream);
        }
        if ((outputFilterChains != null && outputFilterChains.size() > 0) || !(outputEncoding.equalsIgnoreCase(inputEncoding))) {
            try {
                final LeadPipeInputStream snk = new LeadPipeInputStream();
                snk.setManagingComponent(managingTask);
                InputStream outPumpIn = snk;
                Reader reader = new InputStreamReader(outPumpIn, inputEncoding);
                if (outputFilterChains != null && outputFilterChains.size() > 0) {
                    final ChainReaderHelper helper = new ChainReaderHelper();
                    helper.setProject(managingTask.getProject());
                    helper.setPrimaryReader(reader);
                    helper.setFilterChains(outputFilterChains);
                    reader = helper.getAssembledReader();
                }
                outPumpIn = new ReaderInputStream(reader, outputEncoding);
                final Thread t = new Thread(threadGroup, new StreamPumper(outPumpIn, outputStream, true), "output pumper");
                t.setPriority(Thread.MAX_PRIORITY);
                outputStream = new PipedOutputStream(snk);
                t.start();
            } catch (final IOException eyeOhEx) {
                throw new BuildException("error setting up output stream", eyeOhEx);
            }
        }
    }
    synchronized (errMutex) {
        errorStreams();
        if (alwaysLogErr || errorStream == null) {
            final OutputStream errorLog = new LogOutputStream(managingTask, Project.MSG_WARN);
            errorStream = (errorStream == null) ? errorLog : new TeeOutputStream(errorLog, errorStream);
        }
        if ((errorFilterChains != null && errorFilterChains.size() > 0) || !(errorEncoding.equalsIgnoreCase(inputEncoding))) {
            try {
                final LeadPipeInputStream snk = new LeadPipeInputStream();
                snk.setManagingComponent(managingTask);
                InputStream errPumpIn = snk;
                Reader reader = new InputStreamReader(errPumpIn, inputEncoding);
                if (errorFilterChains != null && errorFilterChains.size() > 0) {
                    final ChainReaderHelper helper = new ChainReaderHelper();
                    helper.setProject(managingTask.getProject());
                    helper.setPrimaryReader(reader);
                    helper.setFilterChains(errorFilterChains);
                    reader = helper.getAssembledReader();
                }
                errPumpIn = new ReaderInputStream(reader, errorEncoding);
                final Thread t = new Thread(threadGroup, new StreamPumper(errPumpIn, errorStream, true), "error pumper");
                t.setPriority(Thread.MAX_PRIORITY);
                errorStream = new PipedOutputStream(snk);
                t.start();
            } catch (final IOException eyeOhEx) {
                throw new BuildException("error setting up error stream", eyeOhEx);
            }
        }
    }
    synchronized (inMutex) {
        // whatever warnings are needed
        if (input != null && input.length > 0) {
            managingTask.log("Redirecting input from file" + ((input.length == 1) ? "" : "s"), Project.MSG_VERBOSE);
            try {
                inputStream = new ConcatFileInputStream(input);
            } catch (final IOException eyeOhEx) {
                throw new BuildException(eyeOhEx);
            }
            ((ConcatFileInputStream) inputStream).setManagingComponent(managingTask);
        } else if (inputString != null) {
            final StringBuffer buf = new StringBuffer("Using input ");
            if (logInputString) {
                buf.append('"').append(inputString).append('"');
            } else {
                buf.append("string");
            }
            managingTask.log(buf.toString(), Project.MSG_VERBOSE);
            inputStream = new ByteArrayInputStream(inputString.getBytes());
        }
        if (inputStream != null && inputFilterChains != null && inputFilterChains.size() > 0) {
            final ChainReaderHelper helper = new ChainReaderHelper();
            helper.setProject(managingTask.getProject());
            try {
                helper.setPrimaryReader(new InputStreamReader(inputStream, inputEncoding));
            } catch (final IOException eyeOhEx) {
                throw new BuildException("error setting up input stream", eyeOhEx);
            }
            helper.setFilterChains(inputFilterChains);
            inputStream = new ReaderInputStream(helper.getAssembledReader(), inputEncoding);
        }
    }
}
Also used : TeeOutputStream(org.apache.tools.ant.util.TeeOutputStream) InputStreamReader(java.io.InputStreamReader) LeadPipeInputStream(org.apache.tools.ant.util.LeadPipeInputStream) ByteArrayInputStream(java.io.ByteArrayInputStream) ReaderInputStream(org.apache.tools.ant.util.ReaderInputStream) ConcatFileInputStream(org.apache.tools.ant.util.ConcatFileInputStream) InputStream(java.io.InputStream) ByteArrayOutputStream(java.io.ByteArrayOutputStream) KeepAliveOutputStream(org.apache.tools.ant.util.KeepAliveOutputStream) OutputStream(java.io.OutputStream) LazyFileOutputStream(org.apache.tools.ant.util.LazyFileOutputStream) PipedOutputStream(java.io.PipedOutputStream) TeeOutputStream(org.apache.tools.ant.util.TeeOutputStream) Reader(java.io.Reader) InputStreamReader(java.io.InputStreamReader) StringReader(java.io.StringReader) BufferedReader(java.io.BufferedReader) PipedOutputStream(java.io.PipedOutputStream) IOException(java.io.IOException) ConcatFileInputStream(org.apache.tools.ant.util.ConcatFileInputStream) ReaderInputStream(org.apache.tools.ant.util.ReaderInputStream) ByteArrayInputStream(java.io.ByteArrayInputStream) LeadPipeInputStream(org.apache.tools.ant.util.LeadPipeInputStream) ChainReaderHelper(org.apache.tools.ant.filters.util.ChainReaderHelper) BuildException(org.apache.tools.ant.BuildException)

Example 4 with ReaderInputStream

use of org.apache.tools.ant.util.ReaderInputStream in project kie-wb-common by kiegroup.

the class DMNMarshallerStandaloneTest method test_decisionservice2_1outputDecision1encapsulatedDecision.

@Test
public void test_decisionservice2_1outputDecision1encapsulatedDecision() throws IOException {
    final DMNMarshallerStandalone m = getDMNMarshaller();
    @SuppressWarnings("unchecked") final Graph<?, Node<?, ?>> g = m.unmarshall(createMetadata(), this.getClass().getResourceAsStream("/DROOLS-3372bis.dmn"));
    Node<?, ?> nodeDS = g.getNode("_659a06e2-ae80-496c-8783-f790a640bb49");
    Node<?, ?> nodeDecisionPostfix = g.getNode("_3a69915a-30af-4de3-a07f-6be514f53caa");
    Node<?, ?> nodeDecisionPrefix = g.getNode("_afce4fb3-9a7c-4791-bbfe-63d4b76bd61a");
    moveNode(nodeDecisionPostfix, 0, -280);
    makeNodeChildOf(nodeDecisionPostfix, nodeDS);
    moveNode(nodeDecisionPrefix, 0, -170);
    makeNodeChildOf(nodeDecisionPrefix, nodeDS);
    DiagramImpl diagram = createDiagram();
    diagram.setGraph(g);
    String mString = m.marshall(diagram);
    LOG.debug("MARSHALLED ROUNDTRIP RESULTING xml:\n{}\n", mString);
    roundTripUnmarshalThenMarshalUnmarshal(new ReaderInputStream(new StringReader(mString)), this::check_decisionservice2_1outputDecision1encapsulatedDecision);
}
Also used : ReaderInputStream(org.apache.tools.ant.util.ReaderInputStream) DiagramImpl(org.kie.workbench.common.stunner.core.diagram.DiagramImpl) BusinessKnowledgeModelNode(org.kie.dmn.api.core.ast.BusinessKnowledgeModelNode) Node(org.kie.workbench.common.stunner.core.graph.Node) StringReader(java.io.StringReader) Test(org.junit.Test)

Example 5 with ReaderInputStream

use of org.apache.tools.ant.util.ReaderInputStream in project kie-wb-common by kiegroup.

the class DMNMarshallerStandaloneTest method test_decisionservice_1outputDecision.

@Test
public void test_decisionservice_1outputDecision() throws IOException {
    final DMNMarshallerStandalone m = getDMNMarshaller();
    @SuppressWarnings("unchecked") final Graph<?, Node<?, ?>> g = m.unmarshall(createMetadata(), this.getClass().getResourceAsStream("/DROOLS-3372.dmn"));
    Node<?, ?> nodeDS = g.getNode("_659a06e2-ae80-496c-8783-f790a640bb49");
    Node<?, ?> nodeDecisionPostfix = g.getNode("_3a69915a-30af-4de3-a07f-6be514f53caa");
    moveNode(nodeDecisionPostfix, 0, -280);
    makeNodeChildOf(nodeDecisionPostfix, nodeDS);
    DiagramImpl diagram = createDiagram();
    diagram.setGraph(g);
    String mString = m.marshall(diagram);
    LOG.debug("MARSHALLED ROUNDTRIP RESULTING xml:\n{}\n", mString);
    roundTripUnmarshalThenMarshalUnmarshal(new ReaderInputStream(new StringReader(mString)), this::check_decisionservice_1outputDecision);
}
Also used : ReaderInputStream(org.apache.tools.ant.util.ReaderInputStream) DiagramImpl(org.kie.workbench.common.stunner.core.diagram.DiagramImpl) BusinessKnowledgeModelNode(org.kie.dmn.api.core.ast.BusinessKnowledgeModelNode) Node(org.kie.workbench.common.stunner.core.graph.Node) StringReader(java.io.StringReader) Test(org.junit.Test)

Aggregations

ReaderInputStream (org.apache.tools.ant.util.ReaderInputStream)8 StringReader (java.io.StringReader)7 BusinessKnowledgeModelNode (org.kie.dmn.api.core.ast.BusinessKnowledgeModelNode)5 DiagramImpl (org.kie.workbench.common.stunner.core.diagram.DiagramImpl)5 Node (org.kie.workbench.common.stunner.core.graph.Node)5 Test (org.junit.Test)4 BufferedReader (java.io.BufferedReader)3 IOException (java.io.IOException)3 InputStreamReader (java.io.InputStreamReader)3 InputStream (java.io.InputStream)2 XPathExpressionException (javax.xml.xpath.XPathExpressionException)2 ByteArrayInputStream (java.io.ByteArrayInputStream)1 ByteArrayOutputStream (java.io.ByteArrayOutputStream)1 OutputStream (java.io.OutputStream)1 PipedOutputStream (java.io.PipedOutputStream)1 Reader (java.io.Reader)1 BigDecimal (java.math.BigDecimal)1 AbstractMap (java.util.AbstractMap)1 ArrayList (java.util.ArrayList)1 Arrays (java.util.Arrays)1