You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Kristian Koehler (JIRA)" <ji...@apache.org> on 2009/03/27 11:28:51 UTC
[jira] Created: (FELIX-1007) OBR search doesn't take 'categories'
into account
OBR search doesn't take 'categories' into account
-------------------------------------------------
Key: FELIX-1007
URL: https://issues.apache.org/jira/browse/FELIX-1007
Project: Felix
Issue Type: Bug
Components: Bundle Repository (OBR)
Reporter: Kristian Koehler
Hi
the RFC-0112 Bundle Repository document says: "The <category> element defines a category. The purpose is to easy the discovery." and the description of the method org.osgi.servicex.obr. RepositoryAdmin#discoverResources says "The attributes that can be checked are: [...] category" but filtering resources with a given category doesn't work. The following filter is "meaningless": "(category:*>sampleCategory)"
Kristian
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (FELIX-1007) OBR search doesn't take 'categories'
into account
Posted by "Kristian Koehler (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FELIX-1007?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12693668#action_12693668 ]
Kristian Koehler commented on FELIX-1007:
-----------------------------------------
Ok. Now we are both confused ;-) Sorry.
I tried to find resources within the BundleRepository with a specific category value calling the RepositoryAdmin#discoverResources Method. This method takes a filter String. within this method all resources of the OBR are checked via the Filter#match Method of the Filter Implementation. This is done via a Dictionary Object which is passed to the method. This dictionary is filled with
--- 8< ---
Map properties = resources[resIdx].getProperties();
dict.setSourceMap(properties);
--- 8< ---
... and these properties, if i'm right, don't include the category value.
So my attempt to call RepositoryAdmin#discoverResources("(category:*>sampleCategory)") 'fails'.
Are I'm doing something wrong here? Is there a better way to do this?
Kristian
> OBR search doesn't take 'categories' into account
> -------------------------------------------------
>
> Key: FELIX-1007
> URL: https://issues.apache.org/jira/browse/FELIX-1007
> Project: Felix
> Issue Type: Bug
> Components: Bundle Repository (OBR)
> Reporter: Kristian Koehler
> Attachments: categoriesQueryPatch_2009_03_27.txt
>
>
> Hi
> the RFC-0112 Bundle Repository document says: "The <category> element defines a category. The purpose is to easy the discovery." and the description of the method org.osgi.servicex.obr. RepositoryAdmin#discoverResources says "The attributes that can be checked are: [...] category" but filtering resources with a given category doesn't work. The following filter is "meaningless": "(category:*>sampleCategory)"
> Kristian
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Issue Comment Edited: (FELIX-1007) OBR search doesn't take
'categories' into account
Posted by "Richard S. Hall (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FELIX-1007?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12690011#action_12690011 ]
Richard S. Hall edited comment on FELIX-1007 at 3/27/09 12:12 PM:
------------------------------------------------------------------
I am not sure what you mean that filtering resources with a given category doesn't work.
OBR expects the category to be multi-valued. So, the property is an array of Strings. You should be able to do filter with an array value, just specify the value you want and if it is in the array, then it will match.
I don't think we want to take the multi-valued category property and turn it into a single comma-delimited string value. Especially if we end up including set operations in the OBR filter impl.
was (Author: rickhall):
I am not sure what you mean that filtering resources with a given category doesn't work.
OBR expects the category to be multi-valued. So, the property is an array of Strings. You should be able to do filter with an array value, just specify the value you want and if it is in the array, then it will match.
I don't think we want to take the multi-valued category property and turn it into a single comma-delimited string value. Especially if we end up including set values in the OBR filter impl.
> OBR search doesn't take 'categories' into account
> -------------------------------------------------
>
> Key: FELIX-1007
> URL: https://issues.apache.org/jira/browse/FELIX-1007
> Project: Felix
> Issue Type: Bug
> Components: Bundle Repository (OBR)
> Reporter: Kristian Koehler
> Attachments: categoriesQueryPatch_2009_03_27.txt
>
>
> Hi
> the RFC-0112 Bundle Repository document says: "The <category> element defines a category. The purpose is to easy the discovery." and the description of the method org.osgi.servicex.obr. RepositoryAdmin#discoverResources says "The attributes that can be checked are: [...] category" but filtering resources with a given category doesn't work. The following filter is "meaningless": "(category:*>sampleCategory)"
> Kristian
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (FELIX-1007) OBR search doesn't take 'categories'
into account
Posted by "Richard S. Hall (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FELIX-1007?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12690011#action_12690011 ]
Richard S. Hall commented on FELIX-1007:
----------------------------------------
I am not sure what you mean that filtering resources with a given category doesn't work.
OBR expects the category to be multi-valued. So, the property is an array of Strings. You should be able to do filter with an array value, just specify the value you want and if it is in the array, then it will match.
I don't think we want to take the multi-valued category property and turn it into a single comma-delimited string value. Especially if we end up include set values in the OBR filter impl.
> OBR search doesn't take 'categories' into account
> -------------------------------------------------
>
> Key: FELIX-1007
> URL: https://issues.apache.org/jira/browse/FELIX-1007
> Project: Felix
> Issue Type: Bug
> Components: Bundle Repository (OBR)
> Reporter: Kristian Koehler
> Attachments: categoriesQueryPatch_2009_03_27.txt
>
>
> Hi
> the RFC-0112 Bundle Repository document says: "The <category> element defines a category. The purpose is to easy the discovery." and the description of the method org.osgi.servicex.obr. RepositoryAdmin#discoverResources says "The attributes that can be checked are: [...] category" but filtering resources with a given category doesn't work. The following filter is "meaningless": "(category:*>sampleCategory)"
> Kristian
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (FELIX-1007) OBR search doesn't take 'categories'
into account
Posted by "Richard S. Hall (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FELIX-1007?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12695284#action_12695284 ]
Richard S. Hall commented on FELIX-1007:
----------------------------------------
Ok, I think I see your (and my) confusion.
Yes, you are correct, the categories are not included in the properties; however, it probably should be. This could probably be added to the properties as it is set in ResourceImpl.addCategory(). It might actually be the case that we don't need to put them into the category array list at all and we can just aggregate them into an array in the properties map.
I think this was just something that was never really completed.
> OBR search doesn't take 'categories' into account
> -------------------------------------------------
>
> Key: FELIX-1007
> URL: https://issues.apache.org/jira/browse/FELIX-1007
> Project: Felix
> Issue Type: Bug
> Components: Bundle Repository (OBR)
> Reporter: Kristian Koehler
> Attachments: categoriesQueryPatch_2009_03_27.txt
>
>
> Hi
> the RFC-0112 Bundle Repository document says: "The <category> element defines a category. The purpose is to easy the discovery." and the description of the method org.osgi.servicex.obr. RepositoryAdmin#discoverResources says "The attributes that can be checked are: [...] category" but filtering resources with a given category doesn't work. The following filter is "meaningless": "(category:*>sampleCategory)"
> Kristian
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Closed: (FELIX-1007) OBR search doesn't take 'categories'
into account
Posted by "Carsten Ziegeler (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FELIX-1007?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Carsten Ziegeler closed FELIX-1007.
-----------------------------------
> OBR search doesn't take 'categories' into account
> -------------------------------------------------
>
> Key: FELIX-1007
> URL: https://issues.apache.org/jira/browse/FELIX-1007
> Project: Felix
> Issue Type: Bug
> Components: Bundle Repository (OBR)
> Reporter: Kristian Koehler
> Assignee: Guillaume Nodet
> Fix For: bundlerepository-1.6.0
>
> Attachments: categoriesQueryPatch_2009_03_27.txt
>
>
> Hi
> the RFC-0112 Bundle Repository document says: "The <category> element defines a category. The purpose is to easy the discovery." and the description of the method org.osgi.servicex.obr. RepositoryAdmin#discoverResources says "The attributes that can be checked are: [...] category" but filtering resources with a given category doesn't work. The following filter is "meaningless": "(category:*>sampleCategory)"
> Kristian
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Issue Comment Edited: (FELIX-1007) OBR search doesn't take
'categories' into account
Posted by "Richard S. Hall (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FELIX-1007?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12690011#action_12690011 ]
Richard S. Hall edited comment on FELIX-1007 at 3/27/09 12:12 PM:
------------------------------------------------------------------
I am not sure what you mean that filtering resources with a given category doesn't work.
OBR expects the category to be multi-valued. So, the property is an array of Strings. You should be able to do filter with an array value, just specify the value you want and if it is in the array, then it will match.
I don't think we want to take the multi-valued category property and turn it into a single comma-delimited string value. Especially if we end up including set values in the OBR filter impl.
was (Author: rickhall):
I am not sure what you mean that filtering resources with a given category doesn't work.
OBR expects the category to be multi-valued. So, the property is an array of Strings. You should be able to do filter with an array value, just specify the value you want and if it is in the array, then it will match.
I don't think we want to take the multi-valued category property and turn it into a single comma-delimited string value. Especially if we end up include set values in the OBR filter impl.
> OBR search doesn't take 'categories' into account
> -------------------------------------------------
>
> Key: FELIX-1007
> URL: https://issues.apache.org/jira/browse/FELIX-1007
> Project: Felix
> Issue Type: Bug
> Components: Bundle Repository (OBR)
> Reporter: Kristian Koehler
> Attachments: categoriesQueryPatch_2009_03_27.txt
>
>
> Hi
> the RFC-0112 Bundle Repository document says: "The <category> element defines a category. The purpose is to easy the discovery." and the description of the method org.osgi.servicex.obr. RepositoryAdmin#discoverResources says "The attributes that can be checked are: [...] category" but filtering resources with a given category doesn't work. The following filter is "meaningless": "(category:*>sampleCategory)"
> Kristian
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Issue Comment Edited: (FELIX-1007) OBR search doesn't take
'categories' into account
Posted by "Richard S. Hall (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FELIX-1007?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12690011#action_12690011 ]
Richard S. Hall edited comment on FELIX-1007 at 3/27/09 12:16 PM:
------------------------------------------------------------------
I am not sure what you mean that filtering resources with a given category doesn't work.
OBR expects the category to be multi-valued. So, the property is an array of Strings. You should be able to do filter with an array value, just specify the value you want and if it is in the array, then it will match.
I don't think we want to take the multi-valued category property and turn it into a single comma-delimited string value.
I guess I am confused, since this set operator should be working on the array...assuming you are using the patched FilterImpl that supports set operators.
was (Author: rickhall):
I am not sure what you mean that filtering resources with a given category doesn't work.
OBR expects the category to be multi-valued. So, the property is an array of Strings. You should be able to do filter with an array value, just specify the value you want and if it is in the array, then it will match.
I don't think we want to take the multi-valued category property and turn it into a single comma-delimited string value. Especially if we end up including set operations in the OBR filter impl.
> OBR search doesn't take 'categories' into account
> -------------------------------------------------
>
> Key: FELIX-1007
> URL: https://issues.apache.org/jira/browse/FELIX-1007
> Project: Felix
> Issue Type: Bug
> Components: Bundle Repository (OBR)
> Reporter: Kristian Koehler
> Attachments: categoriesQueryPatch_2009_03_27.txt
>
>
> Hi
> the RFC-0112 Bundle Repository document says: "The <category> element defines a category. The purpose is to easy the discovery." and the description of the method org.osgi.servicex.obr. RepositoryAdmin#discoverResources says "The attributes that can be checked are: [...] category" but filtering resources with a given category doesn't work. The following filter is "meaningless": "(category:*>sampleCategory)"
> Kristian
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (FELIX-1007) OBR search doesn't take 'categories'
into account
Posted by "Kristian Koehler (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FELIX-1007?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kristian Koehler updated FELIX-1007:
------------------------------------
Attachment: categoriesQueryPatch_2009_03_27.txt
This patch fixes this issue. I also have test cases for this but they depend on the new FilterImpl which is not committed yet (https://issues.apache.org/jira/browse/FELIX-973).
> OBR search doesn't take 'categories' into account
> -------------------------------------------------
>
> Key: FELIX-1007
> URL: https://issues.apache.org/jira/browse/FELIX-1007
> Project: Felix
> Issue Type: Bug
> Components: Bundle Repository (OBR)
> Reporter: Kristian Koehler
> Attachments: categoriesQueryPatch_2009_03_27.txt
>
>
> Hi
> the RFC-0112 Bundle Repository document says: "The <category> element defines a category. The purpose is to easy the discovery." and the description of the method org.osgi.servicex.obr. RepositoryAdmin#discoverResources says "The attributes that can be checked are: [...] category" but filtering resources with a given category doesn't work. The following filter is "meaningless": "(category:*>sampleCategory)"
> Kristian
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (FELIX-1007) OBR search doesn't take 'categories'
into account
Posted by "Guillaume Nodet (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FELIX-1007?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Guillaume Nodet resolved FELIX-1007.
------------------------------------
Resolution: Fixed
Fix Version/s: bundlerepository-1.6.0
Committing to https://svn.apache.org/repos/asf/felix/trunk ...
M bundlerepository/src/main/java/org/apache/felix/bundlerepository/ResourceImpl.java
A bundlerepository/src/test/java/org/apache/felix/bundlerepository/RepositoryAdminTest.java
M org.osgi.service.obr/src/main/java/org/osgi/service/obr/Resource.java
Committed r915039
> OBR search doesn't take 'categories' into account
> -------------------------------------------------
>
> Key: FELIX-1007
> URL: https://issues.apache.org/jira/browse/FELIX-1007
> Project: Felix
> Issue Type: Bug
> Components: Bundle Repository (OBR)
> Reporter: Kristian Koehler
> Assignee: Guillaume Nodet
> Fix For: bundlerepository-1.6.0
>
> Attachments: categoriesQueryPatch_2009_03_27.txt
>
>
> Hi
> the RFC-0112 Bundle Repository document says: "The <category> element defines a category. The purpose is to easy the discovery." and the description of the method org.osgi.servicex.obr. RepositoryAdmin#discoverResources says "The attributes that can be checked are: [...] category" but filtering resources with a given category doesn't work. The following filter is "meaningless": "(category:*>sampleCategory)"
> Kristian
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Assigned: (FELIX-1007) OBR search doesn't take 'categories'
into account
Posted by "Guillaume Nodet (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FELIX-1007?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Guillaume Nodet reassigned FELIX-1007:
--------------------------------------
Assignee: Guillaume Nodet
> OBR search doesn't take 'categories' into account
> -------------------------------------------------
>
> Key: FELIX-1007
> URL: https://issues.apache.org/jira/browse/FELIX-1007
> Project: Felix
> Issue Type: Bug
> Components: Bundle Repository (OBR)
> Reporter: Kristian Koehler
> Assignee: Guillaume Nodet
> Attachments: categoriesQueryPatch_2009_03_27.txt
>
>
> Hi
> the RFC-0112 Bundle Repository document says: "The <category> element defines a category. The purpose is to easy the discovery." and the description of the method org.osgi.servicex.obr. RepositoryAdmin#discoverResources says "The attributes that can be checked are: [...] category" but filtering resources with a given category doesn't work. The following filter is "meaningless": "(category:*>sampleCategory)"
> Kristian
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.