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.
Tuscany SDO Committers Guide
============================
All classes should be in the commonj/sdo namespace.
The Tuscany SDO codebase consists of a number of abstract classes representing the SDO API. These
are accompanied by a set of classes whose names end in Impl, which are the implementations of the
API. For example the DataObject API is represented by the DataObject class, and implemented by
the DataObjectImpl class.
When pointers to classes are handed out by the library, they are really pointing at instances of
the Impl class, but the application must not make that assumption.
DataObjects and DataFactories inherit from a base class which maintains a reference count on
itself (RefCountingObject). The pointers handed out are really classes holding a pointer to
the object, such that they can contribute to the reference count when copied. These RefCountingPointers
must not be deleted, they dispose of the underlying object when the reference count drops to
zero.
There is trace commented out of RefCountingObject, which can count and report the references. It is
particularly useful to check that all instances are cleared at the end of a program run.
The API for metadata consists of the DataFactory, Property and Type classes. All Properties and Types
handed out to the client are const, so setting up the modifying the types is done using APIS of the
data factory.
The process of creating types is usually done by loading them from XSD, but can also be performed
by using the data factory. Properties and Types may both be defined, but the data factory 'locks'
itself as soon as the first DataObject is created. It does this because at that point it needs to
resolve the type hierarchy, and perform validation. For consistency a Type may not be modified once
an instance has been created.
A data object contains properties, which are of a particular Type, however the API allows access to
all properties using any of the methods. getString() may be called on a Boolean property etc. The
conversion is attempted by the Type class, and either throws an exception or passes back a converted
value according to the tables in the specification.
The get/set APIs of DataObject are supplied by a set of macros in DataObjectImpl.cpp. These are
duplicated for string and non-string, and also make it hard to debug effectively. They will be
removed and replaced by methods in the future. For now, the easiest way to debug them is to be
aware that each eventually calls the private no-params method, so for example all the getString(...)
methods eventually call getString().
The internal string handling is partially working with the SDOXMLString class, and partially still uses
allocated char* buffers, these will be replaced by SDOXMLStrings in the future.
The parsers for XML are absed on the SAX2Parser class, but the bulk of the processing is done by the
startElementNS and similar methods in the SDOSchemaSAX2parser and SDOSAX2Parser classes. These are called
back by the libxml2 library, and build a picture of the information which it then decoded by the XSDhelper
or XMLHelper class into metadata or data.
There are easy targets for improvements of performance, particularly in DataObject and parsing of XSD
input, here is a list of a few that I can think of:
DataObject frequently maps from Property to index, and this could be re-organized to avoid most of these.
The allocation of space for property values could in most cases be dropped - its usually s fixed size
element.
The use of DataObject as a means of storing lists of primitives is not optimal, and should be replaced.
The ChangeSummary class holds the previous value of any property when it is changed. At present, for many-
valued properties, it holds the entire list as it was before an addition. This could just keep a record of
the changes, and only save the old list when serializing.
Parsing the XSD loops though types checking that all substitutes are covered, it would be good to
replace this.
没有合适的资源?快使用搜索试试~ 我知道了~
Tuscany的开源项目Tuscany_sdo(C++版)
共142个文件
h:90个
xsd:6个
cpp:6个
需积分: 9 14 下载量 200 浏览量
2009-01-12
11:09:07
上传
评论
收藏 560KB ZIP 举报
温馨提示
sdo为各种数据提供了一个通用的操作接口。
资源推荐
资源详情
资源评论
收起资源包目录
Tuscany的开源项目Tuscany_sdo(C++版) (142个子文件)
deploy.bat 2KB
build.bat 1KB
COPYING 11KB
COPYING 11KB
ObjectCreation.cpp 7KB
ChangeSummarySave.cpp 6KB
Query.cpp 6KB
Substitutes.cpp 4KB
XSDLoading.cpp 4KB
samples.cpp 1KB
maven-theme.css 4KB
maven-base.css 3KB
mt.dep 62B
tuscany_sdo.dll 656KB
tuscany_sdo_axiom.dll 16KB
sdo_misc.exe 48KB
sdo_misc.exe 48KB
DataObjectImpl.h 29KB
DataFactory.h 26KB
DataObject.h 26KB
DataFactoryImpl.h 23KB
SequenceImpl.h 20KB
Sequence.h 17KB
SDORuntimeException.h 15KB
ChangeSummaryImpl.h 14KB
TypeImpl.h 13KB
SDOValue.h 10KB
ChangeSummaryBuilder.h 10KB
PropertyImpl.h 9KB
SDOSchemaSAX2Parser.h 9KB
DataObjectList.h 8KB
DataObjectListImpl.h 8KB
ChangeSummary.h 7KB
Property.h 7KB
XMLHelper.h 7KB
XMLHelperImpl.h 7KB
Type.h 7KB
RefCountingPointer.h 6KB
XSDHelperImpl.h 6KB
SDOSAX2Parser.h 6KB
XMLDocument.h 5KB
DataTypeInfo.h 5KB
PropertyDefinition.h 5KB
XSDHelper.h 5KB
Logging.h 4KB
Setting.h 4KB
SDOXMLWriter.h 4KB
SDODataConverter.h 4KB
TypeDefinition.h 4KB
XMLDocumentImpl.h 4KB
EqualityHelper.h 4KB
SDOXMLString.h 4KB
SAX2Parser.h 4KB
ChangedDataObjectListImpl.h 3KB
DataGraphImpl.h 3KB
CopyHelper.h 3KB
DataGraph.h 3KB
SDOUtils.h 3KB
sdo_axiom.h 3KB
PropertyDefinitionImpl.h 3KB
SDOXSDWriter.h 2KB
SAX2Attributes.h 2KB
PropertyList.h 2KB
SDO.h 2KB
TypeDefinitionImpl.h 2KB
ChangedDataObjectList.h 2KB
DataObjectInstance.h 2KB
SDODate.h 2KB
SAX2Namespaces.h 2KB
ParserErrorSetter.h 2KB
XMLQName.h 2KB
Logger.h 2KB
GroupEvent.h 2KB
SAX2Attribute.h 2KB
XSDPropertyInfo.h 2KB
PropertySetting.h 2KB
SettingList.h 2KB
RefCountingObject.h 2KB
SchemaInfo.h 2KB
HelperProvider.h 2KB
TypeDefinitions.h 2KB
SdoRuntime.h 2KB
SDOXSDStreamWriter.h 2KB
DASValues.h 2KB
XSDTypeInfo.h 2KB
TypeDefinitionsImpl.h 2KB
SDOXMLStreamWriter.h 2KB
TypeList.h 2KB
DefaultLogWriter.h 2KB
GroupDefinition.h 2KB
DASValue.h 2KB
SDOXMLBufferWriter.h 2KB
SDOXSDBufferWriter.h 2KB
SDOXMLFileWriter.h 2KB
XpathHelper.h 2KB
SDOXSDFileWriter.h 1KB
DASType.h 1KB
export.h 1KB
LogWriter.h 1KB
DASProperty.h 1KB
共 142 条
- 1
- 2
资源评论
ling091
- 粉丝: 7
- 资源: 5
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- unidac29 for delphi 12.1
- Cauchy奇异积分的数值计算程序
- 基于Python实现的股票量化交易策略源代码+视频讲解+案例代码,含RSI策略、BOP指标策略、KDJ策略、MACD指标策略等
- EDA编码.zip
- 文本分类任务训练神经网络来学习词汇表中每个词的词向量
- MyBatis进阶技巧:探索动态SQL的无限可能.md
- HM2300C-VB一款N-Channel沟道SOT23的MOSFET晶体管参数介绍与应用说明
- HM2300B-VB一款N-Channel沟道SOT23的MOSFET晶体管参数介绍与应用说明
- 员工解除劳动合同申请表.pdf
- 物模块模型代码,前往设计物模块所属
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功