Package commonj.sdo.helper

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


       
        HelperContext helperContext = SDOContextHelper.getHelperContext(operation);
        Type sdoType = getSDOType(helperContext, element);
        if (sdoType != null) {
            DataFactory dataFactory = helperContext.getDataFactory();
            return dataFactory.create(sdoType);
        }
        return null;
    }

    public void setChildren(Object wrapper, Object[] childObjects, Operation operation, boolean input) {
View Full Code Here


     */
    public Object create(ElementInfo element, TransformationContext context) {
        HelperContext helperContext = SDOContextHelper.getHelperContext(context);
        QName typeName = element.getType().getQName();
        DataFactory dataFactory = helperContext.getDataFactory();
        DataObject root = dataFactory.create(typeName.getNamespaceURI(), typeName.getLocalPart());
        XMLHelper xmlHelper = helperContext.getXMLHelper();
        return xmlHelper.createDocument(root, element.getQName().getNamespaceURI(), element.getQName().getLocalPart());
    }

    /**
 
View Full Code Here

        // Class<?> wrapperClass = input ? wrapperInfo.getInputWrapperClass() : wrapperInfo.getOutputWrapperClass();
        HelperContext helperContext = SDOContextHelper.getHelperContext(operation);
        Type sdoType = getSDOType(helperContext, element);
        if (sdoType != null) {
            DataFactory dataFactory = helperContext.getDataFactory();
            return dataFactory.create(sdoType);
        }
        return null;
    }

    public void setChildren(Object wrapper, Object[] childObjects, Operation operation, boolean input) {
View Full Code Here

        TypeHelper types = hc.getTypeHelper();
        DataFactory dataFactory = hc.getDataFactory();
   
      Type stringType = types.getType("commonj.sdo", "String");
       
      DataObject testType = dataFactory.create("commonj.sdo", "Type");
      testType.set("uri", "http://www.example.com/api_test");
      testType.set("name", "APITest");
     
        DataObject stringProperty = testType.createDataObject("property");
        stringProperty.set("name", "stringVal");
View Full Code Here

        types2Define.add(testType);
        List apiXSD = types.define(types2Define);
        Type apiXSDType = (Type) apiXSD.get(0);
       
        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);
       
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

    Type stringType = types.getType("commonj.sdo", "String");
   
    Property xmlElementProp = hc.getXSDHelper().getGlobalProperty("commonj.sdo/xml", "xmlElement", false);
   
    // 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 as an XSD attribute
View Full Code Here

    customerType = xdoc.getRootObject();
   
    // now define the Customer type so that customers can be made
    types.define(customerType);
   
    DataObject customer1 = factory.create("http://example.com/customer",
    "Customer");
   
    customer1.setInt("custNum", 1);
    customer1.set("firstName", "John");
    customer1.set("lastName", "Adams");
View Full Code Here

    "Customer");
   
    customer1.setInt("custNum", 1);
    customer1.set("firstName", "John");
    customer1.set("lastName", "Adams");
    DataObject customer2 = factory.create("http://example.com/customer",
    "Customer");   
    customer2.setInt("custNum", 2);
    customer2.set("firstName", "Jeremy");
    customer2.set("lastName", "Pavick");
   
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.