Data management system and method to host applications and manage storage, finding and retrieval of typed items with support for tagging, connections, and situated queries
10528555 ยท 2020-01-07
Assignee
Inventors
- Alan Bush (Redmond, WA, US)
- Zahid N. Ahmed (Westborough, MA, US)
- Valeriy V. Pelyushenko (San Jose, CA, US)
- Shashi P. Suravarapu (San Ramon, CA, US)
- Herbert Wayne Stiel (San Francisco, CA, US)
- Michael Galpin (San Jose, CA, US)
Cpc classification
Y10S707/99942
GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
International classification
Abstract
A data management system and unit host applications and manage storage, finding and retrieval of typed items with support for tagging, connections, and situated queries. The data management system and unit have a content processor that receives content and processes the content to add one or more items into a particular cell, an item processor that receives one of an item to add to the cells in the storage unit and an item to update in the cells of the storage unit and a query processor that executes a query against the one or more cells in the storage unit.
Claims
1. A data management system for managing a plurality of objects, the system comprising: a computing device that has at least one processing unit that executes a data management unit; at least one storage unit that is coupled to the computing device that stores the data managed by the data management unit into one or more cells; and the data management unit having a content processor, an item processor and a query processor, the content processor receives content and processes the content to add one or more items into a particular cell, the item processor receives one of an item to add to the cells in the storage unit and an item to update in the cells of the storage unit, and the query processor that executes a query against the one or more cells in the storage unit.
2. The system of claim 1, wherein the data management unit further comprises an application component that performs an operation on the one or more cells in the storage unit.
3. The system of claim 2, wherein the operation performed by the application component is a situated query that is processed by the query processor.
4. The system of claim 2, wherein the content is one of RSS data, an email and a piece of structured data and wherein the system further comprises a client that provides structured data to the content processor and a query to the application component.
5. The system of claim 1, wherein the data management unit is one or more application servers.
6. The system of claim 1, wherein the content is one of RSS data, an email and a piece of structured data.
7. The system of claim 6, wherein the structured data is a book.
8. A data management unit comprising: a computing device that has at least one processing unit; at least one storage unit that is coupled to the computing device that stores the data managed by the data management unit into one or more cells; and the data management unit having a content processor, an item processor and a query processor, the content processor receives content and processes the content to add one or more items into a particular cell, the item processor receives one of an item to add to the cells in the storage unit and an item to update in the cells of the storage unit, and the query processor that executes a query against the one or more cells in the storage unit.
9. The data management unit of claim 8, wherein the data management unit further comprises an application component that performs an operation on the one or more cells in the storage unit.
10. The data management unit of claim 9, wherein the operation performed by the application component is a situated query that is processed by the query processor.
11. The data management unit of claim 9, wherein the content is one of RSS data, an email and a piece of structured data and wherein the system further comprises a client that provides structured data to the content processor and a query to the application component.
12. The data management unit of claim 8, wherein the data management unit is one or more application servers.
13. The data management unit of claim 8, wherein the content is one of RSS data, an email and a piece of structured data.
14. The data management unit of claim 13, wherein the structured data is a book.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
(1)
(2)
(3)
(4)
(5)
(6)
(7)
(8)
(9)
(10)
(11)
(12)
(13)
(14)
(15)
(16)
(17)
(18)
(19)
(20)
(21)
DETAILED DESCRIPTION OF AN EMBODIMENT
(22) The invention is particularly applicable to a XML-based data management system and method to manage the storage, access, update and integration of content that is described using a Universal Item Description Language (UIDL) and that supports a hierarchical, objected-oriented, semantically rich data type model using a Universal Item Information Model (UIIM), and it is in this context that the system and method will be described. It will be appreciated, however, that the data management system and method may use other types of information that is not specifically modeled in the Universal Item Information Model (UIIM) and may be implemented using schema languages other than XML Schema Definition (XSD) language and/or Universal Item Description Language (UIDL).
(23)
(24)
(25) In an exemplary implementation of the data management system, a commercially available Berkeley XML embeddable database is used as the storage device for the cells and the one or more items in each cell. In the exemplary implementation, the objects stored within cells use the object- and semantic-oriented Universal Item Description Language (UIDL) (extending the well known XML Schema definition language) to describe those objects. The cell interfaces with an embeddable XML database (whose document-centric container is used to store and access any type of content) which provides native XML support and no processing overhead cost due to XML-to-Java-to-SQL transformation (typically expected in existing Java-based database driven applications). Elimination of such data transformation and SQL round-trips over the network will result in decrease in cost of procuring server hardware and a scalable and extensible data management solution. Since there will be no SQL call-outs due to the content being locally accessed, inserted and updated there will also be better performance and response time. Furthermore, the model partitions large data sets of heterogeneous items into smaller contextual subsets containing items likely to be processed at the same time together with applications which will do the processing. In addition, for the exemplary implementation, there is no need to develop another XML querying mechanism since the system can exploit XML Query support in the commercially available Berkeley Database XML using the W3C XQuery Language. Thus, the system may utilize an XML database for content storage in combination with the Universal Item Information Model (UIIM) and XML-based Universal Item Description Language (UIDL) described above in the exemplary embodiment.
(26)
(27)
(28) A Universal Item Information Model (UIIM) is presented that accomplishes several goals and overcomes certain problems that have existed. In particular, the universal item information model can be used to personalize and simplify the process of content consumption, sharing and publishing in a system in which various types of existing and new user-defined content needs to published, consumed and shared by and from various sources. The universal item information model addresses data integration from disparate sources as is needed currently in the areas of social networking, consumer-oriented and business-oriented application integration platforms. The Universal Item Information Model (UIIM) also provides the ability to preserve and leverage existing and legacy content formats within the Universal Item Information Model (UIIM) such that interoperability with existing consumers and publishers and their applications is possible within a networked community environment where a system supports the handling of all kinds of new and existing content.
(29)
(30) Since the Universal Item Information Model (UIIM) and Universal Item Description Language (UIDL) can be employed to model and represent various types of information items, it should be noted that items expressed in UIDL can be stored in a database or in-memory cache, or transmitted on-the-wire over any communication channel (for example, HTTP, TLS, SMTP, SMS), or instantiated by an application serviceall of these scenarios can employ the same description of the item based on UIDL.
(31)
(32) The AbstractItemKind includes sub-components that describe the general characteristics of any item in one or more general characteristics elements, such as the data structure fields shown in
(33) The AbstractItem kind also includes sub-components that describe various semantic characteristics of any item (using one or more semantic property elements) as part of the <ItemDetails> child element that Item instances inherit from the AbstractItem component. These semantic characteristics provide capabilities to describe additional information about a specific content, i.e., item instance, in a personalized and context specific way such that it can be used for various search, information navigation and filtering and other actions applicable to a content of a certain type. The semantic properties can be expressed uniformly for all kinds of information items by defining various semantic components within the AbstractItem component. This approach implies that derived types of content (e.g., a item instances of the types PhotoKind or a BlogKind or an AutoKind) that are extensions of the AbstractItemKind component would inherit identical sets of semantic properties which are therefore applicable to all instances of those derived item types. Following is a set of semantic elements defined as part of the <ItemDetails> child element of the AbstractItem component: Zero or more user-defined tags (represented by the <UserTags> child element) which are free-form text entered by the user to add additional meaning or context to a specific information item; Multiple system-managed tags (represented by the <SysTag> child element) which are generated automatically by a system along some standardized set of attributes, for example, Time, Person, Location, Category, and Rating. It is expected that an application and content server, i.e., the system that processes the publishing or creation of an item would have capabilities to process the generic, semantic and type-specific descriptions of an item to generate the derived system-managed tags. The details of the system-managed tag model and structure is described in more detail below with reference to
(34) Thus, the AbstractItem specifies one or more general characteristic elements (that can contain general characteristics) and one or more semantic property elements (that can contain the semantic properties of a particular instance of an item) of each item in the model. Since the above generic characteristics and semantic characteristics are described in a generic way for any type of item (that may be content), the universal item information model can be used by various types of applications wherein the applications can uniformly process the generic and semantic components of any type of item. In one example of the use of the universal item information model, the flexibility of the universal information model can be used by a scalable and extensible media operating system which can host media-rich applications that will be shared and customized by a consumer-oriented user community or a business-oriented user community.
(35) Returning to
(36) For each base component (a kind of item in the example shown in
(37) Views
(38) The zero or more views describe ways of displaying instances of the particular base component type (such as an ContactItem kind in the example above). Examples of some views that could be supported for a specific kind of item may include 1) display the item in a list view. E.g., for a contact item display the first_name and last_name elements such that each contact item appears in a single line; or 2) display an expanded view that displays all base component meta-data that is applicable to that kind of base component. In both cases the applicable elements are specified as part of the view specification for the particular base component type.
(39) Actions
(40) The zero or more actions may be applicable to processing an item of a given type. Examples of generic actions that can be supported for all kinds of items are: AddItem, UpdateItem, and DeleteItem. Examples of some of the actions that could be supported for an item that is of particular type, for example, a Contact kind (shown in
(41) TABLE-US-00001 <action name=importVCard componentAction=contact.ImportVCard uiLabel=ImportVCard> <parameter dataType=stream name=vcard uiLabel=VCard file/> <returnType>items</returnType> </action>
(42) A second example of an action that can be associated with an item kind are ones which refer to a one or more service providers that can process an item. For example, a photo item may have PrintAction that is processed by a web-based photo printing service provided by a third-party. Here is an example specification to reference a service provider that can process an action associated with a specific item kind:
(43) TABLE-US-00002 <xs:complexType name=ItemActionLinkKind> <xs:complexContent> <xs:extension base=ns:AbstractItemKind> <xs:annotation> <xs:documentation> This specifies the invocation of a third-party web application or resource over HTTP Protocol. The invocation mechanism and parameters are included in the specification such that the consuming application can compose and invoke the URL at run-time. </xs:documentation> </xs:annotation> <xs:sequence> <xs:element name=Name type=xs:string/> <xs:element name=Description type=xs:string minOccurs=0/> <xs:element name=ItemKindID type=xs:string/> <xs:element name=BaseURL type=xs:anyURI minOccurs=0/> <xs:element name=InvocationType type=ns:HttpInvocationType/> <xs:element name=Parameter type=ns:ItemActionParameter minOccurs=0 maxOccurs=unbounded/> </xs:sequence> <xs:attribute name=category type=xs:string use=optional/> </xs:extension> </xs:complexContent> </xs:complexType>
(44) A third example is of an action (associated with an item kind) that is processed by a business process which is invoked by an API.
(45) Constraints
(46) The zero or more constraints may be applicable to items of a given type (i.e., an instance of an item kind in the exemplary universal item information model). The constraints may include type constraints and/or semantic constraints. The type constraints for each child element of an item are part of the XML schema definition. The semantic constraints may be applicable to any or all elements within the item. Furthermore, the semantic constraints express which combinations of item element values are acceptable as possible values within the information system. For example, for an element representing a <PostalCode>, the constraint can limit the data entered by the end user to be numeric even if the type definition of this element is xsd:string type within the XML schema namespace. For an element representing <Phone>, the constraint can limit the data entered to be of a specific format and length. Another example is that of a contact item can not have a child element <Gender> with value equal to Male and an another child element <Relationship> with value equal to Mother.
(47) The views, actions and constraints may be expressed in data structure specifications outside the item kind definition such that they are referenced (and inherited) via an identifier to the AbstractItemKind component which is the base type of all items, or referenced via an ItemKindID identifier to another base component that is derived from the AbstractItem kind, or referenced via an ItemKindID identifier directly to a particular item kind definition. This way these views, actions and constraints can be applied to an item kind included in the universal item information model.
(48)
(49) As set forth above, the universal item information model may have vertical application domain extensions that are specialized extensions of the ItemKind. There are multiples ways to extend the Universal Item Information Model to support domain specific needs of a particular class of applications. For example, three techniques can be used to support extensions for vertical application domains and those techniques are:
(50) 1) To support specialized extensions needed by a particular domain or use case, for example, a real-estate application, it is possible to extend the existing types of item kinds. As an example, it is possible that the <Note> component (shown in
(51) TABLE-US-00003 <xs:complexType name=RealEstateNoteKind> <xs:complexContent> <xs:extension base=ns:NoteKind> <xs:sequence> <xs:element name=EmployeeID type=xs:string/> </xs:sequence> </xs:extension> </xs:complexContent> </xs:complexType>
(52) 2) Certain application domains may also need to combine existing kinds of content together for specialized complex types, for example, <Note> and <Photo> component may need to be combined for a particular type of aggregated component needed for the real-estate domain.
(53) 3) If the above two methods of extensions do not address the needs of a specific domain, it is possible to extend the AbstractItem component to a specialized base type.
(54) The new types of schema components could also be defined in its own XML schema namespace that is dedicated to a particular vertical application domain such that all the general and semantic characteristics and other applicable base component characteristics (if extension carried out from an existing base component type) are inherited by the extension defined within the namespace of the vertical application domain.
(55)
(56) 1) Describing the underlying externally defined content using generic meta data description included in the AbstractItemKind component which is applicable to any information item (or content), i.e., both user-defined content and other externally-defined content. Such generic meta-data description for any information item (whether defined externally by a 3.sup.rd party or directly and locally as user-defined content) is expressed within the <ItemDetail> element of the AbstractItem component; and
(57) 2) Wrapping the externally-defined content into an external content element that can carry any kind of content, i.e., including binary content or other specially formatted content as well as content that have a formalized XML schema definition within a namespace owned or managed by a particular business service entity.
(58) Since external content would be processed as a derived type of AbstractItem kind, any kind of content will have fundamentally identical base type definitions that allow external content created by third parties to be generally processed by a system that uses the information model via a combination of generic AbstractItem handler for common information item processing functions and content-type specific handler to process the underlying format-specific content using a 3.sup.rd party specific application library. This approach allows seamless integration of external content which can be plugged-in to any system which uses the Universal Item Taxonomy since there is no need to transform the format of the external content.
(59)
(60)
(61) As an example, when a contact item is created and inserted into the database of a particular cell server that a user is interacting with over the web, the <PersonName> child element of the ContactItem kind would be employed automatically by the system to generate a set of system-managed tags for the Person tag type with roles of <FirstName>, <LastName>, and <FullName>. The values of these tags can be determined at run-time (using an XPath reference) by the system from the contents of the contact item (i.e., from the <PersonName> element). Once the system-managed tags are determined, the system also creates index entry corresponding to these elements representing roles for the particular type of system-managed tag. In specific implementation example of using the XML Database, such indices are updated in the document container of the XML database associated with the cell where the new item is inserted. Lastly, the roles associated with a particular system-managed tag will be driven by the type of system-level tag and the type of content (i.e., item kind). Thus, for the contact item kind case the following pre-defined set of roles and XPath specifications would be employed at the time the contact item instance is inserted into the database of a given cell:
(62) TABLE-US-00004 System Tag Type Role/Qualifier XPath Purpose Time Creation_time ./ItemDetails/CreationTime Find by creation time (of the item) Time Modified_time ./ItemDetails/LastModified Find by modified time (of the item) Person FirstName ./PersonName/FirstName Find by first name of a person Person LastName ./PersonName/LastName Find by last name of person Person FullName ./PersonName/FirstName & Find by fullname (i.e., both ./PersonName/LastName first name and last name) of person Person CreatedBy ./ItemDetails/CreatedBy Find by name of person who created the item Person UpdatedBy ./ItemDetails/UpdatedBy Find by name of person who updated the item Category Organization ./Organization/Title Find by the name of the organization that a person is affiliated with
(63) Hence, contextual information extracted from the item, allows the system to aid in the finding experience of the user by exploiting at run-time system-managed indices that are generated automatically by the system against a standard set of tag types and a pre-defined set of roles corresponding to the set of tag types. Lastly, for the system tags, when an object/item is modified in the data management system, the corresponding system-managed index entries for the item are automatically updated based on the new values of the roles (corresponding to the system-managed tag types) associated with the item/object.
(64) The above has been a description of the pre-defined set of system-managed tag types and the corresponding roles that are applicable to each type of system-managed tag for a given type of item (i.e., content). It is also possible for an administrator of the system to define additional roles for a given type of system-managed tag for a given type of item. For example, we may want to do that to optimize searches for a particular kind of item or for a new kind of item that extends from AbstractItemKind or some other base type from the AbstractItemKind. It is also possible to support new types of system-managed tags that can be generally applicable across various types of items (i.e., content). It should be appreciated that such capabilities will allow the administrator of the data management system to extend the semantic capabilities of the system to support specific types of system-managed tags and their applicable roles.
(65) From above description of the tag model and processing mechanism, it should be appreciated that the system-managed and user generated tags stored with item (via the AbstractItemKind component model) allow the uniform processing of semantic properties extracted from the items which are stored as document instance in the database and permit the data management system to provide searching capabilities wherein the searches can be based on the system and user defined tags consistently. Additionally, it should be appreciated that current keyword based searches to find relevant content available on the internet is limited since keywords may represent from the user's perspective various purposes that are not restricted or qualified by roles (as applied to system-managed tag types). This means that when, for example, a user enters 1974 it could mean the year 1974 or the user's intention could have been to find some information about a location with 1974 representing the numeric part of a street address. The approach described above to semantically extend the XML-based database system that manages items as documents with user-defined and system-managed tags as well as additional semantic properties previously identified (for example, notes that a user can add to an item and which is stored as an integral part of the item via the AbstractItem kind that has a <Notes> child element) allows effective means of characterizing content in a personalized and contextualized manner such that system can take advantage of these across the types of content in a uniform manner. This approach will make it easier and efficient to integrate different types of content and navigate between different types of content since all types of content will be stored in one database instance that is locally controlled by the cell server which functions as an application and content server.
(66)
(67) Hence, to preserve the relationships between items when a particular content is processed and subsequently stored in the database of a particular cell, the system will automatically add the <SystemConnection> elements <SysConnID> and <Source> in all child items {A, B, C, . . . } connected to the parent item X. Similarly, the system will also automatically add in the parent item X the <SystemConnection> elements <SysConnID> and <Source>. This will allow user to subsequently retrieve the parent item X such that the system can on-demand facilitate the retrieval of the child items {A, B, C, . . . } via system connection links. Likewise, this will also allow user to subsequently retrieve the child items {A, B, C, . . . } such that the system can on-demand facilitate the retrieval of the parent item X via system connection links.
(68)
(69) The creation of an item-specific relation from Item A to Item B implies that two links are created (i.e., URIs being instantiated for two-way links), one from A to B and the other from B to A, such that the connection from A to B results in the update of Item A in the database and the connection from B to A results in the update of Item B in the database. The relation URIs are then included as part of the XML data associated with the items as shown in
(70) Query Structure and Language
(71) The Situated Query Language of the data management system will be described in the context of the exemplary implementation that uses the Universal Item Information Model (UIIM) as the underlying information model for the data management system. However, the data management system and method can be used with any information model. The query language can be used to formulate and capture situated queries that can be executed in a particular context, for example a query can be processed that returns information in context of a specified cell where a cell organizes a set of applications together with a database for those applications. This approach of specifying a query is different from an SQL query. SQL queries are formulated outside the relational database and have no context beyond the database as a whole. On the other hand, every Situated Query Language query is executed in the context of some cell. A query can access various different contexts via a scoping qualifier which is used to specify the cells where the desired information items of interest may be present. Hence, situated queries allow flexible search sessions to discover relevant items in an absolutely and/or relatively defined set of sources such that the underlying meaning of the query remains the same as we shift the context of the query. For example, My Friend's music has a different result but the same meaning for me than for you. Moreover, such queries will be very useful to interactively search within different information bases and also allow integration of relevant content in a purposeful way. Such queries can also be defined and employed in the simple creation of applications which can be used in multiple contexts (with the same meaning) without rewrites.
(72) Furthermore, the query language and model described can leverage the standard XQuery Language and operates on any item that is modeled using Universal Item Information Model (UIIM) and defined using the XML-based Universal Item Description Language (UIDL). The advantages of situated query language are: (a) the queries allow context to be addressed absolutely and/or relatively to the current cell; (b) queries take place in context as opposed to outside of the database; this means that applications developed in the context of given cell or a given account can be used with the same meaning in other cells or other accounts without change; this is essential for sharing of user constructed applications and the resulting network effects of sharing of user constructed applications; (c) the query model takes advantage of tagging, connections and user account (i.e., membership) in order to build the most general framework for access to content.
(73) The query structure for the data management system will be of the following: Query [Type] [Scope] [PageSize] [MaxSize] [Expression] wherein each query has following required top-level components [Type], [Scope] and an [Expression] component and following optional top-level components: [PageSize] and [MaxSize]. The [Expression] component comprises the sub-components <conditions>, <kind>, <orderby>, <filter>, <connect>, <tag>, <groupby> and <count>.
(74)
(75) The [Type] of the query specifies the general type of content that the query intended to return. For example, the [Type] can be used to express that a query is for cells or items or tags or user accounts or application components or mixed set of resources (using a union operator).
(76) The [Scope] is a formula determining a set of cells from which the result set will be generated. Hence, the scope of the query enables targeted search to take place. For example, the scope may be THIS cell; or My Photo Cell; or All Cells owned by My Account; or All cells to which my account belongs; or All cells belonging to my friends; or All cells belonging to contacts that have been tagged friends or music, etc. Hence, typically, the query may be processed in two stages: first a computation of the scope yielding a set of cells that are relevant to the query; and second, the computation of the expression part of the query within each of those cells with the query result being the union of the results of evaluating [Expression] for each cell in the result of evaluating [Scope]. The format of the [Scope] specification may consist of 1) scope actions and/or 2) two or more scope actions combined together in various ways using set operations wherein the set operations may include union to aggregate cells, collect to chain one scope action with another scope action and other known set operations.
(77) The scope actions are all evaluated in the in context of a cell instance such that we can qualify the results of the query (which in the most common case is the information item instances for which we are searching). The expression of the scope actions may include any of the following methods: getCellOwnerAction to retrieve information about the owner of cell from the database; getCellMembersAction to retrieve information about all members of the specified cell from the database; getCellsOwnedByAccountAction to retrieve information about all the rooms that a user has access to as specified in the database; getCellsWhoseMemberIsAccountAction to retrieve information for all the rooms that a user has access to as specified by the database; FilterByTag to filter provided objects (for example, cells and accounts) based on tag value such that the filter functions as a predicate which is evaluated in terms of the conditions being true or false. The FilterByTag method will be very useful in situations where a user account is tagged in a particular way. For example, a private tag friend may be defined by a user for a particular account. Such tags will be private tags such that only the user who defined the private tag can see and apply it as a filter using the FilterByTag method. Furthermore, the FilterByTag can be used as a scope action to find cells belonging to particular accounts that have been tagged with a private tag. For example, the account of a particular user may be tagged privately as friend by a user that only the user can see and apply as a filter as part of subsequent query processing. In this way the user X can tag the contact item for the user Y as friend which may be public tag (on the contact item) and also tag the account of the same user Y as friend that is private tag such that the scope action can filter and search for cells that are belonging to accounts that are known by the user X to be of his or her friends using the private tags at the account level. This implies that web accessible content belonging to a particular contact that has been privately tagged (for example, with private tag friend at the account level) could also be filtered using the FilterByTag method.
(78) An example of the scope action specification is the following:
(79) TABLE-US-00005 <scope xmlns=http://www.ludilabs.com/al1/definition> <op name=scope.GetCellsOwnedByAccount>${cell.owner}</op> </scope>
(80) Another example of scope action specification which involves combining cell instances owned by a user with the cell instances that the user is a member of:
(81) TABLE-US-00006 <scope xmlns=http://www.ludilabs.com/al1/definition> <op name=union> <op name=scope.GetCellsOwnedByAccount>${cell.owner}</op> <op name=scope.GetCellsWhoseMemberIsAccount>${cell.owner}</op> </op> </scope>
(82) The [PageSize] of the query can optionally be used to specify the number of items (or objects) in the page of data to be returned in the query result such that the calling application can control the size of the result as a small subset within pages.
(83) The [MaxSize] of the query can optionally be used to specify the maximum number of objects (for example items) to be returned in the query result.
(84) The [Expression] of the query is used to specify the criteria of finding and returning information items stored in an application database (i.e., specific database containers associated with cell instances). The format of the expression may consist of one or more of the following components: <conditions>, <kind>, <orderby>, <filter>, <connect>, <tag>, <groupby> and <count>.
(85) The <condition> specified for the query expression are dependent on [Type] of query. For example, if [Type]=Account, the query conditions would be limited to returning list of user account or member list.
(86) The <kind> is used to specify the type of content the query will be returning, i.e., the query results will be of the type of content identified by the <kind> identifier. For example, the query will be processed by a cell that has a database of items of the <kind> equal to PhotoItem or a ContactItem.
(87) The <orderby> component is used to specify the XPath value to reference the child element within the item such that the query results can be ordered by the specific child element within item instances (in the result of the query). The <orderby> component will also have the <direction> attribute that specifies whether the results are ordered in ascending or descending order, for example in terms of the last modified date of the item instance.
(88) The <filter> component is used to specify the XPath value to reference the child element such that results of the query can be filtered by a specific child-element within the returned item instances.
(89) The <connect> component is used to specify that the returned items should be connected to (i.e., related to) the item referenced by the specified ItemID (which uniquely identifies an item instance).
(90) The <tag> component is used to specify that the returned item instances have a specific tag value which may be in either the user-defined tag or system-managed tag.
(91) The <groupby> element can optionally be used to specify the format of the results of the query, i.e., how the returned information or items should be grouped, for example, using one or more key values in particular elements within an item to group the data in the query result.
(92) The <count> element can optionally be used to specify the number of items to be returned in the query result.
(93) Furthermore two or more sub-expressions may be combined using the <join> operation element with the <type> attribute used to specify whether the sub-expressions will be combined using the logical operators such as or, and, and not. There can be multiple joined sub-expressions using the <join> operation element.
(94) The following is an example of a query expression that filters for items which are contact items and have LastName (in contact item) having value equal to Hayes or tagged with the keyword value of cool such that the query results are sorted in order by LastName and then FirstName:
(95) TABLE-US-00007 <expression xmlns=\urn:com:sharefare:webos:basecomponents-1.0\> <join type=\or\> <filter> /ludi:contactItemKind/ludi:PersonName/ludi:LastName=\Hayes\ </filter> <tag> cool </tag> </join> <kind> Contact </kind> <orderby direction=\asc\\> /ludi:contactItemKind/ludi:PersonName/ludi:LastName </orderby> <orderby direction=\asc\> /ludi:contactItemKind/ludi:PersonName/ludi:FirstName </orderby> </expression>;
(96) Furthermore, here is the sample Java code for creating the application-level query which carries out the query within the cell that is the context for the query:
(97) TABLE-US-00008 // prepare query Query q = queryService.createQuery( <query><scope type=\cell\ value=\${this.cell}\/> + <expression><kind> + kindID + </kind></expression></query>);
(98)
(99) In a first example, the query (which is formulated in this example using the provided Java code sample) returns all that are of type ContentKind or LinkKind such that they are present in cells that either the specified user owns or the specified user is a member of the cells:
(100) TABLE-US-00009 String queryXml = <query xmlns=\http://www.ludilabs.com/al1/definition\> + <scope> + <op name=\union\> + <op name=\scope.GetCellsOwnedByAccount\>${cell.owner}</op> + <op name=\scope.GetCellsWhoseMemberIsAccount\>${cell.owner}</op> + </op> + </scope> + <expression> + <join type=\or\> + <kind>ContactItem</kind> + <kind>LinkItem</kind> + </join> + </expression> + </query>;
(101) In the second example, the query returns all items that are of type ContactItemKind and filters the result using the <FirstName> of the contact instance such that the specified user owns or is member of the underlying cell where the item is present:
(102) TABLE-US-00010 String queryXml = <query xmlns=\http://www.ludilabs.com/al1/definition\> + <scope> + <op name=\union\> + <op name=\scope.GetCellsOwnedByAccount\>${cell.owner}</op> + <op name=\scope.GetCellsWhoseMemberIsAccount\>${cell.owner}</op> + </op> + </scope> + <expression> + <kind>ContactItem</kind> + <filter>//ludi:FirstName=\ + firstName + \</filter> + </expression> + </query>;
(103) In a third example, the query returns all items that have the specified URI link (referencing specific content) such that the specified user owns or is member of the underlying cell where the contact is present:
(104) TABLE-US-00011 String queryXml = <query xmlns=\http://www.ludilabs.com/al1/definition\> + <scope> + <op name=\union\> + <op name=\scope.GetCellsOwnedByAccount\>${cell.owner}</op> + <op name=\scope.GetCellsWhoseMemberIsAccount\>${cell.owner}</op> + </op> + </scope> + <expression> + <filter>//ludi:Content=\ + url + \</filter> + </expression> + </query>;
(105) In a fourth example, the query returns all items that are connected to the specified item instance such that the specified user owns or is member of the underlying cell where the item is present:
(106) TABLE-US-00012 String queryXml = <query xmlns=\http://www.ludilabs.com/al1/definition\>+ <scope> + <op name=\union\> + <op name=\scope.GetCellsOwnedByAccount\>${cell.owner}</op> + <op name=\scope.GetCellsWhoseMemberIsAccount\>${cell.owner}</op> + </op> + </scope> + <expression> + <connect> + item.getId( ) + </connect> + </expression> + </query>;
(107) In a fifth example, the query returns all items that are of specified Item kinds (identified as Item KindIDs) and connected to specified item instances and including specific system- or user-specified tags and sort the results in descending order by the last modified date such that the specified user owns or is member of the underlying cell where the item is present:
(108) TABLE-US-00013 String queryXml = <query xmlns=\http://www.ludilabs.com/al1/definition\> + <scope> + <op name=\union\> + <op name=\scope.GetCellsOwnedByAccount\>${cell.owner}</op> + <op name=\scope.GetCellsWhoseMemberIsAccount\>${cell.owner}</op> + </op> + </scope> + <expression> + (kind == null ? : <kind> + kind + </kind>) + (tag == null ? : <tag> + tag + </tag>) + (connect == null ? : <connect> + connect + </connect>) + (orderby == null ? : <orderby direction=\descending\> + orderby + </orderby>) + </expression> + </query>;
(109) In an sixth example, the query returns all items that are of specified ItemKinds (identified as Item KindIDs) and connected to the specified item instance and including specific system-managed tag of specified type and with specified role and sort the results in descending order by the last modified date such that the specified user owns or is member of the underlying cell where the item is present:
(110) TABLE-US-00014 String queryXml = <query xmlns=\http://www.ludilabs.com/al1/definition\> + <scope> + <op name=\union\> + <op name=\scope.GetCellsOwnedByAccount\>${cell.owner}</op> + <op name=\scope.GetCellsWhoseMemberIsAccount\>${cell.owner}</op> + </op> + </scope> + <expression> + (kind == null ? : <kind> + kind + </kind>) + (tag == null ? : <tag type=\SystemTagType\ role=\ + role + \ name=\ + category + \> + tag + </tag>) + (connect == null ? : <connect> + connect + </connect>) + (orderby == null ? : <orderby direction=\descending\> + orderby + </orderby>) </expression> + </query>;
(111) In addition to the queries, the tags permit items to be sorted and filtered. The items can be sorted by basic item attributes (as defined in the AbstractItem Kind definition) such as source (originator), creation date, date modified, subject, and system-managed tags such as person (for example, the item creator), location, time, category, kinds, ratings and other general tags, i.e., user-defined tags. The filtering may be done based on the tags, such as the Person tag, the Location tag, the Time tag, the Category tag, the Kinds tag, the Rating tag, the user-defined tag or all of the tags.
(112) Query Design for Retrieving Connected Items
(113)
(114) As discussed earlier, the connections may be stored in a connection element for each item and may be either system generated or user generated. The user generated connections permit purpose-based and object-oriented, two-way linking of related items. Examples of system generated connections for a contact item are shown in
(115) Once items are connected to each other, the items can be viewed by a Connected View feature of the data management system. Once the items are connected, the data management system permits queries to retrieve the related items. Hence, for the example of where the user has selected an item that is of any type and the user needs to see all the connected items to the selected item instance, the query will return for a given cell (a) all system defined connections (i.e., all items that came in with the selected item), (b) all items that are first level of user defined connections, (c) and the contact that sent the item. Furthermore, the connected items would be accessed by the data management system using the ItemID of the connected item which would be the value set in the <ItemReference> element within the <RelatedItem> child element of the base type AbstractItemKind.
(116) As another example, the query for retrieving related items wherein the user has selected a contact item and needs to see all items connected to the selected contact item instance, the query needs to fetch all the items from the contact and show them as related items to the Contact item selected. The query results returned for a given cell in the data management system will include (a) contact (which should correspond to the <Source> element in the related items), (b) all items sent from that contact (for example, emails, photos, and any other type of items), (c) all items connected to the selected contact item. Similar to previous example, the ItemID (which is set in the <ItemReference> element within the <RelatedItem> child element of the base type AbstractItemKind) will be used to retrieve the connected items.
(117) As another example, the query for retrieving related items wherein the item is of type EmailMessageKind, i.e., user has selected an email and user wants to see connected item to the selected email. The query results returned for a given cell in the data management system will include (a) the selected email item, (b) all items that are system defined to the email, i.e., all items that were originally to the email and/or parsed from the message body (for example, a web URL link or an email address embedded in the email message body), and (c) the contact item for the person who sent the message (i.e., the From: field of the email header). Similar to previous examples, the ItemID (which is set in the <ItemReference> element within the <RelatedItem> child element of the base type AbstractItemKind) will be used to retrieve the connected items.
(118) While the foregoing has been with reference to a particular embodiment of the invention, it will be appreciated by those skilled in the art that changes in this embodiment may be made without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims.