[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Subject: Re: Combining "Browse & Drilldown" and "Filter Query"
Registry Query team, On August 28 I sent an email to this list that tried to show how each of the Browse & Drilldown queries from Section 8.1 of ebRS could be represented as FilterQueries from Section 8.2. The results were not completely successful because the existing ebRS does not yet include the ClassificationScheme class and its various associations with other ebRIM classes. Let's assume the existence of a UML Query diagram very much like the one attached to a recent email sent to this list: http://lists.oasis-open.org/archives/regrep-query/200109/pdf00002.pdf Using that UML diagram as the definition source, one could specify a revision of the ClassificationNodeQuery (cf ebRS Section 8.2.4) as follows: <!ELEMENT ClassificationNodeQuery ( ClassificationNodeFilter?, HasPathBranch?, FromSchemeBranch?, HasParentNodeBranch?, HasSubNodeBranch*, PermitsClassificationBranch* )> <!ELEMENT HasPathBranch ( PathFilter | XpathNodeExpression | PathElementFilter )> <!ELEMENT FromSchemeBranch ( ClassificationSchemeFilter | RegistryEntryQuery )> <!ELEMENT HasParentNodeBranch ( ClassificationNodeFilter?, HasPathBranch?, HasParentNodeBranch? )> <!ELEMENT HasSubNodeBranch ( ClassificationNodeFilter?, HasPathBranch?, HasSubnodeBranch* )> <!ELEMENT PermitsClassificationBranch ( ClassificationFilter?, RegistryEntryQuery? )> And one could re-specify the HasClassificationBranch in the RegistryEntryQuery as follows: <!ELEMENT HasClassificationBranch ( ClassificationFilter?, FromSchemeBranch?, HasPathBranch?, LocalNodeBranch? )> <!ELEMENT LocalNodeBranch ( ClassificationNodeFilter | ClassificationNodeQuery )> With the above re-specifications, the Browse and Drilldown queries from Section 8.1 of ebRS could be expressed as FilterQuery queries as follows: >Section 8.1.1 Get Root Classification Nodes Request > > From Appendix A the DTD syntax is: > ><!ELEMENT GetRootClassificationNodesRequest EMPTY > ><!ATTLIST GetRootClassificationNodesRequest > namePattern CDATA "*" > ><!ELEMENT GetRootClassificationNodesResponse ( ClassificationNode+ )> > >This syntax assumes that the "Root" node of every classification scheme is >represented as an instance of ClassificationNode. Part of the new proposal >to modify ebRIM would modify that assumption. If that proposal passes, >ClassificationScheme will be a new subtype of RegistryEntry. Each root >node instance in ClassificationNode would be replaced by a >ClassificationScheme instance. > >Assuming that the RIM re-structure proposal passes, the requirements of >GetRootClassificationNodesRequest could be met by a filter query on >RegistryEntry (cf Section 8.2.2) as follows: > > <RegistryEntryQuery> > <RegistryEntryFilter> > objectType EQUAL "ClassificationScheme" > AND > name CONTAINS "someString" > </RegistryEntryFilter> > </RegistryEntryQuery> > >In addition, all of the other flexibility of <RegistryEntryQuery> would be >available to further restrict the ClassificationScheme ID's returned by >this query. I believe that no additional specification is needed to handle >all of the requirements of Section 8.1.1. > > >Section 8.1.2 Get Classification Tree Request > > From Appendix A the DTD syntax is: > ><!ELEMENT GetClassificationTreeRequest EMPTY > ><!ATTLIST GetClassificationTreeRequest > parent CDATA #REQUIRED > depth CDATA "1" > ><!ELEMENT GetClassificationTreeResponse ( ClassificationNode+ )> > >The parent node is supplied and the query is supposed to return all of the >ClassificationNode instances below the parent node for "depth" levels. >This query also assumes that the ClassificationScheme is identified by the >root node. If the RIM re-structuring proposal passes, the >ClassificationScheme will have to be identified in some other way since >the root node will no longer exist as an instance of ClassificationNode. With the re-specification of ClassificationNodeQuery as above, the following query would get all of the nodes of a local classification scheme: <ClassificationNodeQuery> <FromSchemeBranch> <ClassificationSchemeFilter> URN EQUAL "urn:some:known:scheme:urn" </ClassificationSchemeFilter> </FromSchemeBranch> </ClassificationNodeQuery> The following query would get all nodes from the first k levels of a local classification scheme: <ClassificationNodeQuery> <FromSchemeBranch> <ClassificationSchemeFilter> URN EQUAL "urn:some:known:scheme" </ClassificationSchemeFilter> </FromSchemeBranch> <HasPathBranch> <PathFilter> pathDepth LE "k" NOTE: I'm assuming that pathDepth is a derived attribute! </PathFilter> </HasPathBranch> </ClassificationNodeQuery> A simple change of "LE" to "EQ" in the above query would get all nodes at the k-th level. By assuming that the "path" of a node is known, and the URN of the classification scheme it comes from, one could get all nodes at the next level below that node as follows: <ClassificationNodeQuery> <FromSchemeBranch> <ClassificationSchemeFilter> URN EQUAL "urn:some:known:scheme:urn" </ClassificationSchemeFilter> </FromSchemeBranch> <HasParentBranch> <HasPathBranch> <PathFilter> path EQUAL "KnownPathOfGivenNode" </PathFilter> </HasPathBranch> </HasParentBranch> </ClassificationNodeQuery> If instead, one wanted ALL nodes in the subtree beneath the given node, then the following query could be used: <ClassificationNodeQuery> <FromSchemeBranch> <ClassificationSchemeFilter> URN EQUAL "urn:some:known:scheme:urn" </ClassificationSchemeFilter> </FromSchemeBranch> <HasParentBranch> <HasPathBranch> <PathFilter> path STARTSWITH "KnownPathOfGivenNode" </PathFilter> </HasPathBranch> </HasParentBranch> </ClassificationNodeQuery> One could get fancy. Suppose you know that the given node is at level k and you want to retrieve all nodes at the i-th through j-th levels below the given node where i < j: <ClassificationNodeQuery> <FromSchemeBranch> <ClassificationSchemeFilter> URN EQUAL "urn:some:known:scheme:urn" </ClassificationSchemeFilter> </FromSchemeBranch> <HasParentBranch> <HasPathBranch> <PathFilter> path STARTSWITH "KnownPathOfGivenNode" </PathFilter> </HasPathBranch> </HasParentBranch> <HasPathBranch> <PathFilter> pathDepth GE "I" -- where I=k+i AND pathDepth LE "J" -- where J=k+j </PathFilter> </HasPathBranch> </ClassificationNodeQuery> Thus we've seen that the requirements of ebRS Section 8.1.2 are fully satisfied, and then some. >Section 8.1.3 Get Classified Objects Request > > From Appendix A the DTD syntax is: > ><!ELEMENT GetClassifiedObjectsRequest ( ObjectRefList )> ><!ELEMENT GetClassifiedObjectsResponse ( RegistryEntryList )> > >The assumption is that ObjectRefList is a list of classification node >references. The requirement is to return a list of RegistryEntry instances >that are classified by ALL of the classification nodes in the >ObjectRefList. By convention, classification by a sub-node of a node >implies classification by the node. With the above re-specification of RegistryEntryQuery, we can accommmodate all of the requirements of ebRS Section 8.1.3. Suppose the ObjectRefList above has 2 classification nodes identified. Also suppose that we know the URN of the classification scheme of each and the "path" of each. The following RegistryEntryQuery will suffice: <RegistryEntryQuery> <HasClassificationBranch> <FromSchemeBranch> <ClassificationSchemeFilter> URN EQUAL "urn:first:classification:scheme" </ClassificationSchemeFilter> </FromSchemeBranch> <HasPathBranch> <PathFilter> path STARTSWITH "PathOfNode1" </PathFilter> </HasPathBranch> </HasClassificationBranch> <HasClassificationBranch> <FromSchemeBranch> <ClassificationSchemeFilter> URN EQUAL "urn:second:classification:scheme" </ClassificationSchemeFilter> </FromSchemeBranch> <HasPathBranch> <PathFilter> path STARTSWITH "PathOfNode2" </PathFilter> </HasPathBranch> </HasClassificationBranch> </RegistryEntryQuery> CONCLUSION All requirements of ebRS Section 8.1 can be met with the proposed revision of Section 8.2 Queries. -- Len ************************************************************** Len Gallagher LGallagher@nist.gov NIST Work: 301-975-3251 Bldg 820 Room 562 Home: 301-424-1928 Gaithersburg, MD 20899-8970 USA Fax: 301-948-6213 **************************************************************
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Powered by eList eXpress LLC