Examples of DataGraph


Examples of commonj.sdo.DataGraph

  }



  public void testDynamicNestedDataObjectsDG() throws Exception {
    DataGraph dataGraph = SDOUtil.createDataGraph();
    DataObject quote = dataGraph.createRootObject(th.getType("http://www.example.com/simple", "Quote"));

    testDynamicNestedDOBody(quote);
   
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    SDOUtil.saveDataGraph(dataGraph, baos, null);
    // SDOUtil.saveDataGraph(dataGraph, System.out, null);
   
   assertTrue(TestUtil.equalXmlFiles(new ByteArrayInputStream(baos.toByteArray()), getClass().getResource(TEST_DATA)));

  
    assertEquals(1, quote.getList("quotes").size());
    assertEquals("fbnt", quote.getString("symbol"));
    dataGraph.getChangeSummary().undoChanges();
    // SDOUtil.saveDataGraph(dataGraph, System.out, null);
    assertEquals(0, quote.getList("quotes").size());
    assertNull(quote.getString("symbol"));
   
View Full Code Here

Examples of commonj.sdo.DataGraph

    }
       
    public void testScopeDefinedSerializeDeserializeOfDataGraph()
    {
        HelperContext hc = SDOUtil.createHelperContext();
        DataGraph testDO = (DataGraph)createDynamically(hc,false);
       
        runSerializeDeserializeWithDataGraph(testDO, hc);
    }
View Full Code Here

Examples of commonj.sdo.DataGraph

       
        if(createDataObject)
            return dataFactory.create(apiXSDType);;
       
        // Create an empty DataGraph and attach the document root to it. Otherwise, where is the documentRoot ?
        DataGraph dataGraph = SDOUtil.createDataGraph();
        /*DataObject testDO =*/ dataGraph.createRootObject(apiXSDType);
       
       
        return dataGraph;
       
    }
View Full Code Here

Examples of commonj.sdo.DataGraph

        List typesDefined = types.define(types2define);

        // Create an empty data graph and add a root object, an instance of customerType
        //

        DataGraph dataGraph = SDOUtil.createDataGraph();
        Type customerTypeDefined = (Type) typesDefined.get(1);
        DataObject customer1 = dataGraph.createRootObject(customerTypeDefined);

        customer1.setInt("custNum", 1);
        customer1.set("firstName", "John");
        customer1.set("lastName", "Adams");
        DataObject address = customer1.createDataObject("address");
        address.set("addrSt", "577 Airport Blvd");

        SDOUtil.registerDataGraphTypes(dataGraph, typesDefined);

        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        SDOUtil.saveDataGraph(dataGraph, baos, null);
        //SDOUtil.saveDataGraph(dataGraph, System.out, null);

        byte[] serialized = baos.toByteArray();
        ByteArrayInputStream bais = new ByteArrayInputStream(serialized);
        DataGraph loadedDataGraph = SDOUtil.loadDataGraph(bais, null, hc);

        DataObject loadedRootObject = loadedDataGraph.getRootObject();
        assertNotSame(loadedRootObject.getType(), customer1.getType());

        // EqualityHelper requires same Type
        assertEquals(loadedRootObject.getInt("custNum"), customer1.getInt("custNum"));
        assertEquals(loadedRootObject.get("firstName"), customer1.get("firstName"));
View Full Code Here

Examples of commonj.sdo.DataGraph

     * createRootObject(type) test with good parms.
     */
    public void testCreateRootObjectType() throws IOException {
        // Create an empty data graph and add a root object, an instance of type Quote
     
        DataGraph dataGraph = SDOUtil.createDataGraph();
        Type quoteType = dataGraph.getType("http://www.example.com/simple", "Quote");
        DataObject quote = dataGraph.createRootObject(quoteType);

        assertNotNull(quote);
    }
View Full Code Here

Examples of commonj.sdo.DataGraph

     * createRootObject(type) test with bad parm.
     */
    public void testCreateRootObjectTypeBad() throws IOException {
        // Create an empty data graph and pass bad parms to createRootObject
     
        DataGraph dataGraph = SDOUtil.createDataGraph();
        boolean success = false;
        try {
            dataGraph.createRootObject(null);
        } catch(NullPointerException npe) {
            fail("createRootObject with null type threw NullPointerException");
        } catch(Exception e) {
            success = true;
        }
View Full Code Here

Examples of lupos.gui.operatorgraph.visualeditor.dataeditor.guielements.DataGraph

  public CondensedViewViewer(final Prefix prefix, final boolean standAlone,
      final Image image, final JPanel toolbar) {
    super(standAlone);

    this.visualGraphs.add(new DataGraph(this, prefix));
    this.frame = this.createMainWindowSingleGraph("LUPOSDATE-Condensed Data", true,
        image);

    this.frame.getContentPane().add(toolbar, BorderLayout.SOUTH);
View Full Code Here

Examples of lupos.gui.operatorgraph.visualeditor.dataeditor.guielements.DataGraph

  private JFrame create(final String n3daten, final Image image) {
    LANGUAGE.SEMANTIC_WEB.setStyles();

    this.prefix = new VEPrefix(true);

    this.visualGraphs.add(new DataGraph(this, this.prefix));

    final JFrame frame = this.createMainWindowSingleGraph(
        "LUPOSDATE-DEdit", true, image);

    if (!n3daten.equals("")) {
View Full Code Here

Examples of nz.co.abrahams.asithappens.cartgraph.DataGraph

        FlowOptions options;
        PacketTraceLoadTask task;
        ProgressBar progressBar;
        FlowData data;
        TimeSeriesContext context;
        DataGraph graphFrame;
        SimpleDateFormat dateFormat;
        long fromDate;
        long toDate;
       
        try {
View Full Code Here

Examples of nz.co.abrahams.asithappens.cartgraph.DataGraph

        }
    }//GEN-LAST:event_fileButtonActionPerformed
   
    public static void createGraph(Component parent, DataSets dataSets) {
        TimeSeriesContext context;
        DataGraph graphFrame;
       
        try {
            context = new TimeSeriesContext(dataSets);
            graphFrame = new DataGraph(context);
            //graphFrame.setVisible(true);
        } catch (Exception e) {
            ErrorHandler.modalError(parent, e.toString(), "Problem creating graph", e);
        }       
    }   
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.