Package commonj.sdo.helper

Examples of commonj.sdo.helper.DataFactory.create()


    quotesProperty.set("containment", Boolean.TRUE);
   
    types.define(mixedQuoteType);
   
    // Define a global type
    DataObject globalType = factory.create("commonj.sdo", "Type");
    globalType.set("uri", "http://www.example.com/open");
    // Don't set the type's name - null is used for types containing global properties.
   
    DataObject symbolProperty = globalType.createDataObject("property");
    symbolProperty.set("name", "symbol");
View Full Code Here


    symbolProperty.set("type", stringType);
    symbolProperty.set("containment", Boolean.TRUE);
   
    types.define(globalType);
   
    DataObject quote = factory.create("http://www.example.com/mixed", "MixedOpenQuote");

    assertTrue(quote.getType().isSequenced());
   
    Sequence sequence = quote.getSequence();
View Full Code Here

   
    Type stringType = types.getType("commonj.sdo", "String");
    Type decimalType = types.getType("commonj.sdo", "Decimal");
   
    // Define a new open type - OpenQuote
    DataObject openQuoteType = factory.create("commonj.sdo", "Type");
    openQuoteType.set("uri", "http://www.example.com/open");
    openQuoteType.set("name", "OpenQuote");
    openQuoteType.set("open", Boolean.TRUE);
    openQuoteType.setBoolean("open", true);
View Full Code Here

    openQuoteType.setBoolean("open", true);

    types.define(openQuoteType);
   
    // Define new type - CompanyType
    DataObject companyType = factory.create("commonj.sdo", "Type");
    companyType.set("uri", "http://www.example.com/open");
    companyType.set("name", "CompanyType");
   
    // Create CompanyType property - "name"
    DataObject nameProperty = companyType.createDataObject("property");
View Full Code Here

    nameProperty.set("containment", Boolean.TRUE);
   
    types.define(companyType);
   
    // Define open content property - company
    DataObject symbolProperty = factory.create("commonj.sdo", "Property");
    symbolProperty.set("name", "symbol");
    symbolProperty.set("type", stringType);
    types.defineOpenContentProperty("http://www.example.com/open", symbolProperty);

    // Define open content property - company
View Full Code Here

    symbolProperty.set("name", "symbol");
    symbolProperty.set("type", stringType);
    types.defineOpenContentProperty("http://www.example.com/open", symbolProperty);

    // Define open content property - company
    DataObject companyProperty = factory.create("commonj.sdo", "Property");
    companyProperty.set("name", "company");
    companyProperty.set("type", companyType);
    companyProperty.set("containment", Boolean.TRUE);
    types.defineOpenContentProperty("http://www.example.com/open", companyProperty);
   
View Full Code Here

    companyProperty.set("type", companyType);
    companyProperty.set("containment", Boolean.TRUE);
    types.defineOpenContentProperty("http://www.example.com/open", companyProperty);
   
    // Define open content property - price
    DataObject priceProperty = factory.create("commonj.sdo", "Property");
    priceProperty.set("name", "price");
    priceProperty.set("type", decimalType);
    types.defineOpenContentProperty("http://www.example.com/open", priceProperty);
   
    // Create DataObject instances
View Full Code Here

    priceProperty.set("name", "price");
    priceProperty.set("type", decimalType);
    types.defineOpenContentProperty("http://www.example.com/open", priceProperty);
   
    // Create DataObject instances
    DataObject openQuote = factory.create("http://www.example.com/open", "OpenQuote");
    assertTrue(openQuote.getType().isOpen());
   
    Property definedSymbolProperty = types.getOpenContentProperty("http://www.example.com/open", "symbol");
    openQuote.set(definedSymbolProperty, "s1");
   
View Full Code Here

        Type intType = types.getType("commonj.sdo", "Int");
        Type stringType = types.getType("commonj.sdo", "String");

        // create a new Type for Addresses
        DataObject addressType = factory.create("commonj.sdo", "Type");
        addressType.set("uri", "http://example.com/address");
        addressType.set("name", "Address");

        // create a address street property
        DataObject addrStProperty = addressType.createDataObject("property");
View Full Code Here

        DataObject addrStProperty = addressType.createDataObject("property");
        addrStProperty.set("name", "addrSt");
        addrStProperty.set("type", stringType);

        // create a new Type for Customers
        DataObject customerType = factory.create("commonj.sdo", "Type");
        customerType.set("uri", "http://example.com/customer");
        customerType.set("name", "Customer");

        // create a customer number property
        DataObject custNumProperty = customerType.createDataObject("property");
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.