Skip to Content.
Sympa Menu

perfsonar-dev - perfsonar: r4886 - in branches/perfsonarui: jars/ls src/org/perfsonar/perfsonarui src/org/perfsonar/perfsonarui/ls src/org/perfsonar/perfsonarui/ma src/org/perfsonar/perfsonarui/ma/ui/actions src/org/perfsonar/perfsonarui/ma/ui/panels src/org/perfsonar/perfsonarui/plugins src/org/perfsonar/perfsonarui/test/ls src/org/perfsonar/perfsonarui/test/plugins src/org/perfsonar/perfsonarui/ui/panels

Subject: perfsonar development work

List archive

perfsonar: r4886 - in branches/perfsonarui: jars/ls src/org/perfsonar/perfsonarui src/org/perfsonar/perfsonarui/ls src/org/perfsonar/perfsonarui/ma src/org/perfsonar/perfsonarui/ma/ui/actions src/org/perfsonar/perfsonarui/ma/ui/panels src/org/perfsonar/perfsonarui/plugins src/org/perfsonar/perfsonarui/test/ls src/org/perfsonar/perfsonarui/test/plugins src/org/perfsonar/perfsonarui/ui/panels


Chronological Thread 
  • From:
  • To:
  • Subject: perfsonar: r4886 - in branches/perfsonarui: jars/ls src/org/perfsonar/perfsonarui src/org/perfsonar/perfsonarui/ls src/org/perfsonar/perfsonarui/ma src/org/perfsonar/perfsonarui/ma/ui/actions src/org/perfsonar/perfsonarui/ma/ui/panels src/org/perfsonar/perfsonarui/plugins src/org/perfsonar/perfsonarui/test/ls src/org/perfsonar/perfsonarui/test/plugins src/org/perfsonar/perfsonarui/ui/panels
  • Date: Sat, 17 Jan 2009 06:12:34 -0500

Author: nina
Date: 2009-01-17 06:12:34 -0500 (Sat, 17 Jan 2009)
New Revision: 4886

Added:

branches/perfsonarui/src/org/perfsonar/perfsonarui/plugins/EventTypeFactory.java
branches/perfsonarui/src/org/perfsonar/perfsonarui/plugins/Metric.java
Removed:
branches/perfsonarui/src/org/perfsonar/perfsonarui/ma/Metric.java

branches/perfsonarui/src/org/perfsonar/perfsonarui/test/ls/LSDiscoveryTest.java

branches/perfsonarui/src/org/perfsonar/perfsonarui/test/ls/LSQueryMetadataTest.java
Modified:
branches/perfsonarui/jars/ls/LS-client-api-1.0RC2.jar
branches/perfsonarui/jars/ls/LSclient-Implementation-1.0-BETA2.jar
branches/perfsonarui/src/org/perfsonar/perfsonarui/AbstractUserData.java
branches/perfsonarui/src/org/perfsonar/perfsonarui/ls/Lookup.java
branches/perfsonarui/src/org/perfsonar/perfsonarui/ls/LookupProcess.java
branches/perfsonarui/src/org/perfsonar/perfsonarui/ma/MAPerfsonarModel.java
branches/perfsonarui/src/org/perfsonar/perfsonarui/ma/UserData.java

branches/perfsonarui/src/org/perfsonar/perfsonarui/ma/ui/actions/SearchByIPAction.java

branches/perfsonarui/src/org/perfsonar/perfsonarui/ma/ui/panels/MetricsOptionPanel.java
branches/perfsonarui/src/org/perfsonar/perfsonarui/plugins/IUserData.java
branches/perfsonarui/src/org/perfsonar/perfsonarui/plugins/MAEndpoint.java
branches/perfsonarui/src/org/perfsonar/perfsonarui/test/ls/MockLookup.java

branches/perfsonarui/src/org/perfsonar/perfsonarui/test/ls/TracerouteTest.java

branches/perfsonarui/src/org/perfsonar/perfsonarui/test/plugins/MAEndpointTest.java

branches/perfsonarui/src/org/perfsonar/perfsonarui/ui/panels/MAEndpointsPanel.java
Log:
adding LS support by gLS API

