The subject matter disclosed herein relates to object-oriented programming and, more particularly, to systems, methods and computer program products for template inheritance in a configuration object model.
In a configuration object model, templates are logical collections of object instances whose purpose is to allow the easy creation of object collections. Templates can contain one or more object instances as well as links to other templates to include in the owning template. Template inheritance is a modeling concept in which templates may be derived from other templates, objects within a derived template can be derived from objects in a parent template, and links to other templates in a template can be overridden in a derived template. In order to make changes within a template to define template characteristics such as new object instances and new template links, a new template must be defined.
According to one aspect of the invention, a method for generating templates in a configuration object model is disclosed. The method can include generating a first template having object definitions, defining properties for the object definitions within the first template and deriving a second template from the first template, wherein a subset of the object definitions from the first template are defined as being derived from objects in the first template
According to another aspect of the invention, a computer program product for generating templates in an object oriented programming environment, the computer program product having a computer readable medium including instructions for causing a computer to implement a method is disclosed. The method can include generating a first template having object definitions, defining properties for the object definitions within the first template and deriving a second template from the first template, wherein the properties of the first template are defined in the second template, wherein the first template includes a link to a template link object in the second template.
These and other advantages and features will become more apparent from the following description taken in conjunction with the drawings.
The subject matter, which is regarded as the invention, is particularly pointed out and distinctly claimed in the claims at the conclusion of the specification. The foregoing and other features, and advantages of the invention are apparent from the following detailed description taken in conjunction with the accompanying drawings in which:
The detailed description explains embodiments of the invention, together with advantages and features, by way of example with reference to the drawings.
A template can include a single template entity and a set of object instance entities. The template entity has to have a reference to at least one object instance entity using a HasComponent reference type. For example, as illustrated in
When a new set of objects is created from a template, all of the instance entity IDs in the new objects are replaced with new instance entity IDs. As a result, all of the references are also updated to use the new IDs. From
The template model allows for templates to be composed of other templates through template linking via template link objects in the template. In exemplary embodiments, a template can contain links to other templates to include in its template. Furthermore, these template links can be replaced through this template inheritance system by creating a new template link in a derived template that is defined as being derived from a template link in a parent template. A template link object is replaced with object instances from another template. Each template link object has a “Template ID” property that specifies the entity ID of the template that includes the objects that are to be put in place of the template link object. There is no limit to the number of template link objects that can be placed in a template. There is also no limit to the depth of template links that can be chained together (e.g. machine train linked to machine templates, which are linked to shaft templates, which are linked to bearing templates and the like). When a set of object instances are created from a template, the template entities and template link objects are removed so that only the object instance entities remain. For example,
Template inheritance allows templates to be defined as being “derived from” a parent template or a series of parent templates. When a template is defined as deriving from another template or series of templates, the derived template inherits all of the properties and referenced objects of the parent template(s). If a property exists in an object in both the derived template as well as in the parent templates, the derived object's property value takes precedence over the parent templates. The convention model for templates only supports the addition of properties or changing the value of properties on entities. In exemplary embodiments, this property is expanded to support adding and changing references in derived templates.
Template inheritance is modeled by creating multiple templates and implementing IsDerivedFrom references between the template entities as well as between the object entities that have changes. References are therefore included on both the template entities and the object entities. The reference is on the template entity so that the derived template doesn't have to include all of the objects that are defined in the parent template. The reference on the object entities is to specify the object in the parent template to which the inherited template is making changes.
Template inheritance also follows additional rules including but not limited to: 1) If the object type is changed in the derived template, it must follow the object type hierarchy (e.g. a pump template cannot derive from a bearing template); and 2) Multiple levels of inheritance is supported (e.g. having Plain Sleeve Fluid Film Bearing template, which derives from a Fluid Film Bearing template which derives from a base Bearing template)
Exemplary template inheritance is illustrated in
In exemplary embodiment, template inheritance with derived objects enables changing object types between the parent and the derived templates as illustrated in
In exemplary embodiments, template inheritance and template linking can be combined.
In the example of
The exemplary template inheritance and linking methods described herein can be implemented in programming environments that can advantageously reside in computer systems, an example of which is now described.
In exemplary embodiments, in terms of hardware architecture, as shown in
The processor 1705 is a hardware device for executing software, particularly that stored in memory 1710. The processor 1705 can be any custom made or commercially available processor, a central processing unit (CPU), an auxiliary processor among several processors associated with the computer 1701, a semiconductor based microprocessor (in the form of a microchip or chip set), a macroprocessor, or generally any device for executing software instructions.
The memory 1710 can include any one or combination of volatile memory elements (e.g., random access memory (RAM, such as DRAM, SRAM, SDRAM, etc.)) and nonvolatile memory elements (e.g., ROM, erasable programmable read only memory (EPROM), electronically erasable programmable read only memory (EEPROM), programmable read only memory (PROM), tape, compact disc read only memory (CD-ROM), disk, diskette, cartridge, cassette or the like, etc.). Moreover, the memory 1710 may incorporate electronic, magnetic, optical, and/or other types of storage media. Note that the memory 1710 can have a distributed architecture, where various components are situated remote from one another, but can be accessed by the processor 1705.
The software in memory 1710 may include one or more separate programs, each of which comprises an ordered listing of executable instructions for implementing logical functions. In the example of
The template inheritance and linking methods described herein may be in the form of a source program, executable program (object code), script, or any other entity comprising a set of instructions to be performed. When the source code for a program is written, the source code needs to be translated via a compiler, assembler, interpreter, or the like, which may or may not be included within the memory 1710, so as to operate properly in connection with the OS 1711. Furthermore, the template inheritance and linking methods can be written in an object oriented programming language, which has classes of data and methods, or a functional or procedural programming language, which has routines, subroutines, and/or functions.
In exemplary embodiments, a conventional keyboard 1750 and mouse 1755 can be coupled to the input/output controller 1735. Other output devices such as the I/O devices 1740, 1745 may include input devices, for example but not limited to a printer, a scanner, microphone, and the like. Finally, the I/O devices 1740, 1745 may further include devices that communicate both inputs and outputs, for instance but not limited to, a network interface card (NIC) or modulator/demodulator (for accessing other files, devices, systems, or a network), a radio frequency (RF) or other transceiver, a telephonic interface, a bridge, a router, and the like. The system 1700 can further include a display controller 1725 coupled to a display 1730. In exemplary embodiments, the system 1700 can further include a network interface 1760 for coupling to a network 1765. The network 1765 can be an IP-based network for communication between the computer 1701 and any external server, client and the like via a broadband connection. The network 1765 transmits and receives data between the computer 1701 and external systems. In exemplary embodiments, network 1765 can be a managed IP network administered by a service provider. The network 1765 may be implemented in a wireless fashion, e.g., using wireless protocols and technologies, such as WiFi, WiMax, etc. The network 1765 can also be a packet-switched network such as a local area network, wide area network, metropolitan area network, Internet network, or other similar type of network environment. The network 1765 may be a fixed wireless network, a wireless local area network (LAN), a wireless wide area network (WAN) a personal area network (PAN), a virtual private network (VPN), intranet or other suitable network system and includes equipment for receiving and transmitting signals.
If the computer 1701 is a PC, workstation, intelligent device or the like, the software in the memory 1710 may further include a basic input output system (BIOS) (omitted for simplicity). The BIOS is a set of essential software routines that initialize and test hardware at startup, start the OS 1711, and support the transfer of data among the hardware devices. The BIOS is stored in ROM so that the BIOS can be executed when the computer 1701 is activated.
When the computer 1701 is in operation, the processor 1705 is configured to execute software stored within the memory 1710, to communicate data to and from the memory 1710, and to generally control operations of the computer 1701 pursuant to the software. The template inheritance and linking methods described herein and the OS 1711, in whole or in part, but typically the latter, are read by the processor 1705, perhaps buffered within the processor 1705, and then executed.
When the systems and methods described herein are implemented in software, as is shown in
As will be appreciated by one skilled in the art, aspects of the present invention may be embodied as a system, method or computer program product. Accordingly, aspects of the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment (including firmware, resident software, micro-code, etc.) or an embodiment combining software and hardware aspects that may all generally be referred to herein as a “circuit,” “module” or “system”. Furthermore, aspects of the present invention may take the form of a computer program product embodied in one or more computer readable medium(s) having computer readable program code embodied thereon.
Any combination of one or more computer readable medium(s) may be utilized. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C++ or the like and conventional functional or procedural programming languages, such as the “C” programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet Service Provider).
Aspects of the present invention are described below with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer readable medium that can direct a computer, other programmable data processing apparatus, or other devices to function in a particular manner, such that the instructions stored in the computer readable medium produce an article of manufacture including instructions which implement the function/act specified in the flowchart and/or block diagram block or blocks.
The computer program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other devices to cause a series of operational steps to be performed on the computer, other programmable apparatus or other devices to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide processes for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks.
The flowchart and block diagrams in the Figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems that perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In exemplary embodiments, where the template inheritance and linking methods are implemented in hardware, the template inheritance and linking methods described herein can implemented with any or a combination of the following technologies, which are each well known in the art: a discrete logic circuit(s) having logic gates for implementing logic functions upon data signals, an application specific integrated circuit (ASIC) having appropriate combinational logic gates, a programmable gate array(s) (PGA), a field programmable gate array (FPGA), etc.
Technical effects include a decrease in template database size since properties don't have to be redefined in each template. In adding, updating, or removing properties on templates are performed only in a few base templates rather than in all of the templates in the databases.
While the invention has been described in detail in connection with only a limited number of embodiments, it should be readily understood that the invention is not limited to such disclosed embodiments. Rather, the invention can be modified to incorporate any number of variations, alterations, substitutions or equivalent arrangements not heretofore described, but which are commensurate with the spirit and scope of the invention. Additionally, while various embodiments of the invention have been described, it is to be understood that aspects of the invention may include only some of the described embodiments. Accordingly, the invention is not to be seen as limited by the foregoing description, but is only limited by the scope of the appended claims.