Difference between revisions of "DOM guide: Introduction"

From COLLADA Public Wiki
Jump to navigation Jump to search
 
(8 intermediate revisions by 2 users not shown)
Line 2: Line 2:
  
 
==Overview==
 
==Overview==
The COLLADA DOM is a comprehensive framework for the development of COLLADA applications. The DOM provides a C++ programming interface to load, query, and translate COLLADA instance data. The DOM loads COLLADA data into a [[runtime database]] consisting of structures that mirror those defined in the [[COLLADA schema]].
+
The COLLADA DOM is a comprehensive framework for the development of COLLADA applications. The DOM provides a C++ programming interface to load, query, and translate COLLADA instance data. The DOM loads COLLADA data into a [[runtime database]] consisting of structures that mirror those defined in the [[COLLADA schema]].
 
 
An application can query and manipulate the loaded COLLADA instance data either directly in the runtime database using the DOM's built-in objects and methods, or use [[integration template]]s to move the data into the application's own data structures and use its own querying and manipulation functions.
 
  
 
==Design Advantages==
 
==Design Advantages==
 
The COLLADA DOM's design provides several desirable features.
 
The COLLADA DOM's design provides several desirable features.
  
===Simple Data Transformation===
+
===Replaceable I/O Plug-In===
The COLLADA DOM provides a means for users to write translation code to transform data loaded into the COLLADA runtime database into data structures native to their own tools or engines. The API provides plug-in points to eliminate the need to understand the underlying framework in order to write this translation.
+
The DOM uses a repository-neutral strategy that allows future use of the COLLADA DOM with database systems based on XML or binary data representations.
 
 
===Replaceable Backend===
 
The DOM uses a repository-neutral strategy that allows future use of the COLLADA DOM with database systems based on XML or binary data representations. In this way, the COLLADA DOM eliminates any dependence on a particular underlying specification format.
 
  
 
===Schema Driven===
 
===Schema Driven===
The COLLADA DOM [[object model]] uses structures derived directly from the [[COLLADA schema]]. Sony's [[code generator]] generates the C++ definitions of these runtime structures automatically so that they are always consistent and accurate. This correspondence means that the DOM can be kept in sync with the COLLADA schema as it is further developed.
+
The COLLADA DOM [[object model]] uses structures derived directly from the [[COLLADA schema]]. The DOM [[code generator]] generates the C++ definitions of these runtime structures automatically so that they are always consistent and accurate. This correspondence means that the DOM can be kept in sync with the COLLADA schema as it is further developed.
  
 
===COLLADA-Specific Parser===
 
===COLLADA-Specific Parser===
Line 33: Line 28:
 
**A mechanism for converting COLLADA object model elements to user-defined data structures.
 
**A mechanism for converting COLLADA object model elements to user-defined data structures.
 
**A database query manager.
 
**A database query manager.
*[[DOM backend]]: Components responsible for translating external COLLADA instance data into C++ runtime COLLADA objects.
+
*[[I/O plug-in]]: Components responsible for translating external COLLADA instance data into C++ runtime COLLADA objects.
  
 
These components are described in more detail in [[DOM guide: Architecture]].
 
These components are described in more detail in [[DOM guide: Architecture]].
  
{{DOM tutorial}}
+
{{DOM navigation}}
  
[[Category:DOM tutorial|Introduction]]
+
[[Category:COLLADA DOM|Introduction]]

Latest revision as of 23:18, 6 February 2008

The COLLADA Document Object Model (DOM) is an application programming interface (API) that provides a C++ object representation of a COLLADA XML instance document.

Overview

The COLLADA DOM is a comprehensive framework for the development of COLLADA applications. The DOM provides a C++ programming interface to load, query, and translate COLLADA instance data. The DOM loads COLLADA data into a runtime database consisting of structures that mirror those defined in the COLLADA schema.

Design Advantages

The COLLADA DOM's design provides several desirable features.

Replaceable I/O Plug-In

The DOM uses a repository-neutral strategy that allows future use of the COLLADA DOM with database systems based on XML or binary data representations.

Schema Driven

The COLLADA DOM object model uses structures derived directly from the COLLADA schema. The DOM code generator generates the C++ definitions of these runtime structures automatically so that they are always consistent and accurate. This correspondence means that the DOM can be kept in sync with the COLLADA schema as it is further developed.

COLLADA-Specific Parser

The COLLADA DOM provides several advantages over using a standard XML DOM parser to read COLLADA instance documents:

  • With the COLLADA DOM, you need concern yourself only with the specific elements that you want to use or modify. The other elements in an instance document are automatically preserved and are written back to the document when you save the data.
  • The COLLADA DOM automatically resolves URIs upon loading a COLLADA instance document; there is no need to write your own resolver or to search through the data to find referenced URIs.
  • The API converts text strings within the COLLADA instance document into their appropriate binary forms. For example, it converts the text form of a number such as “1.345” into a C++ floating-point number.

Architecture Summary

The COLLADA DOM framework includes these basic components:

  • DOM object model. Includes:
  • DOM runtime database. Manages COLLADA elements. A reference implementation is provided via the C++ standard library. Includes:
    • The C++ structures for specific instances of the COLLADA object model.
    • A mechanism for converting COLLADA object model elements to user-defined data structures.
    • A database query manager.
  • I/O plug-in: Components responsible for translating external COLLADA instance data into C++ runtime COLLADA objects.

These components are described in more detail in DOM guide: Architecture.


COLLADA DOM - Version 2.4 Historical Reference
List of main articles under the DOM portal.
User Guide chapters:  • Intro  • Architecture  • Setting up  • Working with documents  • Creating docs  • Importing docs  • Representing elements  • Working with elements  • Resolving URIs  • Resolving SIDs  • Using custom COLLADA data  • Integration templates  • Error handling

Systems:  • URI resolver  • Meta  • Load/save flow  • Runtime database  • Memory • StringRef  • Code generator
Additional information:  • What's new  • Backward compatibility  • Future work
Terminology categories:  • COLLADA  • DOM  • XML