Browse Prior Art Database

A new OO language syntax (Object Path Finder Syntax) to query data model in hierarchy

IP.com Disclosure Number: IPCOM000198781D
Publication Date: 2010-Aug-16
Document File: 3 page(s) / 88K

Publishing Venue

The IP.com Prior Art Database

Abstract

Data are always stored in data model in hierarchy. For developers, in order to get the wanted data he usually has to iterate the hierarchy with loop methods(e.g. "for" or "do...while"), compare the key/value of each object until he gets what he wanted. The drawback is code are too long, many lengthy scripts consist of loop methods, additional temp variables and a lot of "if/else" condition statements. The developer need to know not only different iteration method of different collection class, but also different syntax in different OO Language. This invention provides a convenient and quicker way to locate and find the data in OO language, and the syntax is so generic so it is able to be supported cross OO languages.

This text was extracted from a PDF file.
This is the abbreviated version, containing approximately 42% of the total text.

Page 1 of 3

A new OO language syntax

A new OO language syntaxA new OO language syntax

((((Object Path Finder SyntaxObject Path Finder SyntaxObject Path Finder Syntax

Object Path Finder Syntax )

))) to query data modelto query data modelto query data model

to query data model

in hierarchyin hierarchy

in hierarchy

Data are always stored in data model in hierarchy . For developers, in order to get the wanted data he usually has to iterate the hierarchy with loop methods (e.g. "for" or "do...while"), compare the key/value of each object until he gets what he wanted . The drawback is code are too long , many lengthy scripts consist of loop methods , additional temp variables and a lot of "if/else" condition statements. The developer need to know not only different iteration method of different collection class , but also different syntax in different OO Language . This invention provides a convenient and quicker way to locate and find the data in OO language , and the syntax is so generic so it is able to be supported cross OO languages .

We have defined a new language syntax - Object Path Finder Syntax (OPFS), this language can help developers to write such query more conveniently . It will reduce all those iteration steps and condition statements into just one line sentence . A way to retrieve the object we want directly .

Here is the syntax of OPFS : Root

RootRoot/

///Class

ClassClass

Class[

[[[{{{{criteria

criteriacriteria

criteria }

}}}][

][][

][|

|||][/

][/][/

][/Class

ClassClass[

[[[{{{{criteria

criteriacriteria

criteria }

}}}][

][][

][|

|||]...] -

]...] -]...] -

]...] - >

>> (

(((Return class

Return classReturn class

Return class )

))

So OPFS syntax starts from a root object , dive into hierarchy. Each hierarchy is divided by a slash and each hierarchy composed of Class (object type) and criteria pattern(See sytax below), and the final output is the type of the object that needs to return . If there is an "|" (intersect) in front of "/", that means this is not a one way path , there are some optional path to get additional objects . Each path will be marked a "|" ahead of it.

criterial pattern: {

{{{[!]

[!][!]

[!]|

|||[[[[collection key

collection keycollection key

collection key ]

]]]||||[[[[method

methodmethod

method ()]

()]()]|

|||[[[[condition statement

condition statementcondition statement

condition statement ]

]]]}}}}

Criterial pattern can be !(NOT), a collection key, a method of current hierarchy object or a condition statement .

Collection keys: For example, the collection key of a Map is the key object . the key of Array is index.

If NOT is added in front of any criterial , that means we take the reverse set .

1

111....Here is an OPFS sample to explain how it works

Here is an OPFS sample to explain how it worksHere is an OPFS sample to explain how it works

Here is an OPFS sample to explain how it works :

::

Example 1: Users need to write a new method to find a city having a street named "Beijing road". The entry point is the map...