1.1 --- a/iep.model/src/org/netbeans/modules/iep/model/Component.java Tue Jul 24 12:55:11 2007 +0000
1.2 +++ b/iep.model/src/org/netbeans/modules/iep/model/Component.java Wed Jul 25 02:00:17 2007 +0000
1.3 @@ -1,5 +1,7 @@
1.4 package org.netbeans.modules.iep.model;
1.5
1.6 +import java.util.Collection;
1.7 +import java.util.List;
1.8 import org.netbeans.modules.xml.wsdl.model.spi.GenericExtensibilityElement.StringAttribute;
1.9 import org.netbeans.modules.xml.xam.dom.Attribute;
1.10
1.11 @@ -32,5 +34,8 @@
1.12 String getType();
1.13
1.14 void setType(String type);
1.15 +
1.16 + List<Component> getChildComponents();
1.17
1.18 + List<Property> getProperties();
1.19 }
2.1 --- a/iep.model/src/org/netbeans/modules/iep/model/IEPModel.java Tue Jul 24 12:55:11 2007 +0000
2.2 +++ b/iep.model/src/org/netbeans/modules/iep/model/IEPModel.java Wed Jul 25 02:00:17 2007 +0000
2.3 @@ -34,8 +34,8 @@
2.4 */
2.5 public abstract class IEPModel extends AbstractDocumentModel<IEPComponent> implements Referenceable {
2.6
2.7 - public static String WLM_NAMESPACE = "http://jbi.com.sun/wfse";
2.8 - public static String WLM_TASKS = "tasks";
2.9 + public static String IEP_NAMESPACE = "http://jbi.com.sun/iep";
2.10 + public static String IEP_COMPONENT = "component";
2.11
2.12 protected IEPModel(ModelSource source) {
2.13 super(source);
2.14 @@ -77,4 +77,5 @@
2.15 // */
2.16 // <T extends ReferenceableWLMComponent> T findComponetnByName(QName name, Class<T> type);
2.17
2.18 + public abstract Component getComponent();
2.19 }
3.1 --- a/iep.model/src/org/netbeans/modules/iep/model/impl/ComponentImpl.java Tue Jul 24 12:55:11 2007 +0000
3.2 +++ b/iep.model/src/org/netbeans/modules/iep/model/impl/ComponentImpl.java Wed Jul 25 02:00:17 2007 +0000
3.3 @@ -16,11 +16,14 @@
3.4 */
3.5 package org.netbeans.modules.iep.model.impl;
3.6
3.7 +import java.util.Collection;
3.8 +import java.util.List;
3.9 import org.netbeans.modules.iep.model.Component;
3.10 import org.netbeans.modules.iep.model.IEPComponent;
3.11 import org.netbeans.modules.iep.model.IEPModel;
3.12 import org.netbeans.modules.iep.model.IEPQNames;
3.13 import org.netbeans.modules.iep.model.IEPVisitor;
3.14 +import org.netbeans.modules.iep.model.Property;
3.15 import org.netbeans.modules.xml.wsdl.model.spi.GenericExtensibilityElement.StringAttribute;
3.16 import org.w3c.dom.Element;
3.17
3.18 @@ -84,5 +87,13 @@
3.19 setAttribute(TYPE_PROPERTY, ATTR_TYPE, type);
3.20 }
3.21
3.22 + public List<Component> getChildComponents() {
3.23 + return getChildren(Component.class);
3.24 + }
3.25 +
3.26 + public List<Property> getProperties() {
3.27 + return getChildren(Property.class);
3.28 + }
3.29 +
3.30
3.31 }
4.1 --- a/iep.model/src/org/netbeans/modules/iep/model/impl/IEPModelImpl.java Tue Jul 24 12:55:11 2007 +0000
4.2 +++ b/iep.model/src/org/netbeans/modules/iep/model/impl/IEPModelImpl.java Wed Jul 25 02:00:17 2007 +0000
4.3 @@ -34,7 +34,7 @@
4.4 import org.w3c.dom.Node;
4.5
4.6 public class IEPModelImpl extends IEPModel {
4.7 - private Component tasks;
4.8 + private Component rootComponent;
4.9
4.10 private IEPComponentFactory wcf;
4.11
4.12 @@ -47,11 +47,12 @@
4.13 public IEPComponent createRootComponent(Element root) {
4.14 // TODO Auto-generated method stub
4.15 String namespace = root.getNamespaceURI();
4.16 - if ( IEPModel.WLM_NAMESPACE.equals(namespace) &&
4.17 - IEPModel.WLM_TASKS.equals( root.getLocalName() ) )
4.18 + //if ( IEPModel.IEP_NAMESPACE.equals(namespace) &&
4.19 + // IEPModel.IEP_COMPONENT.equals( root.getLocalName() ))
4.20 + if (IEPModel.IEP_COMPONENT.equals( root.getLocalName() ))
4.21 {
4.22 - //tasks = new TasksImpl (this, root);
4.23 - return tasks;
4.24 + rootComponent = new ComponentImpl (this, root);
4.25 + return rootComponent;
4.26 }
4.27 return null;
4.28 }
4.29 @@ -111,16 +112,13 @@
4.30
4.31 public IEPComponent getRootComponent() {
4.32 // TODO Auto-generated method stub
4.33 - return tasks;
4.34 + return rootComponent;
4.35 }
4.36 -
4.37 - public Component getComponent() {
4.38 - return tasks;
4.39 - }
4.40 -
4.41 - public void setTasks(Component tasks) {
4.42 - this.tasks = tasks;
4.43 - }
4.44 +
4.45 + public Component getComponent() {
4.46 + return rootComponent;
4.47 + }
4.48 +
4.49
4.50 public ChangeInfo prepareChangeInfo(List<Node> pathToRoot) {
4.51 ChangeInfo change = super.prepareChangeInfo(pathToRoot);
4.52 @@ -132,4 +130,6 @@
4.53 return change;
4.54 }
4.55
4.56 +
4.57 +
4.58 }
5.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
5.2 +++ b/iep.model/test/unit/src/org/netbeans/modules/iep/model/common/IEPModelCommonTest.java Wed Jul 25 02:00:17 2007 +0000
5.3 @@ -0,0 +1,113 @@
5.4 +/*
5.5 + * WLMModelCommonTest.java
5.6 + * JUnit based test
5.7 + *
5.8 + * Created on May 31, 2007, 3:10 PM
5.9 + */
5.10 +
5.11 +package org.netbeans.modules.iep.model.common;
5.12 +
5.13 +import java.io.InputStream;
5.14 +import java.net.URI;
5.15 +
5.16 +import junit.framework.TestCase;
5.17 +import org.netbeans.modules.iep.model.IEPComponent;
5.18 +import org.netbeans.modules.iep.model.IEPComponentFactory;
5.19 +import org.netbeans.modules.iep.model.IEPModel;
5.20 +import org.netbeans.modules.iep.model.impl.IEPComponentFactoryImpl;
5.21 +import org.netbeans.modules.iep.model.util.XmlUtil;
5.22 +
5.23 +import org.netbeans.modules.xml.wsdl.model.Operation;
5.24 +import org.netbeans.modules.xml.wsdl.model.WSDLModel;
5.25 +import org.netbeans.modules.xml.xam.dom.AbstractDocumentModel;
5.26 +import org.w3c.dom.Element;
5.27 +import org.xml.sax.InputSource;
5.28 +
5.29 +/**
5.30 + *
5.31 + *
5.32 + */
5.33 +public class IEPModelCommonTest extends TestCase {
5.34 +
5.35 +
5.36 +
5.37 + public IEPModelCommonTest(String testName) {
5.38 + super(testName);
5.39 + }
5.40 +
5.41 + protected void setUp() throws Exception {
5.42 + super.setUp();
5.43 + }
5.44 +
5.45 + protected void tearDown() throws Exception {
5.46 +
5.47 + }
5.48 +
5.49 + public void testModification () throws Exception {
5.50 + URI wfFile = getClass().getResource("data/test.iep").toURI();
5.51 + InputStream is = getClass().getResourceAsStream("data/test.iep");
5.52 + IEPModelProvider provider = new IEPModelProviderInsideIde ();
5.53 + IEPModel model = provider.getWLMModel(wfFile);
5.54 +
5.55 + IEPComponentFactory factory = new IEPComponentFactoryImpl (model);
5.56 +
5.57 + /*
5.58 + TTasks tasks =factory.createTasks(model);
5.59 + model.setTasks(tasks);
5.60 + TTask task = factory.createTask(model);
5.61 + model.startTransaction();
5.62 + tasks.addTask(task);
5.63 + assertNull(task.getOperationAsString());
5.64 + WSDLModel newModel = TestCatalogModel.getDefault().getWSDLModel(NamespaceLocation.PURCHASE_ORDER);
5.65 + Operation opt = newModel.getDefinitions().getPortTypes().iterator().next().getOperations().iterator().next();
5.66 + task.setOperation(new OperationReference(opt, TaskImpl.class.cast (task)));
5.67 + assertEquals("ns0:ApprovePurchase", task.getOperationAsString());
5.68 + model.endTransaction();
5.69 + assertEquals(1, tasks.getImports().size());
5.70 + */
5.71 + }
5.72 +
5.73 +
5.74 +
5.75 + public void testCreateModel() throws Exception{
5.76 + URI wfFile = getClass().getResource("data/test.iep").toURI();
5.77 + InputStream is = getClass().getResourceAsStream("data/test.iep");
5.78 + InputSource source = new InputSource (is);
5.79 + Element rootEl = XmlUtil.createDocument(true, source).getDocumentElement();
5.80 + IEPModelProvider provider = new IEPModelProviderInsideIde ();
5.81 + IEPModel model = provider.getWLMModel(wfFile);
5.82 + model.sync();
5.83 + assertNotNull(model);
5.84 + IEPComponent root = ((AbstractDocumentModel <IEPComponent>) model).createRootComponent(rootEl);
5.85 +
5.86 + //assert properites on the root component
5.87 + assertEquals(1, model.getComponent().getProperties().size());
5.88 +
5.89 + //assert child components on the root component
5.90 + assertEquals(4, model.getComponent().getChildComponents().size());
5.91 +
5.92 + /*
5.93 + assertEquals(1, model.getTasks().getTasks ().size());
5.94 + TTasks tasks = model.getTasks();
5.95 + TTask task = tasks.getTasks().get(0);
5.96 + assertEquals("http://jbi.com.sun/wfse/wsdl/WorkflowApp2/ApprovePurchase", tasks.getTargetNamespace());
5.97 + TImport importEl = tasks.getImports().iterator().next();
5.98 + assertNotNull (importEl.getImportedWSDLModel());
5.99 + assertEquals(1, task.getTimeouts().size());
5.100 + assertNull(task.getTimeouts().get(0).getDuration());
5.101 + assertNotNull(task.getTimeouts().get(0).getDeadline());
5.102 + assertEquals("2006-12-01T23:00:00", task.getTimeouts().get(0).getDeadline().getContent());
5.103 + assertEquals(1, task.getEscalations().size());
5.104 + TAssignment assign = task.getEscalations().get(0).getAssignment();
5.105 + assertEquals(1,assign.getUsers().size());
5.106 + assertEquals(0,assign.getGroups().size());
5.107 + assertEquals(0,assign.getRoles().size());
5.108 + assertEquals(1, assign.getUsers().size());
5.109 + assertEquals("rwaldorf", assign.getUsers().get(0).getContent());
5.110 + assertEquals(1, task.getNotifications().size());
5.111 + assertTrue(task.getOperation().isResolved());
5.112 + assertEquals(1, tasks.getImports().size());
5.113 + */
5.114 + }
5.115 +
5.116 +}
6.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
6.2 +++ b/iep.model/test/unit/src/org/netbeans/modules/iep/model/common/IEPModelProvider.java Wed Jul 25 02:00:17 2007 +0000
6.3 @@ -0,0 +1,31 @@
6.4 +/*
6.5 + * The contents of this file are subject to the terms of the Common Development
6.6 + * and Distribution License (the License). You may not use this file except in
6.7 + * compliance with the License.
6.8 + *
6.9 + * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
6.10 + * or http://www.netbeans.org/cddl.txt.
6.11 + *
6.12 + * When distributing Covered Code, include this CDDL Header Notice in each file
6.13 + * and include the License file at http://www.netbeans.org/cddl.txt.
6.14 + * If applicable, add the following below the CDDL Header, with the fields
6.15 + * enclosed by brackets [] replaced by your own identifying information:
6.16 + * "Portions Copyrighted [year] [name of copyright owner]"
6.17 + *
6.18 + * The Original Software is NetBeans. The Initial Developer of the Original
6.19 + * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
6.20 + * Microsystems, Inc. All Rights Reserved.
6.21 + */
6.22 +package org.netbeans.modules.iep.model.common;
6.23 +
6.24 +import java.net.URI;
6.25 +import org.netbeans.modules.iep.model.IEPModel;
6.26 +
6.27 +/**
6.28 + *
6.29 + *
6.30 + */
6.31 +public interface IEPModelProvider {
6.32 +
6.33 + IEPModel getWLMModel(URI locationURI) throws Exception;
6.34 +}
7.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
7.2 +++ b/iep.model/test/unit/src/org/netbeans/modules/iep/model/common/IEPModelProviderInsideIde.java Wed Jul 25 02:00:17 2007 +0000
7.3 @@ -0,0 +1,149 @@
7.4 +/*
7.5 + * The contents of this file are subject to the terms of the Common Development
7.6 + * and Distribution License (the License). You may not use this file except in
7.7 + * compliance with the License.
7.8 + *
7.9 + * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
7.10 + * or http://www.netbeans.org/cddl.txt.
7.11 + *
7.12 + * When distributing Covered Code, include this CDDL Header Notice in each file
7.13 + * and include the License file at http://www.netbeans.org/cddl.txt.
7.14 + * If applicable, add the following below the CDDL Header, with the fields
7.15 + * enclosed by brackets [] replaced by your own identifying information:
7.16 + * "Portions Copyrighted [year] [name of copyright owner]"
7.17 + *
7.18 + * The Original Software is NetBeans. The Initial Developer of the Original
7.19 + * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
7.20 + * Microsystems, Inc. All Rights Reserved.
7.21 + */
7.22 +package org.netbeans.modules.iep.model.common;
7.23 +
7.24 +import java.io.File;
7.25 +import java.io.FileInputStream;
7.26 +import java.net.URI;
7.27 +import java.util.logging.Logger;
7.28 +
7.29 +import org.netbeans.editor.BaseDocument;
7.30 +import org.netbeans.modules.iep.model.IEPModel;
7.31 +import org.netbeans.modules.iep.model.IEPModelFactory;
7.32 +import org.netbeans.modules.xml.retriever.catalog.impl.CatalogWriteModelImpl;
7.33 +import org.netbeans.modules.xml.xam.ModelSource;
7.34 +import org.netbeans.modules.xml.xam.locator.CatalogModel;
7.35 +import org.netbeans.modules.xml.xam.locator.CatalogModelException;
7.36 +import org.openide.filesystems.FileObject;
7.37 +import org.openide.filesystems.FileUtil;
7.38 +import org.openide.loaders.DataObject;
7.39 +import org.openide.loaders.DataObjectNotFoundException;
7.40 +import org.openide.util.Lookup;
7.41 +import org.openide.util.lookup.Lookups;
7.42 +
7.43 +/**
7.44 + *
7.45 + * @author radval
7.46 + */
7.47 +public class IEPModelProviderInsideIde extends CatalogWriteModelImpl implements
7.48 + IEPModelProvider {
7.49 +
7.50 + /** Creates a new instance of BPELModelProviderInsideIde */
7.51 + public IEPModelProviderInsideIde() {
7.52 + }
7.53 +
7.54 + public IEPModel getWLMModel(URI locationURI) throws Exception {
7.55 + System.out.println(toString() +" :" + locationURI);
7.56 + ModelSource source = getModelSource(locationURI);
7.57 + IEPModel model = IEPModelFactory.getDefault().getModel(source);
7.58 +// model.sync();
7.59 + return model;
7.60 + }
7.61 +
7.62 +
7.63 + public ModelSource getModelSource(URI locationURI) throws CatalogModelException {
7.64 + File file = new File(locationURI);
7.65 + FileObject thisFileObj = FileUtil.toFileObject(file);
7.66 + return createModelSource(thisFileObj, true);
7.67 + }
7.68 +
7.69 + public ModelSource getModelSource(URI locationURI, ModelSource modelSourceOfSourceDocument) throws CatalogModelException {
7.70 + if(locationURI == null) {
7.71 + return null;
7.72 + }
7.73 +
7.74 + URI resolvedURI = locationURI;
7.75 +
7.76 + if(modelSourceOfSourceDocument != null) {
7.77 + FileObject sFileObj = (FileObject) modelSourceOfSourceDocument.getLookup().lookup(FileObject.class);
7.78 + if(sFileObj != null) {
7.79 + File sFile = FileUtil.toFile(sFileObj);
7.80 + if(sFile != null) {
7.81 + URI sURI = sFile.toURI();
7.82 + resolvedURI = sURI.resolve(locationURI);
7.83 + }
7.84 + }
7.85 + }
7.86 +
7.87 + if(resolvedURI != null) {
7.88 + return getModelSource(resolvedURI);
7.89 + }
7.90 +
7.91 + return null;
7.92 + }
7.93 +
7.94 +
7.95 + protected BaseDocument getDocument(FileObject fo){
7.96 + BaseDocument result = null;
7.97 +
7.98 + try {
7.99 +
7.100 + File file = FileUtil.toFile(fo);
7.101 + FileInputStream fis = new FileInputStream(file);
7.102 + byte buffer[] = new byte[fis.available()];
7.103 + result = new org.netbeans.editor.BaseDocument(
7.104 + org.netbeans.modules.xml.text.syntax.XMLKit.class, false);
7.105 +// result = new javax.swing.text.PlainDocument();
7.106 + result.remove(0, result.getLength());
7.107 + fis.read(buffer);
7.108 + fis.close();
7.109 + String str = new String(buffer);
7.110 + result.insertString(0,str,null);
7.111 +
7.112 + } catch (Exception dObjEx) {
7.113 + return null;
7.114 + }
7.115 +
7.116 + return result;
7.117 + }
7.118 +
7.119 + protected CatalogModel createCatalogModel(FileObject fo) throws CatalogModelException{
7.120 + return this;
7.121 + }
7.122 +
7.123 + public ModelSource createModelSource(FileObject thisFileObj, boolean editable) throws CatalogModelException{
7.124 + assert thisFileObj != null : "Null file object.";
7.125 + final DataObject dobj;
7.126 + try {
7.127 + dobj = DataObject.find(thisFileObj);
7.128 + } catch (DataObjectNotFoundException ex) {
7.129 + throw new CatalogModelException(ex);
7.130 + }
7.131 + Lookup proxyLookup = Lookups.proxy(
7.132 + new Lookup.Provider() {
7.133 + public Lookup getLookup() {
7.134 + Logger l = Logger.getLogger(getClass().getName());
7.135 + BaseDocument document = getDocument(dobj.getPrimaryFile());
7.136 + return Lookups.fixed(new Object[] {
7.137 +
7.138 + dobj.getPrimaryFile(),
7.139 + document,
7.140 + dobj,
7.141 + IEPModelProviderInsideIde.this
7.142 +
7.143 + });
7.144 + }
7.145 + }
7.146 +
7.147 + );
7.148 + return new ModelSource(proxyLookup, editable);
7.149 + }
7.150 +
7.151 +
7.152 +}
8.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
8.2 +++ b/iep.model/test/unit/src/org/netbeans/modules/iep/model/common/NamespaceLocation.java Wed Jul 25 02:00:17 2007 +0000
8.3 @@ -0,0 +1,68 @@
8.4 +package org.netbeans.modules.iep.model.common;
8.5 +
8.6 +import java.io.File;
8.7 +import java.net.URI;
8.8 +import java.net.URISyntaxException;
8.9 +import org.netbeans.modules.xml.xam.ModelSource;
8.10 +import org.openide.cookies.SaveCookie;
8.11 +import org.openide.filesystems.FileObject;
8.12 +import org.openide.filesystems.FileUtil;
8.13 +import org.openide.loaders.DataObject;
8.14 +
8.15 +/**
8.16 + *
8.17 + * @author nn136682
8.18 + */
8.19 +public enum NamespaceLocation {
8.20 + PURCHASE_ORDER("http://jbi.com.sun/wfse/wsdl/WorkflowApp2/ApprovePurchase_TM_BPEL", "data/ApprovePurchase_TM_BPEL.wsdl");
8.21 +
8.22 + private String namespace;
8.23 + private String resourcePath;
8.24 + private String location;
8.25 +
8.26 + /** Creates a new instance of NamespaceLocation */
8.27 + NamespaceLocation(String namespace, String resourcePath) {
8.28 + this.namespace = namespace;
8.29 + this.resourcePath = resourcePath;
8.30 + this.location = resourcePath.substring(resourcePath.lastIndexOf("resources/")+10);
8.31 + }
8.32 + public String getNamespace() { return namespace; }
8.33 + public String getResourcePath() { return resourcePath; }
8.34 + public URI getLocationURI() throws URISyntaxException {
8.35 + return new URI(getLocation());
8.36 + }
8.37 + public String getLocation() { return location; }
8.38 + public URI getNamespaceURI() throws URISyntaxException { return new URI(getNamespace()); }
8.39 + public static File wsdlTestDir = null;
8.40 + public static File getSchemaTestTempDir() throws Exception {
8.41 + if (wsdlTestDir == null) {
8.42 + wsdlTestDir = Util.getTempDir("wsdltest");
8.43 + }
8.44 + return wsdlTestDir;
8.45 + }
8.46 + public File getResourceFile() throws Exception {
8.47 + return new File(getSchemaTestTempDir(), Util.getFileName(getResourcePath()));
8.48 + }
8.49 + public void refreshResourceFile() throws Exception {
8.50 + if (getResourceFile().exists()) {
8.51 + ModelSource source = TestCatalogModel.getDefault().getModelSource(getLocationURI());
8.52 + DataObject dobj = (DataObject) source.getLookup().lookup(DataObject.class);
8.53 + SaveCookie save = (SaveCookie) dobj.getCookie(SaveCookie.class);
8.54 + if (save != null) save.save();
8.55 + FileObject fo = (FileObject) source.getLookup().lookup(FileObject.class);
8.56 + fo.delete();
8.57 + }
8.58 + Util.copyResource(getResourcePath(), FileUtil.toFileObject(getSchemaTestTempDir().getCanonicalFile()));
8.59 + }
8.60 + public URI getResourceURI() throws Exception {
8.61 + return getResourceFile().toURI();
8.62 + }
8.63 + public static NamespaceLocation valueFromResourcePath(String resourcePath) {
8.64 + for (NamespaceLocation nl : values()) {
8.65 + if (nl.getResourcePath().equals(resourcePath)) {
8.66 + return nl;
8.67 + }
8.68 + }
8.69 + return null;
8.70 + }
8.71 +}
9.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
9.2 +++ b/iep.model/test/unit/src/org/netbeans/modules/iep/model/common/TestCatalogModel.java Wed Jul 25 02:00:17 2007 +0000
9.3 @@ -0,0 +1,207 @@
9.4 +package org.netbeans.modules.iep.model.common;
9.5 +/*
9.6 + * TestCatalogModel.java
9.7 + *
9.8 + * Created on April 2, 2006, 10:41 AM
9.9 + *
9.10 + * To change this template, choose Tools | Template Manager
9.11 + * and open the template in the editor.
9.12 + */
9.13 +
9.14 +import java.io.File;
9.15 +import java.io.FileInputStream;
9.16 +import java.io.IOException;
9.17 +import java.net.URI;
9.18 +import java.util.HashMap;
9.19 +import java.util.Map;
9.20 +import java.util.logging.Logger;
9.21 +import javax.swing.text.Document;
9.22 +import org.netbeans.modules.xml.retriever.catalog.impl.CatalogFileWrapperDOMImpl;
9.23 +import org.netbeans.modules.xml.retriever.catalog.impl.CatalogWriteModelImpl;
9.24 +import org.netbeans.modules.xml.schema.model.SchemaModel;
9.25 +import org.netbeans.modules.xml.schema.model.SchemaModelFactory;
9.26 +import org.netbeans.modules.xml.wsdl.model.WSDLModel;
9.27 +import org.netbeans.modules.xml.wsdl.model.WSDLModelFactory;
9.28 +import org.netbeans.modules.xml.xam.locator.CatalogModel;
9.29 +import org.netbeans.modules.xml.xam.locator.CatalogModelException;
9.30 +import org.netbeans.modules.xml.xam.ModelSource;
9.31 +import org.openide.filesystems.FileObject;
9.32 +import org.openide.filesystems.FileUtil;
9.33 +import org.openide.loaders.DataObject;
9.34 +import org.openide.loaders.DataObjectNotFoundException;
9.35 +import org.openide.util.Lookup;
9.36 +import org.openide.util.lookup.Lookups;
9.37 +
9.38 +/**
9.39 + *
9.40 + * @author girix
9.41 + */
9.42 +
9.43 +public class TestCatalogModel extends CatalogWriteModelImpl{
9.44 + private TestCatalogModel(File file) throws IOException{
9.45 + super(file);
9.46 + }
9.47 +
9.48 + static TestCatalogModel singletonCatMod = null;
9.49 + public static TestCatalogModel getDefault(){
9.50 + if (singletonCatMod == null){
9.51 + CatalogFileWrapperDOMImpl.TEST_ENVIRONMENT = true;
9.52 + try {
9.53 + singletonCatMod = new TestCatalogModel(new File(System.getProperty("java.io.tmpdir")));
9.54 + FileObject catalogFO = singletonCatMod.getCatalogFileObject();
9.55 + File catFile = FileUtil.toFile(catalogFO);
9.56 + catFile.deleteOnExit();
9.57 + initCatalogFile();
9.58 + } catch (Exception ex) {
9.59 + ex.printStackTrace();
9.60 + return null;
9.61 + }
9.62 + }
9.63 + return singletonCatMod;
9.64 + }
9.65 +
9.66 +
9.67 +
9.68 + /**
9.69 + * This method could be overridden by the Unit testcase to return a special
9.70 + * ModelSource object for a FileObject with custom impl of classes added to the lookup.
9.71 + * This is optional if both getDocument(FO) and createCatalogModel(FO) are overridden.
9.72 + */
9.73 + protected ModelSource createModelSource(final FileObject thisFileObj, boolean editable) throws CatalogModelException{
9.74 + assert thisFileObj != null : "Null file object.";
9.75 + final CatalogModel catalogModel = createCatalogModel(thisFileObj);
9.76 + final DataObject dobj;
9.77 + try {
9.78 + dobj = DataObject.find(thisFileObj);
9.79 + } catch (DataObjectNotFoundException ex) {
9.80 + throw new CatalogModelException(ex);
9.81 + }
9.82 + Lookup proxyLookup = Lookups.proxy(
9.83 + new Lookup.Provider() {
9.84 + public Lookup getLookup() {
9.85 + Document document = null;
9.86 + Logger l = Logger.getLogger(getClass().getName());
9.87 + document = getDocument(thisFileObj);
9.88 + return Lookups.fixed(new Object[] {
9.89 + thisFileObj,
9.90 + document,
9.91 + dobj,
9.92 + catalogModel
9.93 + });
9.94 + }
9.95 + }
9.96 + );
9.97 + return new ModelSource(proxyLookup, editable);
9.98 + }
9.99 +
9.100 + private Document getDocument(FileObject fo){
9.101 + Document result = null;
9.102 + if (documentPooling) {
9.103 + result = documentPool().get(fo);
9.104 + }
9.105 + if (result != null) return result;
9.106 + try {
9.107 +
9.108 + File file = FileUtil.toFile(fo);
9.109 + FileInputStream fis = new FileInputStream(file);
9.110 + byte buffer[] = new byte[fis.available()];
9.111 + result = new org.netbeans.editor.BaseDocument(
9.112 + org.netbeans.modules.xml.text.syntax.XMLKit.class, false);
9.113 + result.remove(0, result.getLength());
9.114 + fis.read(buffer);
9.115 + fis.close();
9.116 + String str = new String(buffer);
9.117 + result.insertString(0,str,null);
9.118 +
9.119 + } catch (Exception dObjEx) {
9.120 + return null;
9.121 + }
9.122 + if (documentPooling) {
9.123 + documentPool().put(fo, result);
9.124 + }
9.125 + return result;
9.126 + }
9.127 +
9.128 + protected CatalogModel createCatalogModel(FileObject fo) throws CatalogModelException{
9.129 + return getDefault();
9.130 + }
9.131 +
9.132 + public ModelSource createTestModelSource(FileObject fo, boolean editable) throws CatalogModelException{
9.133 + final DataObject dobj;
9.134 + final CatalogModel catalogModel = createCatalogModel(fo);
9.135 + try {
9.136 + dobj = DataObject.find(fo);
9.137 + } catch (DataObjectNotFoundException ex) {
9.138 + throw new CatalogModelException(ex);
9.139 + }
9.140 + Lookup lookup = Lookups.proxy(new Lookup.Provider() {
9.141 + public Lookup getLookup() {
9.142 + return Lookups.fixed(new Object[] {
9.143 + dobj.getPrimaryFile(),
9.144 + getDocument(dobj.getPrimaryFile()),
9.145 + dobj,
9.146 + catalogModel
9.147 + });
9.148 +
9.149 + }
9.150 + } );
9.151 + return new ModelSource(lookup, editable);
9.152 + }
9.153 +
9.154 + public void addNamespace(NamespaceLocation nl) throws Exception {
9.155 + this.addURI(nl.getLocationURI(), nl.getResourceURI());
9.156 + }
9.157 +
9.158 + public SchemaModel getSchemaModel(NamespaceLocation nl) throws Exception {
9.159 + return getSchemaModel(nl.getLocationURI());
9.160 + }
9.161 +
9.162 + public SchemaModel getSchemaModel(URI lcationURI) throws Exception {
9.163 + SchemaModel model = SchemaModelFactory.getDefault().getModel(
9.164 + singletonCatMod.getModelSource(lcationURI));
9.165 + return model;
9.166 + }
9.167 +
9.168 + private Map<FileObject,Document> fileToDocumentMap;
9.169 + private Map<FileObject,Document> documentPool() {
9.170 + if (fileToDocumentMap == null) {
9.171 + fileToDocumentMap = new HashMap<FileObject,Document>();
9.172 + }
9.173 + return fileToDocumentMap;
9.174 + }
9.175 + private boolean documentPooling = true;
9.176 +
9.177 + public void setDocumentPooling(boolean v) {
9.178 + documentPooling = v;
9.179 + if (! documentPooling) {
9.180 + clearDocumentPool();
9.181 + }
9.182 + }
9.183 +
9.184 + public void clearDocumentPool() {
9.185 + fileToDocumentMap = null;
9.186 + }
9.187 +
9.188 + private static void initCatalogFile() throws Exception {
9.189 + TestCatalogModel instance = singletonCatMod;
9.190 + for (NamespaceLocation nl:NamespaceLocation.values()) {
9.191 + instance.addNamespace(nl);
9.192 + }
9.193 + }
9.194 +
9.195 + public WSDLModel getWSDLModel(URI locationURI) throws Exception {
9.196 + ModelSource source = getDefault().getModelSource(locationURI);
9.197 + WSDLModel model = WSDLModelFactory.getDefault().getModel(source);
9.198 + return model;
9.199 + }
9.200 +
9.201 + public WSDLModel getWSDLModel(NamespaceLocation nl) throws Exception {
9.202 + nl.refreshResourceFile();
9.203 + return getWSDLModel(nl.getLocationURI());
9.204 + }
9.205 +
9.206 + public String toString(){
9.207 + return "TestCatalogModel"+super.toString();
9.208 + }
9.209 +}
9.210 +
10.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
10.2 +++ b/iep.model/test/unit/src/org/netbeans/modules/iep/model/common/Util.java Wed Jul 25 02:00:17 2007 +0000
10.3 @@ -0,0 +1,248 @@
10.4 +/*
10.5 + * Util.java
10.6 + *
10.7 + * Created on October 4, 2005, 7:48 PM
10.8 + *
10.9 + * To change this template, choose Tools | Template Manager
10.10 + * and open the template in the editor.
10.11 + */
10.12 +
10.13 +package org.netbeans.modules.iep.model.common;
10.14 +
10.15 +import java.io.BufferedInputStream;
10.16 +import java.io.BufferedOutputStream;
10.17 +import java.io.BufferedReader;
10.18 +import java.io.File;
10.19 +import java.io.FileInputStream;
10.20 +import java.io.FileOutputStream;
10.21 +import java.io.IOException;
10.22 +import java.io.InputStream;
10.23 +import java.io.InputStreamReader;
10.24 +import java.io.OutputStream;
10.25 +import java.io.PrintWriter;
10.26 +import java.net.URI;
10.27 +import java.util.Collection;
10.28 +import javax.swing.text.Document;
10.29 +import org.netbeans.modules.xml.schema.model.GlobalSimpleType;
10.30 +import org.netbeans.modules.xml.schema.model.SchemaModel;
10.31 +import org.netbeans.modules.xml.schema.model.SchemaModelFactory;
10.32 +import org.netbeans.modules.xml.wsdl.model.WSDLComponent;
10.33 +import org.netbeans.modules.xml.wsdl.model.WSDLModel;
10.34 +import org.netbeans.modules.xml.wsdl.model.visitor.FindWSDLComponent;
10.35 +import org.netbeans.modules.xml.xam.dom.AbstractDocumentModel;
10.36 +import org.openide.filesystems.FileObject;
10.37 +import org.openide.filesystems.FileUtil;
10.38 +import org.openide.filesystems.FileLock;
10.39 +import org.openide.filesystems.Repository;
10.40 +
10.41 +/**
10.42 + *
10.43 + * @author nn136682
10.44 + */
10.45 +public class Util {
10.46 + public static final String EMPTY_XSD = "resources/Empty.wsdl";
10.47 +
10.48 + static {
10.49 + registerXMLKit();
10.50 + }
10.51 +
10.52 + public static void registerXMLKit() {
10.53 + String[] path = new String[] { "Editors", "text", "x-xml" };
10.54 + FileObject target = Repository.getDefault().getDefaultFileSystem().getRoot();
10.55 + try {
10.56 + for (int i=0; i<path.length; i++) {
10.57 + FileObject f = target.getFileObject(path[i]);
10.58 + if (f == null) {
10.59 + f = target.createFolder(path[i]);
10.60 + }
10.61 + target = f;
10.62 + }
10.63 + String name = "EditorKit.instance";
10.64 + if (target.getFileObject(name) == null) {
10.65 + FileObject f = target.createData(name);
10.66 + f.setAttribute("instanceClass", "org.netbeans.modules.xml.text.syntax.XMLKit");
10.67 + }
10.68 + } catch(IOException ioe) {
10.69 + ioe.printStackTrace();
10.70 + }
10.71 + }
10.72 +
10.73 + public static Document getResourceAsDocument(String path) throws Exception {
10.74 + InputStream in = Util.class.getResourceAsStream(path);
10.75 + return loadDocument(in);
10.76 + }
10.77 +
10.78 + public static String getResourceAsString(String path) throws Exception {
10.79 + InputStream in = Util.class.getResourceAsStream(path);
10.80 + BufferedReader br = new BufferedReader(new InputStreamReader(in,"UTF-8"));
10.81 + StringBuffer sbuf = new StringBuffer();
10.82 + try {
10.83 + String line = null;
10.84 + while ((line = br.readLine()) != null) {
10.85 + sbuf.append(line);
10.86 + sbuf.append(System.getProperty("line.separator"));
10.87 + }
10.88 + } finally {
10.89 + br.close();
10.90 + }
10.91 + return sbuf.toString();
10.92 + }
10.93 +
10.94 + public static Document loadDocument(InputStream in) throws Exception {
10.95 + Document sd = new org.netbeans.editor.BaseDocument(
10.96 + org.netbeans.modules.xml.text.syntax.XMLKit.class, false);
10.97 + BufferedReader br = new BufferedReader(new InputStreamReader(in));
10.98 + StringBuffer sbuf = new StringBuffer();
10.99 + try {
10.100 + String line = null;
10.101 + while ((line = br.readLine()) != null) {
10.102 + sbuf.append(line);
10.103 + sbuf.append(System.getProperty("line.separator"));
10.104 + }
10.105 + } finally {
10.106 + br.close();
10.107 + }
10.108 + sd.insertString(0,sbuf.toString(),null);
10.109 + return sd;
10.110 + }
10.111 +
10.112 + public static int count = 0;
10.113 + public static WSDLModel loadWSDLModel(String resourcePath) throws Exception {
10.114 + NamespaceLocation nl = NamespaceLocation.valueFromResourcePath(resourcePath);
10.115 + if (nl != null) {
10.116 + return TestCatalogModel.getDefault().getWSDLModel(nl);
10.117 + }
10.118 + String location = resourcePath.substring(resourcePath.lastIndexOf('/')+1);
10.119 + URI locationURI = new URI(location);
10.120 + TestCatalogModel.getDefault().addURI(locationURI, getResourceURI(resourcePath));
10.121 + return TestCatalogModel.getDefault().getWSDLModel(locationURI);
10.122 + }
10.123 +
10.124 + public static WSDLModel createEmptyWSDLModel() throws Exception {
10.125 + return loadWSDLModel(EMPTY_XSD);
10.126 + }
10.127 +
10.128 + /*public static WSDLModel loadWSDLModel(Document doc) throws Exception {
10.129 + return WSDLModelFactory.getDefault().getModel(doc);
10.130 + }*/
10.131 +
10.132 + public static void dumpToStream(Document doc, OutputStream out) throws Exception{
10.133 + PrintWriter w = new PrintWriter(out);
10.134 + w.print(doc.getText(0, doc.getLength()));
10.135 + w.close();
10.136 + out.close();
10.137 + }
10.138 +
10.139 + public static void dumpToFile(Document doc, File f) throws Exception {
10.140 + if (! f.exists()) {
10.141 + f.createNewFile();
10.142 + }
10.143 + OutputStream out = new BufferedOutputStream(new FileOutputStream(f));
10.144 + PrintWriter w = new PrintWriter(out);
10.145 + w.print(doc.getText(0, doc.getLength()));
10.146 + w.close();
10.147 + out.close();
10.148 + }
10.149 +
10.150 + public static File dumpToTempFile(Document doc) throws Exception {
10.151 + File f = File.createTempFile("xsm", "xsd");
10.152 + dumpToFile(doc, f);
10.153 + return f;
10.154 + }
10.155 +
10.156 + public static WSDLModel dumpAndReloadModel(Document doc) throws Exception {
10.157 + File f = dumpToTempFile(doc);
10.158 + URI dumpURI = new URI("dummyDump" + count++);
10.159 + TestCatalogModel.getDefault().addURI(dumpURI, f.toURI());
10.160 + return TestCatalogModel.getDefault().getWSDLModel(dumpURI);
10.161 + }
10.162 +
10.163 + public static Document loadDocument(File f) throws Exception {
10.164 + InputStream in = new BufferedInputStream(new FileInputStream(f));
10.165 + return loadDocument(in);
10.166 + }
10.167 +
10.168 + public static URI getResourceURI(String path) throws RuntimeException {
10.169 + try {
10.170 + return Util.class.getResource(path).toURI();
10.171 + } catch (Exception ex) {
10.172 + throw new RuntimeException(ex);
10.173 + }
10.174 + }
10.175 +
10.176 + public static File getTempDir(String path) throws Exception {
10.177 + File tempdir = new File(System.getProperty("java.io.tmpdir"), path);
10.178 + tempdir.mkdirs();
10.179 + return tempdir;
10.180 + }
10.181 +
10.182 + public static GlobalSimpleType getPrimitiveType(String typeName){
10.183 + SchemaModel primitiveModel = SchemaModelFactory.getDefault().getPrimitiveTypesModel();
10.184 + Collection<GlobalSimpleType> primitives = primitiveModel.getSchema().getSimpleTypes();
10.185 + for(GlobalSimpleType ptype: primitives){
10.186 + if(ptype.getName().equals(typeName)){
10.187 + return ptype;
10.188 + }
10.189 + }
10.190 + return null;
10.191 + }
10.192 +
10.193 + public static Document setDocumentContentTo(Document doc, InputStream in) throws Exception {
10.194 + BufferedReader br = new BufferedReader(new InputStreamReader(in));
10.195 + StringBuffer sbuf = new StringBuffer();
10.196 + try {
10.197 + String line = null;
10.198 + while ((line = br.readLine()) != null) {
10.199 + sbuf.append(line);
10.200 + sbuf.append(System.getProperty("line.separator"));
10.201 + }
10.202 + } finally {
10.203 + br.close();
10.204 + }
10.205 + doc.remove(0, doc.getLength());
10.206 + doc.insertString(0,sbuf.toString(),null);
10.207 + return doc;
10.208 + }
10.209 +
10.210 + public static Document setDocumentContentTo(Document doc, String resourcePath) throws Exception {
10.211 + return setDocumentContentTo(doc, Util.class.getResourceAsStream(resourcePath));
10.212 + }
10.213 +
10.214 + public static void setDocumentContentTo(WSDLModel model, String resourcePath) throws Exception {
10.215 + Document doc = ((AbstractDocumentModel)model).getBaseDocument();
10.216 + setDocumentContentTo(doc, Util.class.getResourceAsStream(resourcePath));
10.217 + }
10.218 +
10.219 + public static FileObject copyResource(String path, FileObject destFolder) throws Exception {
10.220 + String filename = getFileName(path);
10.221 +
10.222 + FileObject dest = destFolder.getFileObject(filename);
10.223 + if (dest == null) {
10.224 + dest = destFolder.createData(filename);
10.225 + }
10.226 + FileLock lock = dest.lock();
10.227 + OutputStream out = dest.getOutputStream(lock);
10.228 + InputStream in = Util.class.getResourceAsStream(path);
10.229 + try {
10.230 + FileUtil.copy(in, out);
10.231 + } finally {
10.232 + out.close();
10.233 + in.close();
10.234 + if (lock != null) lock.releaseLock();
10.235 + }
10.236 + return dest;
10.237 + }
10.238 +
10.239 + public static String getFileName(String path) {
10.240 + int i = path.lastIndexOf('/');
10.241 + if (i > -1) {
10.242 + return path.substring(i+1);
10.243 + } else {
10.244 + return path;
10.245 + }
10.246 + }
10.247 +
10.248 + public static <T extends WSDLComponent> T find(Class<T> type, WSDLModel model, String xpath) {
10.249 + return type.cast(FindWSDLComponent.findComponent(type, model.getDefinitions(), xpath));
10.250 + }
10.251 +}
11.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
11.2 +++ b/iep.model/test/unit/src/org/netbeans/modules/iep/model/common/data/test.iep Wed Jul 25 02:00:17 2007 +0000
11.3 @@ -0,0 +1,383 @@
11.4 +<?xml version="1.0" encoding="UTF-8"?>
11.5 +<component name="Plan" title="Plan" type="/IEP/Model/Plan">
11.6 +<property name="version" value="1.0"/>
11.7 +<component name="Metadata" title="Metadata" type="/IEP/Model/Plan|Metadata">
11.8 +<component name="View" title="View" type="/IEP/Model/Plan|Metadata|View">
11.9 +<property name="orthoflow" value="true"/>
11.10 +</component>
11.11 +</component>
11.12 +<component name="Schemas" title="Schemas" type="/IEP/Model/Plan|Schemas"/>
11.13 +<component name="Operators" title="Operators" type="/IEP/Model/Plan|Operators">
11.14 +<component name="o0" title="o0" type="/IEP/Operator/RelationAggregator">
11.15 +<property name="x" value="285"/>
11.16 +<property name="y" value="46"/>
11.17 +<property name="z" value="0"/>
11.18 +<property name="id" value="o0"/>
11.19 +<property name="name" value="RelationAggregator0"/>
11.20 +<property name="inputSchemaIdList" value=""/>
11.21 +<property name="outputSchemaId" value=""/>
11.22 +<property name="description" value=""/>
11.23 +<property name="topoScore" value="2"/>
11.24 +<property name="inputType" value="i18n.IEP.IOType.relation"/>
11.25 +<property name="inputIdList" value="o3"/>
11.26 +<property name="staticInputIdList" value=""/>
11.27 +<property name="outputType" value="i18n.IEP.IOType.relation"/>
11.28 +<property name="isGlobal" value="false"/>
11.29 +<property name="globalId" value=""/>
11.30 +<property name="batchMode" value="false"/>
11.31 +<property name="fromColumnList" value=""/>
11.32 +<property name="toColumnList" value=""/>
11.33 +<property name="groupByColumnList" value=""/>
11.34 +<property name="whereClause" value=""/>
11.35 +</component>
11.36 +<component name="o1" title="o1" type="/IEP/Input/StreamInput">
11.37 +<property name="x" value="60"/>
11.38 +<property name="y" value="46"/>
11.39 +<property name="z" value="1"/>
11.40 +<property name="id" value="o1"/>
11.41 +<property name="name" value="StreamInput0"/>
11.42 +<property name="inputSchemaIdList" value=""/>
11.43 +<property name="outputSchemaId" value=""/>
11.44 +<property name="description" value=""/>
11.45 +<property name="topoScore" value="0"/>
11.46 +<property name="inputType" value="i18n.IEP.IOType.none"/>
11.47 +<property name="inputIdList" value=""/>
11.48 +<property name="staticInputIdList" value=""/>
11.49 +<property name="outputType" value="i18n.IEP.IOType.stream"/>
11.50 +<property name="isGlobal" value="false"/>
11.51 +<property name="globalId" value=""/>
11.52 +<property name="batchMode" value="false"/>
11.53 +</component>
11.54 +<component name="o2" title="o2" type="/IEP/Output/StreamOutput">
11.55 +<property name="x" value="446"/>
11.56 +<property name="y" value="136"/>
11.57 +<property name="z" value="2"/>
11.58 +<property name="id" value="o2"/>
11.59 +<property name="name" value="StreamOutput0"/>
11.60 +<property name="inputSchemaIdList" value=""/>
11.61 +<property name="outputSchemaId" value=""/>
11.62 +<property name="description" value=""/>
11.63 +<property name="topoScore" value="2"/>
11.64 +<property name="inputType" value="i18n.IEP.IOType.stream"/>
11.65 +<property name="inputIdList" value="o7"/>
11.66 +<property name="staticInputIdList" value=""/>
11.67 +<property name="outputType" value="i18n.IEP.IOType.none"/>
11.68 +<property name="isGlobal" value="false"/>
11.69 +<property name="globalId" value=""/>
11.70 +<property name="batchMode" value="false"/>
11.71 +<property name="includeTimestamp" value="false"/>
11.72 +</component>
11.73 +<component name="o3" title="o3" type="/IEP/Operator/GapWindow">
11.74 +<property name="x" value="181"/>
11.75 +<property name="y" value="46"/>
11.76 +<property name="z" value="3"/>
11.77 +<property name="id" value="o3"/>
11.78 +<property name="name" value="GapWindow0"/>
11.79 +<property name="inputSchemaIdList" value=""/>
11.80 +<property name="outputSchemaId" value=""/>
11.81 +<property name="description" value=""/>
11.82 +<property name="topoScore" value="1"/>
11.83 +<property name="inputType" value="i18n.IEP.IOType.stream"/>
11.84 +<property name="inputIdList" value="o1"/>
11.85 +<property name="staticInputIdList" value=""/>
11.86 +<property name="outputType" value="i18n.IEP.IOType.relation"/>
11.87 +<property name="isGlobal" value="false"/>
11.88 +<property name="globalId" value=""/>
11.89 +<property name="batchMode" value="false"/>
11.90 +<property name="start" value="1"/>
11.91 +<property name="attribute" value=""/>
11.92 +<property name="attributeList" value=""/>
11.93 +</component>
11.94 +<component name="o4" title="o4" type="/IEP/Output/BatchedStreamOutput">
11.95 +<property name="x" value="429"/>
11.96 +<property name="y" value="316"/>
11.97 +<property name="z" value="4"/>
11.98 +<property name="id" value="o4"/>
11.99 +<property name="name" value="BatchedStreamOutput0"/>
11.100 +<property name="inputSchemaIdList" value=""/>
11.101 +<property name="outputSchemaId" value=""/>
11.102 +<property name="description" value=""/>
11.103 +<property name="topoScore" value="0"/>
11.104 +<property name="inputType" value="i18n.IEP.IOType.stream"/>
11.105 +<property name="inputIdList" value=""/>
11.106 +<property name="staticInputIdList" value=""/>
11.107 +<property name="outputType" value="i18n.IEP.IOType.none"/>
11.108 +<property name="isGlobal" value="false"/>
11.109 +<property name="globalId" value=""/>
11.110 +<property name="batchMode" value="true"/>
11.111 +<property name="includeTimestamp" value="false"/>
11.112 +<property name="batchSize" value="10"/>
11.113 +<property name="maximumDelaySize" value="10.0"/>
11.114 +<property name="maximumDelayUnit" value="second"/>
11.115 +</component>
11.116 +<component name="o5" title="o5" type="/IEP/Output/StreamOutput">
11.117 +<property name="x" value="446"/>
11.118 +<property name="y" value="406"/>
11.119 +<property name="z" value="5"/>
11.120 +<property name="id" value="o5"/>
11.121 +<property name="name" value="StreamOutput1"/>
11.122 +<property name="inputSchemaIdList" value=""/>
11.123 +<property name="outputSchemaId" value=""/>
11.124 +<property name="description" value=""/>
11.125 +<property name="topoScore" value="0"/>
11.126 +<property name="inputType" value="i18n.IEP.IOType.stream"/>
11.127 +<property name="inputIdList" value=""/>
11.128 +<property name="staticInputIdList" value=""/>
11.129 +<property name="outputType" value="i18n.IEP.IOType.none"/>
11.130 +<property name="isGlobal" value="false"/>
11.131 +<property name="globalId" value=""/>
11.132 +<property name="batchMode" value="false"/>
11.133 +<property name="includeTimestamp" value="false"/>
11.134 +</component>
11.135 +<component name="o6" title="o6" type="/IEP/Output/TableOutput">
11.136 +<property name="x" value="450"/>
11.137 +<property name="y" value="46"/>
11.138 +<property name="z" value="6"/>
11.139 +<property name="id" value="o6"/>
11.140 +<property name="name" value="TableOutput0"/>
11.141 +<property name="inputSchemaIdList" value=""/>
11.142 +<property name="outputSchemaId" value=""/>
11.143 +<property name="description" value=""/>
11.144 +<property name="topoScore" value="3"/>
11.145 +<property name="inputType" value="i18n.IEP.IOType.relation"/>
11.146 +<property name="inputIdList" value="o0"/>
11.147 +<property name="staticInputIdList" value=""/>
11.148 +<property name="outputType" value="i18n.IEP.IOType.none"/>
11.149 +<property name="isGlobal" value="false"/>
11.150 +<property name="globalId" value=""/>
11.151 +<property name="batchMode" value="false"/>
11.152 +</component>
11.153 +<component name="o7" title="o7" type="/IEP/Operator/TimeBasedAggregator">
11.154 +<property name="x" value="278"/>
11.155 +<property name="y" value="136"/>
11.156 +<property name="z" value="7"/>
11.157 +<property name="id" value="o7"/>
11.158 +<property name="name" value="TimeBasedAggregator0"/>
11.159 +<property name="inputSchemaIdList" value=""/>
11.160 +<property name="outputSchemaId" value=""/>
11.161 +<property name="description" value=""/>
11.162 +<property name="topoScore" value="1"/>
11.163 +<property name="inputType" value="i18n.IEP.IOType.stream"/>
11.164 +<property name="inputIdList" value=""/>
11.165 +<property name="staticInputIdList" value="o8"/>
11.166 +<property name="outputType" value="i18n.IEP.IOType.stream"/>
11.167 +<property name="isGlobal" value="false"/>
11.168 +<property name="globalId" value=""/>
11.169 +<property name="batchMode" value="false"/>
11.170 +<property name="fromColumnList" value=""/>
11.171 +<property name="toColumnList" value=""/>
11.172 +<property name="groupByColumnList" value=""/>
11.173 +<property name="fromClause" value=""/>
11.174 +<property name="whereClause" value=""/>
11.175 +<property name="start" value="1969-12-31 16:00:00.000-0800"/>
11.176 +<property name="increment" value="1.0"/>
11.177 +<property name="incrementUnit" value="second"/>
11.178 +<property name="size" value="1.0"/>
11.179 +<property name="unit" value="second"/>
11.180 +</component>
11.181 +<component name="o8" title="o8" type="/IEP/Input/TableInput">
11.182 +<property name="x" value="183"/>
11.183 +<property name="y" value="136"/>
11.184 +<property name="z" value="8"/>
11.185 +<property name="id" value="o8"/>
11.186 +<property name="name" value="TableInput0"/>
11.187 +<property name="inputSchemaIdList" value=""/>
11.188 +<property name="outputSchemaId" value=""/>
11.189 +<property name="description" value=""/>
11.190 +<property name="topoScore" value="0"/>
11.191 +<property name="inputType" value="i18n.IEP.IOType.none"/>
11.192 +<property name="inputIdList" value=""/>
11.193 +<property name="staticInputIdList" value=""/>
11.194 +<property name="outputType" value="i18n.IEP.IOType.table"/>
11.195 +<property name="isGlobal" value="true"/>
11.196 +<property name="globalId" value=""/>
11.197 +<property name="batchMode" value="false"/>
11.198 +</component>
11.199 +<component name="o9" title="o9" type="/IEP/Operator/TupleBasedAggregator">
11.200 +<property name="x" value="277"/>
11.201 +<property name="y" value="226"/>
11.202 +<property name="z" value="9"/>
11.203 +<property name="id" value="o9"/>
11.204 +<property name="name" value="TupleBasedAggregator0"/>
11.205 +<property name="inputSchemaIdList" value=""/>
11.206 +<property name="outputSchemaId" value=""/>
11.207 +<property name="description" value=""/>
11.208 +<property name="topoScore" value="1"/>
11.209 +<property name="inputType" value="i18n.IEP.IOType.stream"/>
11.210 +<property name="inputIdList" value=""/>
11.211 +<property name="staticInputIdList" value=""/>
11.212 +<property name="outputType" value="i18n.IEP.IOType.stream"/>
11.213 +<property name="isGlobal" value="false"/>
11.214 +<property name="globalId" value=""/>
11.215 +<property name="batchMode" value="false"/>
11.216 +<property name="fromColumnList" value=""/>
11.217 +<property name="toColumnList" value=""/>
11.218 +<property name="groupByColumnList" value=""/>
11.219 +<property name="fromClause" value=""/>
11.220 +<property name="whereClause" value=""/>
11.221 +<property name="start" value="1"/>
11.222 +<property name="increment" value="1"/>
11.223 +<property name="size" value="1"/>
11.224 +</component>
11.225 +<component name="o10" title="o10" type="/IEP/Output/BatchedStreamOutput">
11.226 +<property name="x" value="429"/>
11.227 +<property name="y" value="496"/>
11.228 +<property name="z" value="10"/>
11.229 +<property name="id" value="o10"/>
11.230 +<property name="name" value="BatchedStreamOutput1"/>
11.231 +<property name="inputSchemaIdList" value=""/>
11.232 +<property name="outputSchemaId" value=""/>
11.233 +<property name="description" value=""/>
11.234 +<property name="topoScore" value="0"/>
11.235 +<property name="inputType" value="i18n.IEP.IOType.stream"/>
11.236 +<property name="inputIdList" value=""/>
11.237 +<property name="staticInputIdList" value=""/>
11.238 +<property name="outputType" value="i18n.IEP.IOType.none"/>
11.239 +<property name="isGlobal" value="false"/>
11.240 +<property name="globalId" value=""/>
11.241 +<property name="batchMode" value="true"/>
11.242 +<property name="includeTimestamp" value="false"/>
11.243 +<property name="batchSize" value="10"/>
11.244 +<property name="maximumDelaySize" value="10.0"/>
11.245 +<property name="maximumDelayUnit" value="second"/>
11.246 +</component>
11.247 +<component name="o11" title="o11" type="/IEP/Operator/Distinct">
11.248 +<property name="x" value="461"/>
11.249 +<property name="y" value="586"/>
11.250 +<property name="z" value="11"/>
11.251 +<property name="id" value="o11"/>
11.252 +<property name="name" value="Distinct0"/>
11.253 +<property name="inputSchemaIdList" value=""/>
11.254 +<property name="outputSchemaId" value=""/>
11.255 +<property name="description" value=""/>
11.256 +<property name="topoScore" value="0"/>
11.257 +<property name="inputType" value="i18n.IEP.IOType.relation"/>
11.258 +<property name="inputIdList" value=""/>
11.259 +<property name="staticInputIdList" value=""/>
11.260 +<property name="outputType" value="i18n.IEP.IOType.relation"/>
11.261 +<property name="isGlobal" value="false"/>
11.262 +<property name="globalId" value=""/>
11.263 +<property name="batchMode" value="false"/>
11.264 +</component>
11.265 +<component name="o12" title="o12" type="/IEP/Operator/Intersect">
11.266 +<property name="x" value="458"/>
11.267 +<property name="y" value="676"/>
11.268 +<property name="z" value="12"/>
11.269 +<property name="id" value="o12"/>
11.270 +<property name="name" value="Intersect0"/>
11.271 +<property name="inputSchemaIdList" value=""/>
11.272 +<property name="outputSchemaId" value=""/>
11.273 +<property name="description" value=""/>
11.274 +<property name="topoScore" value="0"/>
11.275 +<property name="inputType" value="i18n.IEP.IOType.relation"/>
11.276 +<property name="inputIdList" value=""/>
11.277 +<property name="staticInputIdList" value=""/>
11.278 +<property name="outputType" value="i18n.IEP.IOType.relation"/>
11.279 +<property name="isGlobal" value="false"/>
11.280 +<property name="globalId" value=""/>
11.281 +<property name="batchMode" value="false"/>
11.282 +</component>
11.283 +<component name="o13" title="o13" type="/IEP/Operator/PartitionedWindow">
11.284 +<property name="x" value="436"/>
11.285 +<property name="y" value="226"/>
11.286 +<property name="z" value="13"/>
11.287 +<property name="id" value="o13"/>
11.288 +<property name="name" value="PartitionedWindow0"/>
11.289 +<property name="inputSchemaIdList" value=""/>
11.290 +<property name="outputSchemaId" value=""/>
11.291 +<property name="description" value=""/>
11.292 +<property name="topoScore" value="2"/>
11.293 +<property name="inputType" value="i18n.IEP.IOType.stream"/>
11.294 +<property name="inputIdList" value="o9"/>
11.295 +<property name="staticInputIdList" value=""/>
11.296 +<property name="outputType" value="i18n.IEP.IOType.relation"/>
11.297 +<property name="isGlobal" value="false"/>
11.298 +<property name="globalId" value=""/>
11.299 +<property name="batchMode" value="false"/>
11.300 +<property name="size" value="9"/>
11.301 +<property name="attributeList" value=""/>
11.302 +</component>
11.303 +<component name="o14" title="o14" type="/IEP/Operator/RelationAggregator">
11.304 +<property name="x" value="119"/>
11.305 +<property name="y" value="0"/>
11.306 +<property name="z" value="0"/>
11.307 +<property name="id" value="o14"/>
11.308 +<property name="name" value="RelationAggregator1"/>
11.309 +<property name="inputSchemaIdList" value=""/>
11.310 +<property name="outputSchemaId" value=""/>
11.311 +<property name="description" value=""/>
11.312 +<property name="topoScore" value="0"/>
11.313 +<property name="inputType" value="i18n.IEP.IOType.relation"/>
11.314 +<property name="inputIdList" value=""/>
11.315 +<property name="staticInputIdList" value=""/>
11.316 +<property name="outputType" value="i18n.IEP.IOType.relation"/>
11.317 +<property name="isGlobal" value="false"/>
11.318 +<property name="globalId" value=""/>
11.319 +<property name="batchMode" value="false"/>
11.320 +<property name="fromColumnList" value=""/>
11.321 +<property name="toColumnList" value=""/>
11.322 +<property name="groupByColumnList" value=""/>
11.323 +<property name="whereClause" value=""/>
11.324 +</component>
11.325 +<component name="o15" title="o15" type="/IEP/Operator/TimeBasedAggregator">
11.326 +<property name="x" value="0"/>
11.327 +<property name="y" value="0"/>
11.328 +<property name="z" value="0"/>
11.329 +<property name="id" value="o15"/>
11.330 +<property name="name" value="TimeBasedAggregator1"/>
11.331 +<property name="inputSchemaIdList" value=""/>
11.332 +<property name="outputSchemaId" value=""/>
11.333 +<property name="description" value=""/>
11.334 +<property name="topoScore" value="0"/>
11.335 +<property name="inputType" value="i18n.IEP.IOType.stream"/>
11.336 +<property name="inputIdList" value=""/>
11.337 +<property name="staticInputIdList" value=""/>
11.338 +<property name="outputType" value="i18n.IEP.IOType.stream"/>
11.339 +<property name="isGlobal" value="false"/>
11.340 +<property name="globalId" value=""/>
11.341 +<property name="batchMode" value="false"/>
11.342 +<property name="fromColumnList" value=""/>
11.343 +<property name="toColumnList" value=""/>
11.344 +<property name="groupByColumnList" value=""/>
11.345 +<property name="fromClause" value=""/>
11.346 +<property name="whereClause" value=""/>
11.347 +<property name="start" value="1969-12-31 16:00:00.000-0800"/>
11.348 +<property name="increment" value="1.0"/>
11.349 +<property name="incrementUnit" value="second"/>
11.350 +<property name="size" value="1.0"/>
11.351 +<property name="unit" value="second"/>
11.352 +</component>
11.353 +</component>
11.354 +<component name="Links" title="Links" type="/IEP/Model/Plan|Links">
11.355 +<component name="link0" title="link0" type="/IEP/Model/Link">
11.356 +<property name="name" value="link0"/>
11.357 +<property name="from" value="o1"/>
11.358 +<property name="to" value="o3"/>
11.359 +</component>
11.360 +<component name="link1" title="link1" type="/IEP/Model/Link">
11.361 +<property name="name" value="link1"/>
11.362 +<property name="from" value="o3"/>
11.363 +<property name="to" value="o0"/>
11.364 +</component>
11.365 +<component name="link2" title="link2" type="/IEP/Model/Link">
11.366 +<property name="name" value="link2"/>
11.367 +<property name="from" value="o0"/>
11.368 +<property name="to" value="o6"/>
11.369 +</component>
11.370 +<component name="link3" title="link3" type="/IEP/Model/Link">
11.371 +<property name="name" value="link3"/>
11.372 +<property name="from" value="o7"/>
11.373 +<property name="to" value="o2"/>
11.374 +</component>
11.375 +<component name="link4" title="link4" type="/IEP/Model/Link">
11.376 +<property name="name" value="link4"/>
11.377 +<property name="from" value="o8"/>
11.378 +<property name="to" value="o7"/>
11.379 +</component>
11.380 +<component name="link5" title="link5" type="/IEP/Model/Link">
11.381 +<property name="name" value="link5"/>
11.382 +<property name="from" value="o9"/>
11.383 +<property name="to" value="o13"/>
11.384 +</component>
11.385 +</component>
11.386 +</component>