Return-Path: Delivered-To: apmail-ws-tuscany-commits-archive@locus.apache.org Received: (qmail 48709 invoked from network); 6 Jun 2007 07:30:16 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 6 Jun 2007 07:30:16 -0000 Received: (qmail 91449 invoked by uid 500); 6 Jun 2007 07:30:20 -0000 Delivered-To: apmail-ws-tuscany-commits-archive@ws.apache.org Received: (qmail 91419 invoked by uid 500); 6 Jun 2007 07:30:20 -0000 Mailing-List: contact tuscany-commits-help@ws.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: tuscany-dev@ws.apache.org Delivered-To: mailing list tuscany-commits@ws.apache.org Received: (qmail 91410 invoked by uid 99); 6 Jun 2007 07:30:20 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Jun 2007 00:30:20 -0700 X-ASF-Spam-Status: No, hits=-99.5 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Jun 2007 00:30:15 -0700 Received: by eris.apache.org (Postfix, from userid 65534) id 4083F1A981A; Wed, 6 Jun 2007 00:29:55 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r544749 - in /incubator/tuscany/cpp/das: VSExpress/tuscany_das/ VSExpress/tuscany_das/Build/ VSExpress/tuscany_das/das_runtime/ VSExpress/tuscany_das/das_test/ runtime/core/include/apache/das/rdb/ runtime/core/resource/ runtime/core/src/ ru... Date: Wed, 06 Jun 2007 07:29:54 -0000 To: tuscany-commits@ws.apache.org From: adrianocrestani@apache.org X-Mailer: svnmailer-1.1.0 Message-Id: <20070606072955.4083F1A981A@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: adrianocrestani Date: Wed Jun 6 00:29:53 2007 New Revision: 544749 URL: http://svn.apache.org/viewvc?view=rev&rev=544749 Log: - DAS doesn't need anymore config.xsd to load xml configuration files Removed: incubator/tuscany/cpp/das/VSExpress/tuscany_das/Build/config.xsd incubator/tuscany/cpp/das/runtime/core/resource/ Modified: incubator/tuscany/cpp/das/VSExpress/tuscany_das/das_runtime/das_runtime.vcproj incubator/tuscany/cpp/das/VSExpress/tuscany_das/das_test/das_test.vcproj incubator/tuscany/cpp/das/VSExpress/tuscany_das/tuscany_das.suo incubator/tuscany/cpp/das/runtime/core/include/apache/das/rdb/ConfigImpl.h incubator/tuscany/cpp/das/runtime/core/include/apache/das/rdb/das_constants.h incubator/tuscany/cpp/das/runtime/core/src/apache/das/DataGraphPrinter.cpp incubator/tuscany/cpp/das/runtime/core/src/apache/das/rdb/ConfigImpl.cpp incubator/tuscany/cpp/das/runtime/core/src/deploy.bat incubator/tuscany/cpp/das/runtime/test/src/main.cpp Modified: incubator/tuscany/cpp/das/VSExpress/tuscany_das/das_runtime/das_runtime.vcproj URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/das/VSExpress/tuscany_das/das_runtime/das_runtime.vcproj?view=diff&rev=544749&r1=544748&r2=544749 ============================================================================== --- incubator/tuscany/cpp/das/VSExpress/tuscany_das/das_runtime/das_runtime.vcproj (original) +++ incubator/tuscany/cpp/das/VSExpress/tuscany_das/das_runtime/das_runtime.vcproj Wed Jun 6 00:29:53 2007 @@ -124,6 +124,8 @@ > #include "commonj/sdo/DataFactory.h" +#include "commonj/sdo/DataFactoryImpl.h" #include "commonj/sdo/XSDHelper.h" #include "commonj/sdo/XMLHelper.h" #include "commonj/sdo/HelperProvider.h" Modified: incubator/tuscany/cpp/das/runtime/core/include/apache/das/rdb/das_constants.h URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/das/runtime/core/include/apache/das/rdb/das_constants.h?view=diff&rev=544749&r1=544748&r2=544749 ============================================================================== --- incubator/tuscany/cpp/das/runtime/core/include/apache/das/rdb/das_constants.h (original) +++ incubator/tuscany/cpp/das/runtime/core/include/apache/das/rdb/das_constants.h Wed Jun 6 00:29:53 2007 @@ -1,3 +1,3 @@ #define DAS_ROOT_NAME "DAS_ROOT" -#define DAS_NAMESPACE "das.lite" +#define DAS_NAMESPACE "apache.das" #define SDO_NAMESPACE "commonj.sdo" Modified: incubator/tuscany/cpp/das/runtime/core/src/apache/das/DataGraphPrinter.cpp URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/das/runtime/core/src/apache/das/DataGraphPrinter.cpp?view=diff&rev=544749&r1=544748&r2=544749 ============================================================================== --- incubator/tuscany/cpp/das/runtime/core/src/apache/das/DataGraphPrinter.cpp (original) +++ incubator/tuscany/cpp/das/runtime/core/src/apache/das/DataGraphPrinter.cpp Wed Jun 6 00:29:53 2007 @@ -33,20 +33,35 @@ const commonj::sdo::TypeList& typeList = root->getDataFactory()->getTypes(); for (unsigned int i = 0 ; i < typeList.size() ; i++) { - out << std::endl << "[" << typeList[i].getName() << "]" << std::endl; + out << std::endl << "[" << typeList[i].getName(); + + const commonj::sdo::Type* base = typeList[i].getBaseType(); + out << "{"; + out << " baseType = " << ((base == 0) ? "NULL" : base->getName()); + out << " uri = " << typeList[i].getURI(); + out << " abstractType = " << typeList[i].isAbstractType(); + out << " changeSummaryType = " << typeList[i].isChangeSummaryType(); + out << " dataObjectType = " << typeList[i].isDataObjectType(); + out << " dataType = " << typeList[i].isDataType(); + out << " openType = " << typeList[i].isOpenType(); + out << " sequencedType = " << typeList[i].isSequencedType(); + out << "} ]" << std::endl; + commonj::sdo::PropertyList propertyList = typeList[i].getProperties(); for (unsigned int j = 0 ; j < propertyList.size() ; j++) { out << propertyList[j].getName(); - - if (propertyList[j].isReference()) { - out << "-> "; - } else { - out << " - "; - } - - out << propertyList[j].getType().getName() << std::endl; + out << "{"; + out << " type = " << propertyList[j].getType().getName(); + out << " alias = " << propertyList[j].getAlias(); + out << " aliasCount = " << propertyList[j].getAliasCount(); + out << " contaiment = " << propertyList[j].isContainment(); + out << " defaulted = " << propertyList[j].isDefaulted(); + out << " many = " << propertyList[j].isMany(); + out << " readOnly = " << propertyList[j].isReadOnly(); + out << " reference = " << propertyList[j].isReference(); + out << "}" << std::endl; } Modified: incubator/tuscany/cpp/das/runtime/core/src/apache/das/rdb/ConfigImpl.cpp URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/das/runtime/core/src/apache/das/rdb/ConfigImpl.cpp?view=diff&rev=544749&r1=544748&r2=544749 ============================================================================== --- incubator/tuscany/cpp/das/runtime/core/src/apache/das/rdb/ConfigImpl.cpp (original) +++ incubator/tuscany/cpp/das/runtime/core/src/apache/das/rdb/ConfigImpl.cpp Wed Jun 6 00:29:53 2007 @@ -59,15 +59,55 @@ tables = new std::map(); convOverConfig = false; - commonj::sdo::DataFactoryPtr df = commonj::sdo::DataFactory::getDataFactory(); - commonj::sdo::XSDHelperPtr xsdh = commonj::sdo::HelperProvider::getXSDHelper(df); - xsdh->defineFile("config.xsd"); - commonj::sdo::XMLHelperPtr xmlh = commonj::sdo::HelperProvider::getXMLHelper(df); - commonj::sdo::XMLDocumentPtr doc = xmlh->loadFile(xmlFile.c_str()); + commonj::sdo::DataFactoryPtr dataFactory = commonj::sdo::DataFactory::getDataFactory(); + dataFactory->addType(DAS_NAMESPACE, "RootType"); + dataFactory->addType(DAS_NAMESPACE, "Table"); + dataFactory->addType(DAS_NAMESPACE, "Relationship"); + dataFactory->addType(DAS_NAMESPACE, "KeyPair"); + dataFactory->addType(DAS_NAMESPACE, "Column"); + dataFactory->addType(DAS_NAMESPACE, "Config"); + + const commonj::sdo::Type& rootType = dataFactory->getType(DAS_NAMESPACE, "RootType"); + const commonj::sdo::Type& table = dataFactory->getType(DAS_NAMESPACE, "Table"); + const commonj::sdo::Type& relationship = dataFactory->getType(DAS_NAMESPACE, "Relationship"); + const commonj::sdo::Type& keyPair = dataFactory->getType(DAS_NAMESPACE, "KeyPair"); + const commonj::sdo::Type& column = dataFactory->getType(DAS_NAMESPACE, "Column"); + const commonj::sdo::Type& config = dataFactory->getType(DAS_NAMESPACE, "Config"); + + dataFactory->addPropertyToType(rootType, "Config", config); + + dataFactory->addPropertyToType(table, "Column", column, true, false, true); + dataFactory->addPropertyToType(table, "tableName", SDO_NAMESPACE, "String", false, false, true); + dataFactory->addPropertyToType(table, "typeName", SDO_NAMESPACE, "String", false, false, true); + + dataFactory->addPropertyToType(config, "Table", table, true, false, true); + dataFactory->addPropertyToType(config, "Relationship", relationship, true, false, true); + dataFactory->addPropertyToType(config, "uri", SDO_NAMESPACE, "String", false, false, true); + + dataFactory->addPropertyToType(relationship, "KeyPair", keyPair, true, false, true); + dataFactory->addPropertyToType(relationship, "name", SDO_NAMESPACE, "String", false, false, true); + dataFactory->addPropertyToType(relationship, "primaryKeyTable", SDO_NAMESPACE, "String", false, false, true); + dataFactory->addPropertyToType(relationship, "foreignKeyTable", SDO_NAMESPACE, "String", false, false, true); + dataFactory->addPropertyToType(relationship, "many", SDO_NAMESPACE, "Boolean", false, false, true); + dataFactory->setDefault(relationship, "many", true); + + dataFactory->addPropertyToType(keyPair, "primaryKeyColumn", SDO_NAMESPACE, "String", false, false, true); + dataFactory->addPropertyToType(keyPair, "foreignKeyColumn", SDO_NAMESPACE, "String", false, false, true); + + dataFactory->addPropertyToType(column, "columnName", SDO_NAMESPACE, "String", false, false, true); + dataFactory->addPropertyToType(column, "sqlType", SDO_NAMESPACE, "String", false, false, true); + dataFactory->addPropertyToType(column, "propertyName", SDO_NAMESPACE, "String", false, false, true); + dataFactory->addPropertyToType(column, "primaryKey", SDO_NAMESPACE, "Boolean", false, false, true); + dataFactory->setDefault(column, "primaryKey", false); + + dataFactory->resolve(); + + commonj::sdo::XMLHelperPtr xmlh = commonj::sdo::HelperProvider::getXMLHelper(dataFactory); + commonj::sdo::XMLDocumentPtr doc = xmlh->loadFile(xmlFile.c_str(), DAS_NAMESPACE); commonj::sdo::DataObjectPtr root = doc->getRootDataObject(); commonj::sdo::DataObjectList& tableList = root->getList("Table"); - + for (unsigned int i = 0 ; i < tableList.size() ; i++) { std::string tableName = SDODataObjectWrapper(tableList[i]).getString("tableName"); Modified: incubator/tuscany/cpp/das/runtime/core/src/deploy.bat URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/das/runtime/core/src/deploy.bat?view=diff&rev=544749&r1=544748&r2=544749 ============================================================================== --- incubator/tuscany/cpp/das/runtime/core/src/deploy.bat (original) +++ incubator/tuscany/cpp/das/runtime/core/src/deploy.bat Wed Jun 6 00:29:53 2007 @@ -37,7 +37,6 @@ if not exist %deploydir% mkdir %deploydir% -if not exist %deploydir%\resource mkdir %deploydir%\resource if not exist %deploydir%\lib mkdir %deploydir%\lib if not exist %deploydir%\include mkdir %deploydir%\include if not exist %deploydir%\include\apache mkdir %deploydir%\include\apache @@ -47,9 +46,6 @@ if not exist %deploydir%\include\apache\das\rdb mkdir %deploydir%\include\apache\das\rdb - -copy %includedir%\resource\* %deploydir%\resource - copy %includedir%\include\apache\das\* %deploydir%\include\apache\das copy %includedir%\include\apache\das\rdb\* %deploydir%\include\apache\das\rdb Modified: incubator/tuscany/cpp/das/runtime/test/src/main.cpp URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/das/runtime/test/src/main.cpp?view=diff&rev=544749&r1=544748&r2=544749 ============================================================================== --- incubator/tuscany/cpp/das/runtime/test/src/main.cpp (original) +++ incubator/tuscany/cpp/das/runtime/test/src/main.cpp Wed Jun 6 00:29:53 2007 @@ -1,3 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + #include #include #include --------------------------------------------------------------------- To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org For additional commands, e-mail: tuscany-commits-help@ws.apache.org