XML files in xmlmetadata directory describe properties and structure of objects that can be created with Oracle SQL Developer Data Modeler UI or using scripting. They are used by Data Modeler (DM) in its functionality thus any changes introduced to them could break normal functionality of DM.
XML files follow internal object model used by DM and all properties of specific object can be found following parent class link. There is an HTML presentation of XML files in doc directory (use index.html) which allow faster navigation in class hierarchy direct descendents of each class are also presented there.
Two important groups can be found in each XML file properties and collections. They can be marked as external which means that property or collection is stored outside the file that represents the object. As example Table has internal collection columns i.e. columns are stored in the file that represents table; RelationalDesign class (representing relational model) has external collection Tables. Design class (representing the whole design) has external property LogicalModel and external collection RelationalModels.
Each property has getter and setter method defined that can be used to get property or set it using scripting. Collection definition provide createItem method that can be used to create item of that collection using instance of surrounding object back to Tables collection we see that table can be created using model.createTable().
ModelObject is the root of the hierarchy and each model is also instance of DesignPart class.
Changed object should be marked as changed using setDirty(true) method otherwise they wont be saved during save operation.
Each collection with type xxxxxSet allows objects to be found by name ( method getByName(name) ) and by object ID (method getObjectByID(objectID) ). Collections for tables and views in relational model also allows object to be found by schema and name using method getBySchemaAndName(schema, name). Method iterator() can be used to iterate over objects or toArray() to get them in array.
Each object has unique ID (method getObjectID() ) that can be used to get the object using method of Design instance in scripting itll be model.getDesign().getDesignObject( ID ) - that doesnt cover objects in physical models. Objects in relational and data types models have counterpart in physical model that has the same ID and can be found through instance of physical model (StorageDesign class) for relational model model.getStorageDesign().getStorageObject( ID ).
Though DM store design in set of directories and files, one can use scripting to store the whole design (or one model) into single file and to restore the status from such file:
- Saving:
model.getAppView().getXMLTransformationManager().saveObjectWithExternals("D:/SVN_Local_files/handy_whole_des_big.xml",model.getDesign());
- Loading
Since design will take the status as its stored in the file its good to be sure design is empty method isEmpty() can be used for models (DesignPart class).
model.getAppView().getXMLTransformationManager().loadObjectWithExternals("D:/SVN_Local_files/handy_whole_des_big.xml",model.getDesign());
Note about physical models only Oracle physical models are described in current revision of XML metadata thus non Oracle physical models cannot be saved into single file.
Difference between transformation and design rule design rule is invoked for each object its set to while transformation is invoked only once.
Objects appearing in search result are available using method getLastSearchResult() of model or physical model. Following code will cycle through all objects in search result:
objs = model.getLastSearchResult().toArray();
for(var i = 0;i<objs.length;i++){
obj = objs[i];
}
没有合适的资源?快使用搜索试试~ 我知道了~
资源详情
资源评论
资源推荐
收起资源包目录
Oracle连接工具sqldeveloper-4.0.3.16.84-x64 (2000个子文件)
3RDPARTY 11KB
Abidjan 65B
jmxremote.access 4KB
Accra 181B
Adak 1KB
Addis_Ababa 65B
Adelaide 1KB
Aden 65B
Algiers 333B
Almaty 453B
Amman 1KB
Amsterdam 2KB
Anadyr 585B
Anchorage 1KB
Andorra 968B
Antananarivo 89B
Antigua 77B
ANTLR-LICENSE 1KB
Apia 568B
Aqtau 453B
Aqtobe 453B
Araguaina 473B
Ashgabat 269B
Asmara 65B
example1.asp 2KB
AST4 27B
AST4ADT 2KB
Asuncion 1KB
Athens 1KB
Atikokan 93B
Auckland 1KB
Azores 2KB
Baghdad 489B
Bahia 553B
Bahia_Banderas 844B
Bahrain 77B
Baku 976B
Bamako 85B
Bangkok 65B
Bangui 65B
Banjul 77B
Barbados 137B
derby_common.bat 2KB
NetworkServerControl.bat 1KB
stopNetworkServer.bat 1KB
startNetworkServer.bat 1KB
sysinfo.bat 1KB
dblook.bat 1KB
ij.bat 1KB
setNetworkClientCP.bat 1KB
setEmbeddedCP.bat 1KB
setNetworkServerCP.bat 1KB
sqlcli.bat 741B
sqldeveloper.bat 445B
Beirut 1KB
Belem 297B
Belgrade 1KB
Belize 513B
Berlin 1KB
Bermuda 1KB
Beulah 1KB
fontconfig.bfc 4KB
Bishkek 485B
Bissau 77B
blacklist 3KB
Blanc-Sablon 93B
Blantyre 65B
Boa_Vista 329B
Bogota 89B
Boise 1KB
ide.boot 3KB
ojwebupdate.boot 1006B
sdcli.boot 446B
sqldeveloper.boot 340B
Brazzaville 65B
Brisbane 189B
Broken_Hill 1KB
Brunei 77B
Brussels 2KB
Bucharest 1KB
Budapest 1KB
Buenos_Aires 549B
Bujumbura 27B
AccessBridgeCalls.c 44KB
sample1.c 2KB
sample2.c 207B
cacerts 85KB
Cairo 1KB
Cambridge_Bay 1KB
Campo_Grande 1KB
Canary 1KB
Cancun 792B
Cape_Verde 97B
Caracas 85B
Casablanca 896B
Casey 101B
Catamarca 549B
Cayenne 77B
Cayman 65B
Center 1KB
共 2000 条
- 1
- 2
- 3
- 4
- 5
- 6
- 20
cl353454715
- 粉丝: 0
- 资源: 10
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0