# US 7,412,689 B1 · Method and apparatus for creating a hierarchical model to facilitate identifying components in a programming language file

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 7,412,689 B1
- Document ID: US7412689B1
- Status: Granted
- Kind: B1
- Application number: 10/877,523
- Filed: 2004-06-25
- Granted: 2008-08-12
- Earliest claimed: 2004-06-25
- Assignees: Sun Microsystems, Inc.
- Inventors: Carl E. Quinn; Torbjorn Norbye; Joseph Paul Nuxoll
- Web page: https://patentgrep.com/patent/US7412689B1

## CPC

- G06F 8/74: Reverse engineering; Extracting design information from source code
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

One embodiment of the present invention provides a system that facilitates creating a hierarchical model from a programming language file that includes components. The system operates by obtaining a component from the programming language file. Upon obtaining the component, the system passes an encoder to the component and requests that the component encode itself using the encoder, thereby causing the encoder to generate elements in the hierarchical model. Each element includes an attribute that identifies the component, thereby allowing the component to be subsequently identified by referencing the attribute in the corresponding element in the hierarchical model.

## Claims

### Claim 1

A process for creating a hierarchical model from a programming language file that includes components, wherein the process is executed by a computer system, the process comprising:
obtaining a component from the programming language file wherein the component has a first corresponding renderer that generates output according to the properties and children of the component;
replacing the first corresponding renderer with a second corresponding renderer;
passing the second corresponding renderer to the component; and
requesting the component to encode itself using the second corresponding renderer, thereby causing the second corresponding renderer to generate elements in the hierarchical model;
wherein each element includes an attribute that identifies the component, thereby allowing the component to be subsequently identified by referencing the attribute in the corresponding element in the hierarchical model.

### Claim 2 (depends on 1)

The process of claim 1, wherein the programming language file is a JavaServer Pages file.

### Claim 3 (depends on 1)

The process of claim 1, wherein the component is a JavaServer Faces Component.

### Claim 4 (depends on 3)

The process of claim 3, wherein the first corresponding renderer and the second corresponding renderer are JavaServer Face ResponseWriters.

### Claim 5 (depends on 1)

The process of claim 1, further comprising:
rendering a markup language file from the programming language file, wherein markup language components in the markup language file correspond to elements in the hierarchical model; and
using the hierarchical model to associate markup language components with components from the programming language file.

### Claim 6 (depends on 5)

The process of claim 5, further comprising using the hierarchical model in an integrated development environment.

### Claim 7 (depends on 5)

The process of claim 5, wherein the markup language is a form of HTML.

### Claim 8 (depends on 7)

The process of claim 7, wherein the markup language is XHTML.

### Claim 9 (depends on 1)

The process of claim 1, wherein the hierarchical model is a Document Object Model.

### Claim 10

A computer-readable storage medium storing instructions that when executed by a computer cause the computer to perform a method for creating a hierarchical model from a programming language file that includes components, the method comprising:
obtaining a component from the programming language file wherein the component has a first corresponding renderer that generates output according to the properties and children of the component;
replacing the first corresponding renderer with a second corresponding renderer;
passing the second corresponding renderer to the component; and
requesting the component to encode itself using the second corresponding renderer, thereby causing the second corresponding renderer to generate elements in the hierarchical model;
wherein each element includes an attribute that identifies the component, thereby allowing the component to be subsequently identified by referencing the attribute in the corresponding element in the hierarchical model.

### Claim 11 (depends on 10)

The computer-readable storage medium of claim 10, wherein the programming language file is a JavaServer Pages file.

### Claim 12 (depends on 10)

The computer-readable storage medium of claim 10, wherein the component is a JavaServer Faces Component.

### Claim 13 (depends on 12)

The computer-readable storage medium of claim 12, wherein the first corresponding renderer and the second corresponding renderer are JavaServer Face ResponseWriters.

### Claim 14 (depends on 10)

The computer-readable storage medium of claim 10, wherein the method further comprises:
rendering a markup language file from the programming language file, wherein markup language components in the markup language file correspond to elements in the hierarchical model; and
using the hierarchical model to associate markup language components with components from the programming language file.

### Claim 15 (depends on 14)

The computer-readable storage medium of claim 14, wherein the method further comprises using the hierarchical model in an integrated development environment.

### Claim 16 (depends on 14)

The computer-readable storage medium of claim 14, wherein the markup language is a form of HTML.

### Claim 17 (depends on 16)

The computer-readable storage medium of claim 16, wherein the markup language is XHTML.

### Claim 18 (depends on 10)

The computer-readable storage medium of claim 10, wherein the hierarchical model is a Document Object Model.

### Claim 19

An apparatus that creates a hierarchical model from a programming language file that includes components, comprising:
a memory;
an obtaining mechanism configured to obtain a component from the programming language file wherein the component has a first corresponding renderer that generates output according to the properties and children of the component;
a replacing mechanism to replace the first corresponding renderer with a second corresponding renderer;
a passing mechanism configured to pass the second corresponding renderer to the component; and
a requesting mechanism configured to request the component to encode itself using the second corresponding renderer, thereby causing the second corresponding renderer to generate elements in the hierarchical model;
wherein each element includes an attribute that identifies the component, thereby allowing the component to be subsequently identified by referencing the attribute in the corresponding element in the hierarchical model; and
wherein the hierarchical model is stored in the memory.

### Claim 20 (depends on 19)

The apparatus of claim 19, wherein the programming language file is a JavaServer Pages file.

### Claim 21 (depends on 19)

The apparatus of claim 19, wherein the component is a JavaServer Faces Component.

### Claim 22 (depends on 21)

The apparatus of claim 21, wherein the first corresponding renderer and the second corresponding renderer are JavaServer Face ResponseWriters.

### Claim 23 (depends on 19)

The apparatus of claim 19, further comprising:
a rendering mechanism configured to render a markup language file from the programming language file, wherein markup language components in the markup language file correspond to elements in the hierarchical model; and
an association mechanism configured to use the hierarchical model to associate markup language components with components from the programming language file.

### Claim 24 (depends on 23)

The apparatus of claim 23, wherein the association mechanism is further configured to use the hierarchical model in an integrated development environment.

### Claim 25 (depends on 23)

The apparatus of claim 23, wherein the markup language is a form of HTML.

### Claim 26 (depends on 25)

The apparatus of claim 25, wherein the markup language is XHTML.

### Claim 27 (depends on 19)

The apparatus of claim 19, wherein the hierarchical model is a Document Object Model.