Modified: branches/perfsonarui/jars/ls/LS-client-api-1.0RC2.jar
===================================================================
--- branches/perfsonarui/jars/ls/LS-client-api-1.0RC2.jar 2009-01-16
11:56:21 UTC (rev 4885)
+++ branches/perfsonarui/jars/ls/LS-client-api-1.0RC2.jar 2009-01-17
11:12:34 UTC (rev 4886)
@@ -1,134 +1,113 @@
PK
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-�U.�� M'�Y_Z����g}%4��v^h�Y!�}D�>)�������=�V�A�/��̚ q���f�P�7���gxYG
/3=��a��H{\���I9��4\�Ŋ?S������;�8�ΉAy����j*
-Ǜ���>���~�d5t�LX�x��`zL-B��6�*4���?�A
�7G UD<�\M�9���:+]��/nom_�qY�fx��
�G�F�W�F6�b���1�����Z��vy���:���[WXyH�s�FI]���јX�I�WYMf�>�
-��My��PK
-
-K�ˬRж.o:��Y�Q�%����B�����cW}�M�����+���rMW�S
-Rf�rP��
�˞ۧm��΀��F� RC�GD����I���5PK
-
-�"�c=kk�lffW��|
-��@����X6��m����0���X�iK}s+�³�.��
��@�;aKy���wQ3�o���������4����D
-l�-ش32���[���t��f/}����x���9�
�ses*CHo� ��&)�<�^L��A�9u�ӏ��<���\Kō㛓:u�AU��������nf�N�<V�.��XO���OW����ID��t�n)�����w7���I�I�O~ir�k��ڑ���a��oZ�����=��
�J|�82R.��u�����5�Wd�`
-�� ='3P$.`�� �����a!�*�",�\#��e�$��WPK
-
-
-�jN�K��L�����
-j��X������k�I��PRAc�� �]�.�N�ɂR�;NvX����c�# x�)v�����
�*���Y8z��|��^4�6%�+(6Vӷr�)�
��y`�=[��/޽$���۞���=���u�tk��Şi����8�v�x8O�Ϝ��̃<�h�E�OPK
-
-
-
-
-�xa��/���
��IE#J�o�2���n�;%��?�!��J�>���g�P@٤�3s���wn����o
-�bɭD�@�i�d����6.
Y6:�KF���S6Rhg8]���kԖD��/�2W =�/�H���e�*T��j,r^���*c� ��0
�����lx��d�i�g�<ƥ\���F׶s��
�r�9� � �ku��e
0t��`2\�W�vk��q\,TZ�G�3��pՈ�V�R9P�{b����!��˦}q�X�w�0��i 3 j�
W�xU�Ѝ�ҝѺ�� Q���6m\�u��7���fPF�M�����)WaT̢��4Fikm��:Cz��sbC�y{�=\71A��uO���t�6�ʫ@��BgEˎZ�<Pm���'�je$Fb�;k<rH��=ͽ�ժ���B�T��
��>���?�л?�y�}QoI��޾��* 5���r=G�����u٬�Y����,u��Vk>lD�����u�nh
-������o%0��
-
-
-
-
-�0�s�Okq�G���쬓�P�k -!-iZ��|
-?%D���爿PK
-
-
-�)fӁ���F�?dP�9&�n/���`P un"q-��o�/�
��������w{�W�gk�)��s�6@�l�J=ڒXn�
-5�uh8�.�Y` �w`�:K���t�PK
-
-%G���;)����&�xq�l��:�I�[I�Hz�ɑ/l<���G)aj%��9�`��|�R�O�v�NΫkZF��%'�%�o��ͽX7V�j7�C yw^�f�n�
�.�"�����LYCE���
-
-
-�0��UmՕ �>\�V����ZbR�(x5�C��Kg1 � ��<_
-
-
-� �0<�̟a��ʮIR�օ�H��r�w�]V�����
-���� ?r}O���T>g#gu?ҡtuUu��l!%p���JǗ��s{��r�����)D=`5Z���-�-�Ui߬,
,U�]z
Z&v�ky�"p=?,��'�Z �*�$��ø@2_�?͆�Q��U��v:��U�+�}������d��q2��^$����߃H��u/r��
-*�jώ�|��t���‰��X�k������
��Ӕե��n���q�����,W�à׻4w�jH\M�]�U}da�jG7�Pj���A�U����c����?\[2j�/�^1I~���o�2��%�qE`<�2Է��8�l�\�"v@y'
\E�,^��
-�>#�� fY(�Vꀅ2�?���<� ��Pd�>�jc ����Z L=b8һ
�#p�i�jZ��XIJ�k�΢k�hCz������Y{���xG
�P��d6�D�d�f�.��$p�؂���ޖ���� ��fc-�}���V�x+�}%��ğ7�zu��=�%��\#ӷ|�S���O���]��SJ��A�y*�����!��?F*��in<o�
-���u6���ezjA'tՆg�q��y�h����q��GxO�S�?��1���r��q��L�!����8�]�g��qb��H��1��to7Γ�eX���c�K1�D�wB��s���R�87��.�Fr#�x����A>g"/� K�\���=�d.e�7q#�O�&����[.�-Y��� H�9C�T�g����m��z���
-z�b7��Xk��u�V���ޤ�)T�M�m�g����C�,r���р�:��x���}�L,��
PK
-
-}�Uя0C4��b���'�M�gG�y�č"�u9nNܪ�0h���x���pE�Y��3]�L<��c��

����ę1CA��ܭٔ��g��;�V�.�6�˰*���ا�t&ݍ�j����ѥ_A�u�$���\�w�\���p�\"�nⶂ[W��yy���q�������0t��w��Z��@�}��S)��#Ajp��\w1!U6I��\�(]�Uh�.��),w-�a,�^}�9O��aA�<�����7�H�����3z��v
-�,1,\��JͭZ��E޲��8
b%�)i,$�|�IM؇-��;�R�+$}��%y��]:3x��b �v�g-à�u�L'v${����}�ʝ
�(ږ�^4���?�Gaq,hG�6�i��~����h-d �f�йU���"1�>b(|������fX굫R�76ãn�;2#�r��!���&��\~�_��ӱ���l����>a"��v�

u>pjFJ����Y�f��C]�y��u8-1w����/F�uL��F�eLo9�J�m�~zG�/0��x����s�|GS>�D�a�y��7�&q c4s�ᆗ�
-�Y2 �,�Gv
��~�ú.ñ(B^2���1219u��?��v,p�����TP���a�op/�����7S�XPz�B��[A�m��/V����X�[�F��8�v��O�>��,��B�+a�R�TZ%�b�v��,�g���'�u��
-R�$�1|�<EY�/h�����x���������1y0�H��H����4K��QZ�T�0O$-�D��$mwI�VI;I�=��PK
-
-`������Ox{xd����'�p��r>�꽃wպ���>i0��0b4|6B�A�a(@��!������=aŤ�Ⱦ><ra٘�6�+�!_0�Ç����p�z��^WCBR�Z(� �&T��v
]W�~�`�H�B��M|��F)�(]�ECJ)|�)��R�"�wEQ�=I.�D.��mI�B� �B����n��+���z
��*rKԓ�IEns<
�%��,�s�܀/�Kb^�jx&��Mu��·P�;d�b{�,t�5��ʚr�5KMi��F�sE�n;��/-��7������4B����7PK
-
-|<��G���o��!�����7n� ��PK
-
-$��
-
-�k)b㟸�NIo��QD�ֵ��ԛ�w8j+ ����#+0},O��e�v�7�ɷ�
-�Ꝯ�$^Zސ�^Zˋ��k=�"}�
�^�@����ځ@v+lQL�ǘ���ڍ;M2���I�䅾�Ҩ�~���#
� #p���֢Ó��m� {q`U�T���f���(e�
�cn�}C����8x`E�"'��yGvO�}��|ޣ(���4�C<(l���M���#PL���;�T&!ɔ����ˡ���7H��c�6������p�o��"V�P`�}���ʰ5�������A�T�.QmX��vm��R�[��e/��}$��8
-c�r�� �� k�i�/㈜��^-GENk]���Q�1��SDU<e9J��*װc�al|�Q��V����
-_�0�"�\��-�ŋ�IL�@Ӝ<����R�d_���o(�
-�g�r�
-
-
-
-
+
+
+
+
+
+
+
+
+`(D��p�]���y�
+
+�0��kmkq�G���쬓�P�k -!-iZ��|
+
+#�.Yg�<�q166�3��2���`�I�Q�q��0��nTvԅ���"ޗ��B���nM�ݚ��Eń�^�[['l�"�e_%����fsm��FTMZ��Ȥ��p���J�\.%��9����@��
��| �
�K�PK
+
+r<���
�� U_�Z��R���e%24�XX1��џ;��'��5ߤ6��*"|#���3���E}����Le��"}�Wb(a
-�˴�j��\��6��i-�,�����t�
PK
+
+��k�Hd��5�ߟ��t��Q�A�!�EK�v{g�>���Ij��m�����
ƪBŒ0(��84^���<w^���m�*��֥5��~9��+�-"nX�Ɨ�66�^ �S�F����F��������q�0���\i����2�B�v�GxB/�~t
Ҩ�N=�
+
+
+�0�Wk��\xE��ڵ�
~�3�Ĥ�Q�j.<��S��b�ü?��9�9�=B�%wk�p<�T���J��,����BV����jg�~,�\ņY[&L��\��4�*Ϧ)LS>���oO~FY��S%E��-(%t��
+�� �/PK
+
+_��'뒽�q�"�p�o6��?�a�psj�p��_�@h�h��R���ER���R������PK
+
+]�2DDŽ����ܺR4���+��b-��1T�ɠ[έ}���r�_t���K�
� ����0IYO���mM8�63�.�m���\N�qa�S�Ld�ѕ�ʶ잋��i�
����-��G�f�a�B]�) o%��0�
�@�#��,}�s3�
+
+�Ҹ/y+�K��6uCZR̤m���V�H��)?����~h3�3�~����~i�w6��ⴣ������s;�{����
+��i���}��-,|�m�����aDs�yPw�v ��f�u#j�؈bH�zJ��7K�O�/��%��ԩS��
������οz�d�[i�4x�)��z��h��V�@UN�y�q:5�L]���#���!y戁��Ֆ}�!w�d+�����#�2�[àIH��:^t�%H�✶�S�
=�l��3?i���;LWp.�w 㤍w��6�ZR���ޡ5�d
����ߐ�jd�)��1]�6� ���}�hB�r�}� ߡ��A�?0T4s�>�
�#�3��a؇��?��,g�H�I�m��DS���"��BAsܦ����]��c�� H���۴�K�ZI�IJh�
+II�\�$�\��R�IZ�&K'r�i�"��H�W�U�F~3Z�}PK
+
+�yOú\sSߒ�m
E
�k��!b����K�W7�����:�g�~ն�#��ZP� �[t-1�<w���6�L���X"�PMx�`�m�P��q��������.���]�F�%�j�ۦg�~{0$��`���m���]_xfU�� �U��E��Ȏ`�'K͖i4�ee.r�����
�5�=^r�/��e*Q[>�S����
�3��j��#9 XS
]1���)\��F���ȉ/z�E��s���>��2�%�N0������M�O�jJ����^�+}s�r�]ۭ�q���ˍA��V��
�vR��A�����8�
n�MO����)���ѲUwLAS $Ϧ����j�_T"F�Nn:a��9���iO���V]"�
+���Bf�j��6�*�iɓ{����I�:&Q����aC�&.S�z���7(��;:>�] ����-
���}c�ai���*:>��:>C�av�z�0��ڦS7��>�U�]s�.��� C0)��w�ܚ�W��h���
�������"u�E��jWk���Գ�x��(��0�M��P��?Gu&��t%/oy��w��;�\c�� ��;��1k�5�fHt��k�D��yNf������ѣh� �-iwҫiBnP�i|�S��vhE��c��`��G�g!�=
��6��/S{ ������i��
/��%�0e�@�/���

�."����@pzf������I��?�1�lX�F覊$"�e�IiE~A,�%��ABS.�0q.�����["���MR��
�Q�N4_�*�t�Ҋ�=��J+�Ќ�
\�+D��uR��UL�T*�e�R��u���s�<N�W��$+L^�%S"��t9�A�v�s�0�������R��+U��-�E�f��Z��j�
R--�b�TK�� IJ���PK
+
+S� G,oո/��Z����I��8 {�'�Nٲ[sm��5F�(P�˝8��A�L�;1��c���A��}�Qtǟ��t*��g
+k��E�GE[��W���Wѥu�����WK�X�
�Dw�`��?����G� ����%�.L)R���;\�j�a'��Ȗ�j�|.�����
���oܘ�i�{�+vu&;����t�W5�K<�}az">v�tz����\�\�Oh�Ex�����O?���x�|���m(i����$��?1jੲx~͒����w�Q�U���xǓ�Z�I��1(�x3
�0��}\�1.�$>�1��:N��$Vu�H��b0:|
0��{+��z�W�u��m<6l��Ό�R�pv���m��iOy�@��Ni���>��}

��z�e@�C��>j)CD_�/�ZFm���`��Ӆ׈�(�
%��
+�1@�dfUK�T-���Lf����9$�G�C?�kxd�~l��U�O�z�o�;�3J��,�&�w�E��]����5�0�ch�9G��(������Q��������T�D]��*�P����0F����ץz��K�HR�B�����H���E��J�
+\B�$8�\F�����Zc���w���?n������M��N+p���£XJ�樝W�B�\�fT&ӈׂ�\�^�c���ղjR�U��A���j�uU3Mҙ'�qZқ�}�e|����
+
+q<��� ����|����s���/��X)��Eo��Y�%�W��F��'��Z���``G
�}�����x���cv��n�������(���:#U��O����k~���F����/�TW*q���œ�3�鮎�vN(��JZ���6�h
̥Պ�(�q"�rQ'$"��;�|�ݡ����M,��fSa-���R�P�yf�pv�`���ͯ1�����S��XJ���;
+�<����x��f�a���eX|u�)'S�t�o(�?u!@H�e�D�bR@�J���a��yv�7}"[&
+hd���aj���D�i��G�1K��a�(��A�u����
+I���ư�����57�Uxɪ�������|f�PK
+
+
+���M���+\j �!4���BXL� D�YǗ=rM a_��0
�"����0�q�yf2�e������q��Z-�
+
+�0D�Wmԕ�p�Е�����--�G�X<� ���� �3��y��� ��B�TP
+s���o���sLX7<����uK:H�p1�w��;/UoC����k������׿�����H����m"T��J�Ȟ`a����PK
+
+���tI�ɒ�.��<�
+�V�vQ=R$�򥷾�.,?I0������ն�}9��h�vN�`�H�8�.J��_�{�T�3�3/9R��ZE�����X�7l��j���
�5i����{��q!�wsZr��ذ�����G8���qK0N~���a�F�PK
+
+�0D�Wmԕ�p۠
+B��'��[Z$�x6�C��f63�^���
+3�RA)L
������1aYs�n]ǭkY�A�����'��z�:��ƇF_s���]�߽�u',�vF}<wl��VE����&PK
+
+�0E�Tm�Z�ޠ�^A��'�aZZB*I��\x
+
+�:��A!�A�$0����4��j���z7���F�����Ð�n��k �B��kVC����r�rۑ�UV9X
�g��%��/2djB-u=g���[���t�,]�ܬ� ��9�(IW��h��ʐ-{6wV�/�����
0�(;0����)k�Ѷ-Jz.����
G��ȵ�a:_��[�r�[���>�ӵMa�@q�ỻ�
+�q�P�y����4'm!���|3T#UBr��ca~��Qz���O�?��
o�&!��nɗ�T �o������J��t�(��3�a:�i��S�8%�
k�x�����B�6E��!�i*�R�P�:�2{ȼl������(���5� PK
+
+
+*
�
+b� �!!��0�4dP2��X��8�
+
+
+
+

H�E��)`��LG"�R�.��wDR2e���h�� g�����Uԁ�\���i��G
2�sQ^�o�|�����Y�(���D�-��|mLsNH�:
kX��D��|�tMΒf��X��������c���:.�S���j��5��І�
�0�ϵ�^Ɍ ��r�1�������"��|Ng'i-s������O�D�>��m�1�
�BK�TJZ�2�`�A�jgab����C ��Y�M�a'�M���5DWR>����
"�,���1%�]��P|��w˔t;����S�LQ뛔Lu3��Q0��qb�/��������X�$mUE���O���VLG��P�C�Dom��b/!Ȝ�<[3��{��+�Q��hK_;s��hM��N��V,�ӭʼn����C
��iJF��p�xu���0�s9

ƞY80�q�+�\�Ʀ�LQ���yE7r�iH2h�n15�1�}�m���7�"�̸�RYU��'�@�D�y�'�h�Z�]�@�-
-&�НH�0��F� �-A
��������2On6ه���
��
St����L�
�@��fR�l���c�T�*�G��S��-����Z��o�0�q:��G����?PK
-
-�0
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
+
+�0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+*
�
+
+
+
+
+
+
\ No newline at end of file

Modified: branches/perfsonarui/jars/ls/LSclient-Implementation-1.0-BETA2.jar
===================================================================
(Binary files differ)

Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/AbstractUserData.java
===================================================================
--- branches/perfsonarui/src/org/perfsonar/perfsonarui/AbstractUserData.java
2009-01-16 11:56:21 UTC (rev 4885)
+++ branches/perfsonarui/src/org/perfsonar/perfsonarui/AbstractUserData.java
2009-01-17 11:12:34 UTC (rev 4886)
@@ -19,12 +19,17 @@
*/
package org.perfsonar.perfsonarui;

+import java.net.URI;
import java.util.ArrayList;
import java.util.Calendar;
+import java.util.Collection;
+import java.util.HashSet;
import java.util.Hashtable;
import java.util.Observable;
import java.util.TimeZone;

+import org.perfsonar.lsclient.data.EventType;
+import org.perfsonar.perfsonarui.plugins.EventTypeFactory;
import org.perfsonar.perfsonarui.plugins.IUserData;
import org.perfsonar.perfsonarui.plugins.MAEndpoint;
import org.perfsonar.perfsonarui.plugins.MAEndpointList;
@@ -313,25 +318,37 @@
public String toString() {
return qr.toString();
}
- public ArrayList<String> getEventTypes() {
+
+
+ public Collection<EventType> getEventTypes() {
return qr.getEventTypes();
}
+ public void setEventTypes(Collection<EventType> events) {
+ qr.setEventTypes(events);
+ }
+ public void addEventType(EventType value) {
+ qr.addEventType(value);
+
+ }
public void clearQuery() {
qr.clearQuery();

}
+ public URI getURI() {
+ return null;
+ }
}

class QueryResponse implements Cloneable {
protected Hashtable[] query_response;
- protected ArrayList<String> eventTypes;
+ protected Collection<EventType> eventTypes;
public static String NULL_DATA="N/A";

public QueryResponse() {
query_response = new Hashtable[2];
query_response[0] = new Hashtable();
query_response[1] = new Hashtable();
- eventTypes = new ArrayList<String>();
+ eventTypes = new HashSet<EventType>();
}
public void clear() {
query_response[0].clear();
@@ -353,7 +370,7 @@
public void putResponse(Object key,Object value) {
query_response[1].put(key,value);
if (IUserData.C_EVENTTYPE.equals(key))
- eventTypes.add(value.toString());
+
eventTypes.add(EventTypeFactory.getInstance(value.toString()));

}
public String getQuery(Object key) {
@@ -399,14 +416,16 @@
newqr.assign(this);
return newqr;
}
- public ArrayList<String> getEventTypes() {
+ public Collection<EventType> getEventTypes() {
return eventTypes;
}
- public void setEventTypes(ArrayList<String> eventTypes) {
+ public void setEventTypes(Collection<EventType> eventTypes) {
this.eventTypes = eventTypes;
}
+ public void addEventType(EventType value) {
+ eventTypes.add(value);
+ }

-

}


Modified: branches/perfsonarui/src/org/perfsonar/perfsonarui/ls/Lookup.java
===================================================================
--- branches/perfsonarui/src/org/perfsonar/perfsonarui/ls/Lookup.java
2009-01-16 11:56:21 UTC (rev 4885)
+++ branches/perfsonarui/src/org/perfsonar/perfsonarui/ls/Lookup.java
2009-01-17 11:12:34 UTC (rev 4886)
@@ -1,123 +1,143 @@
package org.perfsonar.perfsonarui.ls;

-import java.util.ArrayList;
-import java.util.Enumeration;
-import java.util.Hashtable;
-import java.util.List;
-import java.util.concurrent.Future;
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Set;
+import java.util.concurrent.CountDownLatch;

-import org.perfsonar.perfsonarui.IPerfsonarSchema;
-import org.perfsonar.perfsonarui.MetadataListResponseListener;
-import org.perfsonar.perfsonarui.PerfsonarSchema;
-import org.perfsonar.perfsonarui.plugins.Batch;
+import org.perfsonar.lsclient.data.EventType;
+import org.perfsonar.lsclient.data.Service;
+import org.perfsonar.lsclient.data.ServiceType;
+import org.perfsonar.lsclient.data.TopologyElement;
+import org.perfsonar.perfsonarui.PSLogger;
+import org.perfsonar.perfsonarui.SmartMARequest;
+import org.perfsonar.perfsonarui.ma.MARequest_NMWG2;
import org.perfsonar.perfsonarui.plugins.IUserData;
import org.perfsonar.perfsonarui.plugins.MAEndpoint;
-import org.perfsonar.perfsonarui.plugins.MAEndpointList;
import org.perfsonar.perfsonarui.plugins.MetaDataList;
+import org.perfsonar.perfsonarui.plugins.Metric;
+import org.perfsonar.perfsonarui.ui.panels.BusyIdleEvent;
+import org.perfsonar.perfsonarui.util.Collections;

public class Lookup {
- protected LSDiscoveryQuery createDiscoveryQuery(XQueryParams params)
throws Exception {
- MetadataListResponseListener listener = new
MetadataListResponseListener(params.getMetadata());
- return new LSDiscoveryQuery(
- getGlobalLS(),
- params,
- listener
- );
+ protected SmartMARequest request = null;
+ public SmartMARequest getRequest() {
+ return request;
}
- protected LSQueryMetadata createMetadataQuery(MAEndpoint
hls,XQueryParams params) throws Exception {
- MetadataListResponseListener listener = new
MetadataListResponseListener(params.getMetadata());
- return new LSQueryMetadata(
- hls,
- params,
- listener
- );
- }
- public MetaDataList lookup(MetaDataList list) throws Exception {
- XQueryParams params = new XQueryParams();
- List<String> eventType = new ArrayList<String>();
-
eventType.add("http://ggf.org/ns/nmwg/characteristic/utilization/2.0";);
- //eventType.add("utilization");
- params.setEventType(eventType);
- params.setMetadata(list);
+ public void setRequest(SmartMARequest request) {
+ this.request = request;
+ }
+
+ protected static PSLogger logger = new PSLogger(Lookup.class);
+ public MetaDataList lookup(final MetaDataList list) throws Exception {
+ CountDownLatch latch = new CountDownLatch(list.size());
+ for (int i=0; i < list.size();i++)
+ try {
+ lookup(list.get(i),latch);
+ } catch (Exception x) {
+ x.printStackTrace();
+ }
+ latch.await();
+ return list;
+ }
+ public IUserData lookup(final IUserData topoElement) throws Exception
{
+ return lookup(topoElement,null);
+ }
+ public IUserData lookup(final IUserData topoElement,final
CountDownLatch latch) throws Exception {
+ LookupProcess process = new
LookupProcess(LsResources.getExecutor());

- LSDiscoveryQuery discovery = createDiscoveryQuery(params);
+ HashSet<TopologyElement> topoElements = new
HashSet<TopologyElement>();
+ topoElements.add(topoElement);

- Future<MetaDataList> futureResult =
discovery.getResults(discovery.listener);
- //this is blocking call, runs the query in a separate thread
- MetaDataList xqueryResult = futureResult.get();
-
- List<Batch<MetaDataList>> batch =
Batch.createBatch(xqueryResult, Integer.MAX_VALUE);
- IPerfsonarSchema hls_schema =
PerfsonarSchema.getInstance("hls");
- for (Batch<MetaDataList> b: batch) {
- MAEndpoint hls = b.getEndpoint();
- if (hls == null) continue;
- if (hls_schema.equals(hls.getSchema())) {
- MetaDataList d = b.getData();
- XQueryParams xparams = new XQueryParams();
- xparams.setEventType(eventType);
- xparams.setMetadata(d);
-
- LSQueryMetadata metadata =
createMetadataQuery(hls, xparams);
-
- Future<MetaDataList> query =
metadata.getResults(metadata.listener);
- d = query.get();
-
+ HashSet<EventType> events;
+ Collection<EventType> eventTypes =
topoElement.getEventTypes();
+ if (eventTypes == null) {
+ events = new HashSet<EventType>();
+ } else if (eventTypes instanceof HashSet)
+ events = (HashSet<EventType>)eventTypes;
+ else {
+ events = new HashSet<EventType>();
+ for (EventType e : eventTypes) events.add(e);
+ }
+
+ HashSet<ServiceType> types = new HashSet<ServiceType>();
+ types.add(new ServiceType() {
+ @Override
+ public String toString() {
+ return "MA";
}
- }
+ });

- /*
- Hashtable<MAEndpoint, MetaDataList> endpoints = new
Hashtable<MAEndpoint, MetaDataList>();
- for (int i=0; i < xqueryResult.size();i++) {
- xqueryResult.get(i).makeQueryFromResponse();
- MAEndpoint hls = xqueryResult.get(i).getEndpoint();
- if (hls == null) continue;
- if (hls_schema.equals(hls.getSchema())) {
- MetaDataList d = endpoints.get(hls);
- if (d == null) {
- d = new MetaDataList(null);
- endpoints.put(hls, d);
+ process.addProcessListener(new
LookupProcess.ProcessListener() {
+ public void onStart() {
+ request.firePropertyChange(new
BusyIdleEvent(request,BusyIdleEvent.PROPERTY_MESSAGE,
+ "","Discovering ..."
+ ));
+ }
+ public void onProgressChanged(Integer percent) {
+ if (percent != null)
+ request.firePropertyChange(new
BusyIdleEvent(this,BusyIdleEvent.PROPERTY_PERCENT,
+ null,new Double(percent)));
+ else
+ request.firePropertyChange(new
BusyIdleEvent(request,BusyIdleEvent.PROPERTY_MESSAGE,
+ "","."
+ ));
+ }
+ public void onNewResult(Set<Service> result) {
+ if(result.isEmpty()) return;
+ Iterator<Service> i = result.iterator();
+ while (i.hasNext()) {
+ Service service = i.next();
+ MAEndpoint endpoint = new
MAEndpoint();
+ endpoint.setTitle(service.getName());
+
endpoint.setDescription(service.getDescription());
+
endpoint.setContact(service.getOrganization());
+
endpoint.setEndpoint(service.getEndPoint().toString());
+
endpoint.setSchema(MARequest_NMWG2.NS_UTILIZATION_2_0);
+
endpoint.setEvent(MARequest_NMWG2.NS_UTILIZATION_2_0);
+
endpoint.setDescription(service.getDescription());
+ topoElement.addEndpoint(endpoint);
+ StringBuilder b = new StringBuilder();
+ b.append("Found services for \t");
+ b.append(topoElement.toString());
+ for (MAEndpoint e :
topoElement.getEndpoints()) {
+ b.append(e.getName());
+ b.append(',');
+ }
+ request.firePropertyChange(new
BusyIdleEvent(request,BusyIdleEvent.PROPERTY_MESSAGE,
+ "",b.toString()));

+ b.append("\tLookup service\t");
+
b.append(service.getAuthorativeLookupservice());
+ logger.info(b.toString());
+
}
- d.add(xqueryResult.get(i));
}
- }
-
- Enumeration<MAEndpoint> keys = endpoints.keys();
- while (keys.hasMoreElements()) {
- MAEndpoint e = keys.nextElement();
- MetaDataList d = endpoints.get(e);
- XQueryParams xparams = new XQueryParams();
- //eventType.add("utilization");
- xparams.setEventType(eventType);
- xparams.setMetadata(d);
-
- LSQueryMetadata metadata = createMetadataQuery(e,
xparams);
-
- Future<MetaDataList> query =
metadata.getResults(metadata.listener);
- d = query.get();
- }
- */
- IPerfsonarSchema hls = PerfsonarSchema.getInstance("hls");
- for (int i=0; i < list.size();i++) {
- ArrayList<MAEndpoint> toremove = new
ArrayList<MAEndpoint>();
- for (MAEndpoint e: list.get(i).getEndpoints()) {
- if (e == null) continue;
- if (hls.equals(e.getSchema())) {
- toremove.add(e);
-
list.get(i).setResponse(IUserData.C_STATUS, e.toString());
+ public void onFinish(boolean success) {
+ long count = 0;
+ if (latch != null) {
+ latch.countDown();
+ count = latch.getCount();
}
+ request.firePropertyChange(new
BusyIdleEvent(request,BusyIdleEvent.PROPERTY_MESSAGE,
+ "","Completed requests "+
Long.toString(count) + success
+ ));
+ if (success)
+ processTopoElement(topoElement,
success);
}
- for (MAEndpoint e: toremove)
- list.get(i).removeEndpoint(e);
- }
- return list;
- }
+ });
+
+ //process.start(topoElements, events,types);
+ process.start(topoElements,
Collections.umodifiableCopy(events),types);
+ return topoElement;
+ }

- public MAEndpoint getGlobalLS() throws Exception {
- LSManager lsmanager = LSManager.getInstance();
- MAEndpointList endpoints = lsmanager.getServices();
- for (int i=0; i < endpoints.size();i++)
- if
(PerfsonarSchema.getInstance("gls").equals(endpoints.get(i).getSchema()))
- return endpoints.get(i);
- throw new Exception("No Global LS available!");
+ public synchronized void processTopoElement(IUserData topoElement,
boolean success) {
+ /*
+ System.out.println(">\t"+topoElement);
+ for (MAEndpoint endpoint: topoElement.getEndpoints())
+ System.out.println(">>\t\t"+endpoint);
+*/
}
+
}

Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/ls/LookupProcess.java
===================================================================
--- branches/perfsonarui/src/org/perfsonar/perfsonarui/ls/LookupProcess.java
2009-01-16 11:56:21 UTC (rev 4885)
+++ branches/perfsonarui/src/org/perfsonar/perfsonarui/ls/LookupProcess.java
2009-01-17 11:12:34 UTC (rev 4886)
@@ -12,6 +12,8 @@
import java.util.concurrent.Executors;
import java.util.concurrent.Future;

+import javax.xml.soap.SOAPException;
+
import org.perfsonar.lsclient.LsClient;
import org.perfsonar.lsclient.LsClientProvider;
import org.perfsonar.lsclient.data.AuthorativeLookupservice;
@@ -67,7 +69,7 @@
}

public void run() {
- boolean succes = false;
+ boolean success = false;
try {
Set<AuthorativeLookupservice> hlses =
lsClient.discover(elements, types, serviceTypes);
for(final AuthorativeLookupservice service :
hlses) {
@@ -83,13 +85,18 @@

fireProgessChanged(Integer.valueOf(100/hlses.size() * i ));
} catch (ExecutionException e) {
e.printStackTrace(); }
}
- succes = true;
+ success = true;
+
} catch (InterruptedException e) {
- e.printStackTrace(); /* TODO log */
+ /* TODO log */
+ System.out.println(e.getMessage());
+ } catch (Exception e) {
+ System.out.println(e.getMessage());
} finally {
- final boolean result = succes;
EventQueue.invokeLater(new Runnable() {
- public void run() {
fireOnFinish(result); }
+ public void run() {
+ fireOnFinish(true);
+ }
});
}
}
@@ -159,6 +166,7 @@
}
}
protected void fireOnFinish(boolean succes) {
+ System.out.println("onFinish");
for(ProcessListener listener : listeners) {
listener.onFinish(succes);
}

Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/ma/MAPerfsonarModel.java
===================================================================
---
branches/perfsonarui/src/org/perfsonar/perfsonarui/ma/MAPerfsonarModel.java
2009-01-16 11:56:21 UTC (rev 4885)
+++
branches/perfsonarui/src/org/perfsonar/perfsonarui/ma/MAPerfsonarModel.java
2009-01-17 11:12:34 UTC (rev 4886)
@@ -59,6 +59,7 @@
import org.perfsonar.perfsonarui.plugins.MAEndpoint;
import org.perfsonar.perfsonarui.plugins.MAEndpointList;
import org.perfsonar.perfsonarui.plugins.MetaDataList;
+import org.perfsonar.perfsonarui.plugins.Metric;
import org.perfsonar.perfsonarui.plugins.PerfsonarTabsList;
import org.perfsonar.perfsonarui.ui.PerfsonarModel;
import org.perfsonar.perfsonarui.ui.actions.ITimeSetAction;
@@ -218,9 +219,9 @@
return
m.createRequest();
}
else
- throw new
PSNotConfiguredTypeException(endpoint,m.getEvent());
+ throw new
PSNotConfiguredTypeException(endpoint,m.getEvent().toString());
}
-
+ throw new
UnsupportedTypeException(endpoint,endpoint.getEvent().toString());
}
throw new UnsupportedTypeException(endpoint);
}

Deleted: branches/perfsonarui/src/org/perfsonar/perfsonarui/ma/Metric.java

Modified: branches/perfsonarui/src/org/perfsonar/perfsonarui/ma/UserData.java
===================================================================
--- branches/perfsonarui/src/org/perfsonar/perfsonarui/ma/UserData.java
2009-01-16 11:56:21 UTC (rev 4885)
+++ branches/perfsonarui/src/org/perfsonar/perfsonarui/ma/UserData.java
2009-01-17 11:12:34 UTC (rev 4886)
@@ -19,10 +19,12 @@
*/
package org.perfsonar.perfsonarui.ma;

+import java.net.URI;
import java.util.Calendar;
import java.util.Date;
import java.util.TimeZone;

+import org.perfsonar.lsclient.data.TopologyElement;
import org.perfsonar.perfsonarui.AbstractUserData;
import org.perfsonar.perfsonarui.plugins.IUserData;
import org.perfsonar.perfsonarui.ui.PerfsonarModel;
@@ -32,7 +34,7 @@
* @author Nina Jeliazkova
*
*/
-public class UserData extends AbstractUserData {
+public class UserData extends AbstractUserData {

public final static String C_DIRECTION="direction";
public final static String C_IFDESCRIPTION = "ifDescription";
@@ -596,7 +598,13 @@
public void setNum(int num) {
this.num = num;
}
+ public URI getURI() {
+ try {
+ return new URI("urn:ogf:network:node="+
getQuery(IUserData.C_IFADDRESS));
+ } catch (Exception x) {
+ return null;
+ }
+ }

-
}


Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/ma/ui/actions/SearchByIPAction.java
===================================================================
---
branches/perfsonarui/src/org/perfsonar/perfsonarui/ma/ui/actions/SearchByIPAction.java
2009-01-16 11:56:21 UTC (rev 4885)
+++
branches/perfsonarui/src/org/perfsonar/perfsonarui/ma/ui/actions/SearchByIPAction.java
2009-01-17 11:12:34 UTC (rev 4886)
@@ -27,9 +27,11 @@
import org.perfsonar.perfsonarui.PSLogger;
import org.perfsonar.perfsonarui.SmartMARequest;
import org.perfsonar.perfsonarui.ls.Lookup;
+import org.perfsonar.perfsonarui.ma.TimeValueListResponseListener;
import org.perfsonar.perfsonarui.ma.UpdateListResponseListener;
import org.perfsonar.perfsonarui.ma.UserData;
import org.perfsonar.perfsonarui.plugins.IPerfsonarRequest;
+import org.perfsonar.perfsonarui.plugins.IUserData;
import org.perfsonar.perfsonarui.plugins.MAEndpoint;
import org.perfsonar.perfsonarui.plugins.MAEndpointList;
import org.perfsonar.perfsonarui.plugins.MetaDataList;
@@ -123,9 +125,35 @@
updateSearchList(searchText, dataList);

if (isUseGLS()) {
- Lookup lookup =new Lookup();
+ Lookup lookup =new Lookup() {
+ @Override
+ public synchronized void
processTopoElement(
+ IUserData
topoElement, boolean success) {
+ // TODO Auto-generated method
stub
+
super.processTopoElement(topoElement, success);
+ System.out.println("> "+
topoElement);
+ System.out.println(">>
"+topoElement.getEndpoints());
+
+
topoElement.makeQueryFromResponse();
+
topoElement.lastSeconds(timeInterval);
+
((UserData)topoElement).setDirection(UserData.DIRECTION.UNKNOWN);

+ request.makeRequest(topoElement,
IPerfsonarRequest.MA_SetupDataRequest,
+ new
TimeValueListResponseListener(dataList), true);
+
+ }
+ };
try {
+
lookup.setRequest((SmartMARequest)request);
lookup.lookup(dataList);
+ if (!isInterrupted())
+ if (request instanceof
SmartMARequest)
+ ((SmartMARequest)
request).isReady();
+
+
+ dataList.setNotificationEnabled(true);
+ dataList.setChanged();
+ dataList.notifyObservers("STRUCTURE");
+ return null;
} catch (Exception x) {

request.fireStatusMessage(x.getMessage());

request.fireAxisCallException(dataList, x);

Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/ma/ui/panels/MetricsOptionPanel.java
===================================================================
---
branches/perfsonarui/src/org/perfsonar/perfsonarui/ma/ui/panels/MetricsOptionPanel.java
2009-01-16 11:56:21 UTC (rev 4885)
+++
branches/perfsonarui/src/org/perfsonar/perfsonarui/ma/ui/panels/MetricsOptionPanel.java
2009-01-17 11:12:34 UTC (rev 4886)
@@ -42,7 +42,7 @@

import org.perfsonar.perfsonarui.ma.MAPerfsonarModel;
import org.perfsonar.perfsonarui.ma.MARequest_NMWG2;
-import org.perfsonar.perfsonarui.ma.Metric;
+import org.perfsonar.perfsonarui.plugins.Metric;

public class MetricsOptionPanel extends JPanel implements ItemListener {
protected ArrayList<Metric> metrics;

Added:
branches/perfsonarui/src/org/perfsonar/perfsonarui/plugins/EventTypeFactory.java

Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/plugins/IUserData.java
===================================================================
--- branches/perfsonarui/src/org/perfsonar/perfsonarui/plugins/IUserData.java
2009-01-16 11:56:21 UTC (rev 4885)
+++ branches/perfsonarui/src/org/perfsonar/perfsonarui/plugins/IUserData.java
2009-01-17 11:12:34 UTC (rev 4886)
@@ -20,8 +20,10 @@
package org.perfsonar.perfsonarui.plugins;

import java.io.Serializable;
-import java.util.ArrayList;
+import java.util.Collection;

+import org.perfsonar.lsclient.data.EventType;
+import org.perfsonar.lsclient.data.TopologyElement;
import org.w3c.dom.Document;

/**
@@ -29,7 +31,7 @@
* @author nina
*
*/
-public interface IUserData extends Comparable<IUserData>, Serializable {
+public interface IUserData extends Comparable<IUserData>,
Serializable,TopologyElement {
public final static String C_HOSTNAME="hostName";
public final static String C_IFNAME = "ifName";
public final static String C_IFADDRESS = "ifAddress";
@@ -185,5 +187,7 @@
public boolean isNotificationEnabled();
public void setNotificationEnabled(boolean value);

- public ArrayList<String> getEventTypes();
+ public Collection<EventType> getEventTypes();
+ public void setEventTypes(Collection<EventType> value);
+ public void addEventType(EventType value);
}

Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/plugins/MAEndpoint.java
===================================================================
---
branches/perfsonarui/src/org/perfsonar/perfsonarui/plugins/MAEndpoint.java
2009-01-16 11:56:21 UTC (rev 4885)
+++
branches/perfsonarui/src/org/perfsonar/perfsonarui/plugins/MAEndpoint.java
2009-01-17 11:12:34 UTC (rev 4886)
@@ -19,12 +19,18 @@
*/
package org.perfsonar.perfsonarui.plugins;

+import java.net.URI;
+import java.net.URISyntaxException;
import java.util.ArrayList;
import java.util.Collections;
+import java.util.Comparator;
import java.util.Observable;

import org.apache.axis.AxisFault;
import org.apache.axis.utils.XMLUtils;
+import org.perfsonar.lsclient.data.AuthorativeLookupservice;
+import org.perfsonar.lsclient.data.EventType;
+import org.perfsonar.lsclient.data.Service;
import org.perfsonar.perfsonarui.AbstractUserData;
import org.perfsonar.perfsonarui.IPerfsonarSchema;
import org.perfsonar.perfsonarui.PerfsonarSchema;
@@ -46,7 +52,7 @@
* @author Nina Jeliazkova

<b>Modified</b> 2005-12-10
*/

-public class MAEndpoint extends Observable implements Comparable<MAEndpoint>
{
+public class MAEndpoint extends Observable implements Service,
Comparable<Service> {
protected boolean enabled = true;
//organisation
protected String title = "";
@@ -65,9 +71,9 @@
//
protected String authRealm = "";
protected int event = -1;
- protected ArrayList<String> supportedEventTypes = null;
+ protected ArrayList<EventType> supportedEventTypes = null;

- public ArrayList<String> getSupportedEventTypes() {
+ public ArrayList<EventType> getSupportedEventTypes() {
return supportedEventTypes;
}

@@ -97,7 +103,7 @@
public MAEndpoint() {
super();
type = PerfsonarSchema.getInstance("Unknown");
- supportedEventTypes = new ArrayList<String>();
+ supportedEventTypes = new ArrayList<EventType>();
}
public void clear() {
setTitle("");
@@ -123,8 +129,12 @@

for (int i=4;i < result.length;i++)
if
(supportedEventTypes.indexOf(result[i])==-1)
-
supportedEventTypes.add(EventType.getInstance(result[i]));
- Collections.sort(supportedEventTypes);
+
supportedEventTypes.add(EventTypeFactory.getInstance(result[i]));
+ Collections.sort(supportedEventTypes, new
Comparator<EventType>() {
+ public int compare(EventType o1,
EventType o2) {
+ return
o1.getValue().compareTo(o2.getValue());
+ }
+ });
if (result.length > 4)
setEvent(result[4]);
}
}
@@ -280,12 +290,12 @@
* @return
* @deprecated use
{@link
#getEvent()};
*/
- public synchronized String getEvent(int input) {
+ public synchronized EventType getEvent(int input) {
return getEvent();
}
- public synchronized String getEvent() {
+ public synchronized EventType getEvent() {
if ((event >= supportedEventTypes.size()) || (event < 0))
- return EventType.getInstance(AbstractUserData.NULL_DATA);
+ return
EventTypeFactory.getInstance(AbstractUserData.NULL_DATA);
else
return supportedEventTypes.get(event);
}
@@ -298,19 +308,26 @@
public synchronized void setEvent(String event, int input) {
setEvent(event);
}
- public synchronized void setEvent(String event) {
+ public synchronized void setEvent(EventType event) {
if (event == null)
this.event = -1;
else if (AbstractUserData.NULL_DATA.equals(event))
this.event = -1;
else {
- this.event =
supportedEventTypes.indexOf(EventType.getInstance(event.trim()));
+ this.event = supportedEventTypes.indexOf(event);
if (this.event < 0) {
supportedEventTypes.add(event);
- Collections.sort(supportedEventTypes);
- this.event =
supportedEventTypes.indexOf(EventType.getInstance(event.trim()));
+ Collections.sort(supportedEventTypes, new
Comparator<EventType>() {
+ public int compare(EventType o1,
EventType o2) {
+ return
o1.getValue().compareTo(o2.getValue());
+ }
+ });
+ this.event = supportedEventTypes.indexOf(event);
}
}
+ }
+ public synchronized void setEvent(String event) {
+ setEvent(EventTypeFactory.getInstance(event.trim()));
}

/*
@@ -365,12 +382,17 @@
if (arg0 == null) return -1;
return getEndpoint().compareTo(arg0.getEndpoint());
}
+ @Deprecated // use getName();
public String getServiceName() {
return serviceName;
}
+ @Deprecated //use setName()
public void setServiceName(String serviceName) {
this.serviceName = serviceName;
}
+ public void setName(String serviceName) {
+ this.serviceName = serviceName;
+ }
public String getServiceType() {
return serviceType;
}
@@ -397,4 +419,27 @@
public Object clone() throws CloneNotSupportedException {
return new MAEndpoint(toString());
}
+ public AuthorativeLookupservice getAuthorativeLookupservice() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+ public URI getEndPoint() {
+ try {
+ return new URI(endpoint);
+ } catch (URISyntaxException x) {
+ x.printStackTrace();
+ return null;
+ }
+ }
+ public String getName() {
+ return serviceName;
+ }
+ public String getOrganization() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+ public int compareTo(Service o) {
+ // TODO Auto-generated method stub
+ return 0;
+ }
}

Added: branches/perfsonarui/src/org/perfsonar/perfsonarui/plugins/Metric.java

Deleted:
branches/perfsonarui/src/org/perfsonar/perfsonarui/test/ls/LSDiscoveryTest.java

Deleted:
branches/perfsonarui/src/org/perfsonar/perfsonarui/test/ls/LSQueryMetadataTest.java

Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/test/ls/MockLookup.java
===================================================================
---
branches/perfsonarui/src/org/perfsonar/perfsonarui/test/ls/MockLookup.java
2009-01-16 11:56:21 UTC (rev 4885)
+++
branches/perfsonarui/src/org/perfsonar/perfsonarui/test/ls/MockLookup.java
2009-01-17 11:12:34 UTC (rev 4886)
@@ -1,224 +1,30 @@
package org.perfsonar.perfsonarui.test.ls;

-import org.perfsonar.perfsonarui.MetadataListResponseListener;
-import org.perfsonar.perfsonarui.ls.LSDiscoveryQuery;
-import org.perfsonar.perfsonarui.ls.LSQueryMetadata;
import org.perfsonar.perfsonarui.ls.Lookup;
-import org.perfsonar.perfsonarui.ls.XQueryParams;
import org.perfsonar.perfsonarui.plugins.MAEndpoint;
+import org.perfsonar.perfsonarui.plugins.MetaDataList;

public class MockLookup extends Lookup {
- @Override
- public MAEndpoint getGlobalLS() throws Exception {
+ protected final MAEndpoint[] demoendpoints = new MAEndpoint[] {
+ new MAEndpoint("Indiana Gigapop SNMP
MA,http://rrdma.net.internet2.edu:8080/perfSONAR_PS/services/IUsnmpMA,http://schemas.perfsonar.net/2.0,,http://ggf.org/ns/nmwg/characteristic/utilization/2.0";),
+ new MAEndpoint("Internet2 SNMP
MA,http://packrat.internet2.edu:2008/perfSONAR_PS/services/snmp/SC08,http://schemas.perfsonar.net/2.0,,http://ggf.org/ns/nmwg/characteristic/utilization/2.0";),
+ new MAEndpoint("Internet2 Network SNMP
MA,http://rrdma.net.internet2.edu:8080/perfSONAR_PS/services/snmpMA,http://schemas.perfsonar.net/2.0,,http://ggf.org/ns/nmwg/characteristic/utilization/2.0";),
+ };
+ public MockLookup() {
+ super();

- return new
MAEndpoint("http://loco4.man.poznan.pl:8080/xml-ls-home/services/LookupService";);
}
@Override
- protected LSDiscoveryQuery createDiscoveryQuery(XQueryParams params)
throws Exception {
- MetadataListResponseListener listener = new
MetadataListResponseListener(params.getMetadata());
- return new LSDiscoveryQuery(
- getGlobalLS(),
- params,
- listener
- ) {
- protected String execute() throws
java.rmi.RemoteException ,javax.xml.rpc.ServiceException
,org.perfsonar.perfsonarui.ls.UnmarshalException {
- return getGLSResults2();
- };
- };
- }
- @Override
- protected LSQueryMetadata createMetadataQuery(final MAEndpoint hls,
XQueryParams params) throws Exception {
- MetadataListResponseListener listener = new
MetadataListResponseListener(params.getMetadata());
- return new LSQueryMetadata(
- hls,
- params,
- listener
- ) {
- protected String execute() throws
java.rmi.RemoteException ,javax.xml.rpc.ServiceException
,org.perfsonar.perfsonarui.ls.UnmarshalException {
- return getHLSMockupResponse(hls);
- };
- };
- }
- protected String getHLSMockupResponse(MAEndpoint hls) {
+ public MetaDataList lookup(MetaDataList list) throws Exception {
+ for (int i=0; i < list.size(); i++) {
+ for (MAEndpoint e : demoendpoints)
+ list.get(i).addEndpoint(e);
+ }
+ return list;

- if
("http://loco4.man.poznan.pl:8080/xml-ls-home/services/LookupService".equals(hls.getEndpoint()))
- return gethLSResultsPionier();
- else
-
- return gethLSResults();
}
- public static String getGLSResults2() {
- return
- "<psui:lookupInformation
xmlns:psui=\"http://ggf.org/ns/nmwg/tools/org/perfsonar-ui/1.0/\";>\n"+
- "<psui:lookupService>\n"+
- " <psservice:service
xmlns:psservice=\"http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/\";
id=\"localhost.-34842af8:11aa8a33cef:4f70\">\n"+
- " <psservice:serviceName>ACAD perfSONAR
hLS</psservice:serviceName>\n"+
- "
<psservice:accessPoint>http://uran.acad.bg:8080/xml-ls-home/services/LookupService</psservice:accessPoint>\n"+
- " <psservice:serviceType>ls</psservice:serviceType>\n"+
- " <psservice:serviceDescription>ACAD perfSONAR
hLS</psservice:serviceDescription>\n"+
- " <psservice:serviceVersion>1.3</psservice:serviceVersion>\n"+
- " <psservice:organization>ACAD</psservice:organization>\n"+
- "
<psservice:contactEmail>user@domain</psservice:contactEmail>\n"+
- " </psservice:service>\n"+
- " <nmtl3:network
xmlns:nmtl3=\"http://ogf.org/schema/network/topology/l3/20070828/\";
id=\"localhost.-34842af8:11aa8a33cef:56a8\">\n"+
- " <nmtl3:subnet>\n"+
- " <nmtl3:address
type=\"ipv4\">194.141.0.10</nmtl3:address>\n"+
- " <nmtl3:netmask>32</nmtl3:netmask>\n"+
- " </nmtl3:subnet>\n"+
- " </nmtl3:network>\n"+
- "</psui:lookupService>\n"+
- "<psui:lookupService>\n"+
- " <psservice:service
xmlns:psservice=\"http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/\";
id=\"localhost.-34842af8:11aa8a33cef:5782\">\n"+
- " <psservice:serviceName>PIONIER perfSONAR
hLS</psservice:serviceName>\n"+
- "
<psservice:accessPoint>http://loco4.man.poznan.pl:8080/xml-ls-home/services/LookupService</psservice:accessPoint>\n"+
- " <psservice:serviceType>ls</psservice:serviceType>\n"+
- " <psservice:serviceDescription>PIONIER perfSONAR
hLS</psservice:serviceDescription>\n"+
- " <psservice:serviceVersion>1.3</psservice:serviceVersion>\n"+
- " <psservice:organization>PIONIER</psservice:organization>\n"+
- "
<psservice:contactEmail>user@domain</psservice:contactEmail>\n"+
- " </psservice:service>\n"+
- " <nmtl3:network
xmlns:nmtl3=\"http://ogf.org/schema/network/topology/l3/20070828/\";
id=\"localhost.-34842af8:11aa8a33cef:5737\">\n"+
- " <nmtl3:subnet>\n"+
- " <nmtl3:address
type=\"ipv4\">212.191.224.18</nmtl3:address>\n"+
- " <nmtl3:netmask>32</nmtl3:netmask>\n"+
- " </nmtl3:subnet>\n"+
- " </nmtl3:network>\n"+
- "</psui:lookupService>\n"+
- "</psui:lookupInformation>\n";
+

- }
- public static String getGLSResults() {
- return
- "<psui:lookupInformation
xmlns:psui=\"http://ggf.org/ns/nmwg/tools/org/perfsonar-ui/1.0/\";>\n"+
- "<psui:lookupService>\n"+
- " <psservice:service
xmlns:psservice=\"http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/\";
id=\"localhost.-34842af8:11aa8a33cef:4f70\">\n"+
- " <psservice:serviceName>ACAD perfSONAR
hLS</psservice:serviceName>\n"+
- "
<psservice:accessPoint>http://uran.acad.bg:8080/xml-ls-home/services/LookupService</psservice:accessPoint>\n"+
- " <psservice:serviceType>ls</psservice:serviceType>\n"+
- " <psservice:serviceDescription>ACAD perfSONAR
hLS</psservice:serviceDescription>\n"+
- " <psservice:serviceVersion>1.3</psservice:serviceVersion>\n"+
- " <psservice:organization>ACAD</psservice:organization>\n"+
- "
<psservice:contactEmail>user@domain</psservice:contactEmail>\n"+
- " </psservice:service>\n"+
- "</psui:lookupService>\n"+
- "<psui:lookupService>\n"+
- " <psservice:service
xmlns:psservice=\"http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/\";
id=\"localhost.-34842af8:11aa8a33cef:5782\">\n"+
- " <psservice:serviceName>PIONIER perfSONAR
hLS</psservice:serviceName>\n"+
- "
<psservice:accessPoint>http://loco4.man.poznan.pl:8080/xml-ls-home/services/LookupService</psservice:accessPoint>\n"+
- " <psservice:serviceType>ls</psservice:serviceType>\n"+
- " <psservice:serviceDescription>PIONIER perfSONAR
hLS</psservice:serviceDescription>\n"+
- " <psservice:serviceVersion>1.3</psservice:serviceVersion>\n"+
- " <psservice:organization>PIONIER</psservice:organization>\n"+
- "
<psservice:contactEmail>user@domain</psservice:contactEmail>\n"+
- " </psservice:service>\n"+
- " <nmtl3:network
xmlns:nmtl3=\"http://ogf.org/schema/network/topology/l3/20070828/\";
id=\"localhost.-34842af8:11aa8a33cef:56a8\">\n"+
- " <nmtl3:subnet>\n"+
- " <nmtl3:address
type=\"ipv4\">194.141.0.10</nmtl3:address>\n"+
- " <nmtl3:netmask>32</nmtl3:netmask>\n"+
- " </nmtl3:subnet>\n"+
- " </nmtl3:network>\n"+
- " <nmtl3:network
xmlns:nmtl3=\"http://ogf.org/schema/network/topology/l3/20070828/\";
id=\"localhost.-34842af8:11aa8a33cef:5737\">\n"+
- " <nmtl3:subnet>\n"+
- " <nmtl3:address
type=\"ipv4\">212.191.224.18</nmtl3:address>\n"+
- " <nmtl3:netmask>32</nmtl3:netmask>\n"+
- " </nmtl3:subnet>\n"+
- " </nmtl3:network>\n"+
- "</psui:lookupService>\n"+
- "</psui:lookupInformation>\n";

- }
- public static String gethLSResults() {
- return
- "<psui:lookupInformation
xmlns:psui=\"http://ggf.org/ns/nmwg/tools/org/perfsonar-ui/1.0/\";>\n"+
- "<psui:topoelements>\n"+
- " <psservice:service
xmlns:psservice=\"http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/\";
id=\"localhost.17bd84e6:11a1fa5e10d:7d5c\">\n"+
- " <psservice:serviceName>perfSONAR Java RRD
MA</psservice:serviceName>\n"+
- "
<psservice:accessPoint>http://uran.acad.bg:8080/geant2_java-rrd-ma/services/MeasurementArchiveService</psservice:accessPoint>\n"+
- " <psservice:serviceType>ma</psservice:serviceType>\n"+
- " <psservice:serviceDescription>perfSONAR JavaRRD
MA</psservice:serviceDescription>\n"+
- " <psservice:serviceVersion>3.0</psservice:serviceVersion>\n"+
- " <psservice:organization>IPP-BAS</psservice:organization>\n"+
- "
<psservice:contactEmail>user@domain</psservice:contactEmail>\n"+
- " </psservice:service>\n"+
- " <nmwg:metadata xmlns:nmwg=\"http://ggf.org/ns/nmwg/base/2.0/\";
id=\"meta45\">\n"+
- " <netutil:subject
xmlns:netutil=\"http://ggf.org/ns/nmwg/characteristic/utilization/2.0/\";
id=\"subj45\">\n"+
- " <nmwgt:interface
xmlns:nmwgt=\"http://ggf.org/ns/nmwg/topology/2.0/\";>\n"+
- " <nmwgt:hostName>PoP-SOF</nmwgt:hostName>\n"+
- " <nmwgt:ifName>Fa0/4</nmwgt:ifName>\n"+
- "
<nmwgt:ifDescription>SW-nexus==hotspot-A-SOF</nmwgt:ifDescription>\n"+
- " <nmwgt:ifAddress
type=\"ipv4\">194.141.0.10</nmwgt:ifAddress>\n"+
- " <nmwgt:direction>out</nmwgt:direction>\n"+
- " <nmwgt:capacity>100000000</nmwgt:capacity>\n"+
- " </nmwgt:interface>\n"+
- " </netutil:subject>\n"+
- "
<nmwg:eventType>http://ggf.org/ns/nmwg/characteristic/utilization/2.0</nmwg:eventType>\n"+
- " </nmwg:metadata>\n"+
- " <nmwg:metadata xmlns:nmwg=\"http://ggf.org/ns/nmwg/base/2.0/\";
id=\"meta14\">\n"+
- " <netutil:subject
xmlns:netutil=\"http://ggf.org/ns/nmwg/characteristic/utilization/2.0/\";
id=\"subj14\">\n"+
- " <nmwgt:interface
xmlns:nmwgt=\"http://ggf.org/ns/nmwg/topology/2.0/\";>\n"+
- " <nmwgt:hostName>PoP-SOF</nmwgt:hostName>\n"+
- " <nmwgt:ifName>Fa0/3</nmwgt:ifName>\n"+
- "
<nmwgt:ifDescription>SW-nexus==BAS-SOF</nmwgt:ifDescription>\n"+
- " <nmwgt:ifAddress
type=\"ipv4\">194.141.0.10</nmwgt:ifAddress>\n"+
- " <nmwgt:direction>out</nmwgt:direction>\n"+
- " <nmwgt:capacity>100000000</nmwgt:capacity>\n"+
- " </nmwgt:interface>\n"+
- " </netutil:subject>\n"+
- "
<nmwg:eventType>http://ggf.org/ns/nmwg/characteristic/utilization/2.0</nmwg:eventType>\n"+
- " </nmwg:metadata>\n"+
- "</psui:topoelements>\n"+
- "<psui:topoelements>\n"+
- " <psservice:service
xmlns:psservice=\"http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/\";
id=\"localhost.17bd84e6:11a29f2f532:-775a\">\n"+
- " <psservice:serviceName>perfSONAR Java SQL
MA</psservice:serviceName>\n"+
- "
<psservice:accessPoint>http://uran.acad.bg:8080/geant2_java-sql-ma/services/MeasurementArchiveService</psservice:accessPoint>\n"+
- " <psservice:serviceType>ma</psservice:serviceType>\n"+
- " <psservice:serviceDescription>perfSONAR Java SQL
MA</psservice:serviceDescription>\n"+
- " <psservice:serviceVersion>2.0</psservice:serviceVersion>\n"+
- " <psservice:organization>IPP-BAS</psservice:organization>\n"+
- "
<psservice:contactEmail>user@domain</psservice:contactEmail>\n"+
- " </psservice:service>\n"+
- "</psui:topoelements>\n"+
- "</psui:lookupInformation>\n";
- }
-
- public static String gethLSResultsPionier() {
- return
- "<psui:lookupInformation
xmlns:psui=\"http://ggf.org/ns/nmwg/tools/org/perfsonar-ui/1.0/\";>\n"+
- "<psui:topoelements>\n"+
- " <psservice:service
xmlns:psservice=\"http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/\";
id=\"localhost.17bd84e6:11a1fa5e10d:7d5c\">\n"+
- " <psservice:serviceName>perfSONAR Java RRD
MA</psservice:serviceName>\n"+
- "
<psservice:accessPoint>http://pionier.pl:8080/geant2_java-rrd-ma/services/MeasurementArchiveService</psservice:accessPoint>\n"+
- " <psservice:serviceType>ma</psservice:serviceType>\n"+
- " <psservice:serviceDescription>perfSONAR JavaRRD
MA</psservice:serviceDescription>\n"+
- " <psservice:serviceVersion>3.0</psservice:serviceVersion>\n"+
- " <psservice:organization>PIONIER</psservice:organization>\n"+
- "
<psservice:contactEmail>user@domain</psservice:contactEmail>\n"+
- " </psservice:service>\n"+
- " <nmwg:metadata xmlns:nmwg=\"http://ggf.org/ns/nmwg/base/2.0/\";
id=\"meta45\">\n"+
- " <netutil:subject
xmlns:netutil=\"http://ggf.org/ns/nmwg/characteristic/utilization/2.0/\";
id=\"subj45\">\n"+
- " <nmwgt:interface
xmlns:nmwgt=\"http://ggf.org/ns/nmwg/topology/2.0/\";>\n"+
- " <nmwgt:hostName>Test</nmwgt:hostName>\n"+
- " <nmwgt:ifName>Test</nmwgt:ifName>\n"+
- " <nmwgt:ifDescription>Test
description</nmwgt:ifDescription>\n"+
- " <nmwgt:ifAddress
type=\"ipv4\">212.191.224.18</nmwgt:ifAddress>\n"+
- " <nmwgt:direction>out</nmwgt:direction>\n"+
- " <nmwgt:capacity>100000000</nmwgt:capacity>\n"+
- " </nmwgt:interface>\n"+
- " </netutil:subject>\n"+
- "
<nmwg:eventType>http://ggf.org/ns/nmwg/characteristic/utilization/2.0</nmwg:eventType>\n"+
- " </nmwg:metadata>\n"+
- "</psui:topoelements>\n"+
- "<psui:topoelements>\n"+
- " <psservice:service
xmlns:psservice=\"http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/\";
id=\"localhost.17bd84e6:11a29f2f532:-775a\">\n"+
- " <psservice:serviceName>perfSONAR Java SQL
MA</psservice:serviceName>\n"+
- "
<psservice:accessPoint>http://uran.acad.bg:8080/geant2_java-sql-ma/services/MeasurementArchiveService</psservice:accessPoint>\n"+
- " <psservice:serviceType>ma</psservice:serviceType>\n"+
- " <psservice:serviceDescription>perfSONAR Java SQL
MA</psservice:serviceDescription>\n"+
- " <psservice:serviceVersion>2.0</psservice:serviceVersion>\n"+
- " <psservice:organization>IPP-BAS</psservice:organization>\n"+
- "
<psservice:contactEmail>user@domain</psservice:contactEmail>\n"+
- " </psservice:service>\n"+
- "</psui:topoelements>\n"+
- "</psui:lookupInformation>\n";
- }
+
}

Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/test/ls/TracerouteTest.java
===================================================================
---
branches/perfsonarui/src/org/perfsonar/perfsonarui/test/ls/TracerouteTest.java
2009-01-16 11:56:21 UTC (rev 4885)
+++
branches/perfsonarui/src/org/perfsonar/perfsonarui/test/ls/TracerouteTest.java
2009-01-17 11:12:34 UTC (rev 4886)
@@ -1,16 +1,27 @@
package org.perfsonar.perfsonarui.test.ls;

+import java.beans.PropertyChangeEvent;
+import java.beans.PropertyChangeListener;
+import java.net.URI;
import java.net.URL;

import junit.framework.TestCase;

-import org.perfsonar.perfsonarui.AbstractUserData;
+import org.perfsonar.lsclient.data.EventType;
+import org.perfsonar.lsclient.data.TopologyElement;
+import org.perfsonar.perfsonarui.PSException;
+import org.perfsonar.perfsonarui.SmartMARequest;
import org.perfsonar.perfsonarui.ls.LSManager;
import org.perfsonar.perfsonarui.ls.Lookup;
+import org.perfsonar.perfsonarui.ma.MARequest_NMWG2;
import org.perfsonar.perfsonarui.ma.UserData;
+import org.perfsonar.perfsonarui.plugins.EventTypeFactory;
+import org.perfsonar.perfsonarui.plugins.IPerfsonarRequest;
import org.perfsonar.perfsonarui.plugins.IUserData;
import org.perfsonar.perfsonarui.plugins.MAEndpoint;
import org.perfsonar.perfsonarui.plugins.MetaDataList;
+import org.perfsonar.perfsonarui.plugins.Metric;
+import org.perfsonar.ri.lsclient.level1.TopologyElements;

public class TracerouteTest extends TestCase {
/**
@@ -34,9 +45,16 @@

protected MetaDataList createQuery() throws Exception {
String[] ip = {
+ "192.5.40.187",
+ "212.191.224.74"
+ /*
"194.141.0.10",
- "194.141.0.10",
- "212.191.224.18"
+ "212.191.224.18",
+ "129.93.239.190",
+ "198.49.208.15",
+
+ "131.225.15.202",
+ */
/*
//ACAD
"194.141.0.11",
@@ -55,11 +73,22 @@
"195.69.146.5"
*/
};
+ /*
+
+http://rrdma.net.internet2.edu:8080/perfSONAR_PS/services/IUsnmpMA
+
+192.5.40.187
+149.165.227.249
+ */
MetaDataList list = new MetaDataList(null);

for (int i =0; i < ip.length;i++) {
- IUserData data = new AbstractUserData();
+ IUserData data = new UserData();
data.setQuery(UserData.C_IFADDRESS,ip[i]);
+ data.setResponse(UserData.C_IFADDRESS,ip[i]);
+
data.addEventType(EventTypeFactory.getInstance(MARequest_NMWG2.NS_UTILIZATION_2_0));
+
data.addEventType(EventTypeFactory.getInstance(MARequest_NMWG2.NS_ERRORS_2_0));
+
data.addEventType(EventTypeFactory.getInstance(MARequest_NMWG2.NS_DISCARDS_2_0));
list.add(data);
}
return list;
@@ -82,13 +111,49 @@

//assertEquals("http://schemas.perfsonar.net/2.0",list.get(i).getEndpoint().getSchema().toString());
}
}
+
+ public void testNewLookup() throws Exception {
+ final Lookup lookup = new Lookup();
+ SmartMARequest request = new SmartMARequest() {
+ @Override
+ public IPerfsonarRequest createMARequest(MAEndpoint
endpoint)
+ throws PSException {
+ return null;
+ }
+
+ };
+ request.addPropertyChangeListener(new
PropertyChangeListener() {
+ public void propertyChange(PropertyChangeEvent evt) {
+ System.out.print(evt.getPropertyName());
+ System.out.print('=');
+ System.out.println(evt.getNewValue());
+ }
+ });
+ lookup.setRequest(request);
+ final MetaDataList list = createQuery();
+ long now = System.currentTimeMillis();
+ lookup.lookup(list);
+ System.out.println(System.currentTimeMillis()-now);
+
+ for (int i=0; i < list.size();i++) {
+ System.out.println(">>\t"+list.get(i));
+ for (MAEndpoint endpoint: list.get(i).getEndpoints())
+ System.out.println(">>\t"+endpoint);
+ }
+ }

- public void testFindGLS() throws Exception {
- LSManager.getInstance(new
URL("http://perfsonar.acad.bg/psui_beta/MA.conf";));
- //new
File("org/perfsonar/perfsonarui/config/MA.conf"));
- Lookup lookup = new Lookup();
- //will throw exception if not found
- MAEndpoint e = lookup.getGlobalLS();
- System.out.println(e);
+ public void testSummarizedXml() throws Exception {
+ String xml = TopologyElements.toSummerisedXml(new
TopologyElement() {
+ public URI getURI() {
+ try {
+ return new
URI("urn:ogf:network:node=194.141.0.10");
+ } catch (Exception x) {
+ x.printStackTrace();
+ return null;
+ }
+ }
+ });
+ System.out.println(xml);
+
}
}

Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/test/plugins/MAEndpointTest.java
===================================================================
---
branches/perfsonarui/src/org/perfsonar/perfsonarui/test/plugins/MAEndpointTest.java
2009-01-16 11:56:21 UTC (rev 4885)
+++
branches/perfsonarui/src/org/perfsonar/perfsonarui/test/plugins/MAEndpointTest.java
2009-01-17 11:12:34 UTC (rev 4886)
@@ -28,8 +28,9 @@

import junit.framework.TestCase;

+import org.perfsonar.lsclient.data.EventType;
import org.perfsonar.perfsonarui.PerfsonarSchema;
-import org.perfsonar.perfsonarui.plugins.EventType;
+import org.perfsonar.perfsonarui.plugins.EventTypeFactory;
import org.perfsonar.perfsonarui.plugins.MAEndpoint;


@@ -80,7 +81,7 @@

MAEndpoint q4= new MAEndpoint("url1");

q4.setSchema(PerfsonarSchema.getInstance("http://ggf.org/ns/nmwg/characteristic/errors/2.0";));
- q4.setEvent(null);
+ q4.setEvent((String)null);

assertNotNull(hashtable.get(q1));

@@ -100,9 +101,9 @@
}

public void testEventType() throws Exception {
- String t = EventType.getInstance("xxx");
+ EventType t = EventTypeFactory.getInstance("xxx");
assertNotNull(t);
- String t1 = EventType.getInstance("xxx");
+ EventType t1 = EventTypeFactory.getInstance("xxx");
assertNotNull(t1);
assertSame(t,t1);
}

Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/ui/panels/MAEndpointsPanel.java
===================================================================
---
branches/perfsonarui/src/org/perfsonar/perfsonarui/ui/panels/MAEndpointsPanel.java
2009-01-16 11:56:21 UTC (rev 4885)
+++
branches/perfsonarui/src/org/perfsonar/perfsonarui/ui/panels/MAEndpointsPanel.java
2009-01-17 11:12:34 UTC (rev 4886)
@@ -432,7 +432,7 @@
field_name.setText(endpoint.getTitle());
field_schema.setText(endpoint.getSchema().getSchema());
//field_schema.setSelectedItem(endpoint.getSchema().getSchema());
- field_event.setText(endpoint.getEvent());
+ field_event.setText(endpoint.getEvent().toString());

field_supportedevents.setSelectedIndex(0);
} else {
field_url.setText("");



  • perfsonar: r4886 - in branches/perfsonarui: jars/ls src/org/perfsonar/perfsonarui src/org/perfsonar/perfsonarui/ls src/org/perfsonar/perfsonarui/ma src/org/perfsonar/perfsonarui/ma/ui/actions src/org/perfsonar/perfsonarui/ma/ui/panels src/org/perfsonar/perfsonarui/plugins src/org/perfsonar/perfsonarui/test/ls src/org/perfsonar/perfsonarui/test/plugins src/org/perfsonar/perfsonarui/ui/panels, svnlog, 01/17/2009

Archive powered by MHonArc 2.6.16.

Top of Page