SVG Binding to Java Classes for Dynamic Instance Creation
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Scalable Vector Graphics (SVG) lacks dynamic behavior and executable code hooks, limiting its ability to create multiple instances of visual elements with varying attributes without manual editing.
Innovation Solution
A binding document in a subset of XML language associates SVG element instances with JAVA classes, using the 'createFromTemplate()' method to create clone nodes and instantiate objects, allowing attribute manipulation and dynamic behavior through JAVA classes.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Adaptability or versatility
If SVG elements are manipulated through the SVG DOM tree, then the programming model is established, but no hooks exist for attaching executable code and elements remain static
Solution Approach 1:
The patent introduces a binding document as an intermediary layer between SVG elements and executable code. This binding document serves as a mediator that associates SVG element instances with Java classes, enabling dynamic behavior without directly modifying the SVG DOM tree structure. The binding document acts as a bridge that connects the static SVG elements to the dynamic Java object model.
Solution Approach 2:
The patent segments the system into distinct components: SVG elements for visual representation, binding documents for association rules, and Java classes for behavior. This segmentation allows each component to maintain its original simplicity while enabling complex interactions through the binding document that maps between SVG elements and Java objects, avoiding the need to complicate the core SVG DOM tree.
2Productivity
If multiple instances of SVG elements are created with varying attributes, then visual diversity is achieved, but manual editing is required for each instance
Solution Approach 1:
The binding document is created in advance with pre-defined associations between SVG element instances and Java classes. This preliminary configuration allows the system to automatically generate multiple instances with varying attributes by instantiating the associated Java classes, eliminating the need for manual editing of each instance. The binding document serves as a template that guides automatic instance creation.
Solution Approach 2:
The patent uses the Java object instantiation mechanism to create copies of SVG elements with varying attributes. Instead of manually copying and editing SVG code for each instance, the system copies the binding document associations and instantiates corresponding Java objects, which automatically generate multiple SVG element instances with different attributes through object property configuration.
3Adaptability or versatility
If SVG elements are made dynamic with executable code, then behavior is enabled, but the simplicity of the SVG language is compromised
Solution Approach 1:
The binding document serves as an intermediary that preserves the simplicity of the SVG language while enabling dynamic behavior. SVG elements remain simple XML-based descriptions, and the binding document acts as a separate layer that associates these simple elements with Java classes containing executable code. This mediator approach allows behavior to be added without complicating the core SVG language syntax.
Solution Approach 2:
The patent segments functionality into three distinct parts: simple SVG elements for visual description, binding documents for association rules, and Java classes for executable behavior. This segmentation allows the SVG language to remain simple while enabling complex behavior through the separate Java layer, with the binding document providing the connection between the simple visual elements and the complex behavior without requiring changes to either component.
Data Source
AI summary
According to a technique described herein, a binding document comprises one or more “<bind>” element instances. Each “<bind>” element instance indicates an association between (a) an SVG element instance and (b) a class. When a binding's name is passed to a “createFromTemplate( )” method, the method processes all of the “<bind>” element instances that are associated within that name. For each such “<bind>” element instance, the method (a) creates, in an SVG DOM tree, a clone of a node that corresponds to an SVG element instance indicated in that “<bind>” element instance, (b) instantiates an object that is an instance of a class that is indicated in that “<bind>” element instance, and (c) stores data that establishes a binding between the clone node and the object. Methods of the object can be invoked to affect and/or alter attributes of the clone node to which the object is bound.


