Manuele Simi 2009-08-17 17:32:15 +00:00
parent de7c213f95
commit fd9a82fb0c
45 changed files with 5198 additions and 0 deletions

12
.classpath Normal file
View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry excluding="src/|build/|schema/|etc/|src/|lib/|pkgdata/|ServiceFiles/|design/" kind="src" path=""/>
<classpathentry kind="src" path="src"/>
<classpathentry exported="true" kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry exported="true" kind="con" path="org.eclipse.jdt.USER_LIBRARY/GCORELIBS"/>
<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/EXISTLIBS"/>
<classpathentry combineaccessrules="false" kind="src" path="/GCUBE_CORE"/>
<classpathentry combineaccessrules="false" kind="src" path="/GCF.05x"/>
<classpathentry kind="lib" path="/Dependencies/ISIC/org.gcube.informationsystem.collector.stubs.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>

17
.project Normal file
View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>InformationCollector</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>

View File

@ -0,0 +1,258 @@
#Wed Aug 12 09:49:59 EDT 2009
eclipse.preferences.version=1
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
org.eclipse.jdt.core.formatter.alignment_for_assignment=0
org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
org.eclipse.jdt.core.formatter.blank_lines_after_package=1
org.eclipse.jdt.core.formatter.blank_lines_before_field=0
org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
org.eclipse.jdt.core.formatter.blank_lines_before_method=1
org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
org.eclipse.jdt.core.formatter.blank_lines_before_package=0
org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
org.eclipse.jdt.core.formatter.comment.format_block_comments=true
org.eclipse.jdt.core.formatter.comment.format_header=false
org.eclipse.jdt.core.formatter.comment.format_html=true
org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
org.eclipse.jdt.core.formatter.comment.format_line_comments=true
org.eclipse.jdt.core.formatter.comment.format_source_code=true
org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
org.eclipse.jdt.core.formatter.comment.line_length=100
org.eclipse.jdt.core.formatter.compact_else_if=true
org.eclipse.jdt.core.formatter.continuation_indentation=2
org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
org.eclipse.jdt.core.formatter.indent_empty_lines=false
org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
org.eclipse.jdt.core.formatter.indentation.size=4
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_member=insert
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
org.eclipse.jdt.core.formatter.lineSplit=200
org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
org.eclipse.jdt.core.formatter.tabulation.char=mixed
org.eclipse.jdt.core.formatter.tabulation.size=8
org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true

View File

@ -0,0 +1,4 @@
#Wed Aug 12 09:49:59 EDT 2009
eclipse.preferences.version=1
formatter_profile=_D4SConventions
formatter_settings_version=11

8
CHANGELOG Normal file
View File

@ -0,0 +1,8 @@
v. 2.0.0 (30-08-2009)
* portTypes reorganization
* internal refactoring
* hot and cold backups
v. 1.0.0 (10-01-2009)
* gCore refactoring

6
LICENSE Normal file
View File

@ -0,0 +1,6 @@
gCube System - License
------------------------------------------------------------
The gCube/gCore software is licensed as Free Open Source software conveying to the EUPL (http://ec.europa.eu/idabc/eupl).
The software and documentation is provided by its authors/distributors "as is" and no expressed or
implied warranty is given for its use, quality or fitness for a particular case.

3
MAINTAINERS Normal file
View File

@ -0,0 +1,3 @@
* Manuele Simi (manuele.simi@isti.cnr.it), CNR Pisa,
Istituto di Scienza e Tecnologie dell'Informazione "A. Faedo".

54
README Executable file
View File

@ -0,0 +1,54 @@
The gCube System - ISRegistry
------------------------------------------------------------
This work is partially funded by the European Commission in the
context of the D4Science project (www.d4science.eu), under the 1st
call of FP7 IST priority.
Authors
-------
* Manuele Simi (manuele.simi@isti.cnr.it), CNR Pisa,
Istituto di Scienza e Tecnologie dell'Informazione "A. Faedo".
Version and Release Date
------------------------
v. 2.0.0 (30-08-2009)
Description
-----------
Download information
--------------------
Source code is available from SVN:
http://svn.d4science.research-infrastructures.eu/gcube/trunk/
Binaries can be downloaded from:
http://software.d4science.research-infrastructures.eu/
Documentation
-------------
Documentation is available on-line from the Projects Documentation Wiki:
https://technical.wiki.d4science.research-infrastructures.eu/documentation/index.php/
Licensing
---------
This software is licensed under the terms you may find in the file named "LICENSE" in this directory.
Third Party Software License Notice
------------------------------------
This product includes software developed by:
* The Apache Software Foundation (http://www.apache.org/).
* eXist XML Database: released to the public under the terms of the GNU LGPL license (http://www.gnu.org/copyleft/lesser.html).

554
build.xml Executable file
View File

@ -0,0 +1,554 @@
<?xml version="1.0"?>
<!-- Ant buildfile for GCUBE Services
Version 0.5
INPUT PROPERTIES
This buildfile assumes that the following properties have or may have been defined in a "build.properties" file
in the configuration directory of the service (or else using the -D flag on the command line).
package: (mandatory) Root package of the service implementation: it should be the first package in the
implementation hierarchy which uniquely identifies the implementation.
lib.dir: (mandatory) Root directory where auxiliary jar files are located. Ideally outside ${base.dir} as not needed for remote build and dynamic deployment.
wsdl.<n>: (mandatory) Name of the <n>-th port-type of the service, as defined in the "name" attributed of the
"definitions" root element of the corresponding WSDL file.
The order imposed over port-type serves only to distinguish build properties and
and has no particular semantics otherwise.
This script supports by default up to 6 wsdls (wsdl.1, wsdl.2, wsdl.3,...).
Further wsdls require a simple script extension (see guidelines at end of script).
namespace.<n>: (mandatory) The <n>-th target namespace of a port-type WSSDL or of auxiliary XSD definition. Again, the over imposed over namespaces
serves only to distinguish build properties and has no particular semantics otherwise.
package.<n>: (optional) The package name of the stubs generated from WSDL and/or XSD elements in the <n>-th target namespace. If it is specified, it is
considered to be relative to ${package}.stubs. If it is omitted, WSLD and XSD elements are placed in $package}.stubs.
etics.build: (optional) Set to 'true', it indicates that build structures and procedures
should be optimised for remote builds in ETICS. If it is omitted, this buildfile will optimise build structures and procedures
for local builds.
full.stubs: (optional) Set to 'false', it excludes auxiliary stub code placed under ${package}/stubs when building the stub distribution.
It is intended to simplify realignment of auxiliary and standard stub in IDE environments in case the latter change in non backwards-compatible ways.
After re-alignment, the property is typically left to its default of 'true' to restore a joint build of all stub code.
-->
<project default="deployService" name="GCUBE Service Buildfile">
<!-- environment -->
<property environment="env" />
<!-- external environment -->
<echo message="container.dir ->${env.GLOBUS_LOCATION}" level="info"/>
<property name="container.dir" value="${env.GLOBUS_LOCATION}" />
<property name="container.schema.dir" location="${container.dir}/share/schema" />
<property name="build.packages" location="${container.dir}/share/gcore_tools/build-packages.xml" />
<property name="build.stubs" location="${container.dir}/share/gcore_tools/build-stubs.xml" />
<!-- load non-standard tasks -->
<taskdef resource="ise/antelope/tasks/antlib.xml">
<classpath>
<pathelement location="${container.dir}/lib/AntelopeTasks_3.4.2.jar"/>
</classpath>
</taskdef>
<!-- discriminate between local and remote build -->
<property name="etics.build" value="false" />
<!-- service-specific locations -->
<property name="service.dir" location="." />
<property name="schema.dir.name" value="schema" />
<property name="schema.dir" location="${service.dir}/${schema.dir.name}"/>
<property name="etc.dir.name" value="etc" />
<property name="etc.dir" value="${service.dir}/${etc.dir.name}" />
<property name="source.dir" value="${service.dir}/src" />
<!-- load input properties -->
<property file="${etc.dir}/build.properties" />
<stringutil property="package.dir" string="${package}"><!-- derive package.dir from ${package} -->
<replace regex="\." replacement="/"/>
</stringutil>
<!-- file defaults -->
<property name="garname" value="${package}"/>
<property name="garfile" value="${garname}.gar"/>
<property name="jarfile" value="${package}.jar" />
<property name="jarfile.stubs" value="${package}.stubs.jar" />
<if name="etics.build" value="true">
<property name="build.location" location="${service.dir}" />
<property name="lib.location" value="${build.location}/lib" />
<property name="gar.location" value="${lib.location}"/>
<else>
<property name="build.location" location="${env.BUILD_LOCATION}" />
<property name="lib.location" value="${build.location}/${lib.dir}" />
<property name="gar.location" value="${build.location}"/>
</else>
</if>
<property name="full.stubs" value="true"/>
<property name="stubs.package" value="${package}.${stubs.dir.name}"/>
<property name="stubs.dir.name" value="stubs" /> <!-- auxiliary stub classes -->
<property name="stubs.dir" value="${source.dir}/${package.dir}/${stubs.dir.name}" />
<available file="${stubs.dir}" property="stubs.dir.present"/>
<!-- temporary build locations -->
<property name="build.dir" location="${build.location}/build" />
<property name="build.class.dir" location="${build.dir}/classes" />
<property name="build.lib.dir" location="${build.dir}/lib" />
<property name="build.schema.dir" location="${build.dir}/schema" />
<property name="build.schema.service.dir" location="${build.schema.dir}/${package}" />
<property name="build.stubs.dir" location="${build.dir}/stubs-${package}" />
<property name="build.stubs.src.dir" location="${build.stubs.dir}/src" />
<property name="build.stubs.class.dir" location="${build.stubs.dir}/classes" />
<!-- misc defaults -->
<property name="java.debug" value="on" />
<property name="java.deprecation" value="off" />
<!-- common filesets -->
<fileset dir="${build.lib.dir}" id="garjars" />
<property name="garjars.id" value="garjars" />
<fileset dir="${build.schema.dir}" id="garschema">
<include name="${package}/**" />
</fileset>
<property name="garschema.id" value="garschema" />
<fileset dir="${etc.dir}" id="garetc" />
<property name="garetc.id" value="garetc" />
<!-- initialisation tasks -->
<target name="init" depends="clean" description="creates build structures">
<!-- input summary -->
<echo message="Root Package -> ${package}" level="info"/>
<echo message="Interfaces -> ${schema.dir}" level="info"/>
<echo message="Auxiliary Stubs -> ${stubs.dir}" level="info"/>
<echo message="Configuration -> ${etc.dir}" level="info"/>
<echo message="External dependencies -> ${lib.location}" level="info"/>
<!-- output summary -->
<echo message="Service Gar -> ${garfile}" level="info"/>
<echo message="Service Jar -> ${jarfile}" level="info"/>
<echo message="Stubs Jar -> ${jarfile.stubs}" level="info"/>
<!-- create dependency location, if it does not exist already -->
<mkdir dir="${lib.location}" />
<!-- create temporary build folders -->
<mkdir dir="${build.dir}" />
<mkdir dir="${build.class.dir}" />
<delete dir="${build.lib.dir}" />
<mkdir dir="${build.lib.dir}" />
<mkdir dir="${build.schema.service.dir}" />
<mkdir dir="${build.stubs.dir}" />
<mkdir dir="${build.stubs.src.dir}" />
<mkdir dir="${build.stubs.class.dir}"/>
<!-- Populates schema folder -->
<copy toDir="${build.schema.dir}">
<fileset dir="${container.schema.dir}" casesensitive="yes">
<include name="wsrf/**/*" />
<include name="ws/**/*" />
<include name="mds/aggregator/**/*"/>
<include name="mds/usefulrp/**/*"/>
<include name="gcube/**/**/**/*" />
</fileset>
</copy>
<copy toDir="${build.schema.service.dir}">
<fileset dir="${schema.dir}"/>
</copy>
</target>
<!-- wsdl specific tasks. Clone for each additional wsdl, if required -->
<target name="processWSDL.1" depends="init" if="wsdl.1" description="Flattens wsdl and generate bindings">
<echo message="PROCESSING ${wsdl.1}'s WSDL:" level="debug"/>
<ant antfile="${build.stubs}" target="flatten">
<property name="source.flatten.dir" location="${build.schema.service.dir}" />
<property name="target.flatten.dir" location="${build.schema.service.dir}" />
<property name="wsdl.source" value="${wsdl.1}.wsdl" />
<property name="wsdl.target" value="${wsdl.1}_flattened.wsdl" />
<property name="wsdl.porttype" value="${wsdl.1}PortType" />
</ant>
<ant antfile="${build.stubs}" target="generateBinding">
<property name="source.binding.dir" value="${build.schema.service.dir}" />
<property name="target.binding.dir" value="${build.schema.service.dir}" />
<property name="porttype.wsdl" value="${wsdl.1}_flattened.wsdl" />
<property name="binding.root" value="${wsdl.1}" />
</ant>
</target>
<target name="processWSDL.2" depends="init" if="wsdl.2" description="Flattens wsdl and generate bindings">
<echo message="PROCESSING ${wsdl.2}'s WSDL:" level="debug"/>
<ant antfile="${build.stubs}" target="flatten">
<property name="source.flatten.dir" location="${build.schema.service.dir}" />
<property name="target.flatten.dir" location="${build.schema.service.dir}" />
<property name="wsdl.source" value="${wsdl.2}.wsdl" />
<property name="wsdl.target" value="${wsdl.2}_flattened.wsdl" />
<property name="wsdl.porttype" value="SinkPortType" />
</ant>
<!-- <ant antfile="${build.stubs}" target="generateBinding">
<property name="source.binding.dir" value="${build.schema.service.dir}" />
<property name="target.binding.dir" value="${build.schema.service.dir}" />
<property name="porttype.wsdl" value="${wsdl.2}_flattened.wsdl" />
<property name="binding.root" value="${wsdl.2}" />
</ant> -->
</target>
<target name="processWSDL.3" depends="init" if="wsdl.3" description="Flattens wsdl and generate bindings">
<echo message="PROCESSING ${wsdl.3}'s WSDL:" level="debug"/>
<ant antfile="${build.stubs}" target="flatten">
<property name="source.flatten.dir" location="${build.schema.service.dir}" />
<property name="target.flatten.dir" location="${build.schema.service.dir}" />
<property name="wsdl.source" value="${wsdl.3}.wsdl" />
<property name="wsdl.target" value="${wsdl.3}_flattened.wsdl" />
<property name="wsdl.porttype" value="EntryPortType" />
</ant>
<!-- <ant antfile="${build.stubs}" target="generateBinding">
<property name="source.binding.dir" value="${build.schema.service.dir}" />
<property name="target.binding.dir" value="${build.schema.service.dir}" />
<property name="porttype.wsdl" value="${wsdl.3}_flattened.wsdl" />
<property name="binding.root" value="${wsdl.3}" />
</ant> -->
</target>
<target name="processWSDL.4" depends="init" if="wsdl.4" description="Flattens wsdl and generate bindings">
<echo message="PROCESSING ${wsdl.4.name}'s WSDL:" level="debug"/>
<ant antfile="${build.stubs}" target="flatten">
<property name="source.flatten.dir" location="${build.schema.service.dir}" />
<property name="target.flatten.dir" location="${build.schema.service.dir}" />
<property name="wsdl.source" value="${wsdl.4}.wsdl" />
<property name="wsdl.target" value="${wsdl.4}_flattened.wsdl" />
<property name="wsdl.porttype" value="${wsdl.4}PortType" />
</ant>
<ant antfile="${build.stubs}" target="generateBinding">
<property name="source.binding.dir" value="${build.schema.service.dir}" />
<property name="target.binding.dir" value="${build.schema.service.dir}" />
<property name="porttype.wsdl" value="${wsdl.4}_flattened.wsdl" />
<property name="binding.root" value="${wsdl.4}" />
</ant>
</target>
<target name="processWSDL.5" depends="init" if="wsdl.5" description="Flattens wsdl and generate bindings">
<echo message="PROCESSING ${wsdl.5}'s WSDL:" level="debug"/>
<ant antfile="${build.stubs}" target="flatten">
<property name="source.flatten.dir" location="${build.schema.service.dir}" />
<property name="target.flatten.dir" location="${build.schema.service.dir}" />
<property name="wsdl.source" value="${wsdl.5}.wsdl" />
<property name="wsdl.target" value="${wsdl.5}_flattened.wsdl" />
<property name="wsdl.porttype" value="${wsdl.5}PortType" />
</ant>
<ant antfile="${build.stubs}" target="generateBinding">
<property name="source.binding.dir" value="${build.schema.service.dir}" />
<property name="target.binding.dir" value="${build.schema.service.dir}" />
<property name="porttype.wsdl" value="${wsdl.5}_flattened.wsdl" />
<property name="binding.root" value="${wsdl.5}" />
</ant>
</target>
<target name="processWSDL.6" depends="init" if="wsdl.6" description="Flattens wsdl and generate bindings">
<echo message="PROCESSING ${wsdl.6}'s WSDL:" level="debug"/>
<ant antfile="${build.stubs}" target="flatten">
<property name="source.flatten.dir" location="${build.schema.service.dir}" />
<property name="target.flatten.dir" location="${build.schema.service.dir}" />
<property name="wsdl.source" value="${wsdl.6}.wsdl" />
<property name="wsdl.target" value="${wsdl.6}_flattened.wsdl" />
<property name="wsdl.porttype" value="${wsdl.6}PortType" />
</ant>
<ant antfile="${build.stubs}" target="generateBinding">
<property name="source.binding.dir" value="${build.schema.service.dir}" />
<property name="target.binding.dir" value="${build.schema.service.dir}" />
<property name="porttype.wsdl" value="${wsdl.6}_flattened.wsdl" />
<property name="binding.root" value="${wsdl.6}" />
</ant>
</target>
<target name="generateStubs.1" if="wsdl.1" description="Generate wsdl stub classes">
<echo message="GENERATING ${wsdl.1}'s STUBS:" level="debug"/>
<ant antfile="${build.stubs}" target="generateStubs">
<property name="mappings" value="${mappings}"/>
<property name="source.stubs.dir" location="${build.schema.service.dir}" />
<property name="target.stubs.dir" location="${build.stubs.src.dir}" />
<property name="wsdl.file" value="${wsdl.1}_service.wsdl" />
</ant>
</target>
<target name="generateStubs.2" if="wsdl.2" description="Generate wsdl stub classes">
<echo message="GENERATING ${wsdl.2}'s STUBS:" level="debug"/>
<ant antfile="${build.stubs}" target="generateStubs">
<property name="mappings" value="${mappings}"/>
<property name="source.stubs.dir" location="${build.schema.service.dir}" />
<property name="target.stubs.dir" location="${build.stubs.src.dir}" />
<property name="wsdl.file" value="${wsdl.2}.wsdl" />
</ant>
</target>
<target name="generateStubs.3" if="wsdl.3" description="Generate wsdl stub classes">
<echo message="GENERATING ${wsdl.3}'s STUBS:" level="debug"/>
<ant antfile="${build.stubs}" target="generateStubs">
<property name="mappings" value="${mappings}"/>
<property name="source.stubs.dir" location="${build.schema.service.dir}" />
<property name="target.stubs.dir" location="${build.stubs.src.dir}" />
<property name="wsdl.file" value="${wsdl.3}.wsdl" />
</ant>
</target>
<target name="generateStubs.4" if="wsdl.4" description="Generate wsdl stub classes">
<echo message="GENERATING ${wsdl.4}'s STUBS:" level="debug"/>
<ant antfile="${build.stubs}" target="generateStubs">
<property name="mappings" value="${mappings}"/>
<property name="source.stubs.dir" location="${build.schema.service.dir}" />
<property name="target.stubs.dir" location="${build.stubs.src.dir}" />
<property name="wsdl.file" value="${wsdl.4}_service.wsdl" />
</ant>
</target>
<target name="generateStubs.5" if="wsdl.5" description="Generate wsdl stub classes">
<echo message="GENERATING ${wsdl.5}'s STUBS:" level="debug"/>
<ant antfile="${build.stubs}" target="generateStubs">
<property name="mappings" value="${mappings}"/>
<property name="source.stubs.dir" location="${build.schema.service.dir}" />
<property name="target.stubs.dir" location="${build.stubs.src.dir}" />
<property name="wsdl.file" value="${wsdl.5}_service.wsdl" />
</ant>
</target>
<target name="generateStubs.6" if="wsdl.6" description="Generate wsdl stub classes">
<echo message="GENERATING ${wsdl.6}'s STUBS:" level="debug"/>
<ant antfile="${build.stubs}" target="generateStubs">
<property name="mappings" value="${mappings}"/>
<property name="source.stubs.dir" location="${build.schema.service.dir}" />
<property name="target.stubs.dir" location="${build.stubs.src.dir}" />
<property name="wsdl.file" value="${wsdl.6}_service.wsdl" />
</ant>
</target>
<!-- Cross-wsdl tasks. Adds dependencies for each additional wsdl, if required -->
<target name="processWSDLs" depends="processWSDL.1,processWSDL.2,processWSDL.3,processWSDL.4,processWSDL.5,processWSDL.6" description="generate bindings for all porttypes" />
<target name="generateStubs" depends="generateMappings,generateStubs.1,generateStubs.2,generateStubs.3,generateStubs.4,generateStubs.5,generateStubs.6" description="generate stub classes for all porttypes" />
<target name="generateMappings">
<var name="mappings" value=""/>
<if name="namespace.1">
<if name="package.1">
<var name="package.1" value="${stubs.package}.${package.1}"/>
<else>
<var name="package.1" value="${stubs.package}"/></else>
</if>
<var name="mappings" value="${mappings} -N${namespace.1}=${package.1} -N${namespace.1}/service=${package.1}.service -N${namespace.1}/bindings=${package.1}.bindings"/>
</if>
<if name="namespace.2">
<if name="package.2">
<var name="package.2" value="${stubs.package}.${package.2}"/>
<else>
<var name="package.2" value="${stubs.package}"/></else>
</if>
<var name="mappings" value="${mappings} -N${namespace.2}=${package.2} -N${namespace.2}/service=${package.2}.service -N${namespace.2}/bindings=${package.2}.bindings"/>
</if>
<if name="namespace.3">
<if name="package.3">
<var name="package.3" value="${stubs.package}.${package.3}"/>
<else>
<var name="package.3" value="${stubs.package}"/></else>
</if>
<var name="mappings" value="${mappings} -N${namespace.3}=${package.3} -N${namespace.3}/service=${package.3}.service -N${namespace.3}/bindings=${package.3}.bindings"/>
</if>
<if name="namespace.4">
<if name="package.4">
<var name="package.4" value="${stubs.package}.${package.4}"/>
<else>
<var name="package.4" value="${stubs.package}"/></else>
</if>
<var name="mappings" value="${mappings} -N${namespace.4}=${package.4} -N${namespace.4}/service=${package.4}.service -N${namespace.4}/bindings=${package.4}.bindings"/>
</if>
<if name="namespace.5">
<if name="package.5">
<var name="package.5" value="${stubs.package}.${package.5}"/>
<else>
<var name="package.5" value="${stubs.package}"/></else>
</if>
<var name="mappings" value="${mappings} -N${namespace.5}=${package.5} -N${namespace.5}/service=${package.5}.service -N${namespace.5}/bindings=${package.5}.bindings"/>
</if>
<if name="namespace.6">
<if name="package.6">
<var name="package.6" value="${stubs.package}.${package.6}"/>
<else>
<var name="package.6" value="${stubs.package}"/></else>
</if>
<var name="mappings" value="${mappings} -N${namespace.6}=${package.6} -N${namespace.6}/service=${package.6}.service -N${namespace.6}/bindings=${package.6}.bindings"/>
</if>
</target>
<!-- Service tasks -->
<target name="deployService" depends="garService" description="deploy service gar">
<exec executable="${container.dir}/bin/gcore-deploy-service">
<arg value="${gar.location}/${package}.gar"/>
</exec>
</target>
<target name="buildService" depends="processWSDLs" description="compiles service implementation">
<javac srcdir="${source.dir}" destdir="${build.class.dir}" debug="${java.debug}" deprecation="${java.deprecation}">
<exclude name="${stubs.dir}/**"/>
<classpath>
<fileset dir="${lib.location}">
<include name="**/*.jar" />
</fileset>
<fileset dir="${container.dir}/lib">
<include name="*.jar" />
<exclude name="${jarfile}" />
</fileset>
</classpath>
</javac>
</target>
<target name="jarService" depends="buildService" description="jars service implementation">
<jar jarfile="${build.lib.dir}/${jarfile}" basedir="${build.class.dir}">
<include name="${package.dir}/**" />
</jar>
</target>
<target name="garService" depends="jarService" description="creates service gar">
<ant antfile="${build.packages}" target="makeGar">
<property name="garserverdeployment.file" value="${etc.dir}/deploy-server.wsdd" />
<property name="garserverdeployment_NOSEC.file" value="${etc.dir}/deploy-server.wsdd_NOSEC" />
<property name="garclientdeployment.file" value="${etc.dir}/deploy-client.wsdd" />
<property name="garclientserverdeployment.file" value="${etc.dir}/deploy-client-server.wsdd" />
<property name="garjndiconfigdeployment.file" value="${etc.dir}/deploy-jndi-config.xml" />
<property name="gar.id" value="${package}" />
<reference refid="${garjars.id}" />
<reference refid="${garschema.id}" />
<reference refid="${garetc.id}" />
</ant>
<delete dir="tmp" />
<move file="${garfile}" toDir="${gar.location}"/>
</target>
<!-- Stub Build tasks -->
<target name="buildStubs" depends="processWSDLs,generateStubs" description="build service stubs">
<if name="full.stubs" value="true">
<if name="stubs.dir.present">
<copy toDir="${build.stubs.src.dir}/${package.dir}/${stubs.dir.name}" overwrite="true">
<fileset dir="${stubs.dir}" casesensitive="yes">
<exclude name="**/*.class" />
</fileset>
</copy>
</if>
</if>
<javac srcdir="${build.stubs.src.dir}" destdir="${build.stubs.class.dir}" debug="${java.debug}" deprecation="${java.deprecation}" description="compile stub classes">
<include name="**/*.java" />
<classpath>
<fileset dir="${container.dir}/lib">
<include name="*.jar" />
<exclude name="${jarfile.stubs}" />
<exclude name="${jarfile}" />
</fileset>
<fileset dir="${lib.location}">
<include name="**/*.jar" />
<exclude name="**/${jarfile.stubs}" />
<exclude name="**/${jarfile}" />
</fileset>
</classpath>
</javac>
<copy toDir="${build.stubs.class.dir}/META-INF" overwrite="false"><!-- copy configuration info as well -->
<fileset dir="${etc.dir}" casesensitive="yes" />
</copy>
</target>
<target name="jarStubs" depends="buildStubs" description="jar stub classes">
<jar destfile="${build.lib.dir}/${jarfile.stubs}" basedir="${build.stubs.class.dir}" />
</target>
<target name="deployStubs" depends="jarStubs" description="deploy stub jar">
<copy file="${build.lib.dir}/${jarfile.stubs}" toDir="${lib.location}"/>
<if name="etics.build" value="false">
<copy file="${build.lib.dir}/${jarfile.stubs}" toDir="${container.dir}/lib"/>
</if>
</target>
<target name="stubs" depends="deployStubs" description="generates, builds, jars and deploy stubs"/>
<!-- undeployement tasks -->
<target name="undeployStubs" description="deploy stub jar">
<delete file="${container.dir}/lib/${jarfile.stubs}"/>
</target>
<target name="undeployService" description="undeploy service jar">
<exec executable="${container.dir}/bin/gcore-undeploy-service">
<arg value="${package}"/>
</exec>
</target>
<!-- javadoc tasks -->
<target name="doc">
<javadoc access="public" author="true" sourcepath="${source.dir}" packagenames="${package}.*"
destdir="doc/api" nodeprecated="false" nodeprecatedlist="false"
noindex="false" nonavbar="false" notree="false"
source="1.5"
splitindex="true"
use="true" version="true" failonerror="false">
<classpath>
<fileset dir="${lib.location}">
<include name="**/*.jar" />
<exclude name="**/${jarfile}" />
</fileset>
<fileset dir="${container.dir}/lib">
<include name="*.jar" />
</fileset>
</classpath>
</javadoc>
</target>
<target name="docstubs">
<javadoc access="public" author="true" destdir="doc/api" nodeprecated="false"
packagenames="${package}.${stubs.dir.name}.*"
nodeprecatedlist="false" noindex="false" nonavbar="false" notree="false"
source="1.5" sourcepath="${build.stubs.src.dir}"
splitindex="true" use="true" version="true"
failonerror="false">
<classpath>
<fileset dir="${lib.location}">
<include name="**/*.jar" />
<exclude name="**/${jarfile.stubs}" />
</fileset>
<fileset dir="${container.dir}/lib">
<include name="*.jar" />
</fileset>
</classpath>
</javadoc>
</target>
<target name="compileTestSuite" depends="clean">
<mkdir dir="./build"/>
<javac srcdir="./src" destdir="./build" source="1.5" target="1.5">
<include name="org/gcube/metadatamanagement/metadatamanager/testsuite/*.java"/>
<classpath>
<fileset dir="${container.dir}/lib">
<include name="*.jar"/>
</fileset>
</classpath>
</javac>
</target>
<target name="buildTestSuite" depends="compileTestSuite">
<mkdir dir="./lib"/>
<jar jarfile="./test-suite/lib/org.gcube.metadatamanagement.metadatamanager.testsuite.jar" basedir="./build">
<include name="**/*.class"/>
</jar>
</target>
<target name="clean">
<delete dir="${build.dir}" quiet="true"/>
<delete dir="${service.dir}/tmp" quiet="true"/>
<delete file="${gar.location}/${garfile}" quiet="true"/>
</target>
</project>

Binary file not shown.

BIN
design/IC skeleton.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

172
design/StorageAndDocSchema.txt Executable file
View File

@ -0,0 +1,172 @@
1) DB COLLECTIONS organization:
/db (root collection)
|
|-Properties
|
|-Profiles
|
|-RunningInstance
|-GHN
|-Service
|-ExternalRunningInstance
|-CS
|-CSInstance
|-Collection
|-MetadataCollection
|-GenericResource
2) DOCUMENT STRUCTURE
<Document>
<ID>internal document identifier</ID>
<Source>EPR of the RI</Source>
<EntryKey>info di gestione</EntryKey>
<GroupKey>info di gestione</GroupKey>
<TerminationTime>expire date from the epoc</TerminationTime>
<TerminationTimeHuman>human readable version</TerminationTimeHuman>
<LastUpdateMs>last update time from the peco</LastUpdateMs>
<LastUpdateHuman>human readable version</LastUpdateHuman>
<Data>
(the list of ws-resourceproperties
or
the profile)
+
gCube Provider properties
</Data>
</Document>
Example:
<?xml version="1.0" encoding="UTF-8"?>
<Document>
<ID>247246288042653</ID>
<Source>http://node6.d.d4science.research-infrastructures.eu:8080/wsrf/services/gcube/informationsystem/registry/RegistryFactory</Source>
<SourceKey>RegistryResource</SourceKey>
<CompleteSourceKey>
<ns1:ResourceKey xmlns:ns1="http://gcube-system.org/namespaces/informationsystem/registry">RegistryResource</ns1:ResourceKey>
</CompleteSourceKey>
<EntryKey>8042653</EntryKey>
<GroupKey>24724628</GroupKey>
<TerminationTime>1250529645842</TerminationTime>
<TerminationTimeHuman>Mon Aug 17 18:20:45 GMT+01:00 2009</TerminationTimeHuman>
<LastUpdateMs>1250529525976</LastUpdateMs>
<LastUpdateHuman>Mon Aug 17 18:18:45 GMT+01:00 2009</LastUpdateHuman>
<Data>
<ns1:RunningInstance xmlns:ns1="http://gcube-system.org/namespaces/informationsystem/registry">
<uniqueID>537ff150-8b4d-11de-a789-cac4f8c904e3</uniqueID>
<operationType>create</operationType>
<changeTime>2009-08-17T16:45:10.945Z</changeTime>
</ns1:RunningInstance>
<ns2:ExternalRunningInstance xmlns:ns2="http://gcube-system.org/namespaces/informationsystem/registry">
<uniqueID xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
<operationType xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
<changeTime xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
</ns2:ExternalRunningInstance>
<ns3:Service xmlns:ns3="http://gcube-system.org/namespaces/informationsystem/registry">
<uniqueID xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
<operationType xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
<changeTime xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
</ns3:Service>
<ns4:Collection xmlns:ns4="http://gcube-system.org/namespaces/informationsystem/registry">
<uniqueID xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
<operationType xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
<changeTime xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
</ns4:Collection>
<ns5:CS xmlns:ns5="http://gcube-system.org/namespaces/informationsystem/registry">
<uniqueID xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
<operationType xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
<changeTime xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
</ns5:CS>
<ns6:CSInstance xmlns:ns6="http://gcube-system.org/namespaces/informationsystem/registry">
<uniqueID xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
<operationType xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
<changeTime xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
</ns6:CSInstance>
<ns7:GHN xmlns:ns7="http://gcube-system.org/namespaces/informationsystem/registry">
<uniqueID>1ab13550-8aad-11de-a0b8-daa6294f6796</uniqueID>
<operationType>update</operationType>
<changeTime>2009-08-17T17:18:35.079Z</changeTime>
</ns7:GHN>
<ns8:gLiteCE xmlns:ns8="http://gcube-system.org/namespaces/informationsystem/registry">
<uniqueID xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
<operationType xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
<changeTime xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
</ns8:gLiteCE>
<ns9:gLiteSE xmlns:ns9="http://gcube-system.org/namespaces/informationsystem/registry">
<uniqueID xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
<operationType xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
<changeTime xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
</ns9:gLiteSE>
<ns10:gLiteSite xmlns:ns10="http://gcube-system.org/namespaces/informationsystem/registry">
<uniqueID xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
<operationType xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
<changeTime xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
</ns10:gLiteSite>
<ns11:gLiteService xmlns:ns11="http://gcube-system.org/namespaces/informationsystem/registry">
<uniqueID xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
<operationType xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
<changeTime xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
</ns11:gLiteService>
<ns12:VRE xmlns:ns12="http://gcube-system.org/namespaces/informationsystem/registry">
<uniqueID xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
<operationType xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
<changeTime xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
</ns12:VRE>
<ns13:MetadataCollection xmlns:ns13="http://gcube-system.org/namespaces/informationsystem/registry">
<uniqueID xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
<operationType xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
<changeTime xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
</ns13:MetadataCollection>
<ns14:GenericResource xmlns:ns14="http://gcube-system.org/namespaces/informationsystem/registry">
<uniqueID xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
<operationType xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
<changeTime xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
</ns14:GenericResource>
<ns15:TerminationTime xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns15="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime-1.2-draft-01.xsd" xsi:nil="true"/>
<ns16:CurrentTime xmlns:ns16="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime-1.2-draft-01.xsd">2009-08-17T17:18:46.068Z</ns16:CurrentTime>
<ns17:GHN xmlns:ns17="http://gcube-system.org/namespaces/common/core/porttypes/GCUBEProvider">1ab13550-8aad-11de-a0b8-daa6294f6796</ns17:GHN>
<ns18:RI xmlns:ns18="http://gcube-system.org/namespaces/common/core/porttypes/GCUBEProvider">1d1eb2e0-8aad-11de-a0ba-daa6294f6796</ns18:RI>
<ns19:ServiceClass xmlns:ns19="http://gcube-system.org/namespaces/common/core/porttypes/GCUBEProvider">InformationSystem</ns19:ServiceClass>
<ns20:Scope xmlns:ns20="http://gcube-system.org/namespaces/common/core/porttypes/GCUBEProvider">/CNRPrivate</ns20:Scope>
<ns21:ServiceID xmlns:ns21="http://gcube-system.org/namespaces/common/core/porttypes/GCUBEProvider">1d1d5350-8aad-11de-a0ba-daa6294f6796</ns21:ServiceID>
<ns22:ServiceName xmlns:ns22="http://gcube-system.org/namespaces/common/core/porttypes/GCUBEProvider">IS-Registry</ns22:ServiceName>
</Data>
</Document>
3) QUERIES:
the resultset has the following structure:
<Resultset>
<Record>
...
</Record>
<Record>
...
</Record>
<Record>
...
</Record>
<Resultset>
XQuery samples:
for $name in //Document/Data/[ServiceName &= 'ISRegistry']
return
<result>
.....
</result>
for $name in collection("/db/Properties")//Document/Data/[ServiceName &= 'ISRegistry']
return
<result>
.....
</result>

13
etc/build.properties Executable file
View File

@ -0,0 +1,13 @@
package = org.gcube.informationsystem.collector
lib.dir = Dependencies/ISIC
wsdl.1 = XMLCollectionAccess
wsdl.2 = Sink_service
wsdl.3 = SinkEntry_service
namespace.1=http://gcube-system.org/namespaces/informationsystem/collector
namespace.2=http://gcube-system.org/namespaces/informationsystem/collector/Sink
namespace.3=http://mds.globus.org/index/2004/07/12
namespace.4=http://gcube-system.org/namespaces/informationsystem/collector/XMLCollectionAccess
namespace.5=http://gcube-system.org/namespaces/informationsystem/collector/XQueryAccess
namespace.6=http://gcube-system.org/namespaces/informationsystem/collector/XMLStorageAccess

128
etc/deploy-jndi-config.xml Executable file
View File

@ -0,0 +1,128 @@
<?xml version="1.0" encoding="UTF-8"?>
<jndiConfig xmlns="http://wsrf.globus.org/jndi/config">
<service name="gcube/informationsystem/collector">
<environment name="configDir" value="@config.dir@" type="java.lang.String"
override="false" />
<environment name="sweeperIntervalinMillis" value="120000"
type="java.lang.String" override="false" />
<environment name="resourceExpirationTimeInMillis" value="600000"
type="java.lang.String" override="false" />
<environment name="deleteRPsOnStartup" value="false"
type="java.lang.String" override="false" />
<environment name="startScopes" value="/CNRPrivate"
type="java.lang.String" override="false" />
</service>
<global>
<resource name="configuration"
type="org.globus.mds.aggregator.impl.AggregatorConfiguration">
<resourceParams>
<parameter>
<name>
factory
</name>
<value>
org.globus.wsrf.jndi.BeanFactory
</value>
</parameter>
<parameter>
<name>
entrySweeperInterval
</name>
<value>
480000
</value>
</parameter>
<parameter>
<name>
entryRemovedCallback
</name>
<value>
org.gcube.informationsystem.collector.impl.state.ICAggregatorRemoveCallback
</value>
</parameter>
<parameter>
<name>aggregatorSources</name>
<value>org.globus.mds.aggregator.impl.QueryAggregatorSource
org.globus.mds.aggregator.impl.SubscriptionAggregatorSource
org.globus.mds.aggregator.impl.ExecutionAggregatorSource</value>
</parameter>
</resourceParams>
</resource>
</global>
<!-- query portType -->
<service name="gcube/informationsystem/collector/XMLCollectionAccess">
<environment
name="name"
value="XMLCollectionAccess"
type="java.lang.String"
override="false" />
</service>
<!-- Aggregator Framework registration portType -->
<service name="gcube/informationsystem/collector/Sink">
<environment
name="name"
value="Sink"
type="java.lang.String"
override="false" />
<resource name="home"
type="org.globus.mds.aggregator.impl.SingletonAggregatorHome">
<resourceParams>
<parameter>
<name>
factory
</name>
<value>
org.globus.wsrf.jndi.BeanFactory
</value>
</parameter>
<parameter>
<name>resourceClass</name>
<value>org.gcube.informationsystem.collector.impl.state.AggregatorRegisteredResource</value>
</parameter>
</resourceParams>
</resource>
<resourceLink name="entryHome" target="java:comp/env/services/gcube/informationsystem/collector/SinkEntry/home"/>
<resourceLink name="configuration" target="java:comp/env/configuration"/>
</service>
<service name="gcube/informationsystem/collector/SinkEntry">
<environment
name="SinkEntry"
value="ResourceFactory"
type="java.lang.String"
override="false" />
<resource name="home"
type="org.globus.mds.aggregator.impl.AggregatorServiceGroupEntryHome">
<resourceParams>
<parameter>
<name>
factory
</name>
<value>
org.globus.wsrf.jndi.BeanFactory
</value>
</parameter>
</resourceParams>
</resource>
<resourceLink name="groupHome" target="java:comp/env/services/gcube/informationsystem/collector/Sink/home"/>
<resourceLink name="configuration" target="java:comp/env/configuration"/>
</service>
</jndiConfig>

63
etc/deploy-server.wsdd Executable file
View File

@ -0,0 +1,63 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- IC deployment descriptor's file -->
<deployment name="InformationCollector"
xmlns="http://xml.apache.org/axis/wsdd/"
xmlns:java="http://xml.apache.org/axis/wsdd/providers/java"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<service name="gcube/informationsystem/collector/XMLCollectionAccess" provider="Handler" use="literal" style="document">
<parameter name="handlerClass" value="org.globus.axis.providers.RPCProvider"/>
<parameter name="scope" value="Application"/>
<parameter name="allowedMethods" value="*"/>
<parameter name="className" value="org.gcube.informationsystem.collector.impl.porttypes.XMLCollectionAccess"/>
<parameter name="loadOnStartup" value="false"/>
<wsdlFile>share/schema/org.gcube.informationsystem.collector/XMLCollectionAccess_service.wsdl</wsdlFile>
</service>
<!-- Create the IC resources by implementing the ServiceGroupFactory's portType -->
<!-- <service name="gcube/informationsystem/collector/ResourceFactory" provider="Handler" use="literal" style="document">
<parameter name="handlerClass" value="org.globus.axis.providers.RPCProvider"/>
<parameter name="scope" value="Application"/>
<parameter name="allowedMethods" value="*"/>
<parameter name="className" value="org.gcube.informationsystem.collector.impl.porttypes.ResourceFactory"/>
<parameter name="loadOnStartup" value="true"/>
<wsdlFile>share/schema/mds/servicegroup/ServiceGroupFactory_service.wsdl</wsdlFile>
</service>
-->
<service name="gcube/informationsystem/collector/SinkEntry" provider="Handler" use="literal" style="document">
<parameter name="providers"
value="GetRPProvider
GetMRPProvider
QueryRPProvider
SetTerminationTimeProvider"/>
<parameter name="handlerClass" value="org.globus.axis.providers.RPCProvider"/>
<parameter name="scope" value="Application"/>
<parameter name="allowedMethods" value="*"/>
<parameter name="className" value="org.gcube.informationsystem.collector.impl.porttypes.SinkEntry"/>
<parameter name="loadOnStartup" value="false"/>
<wsdlFile>share/schema/org.gcube.informationsystem.collector/SinkEntry_service.wsdl</wsdlFile>
</service>
<service name="gcube/informationsystem/collector/Sink" provider="Handler"
use="literal" style="document">
<parameter name="providers"
value="org.globus.wsrf.impl.servicegroup.ServiceGroupRegistrationProvider
GetRPProvider
GetMRPProvider
QueryRPProvider
DestroyProvider
SetTerminationTimeProvider
SubscribeProvider
GetCurrentMessageProvider"/>
<parameter name="handlerClass" value="org.globus.axis.providers.RPCProvider"/>
<parameter name="scope" value="Application"/>
<parameter name="allowedMethods" value="*"/>
<parameter name="className" value="org.gcube.informationsystem.collector.impl.porttypes.Sink"/>
<parameter name="loadOnStartup" value="false"/>
<wsdlFile>share/schema/org.gcube.informationsystem.collector/Sink_service.wsdl</wsdlFile>
</service>
</deployment>

69
etc/profile.xml Normal file
View File

@ -0,0 +1,69 @@
<?xml version="1.0" encoding="UTF-8"?>
<Resource>
<ID></ID>
<Type>Service</Type>
<Profile>
<Description>Information Collector service: collect and made available information related to the actual state of a gCube infrastructure and/or of an assigned subset of it</Description>
<Class>InformationSystem</Class>
<Name>IS-Collector</Name>
<Version>1.0.0</Version>
<!-- <Dependencies>
<Dependency>
<Class>Search</Class>
<Name>ResultSetService</Name>
<Version>1.0.0</Version>
</Dependency>
</Dependencies> -->
<Packages>
<Main>
<Description>Information Collector service: it acts at an aggregator
sink by collecting and exposing the information published by the
registered gCube services</Description>
<Name>IS-Collector-service</Name>
<Version>2.0.0</Version>
<Dependencies>
<Dependency>
<Service>
<Class>InformationSystem</Class>
<Name>IS-Collector</Name>
<Version>1.0.0</Version>
</Service>
<Package>IS-Collector-stubs</Package>
<Version>[2.0.0]</Version>
<Scope level="GHN" />
<Optional>false</Optional>
</Dependency>
</Dependencies>
<GARArchive>org.gcube.informationsystem.collector.gar
</GARArchive>
<PortType>
<Name>gcube/informationsystem/collector/Sink</Name>
<Security />
<WSDL />
</PortType>
<PortType>
<Name>gcube/informationsystem/collector/SinkEntry</Name>
<Security />
<WSDL />
</PortType>
<PortType>
<Name>gcube/informationsystem/collector/XMLCollectionAccess</Name>
<Security />
<WSDL />
</PortType>
</Main>
<Software deployable="true">
<Description>InformationCollector Stubs</Description>
<Name>IS-Collector-stubs</Name>
<Version>2.0.0</Version>
<MultiVersion value="true" />
<Mandatory level="VO" />
<Shareable level="VO" />
<Type>library</Type>
<Files>
<File>org.gcube.informationsystem.collector.stubs.jar</File>
</Files>
</Software>
</Packages>
</Profile>
</Resource>

24
etc/scripts/install.sh Executable file
View File

@ -0,0 +1,24 @@
#! /bin/sh
#wget --no-check-certificate https://elibrary.isti.cnr.it/svn_public/diligent_GAR/ExternalDependencies/eXist/eXist-1.0rc2.jar
java -jar ./eXist-1.0rc2.jar -p ~/exist
export EXIST_HOME=~/exist
export GLOBUS_OPTIONS="-Dexist.home=$EXIST_HOME $GLOBUS_OPTIONS"
ln -s $EXIST_HOME/exist.jar $GLOBUS_LOCATION/lib/
ln -s $EXIST_HOME/lib/core/xmldb.jar $GLOBUS_LOCATION/lib/
ln -s $EXIST_HOME/lib/core/commons-pool-1.2.jar $GLOBUS_LOCATION/lib/
ln -s $EXIST_HOME/lib/core/xmlrpc-1.2-patched.jar $GLOBUS_LOCATION/lib/
ln -s $EXIST_HOME/lib/core/antlr.jar $GLOBUS_LOCATION/lib/
. ${GLOBUS_LOCATION}/etc/globus-devel-env.sh
#rm -rf ./eXist-1.0rc2.jar

27
etc/scripts/install1.1.sh Executable file
View File

@ -0,0 +1,27 @@
#! /bin/sh
#wget --no-check-certificate http://grids17.eng.it/engrepository/exist/1.1.1/noarch/eXist-1.1.1-newcore-build4311.tar.gz
tar zxvf eXist-1.1.1-newcore-build4311.tar.gz
java -jar ./eXist-1.1.1-newcore-build4311.jar -p ~/exist1.1
export EXIST_HOME=~/exist1.1
export GLOBUS_OPTIONS="-Dexist.home=$EXIST_HOME $GLOBUS_OPTIONS"
ln -sf $EXIST_HOME/exist.jar $GLOBUS_LOCATION/lib/
ln -sf $EXIST_HOME/lib/core/xmldb.jar $GLOBUS_LOCATION/lib/
ln -sf $EXIST_HOME/lib/core/commons-pool-1.2.jar $GLOBUS_LOCATION/lib/
ln -sf $EXIST_HOME/lib/core/xmlrpc-1.2-patched.jar $GLOBUS_LOCATION/lib/
ln -sf $EXIST_HOME/lib/core/antlr-2.7.6.jar $GLOBUS_LOCATION/lib/
. ${GLOBUS_LOCATION}/etc/globus-devel-env.sh
rm -rf ./eXist-1.1.1-newcore-build4311.jar

7
etc/scripts/reboot.sh Executable file
View File

@ -0,0 +1,7 @@
#! /bin/sh
export EXIST_HOME=~/exist1.1
export GLOBUS_OPTIONS="-Dexist.home=$EXIST_HOME $GLOBUS_OPTIONS"

172
schema/SinkEntry_service.wsdl Executable file
View File

@ -0,0 +1,172 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Portions of this file Copyright 1999-2005 University of Chicago
Portions of this file Copyright 1999-2005 The University of Southern California.
This file or a portion of this file is licensed under the
terms of the Globus Toolkit Public License, found at
http://www.globus.org/toolkit/download/license.html.
If you redistribute this file, with or without
modifications, you must include this notice in the file.
-->
<wsdl:definitions name="SinkEntry" targetNamespace="http://gcube-system.org/namespaces/informationsystem/collector"
xmlns:wsrp="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.xsd"
xmlns:tns="http://gcube-system.org/namespaces/informationsystem/collector"
xmlns:wsdlpp="http://www.globus.org/namespaces/2004/10/WSDLPreprocessor"
xmlns:gtwsdl1="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.wsdl"
xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/03/addressing"
xmlns:asge="http://mds.globus.org/aggregator"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:gtwsdl0="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime-1.2-draft-01.wsdl"
xmlns="http://schemas.xmlsoap.org/wsdl/">
<import namespace="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-BaseFaults-1.2-draft-01.wsdl" location="../wsrf/faults/WS-BaseFaults.wsdl"/>
<import namespace="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime-1.2-draft-01.wsdl" location="../wsrf/lifetime/WS-ResourceLifetime.wsdl"/>
<import namespace="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.wsdl" location="../wsrf/properties/WS-ResourceProperties.wsdl"/>
<import namespace="http://mds.globus.org/aggregator" location="../mds/aggregator/aggregator_service_group_entry_port_type.wsdl"/>
<import namespace="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ServiceGroup-1.2-draft-01.wsdl" location="../wsrf/servicegroup/WS-ServiceGroup.wsdl"/>
<types>
<xsd:schema targetNamespace="http://gcube-system.org/namespaces/informationsystem/collector"
xmlns:rpns0="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime-1.2-draft-01.xsd"
xmlns:rpns1="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ServiceGroup-1.2-draft-01.xsd"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:import namespace="http://schemas.xmlsoap.org/ws/2004/03/addressing" schemaLocation="../ws/addressing/WS-Addressing.xsd"/>
<xsd:import namespace="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ServiceGroup-1.2-draft-01.xsd" schemaLocation="../wsrf/servicegroup/WS-ServiceGroup.xsd"/>
<xsd:import namespace="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime-1.2-draft-01.xsd" schemaLocation="../wsrf/lifetime/WS-ResourceLifetime.xsd"/>
<xsd:element name="EntryPortTypeGTWSDLResourceProperties">
<xsd:complexType>
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="1" ref="rpns0:TerminationTime"/>
<xsd:element maxOccurs="1" minOccurs="1" ref="rpns1:MemberEPR"/>
<xsd:element maxOccurs="1" minOccurs="1" ref="rpns1:Content"/>
<xsd:element maxOccurs="1" minOccurs="1" ref="rpns0:CurrentTime"/>
<xsd:element maxOccurs="1" minOccurs="1" ref="rpns1:ServiceGroupEPR"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
</types>
<wsdl:portType name="EntryPortType" wsrp:ResourceProperties="EntryPortTypeGTWSDLResourceProperties">
<operation name="SetTerminationTime">
<input message="gtwsdl0:SetTerminationTimeRequest" wsa:Action="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime/SetTerminationTime"/>
<output message="gtwsdl0:SetTerminationTimeResponse" wsa:Action="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime/SetTerminationTimeResponse"/>
<fault name="UnableToSetTerminationTimeFault" message="gtwsdl0:UnableToSetTerminationTimeFault"/>
<fault name="ResourceUnknownFault" message="gtwsdl0:ResourceUnknownFault"/>
<fault name="TerminationTimeChangeRejectedFault" message="gtwsdl0:TerminationTimeChangeRejectedFault"/>
</operation>
<operation name="QueryResourceProperties">
<input name="QueryResourcePropertiesRequest" message="gtwsdl1:QueryResourcePropertiesRequest" wsa:Action="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties/QueryResourceProperties"/>
<output name="QueryResourcePropertiesResponse" message="gtwsdl1:QueryResourcePropertiesResponse" wsa:Action="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties/QueryResourcePropertiesResponse"/>
<fault name="InvalidResourcePropertyQNameFault" message="gtwsdl1:InvalidResourcePropertyQNameFault"/>
<fault name="InvalidQueryExpressionFault" message="gtwsdl1:InvalidQueryExpressionFault"/>
<fault name="QueryEvaluationErrorFault" message="gtwsdl1:QueryEvaluationErrorFault"/>
<fault name="ResourceUnknownFault" message="gtwsdl1:ResourceUnknownFault"/>
<fault name="UnknownQueryExpressionDialectFault" message="gtwsdl1:UnknownQueryExpressionDialectFault"/>
</operation>
<operation name="GetMultipleResourceProperties">
<input name="GetMultipleResourcePropertiesRequest" message="gtwsdl1:GetMultipleResourcePropertiesRequest" wsa:Action="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties/GetMultipleResourceProperties"/>
<output name="GetMultipleResourcePropertiesResponse" message="gtwsdl1:GetMultipleResourcePropertiesResponse" wsa:Action="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties/GetMultipleResourcePropertiesResponse"/>
<fault name="InvalidResourcePropertyQNameFault" message="gtwsdl1:InvalidResourcePropertyQNameFault"/>
<fault name="ResourceUnknownFault" message="gtwsdl1:ResourceUnknownFault"/>
</operation>
<operation name="GetResourceProperty">
<input name="GetResourcePropertyRequest" message="gtwsdl1:GetResourcePropertyRequest" wsa:Action="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties/GetResourceProperty"/>
<output name="GetResourcePropertyResponse" message="gtwsdl1:GetResourcePropertyResponse" wsa:Action="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties/GetResourcePropertyResponse"/>
<fault name="InvalidResourcePropertyQNameFault" message="gtwsdl1:InvalidResourcePropertyQNameFault"/>
<fault name="ResourceUnknownFault" message="gtwsdl1:ResourceUnknownFault"/>
</operation>
</wsdl:portType>
<wsdl:binding name="EntryPortTypeSOAPBinding" type="tns:EntryPortType">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="SetTerminationTime">
<soap:operation soapAction="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime/SetTerminationTime"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
<wsdl:fault name="UnableToSetTerminationTimeFault">
<soap:fault name="UnableToSetTerminationTimeFault" use="literal"/>
</wsdl:fault>
<wsdl:fault name="ResourceUnknownFault">
<soap:fault name="ResourceUnknownFault" use="literal"/>
</wsdl:fault>
<wsdl:fault name="TerminationTimeChangeRejectedFault">
<soap:fault name="TerminationTimeChangeRejectedFault" use="literal"/>
</wsdl:fault>
</wsdl:operation>
<wsdl:operation name="QueryResourceProperties">
<soap:operation soapAction="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties/QueryResourceProperties"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
<wsdl:fault name="InvalidResourcePropertyQNameFault">
<soap:fault name="InvalidResourcePropertyQNameFault" use="literal"/>
</wsdl:fault>
<wsdl:fault name="InvalidQueryExpressionFault">
<soap:fault name="InvalidQueryExpressionFault" use="literal"/>
</wsdl:fault>
<wsdl:fault name="QueryEvaluationErrorFault">
<soap:fault name="QueryEvaluationErrorFault" use="literal"/>
</wsdl:fault>
<wsdl:fault name="ResourceUnknownFault">
<soap:fault name="ResourceUnknownFault" use="literal"/>
</wsdl:fault>
<wsdl:fault name="UnknownQueryExpressionDialectFault">
<soap:fault name="UnknownQueryExpressionDialectFault" use="literal"/>
</wsdl:fault>
</wsdl:operation>
<wsdl:operation name="GetMultipleResourceProperties">
<soap:operation soapAction="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties/GetMultipleResourceProperties"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
<wsdl:fault name="InvalidResourcePropertyQNameFault">
<soap:fault name="InvalidResourcePropertyQNameFault" use="literal"/>
</wsdl:fault>
<wsdl:fault name="ResourceUnknownFault">
<soap:fault name="ResourceUnknownFault" use="literal"/>
</wsdl:fault>
</wsdl:operation>
<wsdl:operation name="GetResourceProperty">
<soap:operation soapAction="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties/GetResourceProperty"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
<wsdl:fault name="InvalidResourcePropertyQNameFault">
<soap:fault name="InvalidResourcePropertyQNameFault" use="literal"/>
</wsdl:fault>
<wsdl:fault name="ResourceUnknownFault">
<soap:fault name="ResourceUnknownFault" use="literal"/>
</wsdl:fault>
</wsdl:operation>
</wsdl:binding>
<service name="Entry">
<documentation>Service Entry</documentation>
<port name="IC" binding="tns:EntryPortTypeSOAPBinding">
<soap:address location="http://localhost:8080/wsrf/services/"/>
</port>
</service>
</wsdl:definitions>

160
schema/Sink_service.wsdl Executable file
View File

@ -0,0 +1,160 @@
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions name="Sink" targetNamespace="http://gcube-system.org/namespaces/informationsystem/collector/Sink"
xmlns:tns="http://gcube-system.org/namespaces/informationsystem/collector/Sink"
xmlns:binding="http://gcube-system.org/namespaces/informationsystem/collector/Sink/bindings"
xmlns:asgt="http://mds.globus.org/aggregator/types"
xmlns:asgw="http://mds.globus.org/aggregator"
xmlns:wsrlw="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime-1.2-draft-01.wsdl"
xmlns:wsrp="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.xsd"
xmlns:gtwsdl1="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ServiceGroup-1.2-draft-01.wsdl"
xmlns:wsntw="http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.wsdl"
xmlns:gtwsdl0="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.wsdl"
xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/03/addressing"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:wsdlpp="http://www.globus.org/namespaces/2004/10/WSDLPreprocessor"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
<wsdl:import
namespace="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime-1.2-draft-01.wsdl"
location="../wsrf/lifetime/WS-ResourceLifetime.wsdl" />
<wsdl:import
namespace="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.wsdl"
location="../wsrf/properties/WS-ResourceProperties.wsdl" />
<wsdl:import
namespace="http://mds.globus.org/aggregator"
location="../mds/aggregator/aggregator_service_group_port_type.wsdl"/>
<wsdl:import
namespace="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ServiceGroup-1.2-draft-01.wsdl"
location="../wsrf/servicegroup/WS-ServiceGroup.wsdl"/>
<wsdl:import
namespace="http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.wsdl"
location="../wsrf/notification/WS-BaseN.wsdl"/>
<!--============================================================
T Y P E S
============================================================-->
<wsdl:types>
<schema targetNamespace="http://gcube-system.org/namespaces/informationsystem/collector/Sink"
xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:rpns0="http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.xsd"
xmlns:rpns1="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ServiceGroup-1.2-draft-01.xsd"
xmlns:rpns2="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime-1.2-draft-01.xsd"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:tns="http://gcube-system.org/namespaces/informationsystem/collector">
<import namespace="http://schemas.xmlsoap.org/ws/2004/03/addressing" schemaLocation="../ws/addressing/WS-Addressing.xsd"/>
<import namespace="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime-1.2-draft-01.xsd" schemaLocation="../wsrf/lifetime/WS-ResourceLifetime.xsd"/>
<import namespace="http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.xsd" schemaLocation="../wsrf/notification/WS-BaseN.xsd"/>
<import namespace="http://mds.globus.org/aggregator/types" schemaLocation="../mds/aggregator/aggregator-types.xsd"/>
<import namespace="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ServiceGroup-1.2-draft-01.xsd" schemaLocation="../wsrf/servicegroup/WS-ServiceGroup.xsd"/>
<element name="ICResourceProperties">
<complexType>
<sequence>
<element maxOccurs="unbounded" minOccurs="1" ref="rpns0:Topic"/>
<element maxOccurs="unbounded" minOccurs="1" ref="rpns0:TopicExpressionDialects"/>
<element maxOccurs="unbounded" minOccurs="0" ref="rpns1:Entry"/>
<element maxOccurs="1" minOccurs="1" ref="rpns2:TerminationTime"/>
<element maxOccurs="unbounded" minOccurs="0" ref="rpns1:MembershipContentRule"/>
<element maxOccurs="1" minOccurs="1" ref="asgt:RegistrationCount"/>
<element maxOccurs="1" minOccurs="1" ref="rpns2:CurrentTime"/>
<element maxOccurs="1" minOccurs="1" ref="rpns0:FixedTopicSet"/>
</sequence>
</complexType>
</element>
</schema>
</wsdl:types>
<!--============================================================
P O R T T Y P E
============================================================-->
<wsdl:portType name="SinkPortType" wsrp:ResourceProperties="tns:ICResourceProperties">
<wsdl:operation name="SetTerminationTime">
<wsdl:input message="wsrlw:SetTerminationTimeRequest" wsa:Action="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime/SetTerminationTime"/>
<wsdl:output message="wsrlw:SetTerminationTimeResponse" wsa:Action="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime/SetTerminationTimeResponse"/>
<wsdl:fault name="UnableToSetTerminationTimeFault" message="wsrlw:UnableToSetTerminationTimeFault"/>
<wsdl:fault name="ResourceUnknownFault" message="wsrlw:ResourceUnknownFault"/>
<wsdl:fault name="TerminationTimeChangeRejectedFault" message="wsrlw:TerminationTimeChangeRejectedFault"/>
</wsdl:operation>
<wsdl:operation name="Destroy">
<wsdl:input message="wsrlw:DestroyRequest" wsa:Action="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime/Destroy"/>
<wsdl:output message="wsrlw:DestroyResponse" wsa:Action="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime/DestroyResponse"/>
<wsdl:fault name="ResourceNotDestroyedFault" message="wsrlw:ResourceNotDestroyedFault"/>
<wsdl:fault name="ResourceUnknownFault" message="wsrlw:ResourceUnknownFault"/>
</wsdl:operation>
<wsdl:operation name="QueryResourceProperties">
<wsdl:input name="QueryResourcePropertiesRequest" message="gtwsdl0:QueryResourcePropertiesRequest" wsa:Action="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties/QueryResourceProperties"/>
<wsdl:output name="QueryResourcePropertiesResponse" message="gtwsdl0:QueryResourcePropertiesResponse" wsa:Action="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties/QueryResourcePropertiesResponse"/>
<wsdl:fault name="InvalidResourcePropertyQNameFault" message="gtwsdl0:InvalidResourcePropertyQNameFault"/>
<wsdl:fault name="InvalidQueryExpressionFault" message="gtwsdl0:InvalidQueryExpressionFault"/>
<wsdl:fault name="QueryEvaluationErrorFault" message="gtwsdl0:QueryEvaluationErrorFault"/>
<wsdl:fault name="ResourceUnknownFault" message="gtwsdl0:ResourceUnknownFault"/>
<wsdl:fault name="UnknownQueryExpressionDialectFault" message="gtwsdl0:UnknownQueryExpressionDialectFault"/>
</wsdl:operation>
<wsdl:operation name="GetMultipleResourceProperties">
<wsdl:input name="GetMultipleResourcePropertiesRequest" message="gtwsdl0:GetMultipleResourcePropertiesRequest" wsa:Action="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties/GetMultipleResourceProperties"/>
<wsdl:output name="GetMultipleResourcePropertiesResponse" message="gtwsdl0:GetMultipleResourcePropertiesResponse" wsa:Action="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties/GetMultipleResourcePropertiesResponse"/>
<wsdl:fault name="InvalidResourcePropertyQNameFault" message="gtwsdl0:InvalidResourcePropertyQNameFault"/>
<wsdl:fault name="ResourceUnknownFault" message="gtwsdl0:ResourceUnknownFault"/>
</wsdl:operation>
<wsdl:operation name="GetResourceProperty">
<wsdl:input name="GetResourcePropertyRequest" message="gtwsdl0:GetResourcePropertyRequest" wsa:Action="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties/GetResourceProperty"/>
<wsdl:output name="GetResourcePropertyResponse" message="gtwsdl0:GetResourcePropertyResponse" wsa:Action="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties/GetResourcePropertyResponse"/>
<wsdl:fault name="InvalidResourcePropertyQNameFault" message="gtwsdl0:InvalidResourcePropertyQNameFault"/>
<wsdl:fault name="ResourceUnknownFault" message="gtwsdl0:ResourceUnknownFault"/>
</wsdl:operation>
<wsdl:operation name="Add">
<wsdl:input name="AddRequest" message="gtwsdl1:AddRequest" wsa:Action="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ServiceGroup-1.2/Add"/>
<wsdl:output name="AddResponse" message="gtwsdl1:AddResponse" wsa:Action="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ServiceGroup-1.2/AddResponse"/>
<wsdl:fault name="ContentCreationFailedFault" message="gtwsdl1:ContentCreationFailedFault"/>
<wsdl:fault name="UnsupportedMemberInterfaceFault" message="gtwsdl1:UnsupportedMemberInterfaceFault"/>
<wsdl:fault name="AddRefusedFault" message="gtwsdl1:AddRefusedFault"/>
</wsdl:operation>
<!-- <wsdl:operation name="GetCurrentMessage">
<wsdl:input message="wsntw:GetCurrentMessageRequest" wsa:Action="http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification/GetCurrentMessage"/>
<wsdl:output message="wsntw:GetCurrentMessageResponse" wsa:Action="http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification/GetCurrentMessageResponse"/>
<wsdl:fault name="TopicNotSupportedFault" message="wsntw:TopicNotSupportedFault"/>
<wsdl:fault name="InvalidTopicExpressionFault" message="wsntw:InvalidTopicExpressionFault"/>
<wsdl:fault name="NoCurrentMessageOnTopicFault" message="wsntw:NoCurrentMessageOnTopicFault"/>
<wsdl:fault name="ResourceUnknownFault" message="wsntw:ResourceUnknownFault"/>
</wsdl:operation>
<wsdl:operation name="Subscribe">
<wsdl:input message="wsntw:SubscribeRequest" wsa:Action="http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification/Subscribe"/>
<wsdl:output message="wsntw:SubscribeResponse" wsa:Action="http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification/SubscribeResponse"/>
<wsdl:fault name="TopicNotSupportedFault" message="wsntw:TopicNotSupportedFault"/>
<wsdl:fault name="InvalidTopicExpressionFault" message="wsntw:InvalidTopicExpressionFault"/>
<wsdl:fault name="SubscribeCreationFailedFault" message="wsntw:SubscribeCreationFailedFault"/>
<wsdl:fault name="ResourceUnknownFault" message="wsntw:ResourceUnknownFault"/>
<wsdl:fault name="TopicPathDialectUnknownFault" message="wsntw:TopicPathDialectUnknownFault"/>
</wsdl:operation>-->
</wsdl:portType>
<wsdl:import namespace="http://gcube-system.org/namespaces/informationsystem/collector/Sink/bindings" location="Sink_service_bindings.wsdl" />
<wsdl:service name="Sink">
<wsdl:documentation>Information Collector Sink PortType</wsdl:documentation>
<wsdl:port name="Sink" binding="binding:SinkSOAPBinding">
<soap:address location="http://localhost:8080/wsrf/services/"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>

View File

@ -0,0 +1,125 @@
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions name="Sink" targetNamespace="http://gcube-system.org/namespaces/informationsystem/collector/Sink/bindings"
xmlns:porttype="http://gcube-system.org/namespaces/informationsystem/collector/Sink"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
<wsdl:import namespace="http://gcube-system.org/namespaces/informationsystem/collector/Sink" location="Sink_service_flattened.wsdl"/>
<wsdl:binding name="SinkSOAPBinding" type="porttype:SinkPortType">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="SetTerminationTime">
<soap:operation soapAction="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime/SetTerminationTime"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
<wsdl:fault name="UnableToSetTerminationTimeFault">
<soap:fault name="UnableToSetTerminationTimeFault" use="literal"/>
</wsdl:fault>
<wsdl:fault name="ResourceUnknownFault">
<soap:fault name="ResourceUnknownFault" use="literal"/>
</wsdl:fault>
<wsdl:fault name="TerminationTimeChangeRejectedFault">
<soap:fault name="TerminationTimeChangeRejectedFault" use="literal"/>
</wsdl:fault>
</wsdl:operation>
<wsdl:operation name="Destroy">
<soap:operation soapAction="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime/Destroy"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
<wsdl:fault name="ResourceNotDestroyedFault">
<soap:fault name="ResourceNotDestroyedFault" use="literal"/>
</wsdl:fault>
<wsdl:fault name="ResourceUnknownFault">
<soap:fault name="ResourceUnknownFault" use="literal"/>
</wsdl:fault>
</wsdl:operation>
<wsdl:operation name="QueryResourceProperties">
<soap:operation soapAction="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties/QueryResourceProperties"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
<wsdl:fault name="InvalidResourcePropertyQNameFault">
<soap:fault name="InvalidResourcePropertyQNameFault" use="literal"/>
</wsdl:fault>
<wsdl:fault name="InvalidQueryExpressionFault">
<soap:fault name="InvalidQueryExpressionFault" use="literal"/>
</wsdl:fault>
<wsdl:fault name="QueryEvaluationErrorFault">
<soap:fault name="QueryEvaluationErrorFault" use="literal"/>
</wsdl:fault>
<wsdl:fault name="ResourceUnknownFault">
<soap:fault name="ResourceUnknownFault" use="literal"/>
</wsdl:fault>
<wsdl:fault name="UnknownQueryExpressionDialectFault">
<soap:fault name="UnknownQueryExpressionDialectFault" use="literal"/>
</wsdl:fault>
</wsdl:operation>
<wsdl:operation name="GetMultipleResourceProperties">
<soap:operation soapAction="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties/GetMultipleResourceProperties"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
<wsdl:fault name="InvalidResourcePropertyQNameFault">
<soap:fault name="InvalidResourcePropertyQNameFault" use="literal"/>
</wsdl:fault>
<wsdl:fault name="ResourceUnknownFault">
<soap:fault name="ResourceUnknownFault" use="literal"/>
</wsdl:fault>
</wsdl:operation>
<wsdl:operation name="GetResourceProperty">
<soap:operation soapAction="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties/GetResourceProperty"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
<wsdl:fault name="InvalidResourcePropertyQNameFault">
<soap:fault name="InvalidResourcePropertyQNameFault" use="literal"/>
</wsdl:fault>
<wsdl:fault name="ResourceUnknownFault">
<soap:fault name="ResourceUnknownFault" use="literal"/>
</wsdl:fault>
</wsdl:operation>
<wsdl:operation name="Add">
<soap:operation soapAction="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ServiceGroup-1.2/Add"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
<wsdl:fault name="ContentCreationFailedFault">
<soap:fault name="ContentCreationFailedFault" use="literal"/>
</wsdl:fault>
<wsdl:fault name="UnsupportedMemberInterfaceFault">
<soap:fault name="UnsupportedMemberInterfaceFault" use="literal"/>
</wsdl:fault>
<wsdl:fault name="AddRefusedFault">
<soap:fault name="AddRefusedFault" use="literal"/>
</wsdl:fault>
</wsdl:operation>
</wsdl:binding>
</wsdl:definitions>

View File

@ -0,0 +1,133 @@
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions name="Sink"
targetNamespace="http://gcube-system.org/namespaces/informationsystem/collector/Sink"
xmlns:tns="http://gcube-system.org/namespaces/informationsystem/collector/Sink"
xmlns:asgt="http://mds.globus.org/aggregator/types"
xmlns:wsrlw="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime-1.2-draft-01.wsdl"
xmlns:wsdlpp="http://www.globus.org/namespaces/2004/10/WSDLPreprocessor"
xmlns:wsrp="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.xsd"
xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/03/addressing"
xmlns:gtwsdl1="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ServiceGroup-1.2-draft-01.wsdl"
xmlns:asgw="http://mds.globus.org/aggregator"
xmlns:wsntw="http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.wsdl"
xmlns:gtwsdl0="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.wsdl"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://schemas.xmlsoap.org/wsdl/">
<wsdl:import namespace="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime-1.2-draft-01.wsdl" location="../wsrf/lifetime/WS-ResourceLifetime.wsdl" />
<wsdl:import namespace="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.wsdl" location="../wsrf/properties/WS-ResourceProperties.wsdl" />
<wsdl:import namespace="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ServiceGroup-1.2-draft-01.wsdl" location="../wsrf/servicegroup/WS-ServiceGroup.wsdl"/>
<!--============================================================
T Y P E S
============================================================-->
<wsdl:types>
<schema targetNamespace="http://gcube-system.org/namespaces/informationsystem/collector/Sink"
xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:rpns0="http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.xsd"
xmlns:rpns1="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ServiceGroup-1.2-draft-01.xsd"
xmlns:rpns2="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime-1.2-draft-01.xsd"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:tns="http://gcube-system.org/namespaces/informationsystem/collector">
<import namespace="http://schemas.xmlsoap.org/ws/2004/03/addressing" schemaLocation="../ws/addressing/WS-Addressing.xsd"/>
<import namespace="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime-1.2-draft-01.xsd" schemaLocation="../wsrf/lifetime/WS-ResourceLifetime.xsd"/>
<import namespace="http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.xsd" schemaLocation="../wsrf/notification/WS-BaseN.xsd"/>
<import namespace="http://mds.globus.org/aggregator/types" schemaLocation="../mds/aggregator/aggregator-types.xsd"/>
<import namespace="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ServiceGroup-1.2-draft-01.xsd" schemaLocation="../wsrf/servicegroup/WS-ServiceGroup.xsd"/>
<element name="ICResourceProperties">
<complexType>
<sequence>
<element maxOccurs="unbounded" minOccurs="1" ref="rpns0:Topic"/>
<element maxOccurs="unbounded" minOccurs="1" ref="rpns0:TopicExpressionDialects"/>
<element maxOccurs="unbounded" minOccurs="0" ref="rpns1:Entry"/>
<element maxOccurs="1" minOccurs="1" ref="rpns2:TerminationTime"/>
<element maxOccurs="unbounded" minOccurs="0" ref="rpns1:MembershipContentRule"/>
<element maxOccurs="1" minOccurs="1" ref="asgt:RegistrationCount"/>
<element maxOccurs="1" minOccurs="1" ref="rpns2:CurrentTime"/>
<element maxOccurs="1" minOccurs="1" ref="rpns0:FixedTopicSet"/>
</sequence>
</complexType>
</element>
</schema>
</wsdl:types>
<!--============================================================
P O R T T Y P E
============================================================-->
<wsdl:portType name="SinkPortType" wsrp:ResourceProperties="tns:ICResourceProperties">
<wsdl:operation name="SetTerminationTime">
<wsdl:input message="wsrlw:SetTerminationTimeRequest" wsa:Action="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime/SetTerminationTime"/>
<wsdl:output message="wsrlw:SetTerminationTimeResponse" wsa:Action="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime/SetTerminationTimeResponse"/>
<wsdl:fault name="UnableToSetTerminationTimeFault" message="wsrlw:UnableToSetTerminationTimeFault"/>
<wsdl:fault name="ResourceUnknownFault" message="wsrlw:ResourceUnknownFault"/>
<wsdl:fault name="TerminationTimeChangeRejectedFault" message="wsrlw:TerminationTimeChangeRejectedFault"/>
</wsdl:operation>
<wsdl:operation name="Destroy">
<wsdl:input message="wsrlw:DestroyRequest" wsa:Action="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime/Destroy"/>
<wsdl:output message="wsrlw:DestroyResponse" wsa:Action="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime/DestroyResponse"/>
<wsdl:fault name="ResourceNotDestroyedFault" message="wsrlw:ResourceNotDestroyedFault"/>
<wsdl:fault name="ResourceUnknownFault" message="wsrlw:ResourceUnknownFault"/>
</wsdl:operation>
<wsdl:operation name="QueryResourceProperties">
<wsdl:input name="QueryResourcePropertiesRequest" message="gtwsdl0:QueryResourcePropertiesRequest" wsa:Action="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties/QueryResourceProperties"/>
<wsdl:output name="QueryResourcePropertiesResponse" message="gtwsdl0:QueryResourcePropertiesResponse" wsa:Action="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties/QueryResourcePropertiesResponse"/>
<wsdl:fault name="InvalidResourcePropertyQNameFault" message="gtwsdl0:InvalidResourcePropertyQNameFault"/>
<wsdl:fault name="InvalidQueryExpressionFault" message="gtwsdl0:InvalidQueryExpressionFault"/>
<wsdl:fault name="QueryEvaluationErrorFault" message="gtwsdl0:QueryEvaluationErrorFault"/>
<wsdl:fault name="ResourceUnknownFault" message="gtwsdl0:ResourceUnknownFault"/>
<wsdl:fault name="UnknownQueryExpressionDialectFault" message="gtwsdl0:UnknownQueryExpressionDialectFault"/>
</wsdl:operation>
<wsdl:operation name="GetMultipleResourceProperties">
<wsdl:input name="GetMultipleResourcePropertiesRequest" message="gtwsdl0:GetMultipleResourcePropertiesRequest" wsa:Action="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties/GetMultipleResourceProperties"/>
<wsdl:output name="GetMultipleResourcePropertiesResponse" message="gtwsdl0:GetMultipleResourcePropertiesResponse" wsa:Action="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties/GetMultipleResourcePropertiesResponse"/>
<wsdl:fault name="InvalidResourcePropertyQNameFault" message="gtwsdl0:InvalidResourcePropertyQNameFault"/>
<wsdl:fault name="ResourceUnknownFault" message="gtwsdl0:ResourceUnknownFault"/>
</wsdl:operation>
<wsdl:operation name="GetResourceProperty">
<wsdl:input name="GetResourcePropertyRequest" message="gtwsdl0:GetResourcePropertyRequest" wsa:Action="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties/GetResourceProperty"/>
<wsdl:output name="GetResourcePropertyResponse" message="gtwsdl0:GetResourcePropertyResponse" wsa:Action="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties/GetResourcePropertyResponse"/>
<wsdl:fault name="InvalidResourcePropertyQNameFault" message="gtwsdl0:InvalidResourcePropertyQNameFault"/>
<wsdl:fault name="ResourceUnknownFault" message="gtwsdl0:ResourceUnknownFault"/>
</wsdl:operation>
<wsdl:operation name="Add">
<wsdl:input name="AddRequest" message="gtwsdl1:AddRequest" wsa:Action="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ServiceGroup-1.2/Add"/>
<wsdl:output name="AddResponse" message="gtwsdl1:AddResponse" wsa:Action="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ServiceGroup-1.2/AddResponse"/>
<wsdl:fault name="ContentCreationFailedFault" message="gtwsdl1:ContentCreationFailedFault"/>
<wsdl:fault name="UnsupportedMemberInterfaceFault" message="gtwsdl1:UnsupportedMemberInterfaceFault"/>
<wsdl:fault name="AddRefusedFault" message="gtwsdl1:AddRefusedFault"/>
</wsdl:operation>
<!-- <wsdl:operation name="GetCurrentMessage">
<wsdl:input message="wsntw:GetCurrentMessageRequest" wsa:Action="http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification/GetCurrentMessage"/>
<wsdl:output message="wsntw:GetCurrentMessageResponse" wsa:Action="http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification/GetCurrentMessageResponse"/>
<wsdl:fault name="TopicNotSupportedFault" message="wsntw:TopicNotSupportedFault"/>
<wsdl:fault name="InvalidTopicExpressionFault" message="wsntw:InvalidTopicExpressionFault"/>
<wsdl:fault name="NoCurrentMessageOnTopicFault" message="wsntw:NoCurrentMessageOnTopicFault"/>
<wsdl:fault name="ResourceUnknownFault" message="wsntw:ResourceUnknownFault"/>
</wsdl:operation>
<wsdl:operation name="Subscribe">
<wsdl:input message="wsntw:SubscribeRequest" wsa:Action="http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification/Subscribe"/>
<wsdl:output message="wsntw:SubscribeResponse" wsa:Action="http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification/SubscribeResponse"/>
<wsdl:fault name="TopicNotSupportedFault" message="wsntw:TopicNotSupportedFault"/>
<wsdl:fault name="InvalidTopicExpressionFault" message="wsntw:InvalidTopicExpressionFault"/>
<wsdl:fault name="SubscribeCreationFailedFault" message="wsntw:SubscribeCreationFailedFault"/>
<wsdl:fault name="ResourceUnknownFault" message="wsntw:ResourceUnknownFault"/>
<wsdl:fault name="TopicPathDialectUnknownFault" message="wsntw:TopicPathDialectUnknownFault"/>
</wsdl:operation>-->
</wsdl:portType>
</wsdl:definitions>

136
schema/XMLCollectionAccess.wsdl Executable file
View File

@ -0,0 +1,136 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
DIS-IC WSDL interace
-->
<wsdl:definitions name="XMLCollectionAccess" targetNamespace="http://gcube-system.org/namespaces/informationsystem/collector/XMLCollectionAccess"
xmlns:tns="http://gcube-system.org/namespaces/informationsystem/collector/XMLCollectionAccess"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:asgt="http://mds.globus.org/aggregator/types"
xmlns:wsrlw="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime-1.2-draft-01.wsdl"
xmlns:wsdlpp="http://www.globus.org/namespaces/2004/10/WSDLPreprocessor"
xmlns:gtwsdl1="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ServiceGroup-1.2-draft-01.wsdl"
xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/03/addressing"
xmlns:asgw="http://mds.globus.org/aggregator"
xmlns:wsntw="http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.wsdl"
xmlns:gtwsdl0="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.wsdl"
xmlns="http://schemas.xmlsoap.org/wsdl/">
<wsdl:import namespace="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-BaseFaults-1.2-draft-01.wsdl" location="../wsrf/faults/WS-BaseFaults.wsdl"/>
<wsdl:import namespace="http://mds.globus.org/aggregator" location="../mds/aggregator/aggregator_service_group_port_type.wsdl"/>
<wsdl:import namespace="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ServiceGroup-1.2-draft-01.wsdl" location="../wsrf/servicegroup/WS-ServiceGroup.wsdl"/>
<!--============================================================
T Y P E S
============================================================-->
<wsdl:types>
<xsd:schema targetNamespace="http://gcube-system.org/namespaces/informationsystem/collector/XMLCollectionAccess"
xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:rpns0="http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.xsd"
xmlns:rpns1="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ServiceGroup-1.2-draft-01.xsd"
xmlns:rpns2="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime-1.2-draft-01.xsd"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:tns="http://gcube-system.org/namespaces/informationsystem/collector/XMLCollectionAccess">
<import namespace="http://schemas.xmlsoap.org/ws/2004/03/addressing" schemaLocation="../ws/addressing/WS-Addressing.xsd"/>
<import namespace="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime-1.2-draft-01.xsd" schemaLocation="../wsrf/lifetime/WS-ResourceLifetime.xsd"/>
<import namespace="http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.xsd" schemaLocation="../wsrf/notification/WS-BaseN.xsd"/>
<import namespace="http://mds.globus.org/aggregator/types" schemaLocation="../mds/aggregator/aggregator-types.xsd"/>
<import namespace="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ServiceGroup-1.2-draft-01.xsd" schemaLocation="../wsrf/servicegroup/WS-ServiceGroup.xsd"/>
<xsd:element name="XQuery" type="xsd:string"/>
<xsd:element name="XQueryResponse" type="xsd:string"/>
<xsd:element name="resourceID" type="xsd:string"/>
<xsd:element name="deleteResponse" type="xsd:boolean"/>
<xsd:element name="deleteProfileParams">
<xsd:complexType >
<xsd:sequence>
<xsd:element name="ID" type="xsd:string"/>
<xsd:element name="profileType" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:complexType name="voidType"/>
<xsd:element name="voidElement" type="tns:voidType"/>
</xsd:schema>
</wsdl:types>
<!--============================================================
M E S S A G E S
============================================================-->
<wsdl:message name="ExecuteXQueryInputMessage">
<part name="parameters" element="tns:XQuery"/>
</wsdl:message>
<wsdl:message name="ExecuteXQueryOutputMessage">
<part name="parameters" element="tns:XQueryResponse"/>
</wsdl:message>
<wsdl:message name="DeleteResourceInputMessage">
<part name="parameters" element="tns:resourceID"/>
</wsdl:message>
<wsdl:message name="DeleteResourceOutputMessage">
<part name="parameters" element="tns:deleteResponse"/>
</wsdl:message>
<wsdl:message name="DeleteProfileInputMessage">
<part name="parameters" element="tns:deleteProfileParams"/>
</wsdl:message>
<wsdl:message name="DeleteProfileOutputMessage">
<part name="parameters" element="tns:deleteResponse"/>
</wsdl:message>
<wsdl:message name="VoidMessage">
<part name="parameters" element="tns:voidElement"/>
</wsdl:message>
<!--============================================================
P O R T T Y P E
============================================================-->
<wsdl:portType name="XMLCollectionAccessPortType">
<wsdl:operation name="ExecuteXQuery">
<wsdl:input message="tns:ExecuteXQueryInputMessage"/>
<wsdl:output message="tns:ExecuteXQueryOutputMessage"/>
</wsdl:operation>
<wsdl:operation name="DeleteResource">
<wsdl:input message="tns:DeleteResourceInputMessage"/>
<wsdl:output message="tns:DeleteResourceOutputMessage"/>
</wsdl:operation>
<wsdl:operation name="DeleteProfile">
<wsdl:input message="tns:DeleteProfileInputMessage"/>
<wsdl:output message="tns:DeleteProfileOutputMessage"/>
</wsdl:operation>
<wsdl:operation name="DeleteAllRPs">
<wsdl:input message="tns:VoidMessage"/>
<wsdl:output message="tns:VoidMessage"/>
</wsdl:operation>
<wsdl:operation name="Dispose">
<wsdl:input message="tns:VoidMessage"/>
<wsdl:output message="tns:VoidMessage"/>
</wsdl:operation>
<wsdl:operation name="Initialize">
<wsdl:input message="tns:VoidMessage"/>
<wsdl:output message="tns:VoidMessage"/>
</wsdl:operation>
</wsdl:portType>
</wsdl:definitions>

View File

@ -0,0 +1,53 @@
package org.gcube.informationsystem.collector.impl.contexts;
import org.gcube.common.core.contexts.GCUBEServiceContext;
import org.gcube.informationsystem.collector.impl.xmlstorage.exist.State;
/**
*
* Information Collector's service context
*
* @author Manuele Simi (ISTI-CNR)
*
*/
public class ICServiceContext extends GCUBEServiceContext {
/** singleton instance of IC context*/
protected static final ICServiceContext cache = new ICServiceContext();
private ICServiceContext() {}
/**
* @return the service context
*/
public static ICServiceContext getContext() {
return cache;
}
/** {@inheritDoc} */
@Override
protected String getJNDIName() {
return "gcube/informationsystem/collector";
}
/** {@inheritDoc} */
@Override
protected void onInitialisation() throws Exception {
State.initialize();
}
/** {@inheritDoc} */
@Override
protected void onReady() throws Exception {
}
/** {@inheritDoc} */
@Override
protected void onShutdown() throws Exception {
State.dispose();
}
}

View File

@ -0,0 +1,482 @@
package org.gcube.informationsystem.collector.impl.persistence;
import org.gcube.common.core.utils.logging.GCUBELog;
import org.gcube.informationsystem.collector.impl.persistence.AggregatorPersistentResource;
import org.gcube.informationsystem.collector.impl.xmlstorage.exist.State;
import org.xmldb.api.modules.XMLResource;
import org.xmldb.api.base.XMLDBException;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.StringReader;
import java.util.Calendar;
import java.util.GregorianCalendar;
import java.util.TimeZone;
import java.lang.Exception;
import org.w3c.dom.*;
import org.xml.sax.InputSource;
import javax.xml.parsers.*;
import javax.xml.xpath.*;
/**
* AggregatorPersistentResource represents a resource in the XML Storage
* repository
*
* @author Manuele Simi (ISTI-CNR)
*
*/
public class AggregatorPersistentResource extends PersistentResource {
private String resourceID = null;
private String resource_string = null;
// the resource type states if the resource contains a profile or generic
// WS-ResourceProperties
private RESOURCETYPE type = null;
// the profile type states which kind of profiles the resource contains
// (RunningInstance, Service, etc.)
private String profile_type = null;
// the various parts of the resource
private String data, /* service_class, service_id, ri_id, ghn_id, scope, */
entryKey, groupKey, source, sourceKey = "", completeSourceKey = "";
private Calendar terminationTime = null, lastUpdateTime = null;
private static GCUBELog logger = new GCUBELog(
AggregatorPersistentResource.class);
// the source XMLResource (if any)
private XMLResource originalSource = null;
// the XML DOM loaded from the resource string
private Document internalDOM = null;
// xpath factory to evaluate Xpath expressions
private XPath path = XPathFactory.newInstance().newXPath();
/**
* Builds a new empty DISPersinstentresource
*
*/
public AggregatorPersistentResource() {
// defatult termination time is now
Calendar cal = new GregorianCalendar();
cal.setTimeZone(TimeZone.getTimeZone("GMT"));
this.setTerminationTime(cal);
lastUpdateTime = new GregorianCalendar();
lastUpdateTime.setTimeZone(TimeZone.getTimeZone("GMT"));
}
/**
* Builds a DISPersinstentresource starting from an eXist resource
*
* @param resource
* the input eXist resource
* @throws Exception
* if the resource is invalid
*/
public AggregatorPersistentResource(XMLResource resource) throws Exception {
try {
this.resourceID = resource.getId();
this.originalSource = resource;
this.resource_string = resource.getContent().toString();
this.parseResource();
} catch (XMLDBException dbe) {
throw new Exception("invalid resource");
}
}
/**
* Sets the content of the resource
*
* @param data
* the new content
*
*/
public void setData(String data) {
this.data = data;
}
/**
* Sets the content of the resource using the content of a file
*
* @param f
* the file to use as content source
*
* @throws IOException
* if the access to the given file fails
*
*/
public void setData(File f) throws IOException {
try {
FileInputStream fin = new FileInputStream(f);
this.data = fin.toString();
} catch (IOException ioe) {
System.out.print(State.logPrefix
+ "unable to set content from file " + f.getAbsolutePath());
throw ioe;
}
}
/**
* Accesses the resource content
*
* @return the content
*/
public String getData() {
return this.data;
}
/**
*
* @return the original XMLResource from which the resource has been
* generated (if any)
*/
public XMLResource getOriginalXMLResource() {
return this.originalSource;
}
/**
* Accesses the resource ID
*
* @return the ID
*/
public String getID() {
// create a unique ID unless the resource contains a profile
if (this.resourceID == null)
this.resourceID = this.getGroupKey() + this.getEntryKey();
return this.resourceID;
}
/**
* Accesses the source GroupKey
*
* @return the ID
*/
public String getGroupKey() {
return this.groupKey;
}
/**
* Sets the source GroupKey
*
* @param groupKey
* the new group key
*
*/
public void setGroupKey(String groupKey) {
this.groupKey = groupKey;
}
/**
* Accesses the source EntryKey
*
* @return the ID
*/
public String getEntryKey() {
return this.entryKey;
}
/**
* Sets the source EntryKey
*
* @param entryKey
* the new entry key
*/
public void setEntryKey(String entryKey) {
this.entryKey = entryKey;
}
/**
* Sets the source address of the RI that publishes resource as reported in
* the servicegroup entry
*
* @param source
* the new source address
*/
public void setSource(String source) {
this.source = source;
}
/**
* Accesses the source address of the service that published the data
*
* @return the source
*/
public String getSource() {
return this.source;
}
/**
* Sets the key of the WS-Resource that published the data
*
* @param key
* the new source key
*/
public void setSourceKey(String key) {
this.sourceKey = key;
}
/**
* Gets the key of the WS-Resource that published the data
*
* @return the key
*/
public String getSourceKey() {
return this.sourceKey;
}
/**
* Sets the complete source key
*
* @param completeKey
* the new complete key
*/
public void setCompleteSourceKey(String completeKey) {
this.completeSourceKey = completeKey;
}
/**
* Gets the complete source key
*
* @return the complete source key
*/
public String getCompleteSourceKey() {
return this.completeSourceKey;
}
/**
* Sets the resource type. The actual implementation supports "Profile" and
* "Properties" as type
*
* @param type
* "Profile" or "Properties"
*/
public void setType(RESOURCETYPE type) {
this.type = type;
}
/**
* Accesses the resource type. The actual implementation supports "Profile"
* and "Properties" as type
*
* @return the type
*/
public RESOURCETYPE getType() {
return this.type;
}
/**
* Updates the resource body
*
* @param data
* the new body
*
*/
public void updateData(String data) {
this.data = data;
}
/**
* Builds a XML representation of the resource
*
* @return a String in the form of &lt;Document&gt;... &lt;Data&gt; resource
* content &lt;/Data&gt; &lt;/Document&gt;
*/
private String toXML() {
String rep = "<Document>\n";
rep += "<ID>" + this.getID() + "</ID>\n";
rep += "<Source>" + this.getSource() + "</Source>\n";
rep += "<SourceKey>" + this.getSourceKey() + "</SourceKey>\n";
rep += "<CompleteSourceKey>" + this.getCompleteSourceKey()
+ "</CompleteSourceKey>\n";
rep += "<EntryKey>" + this.getEntryKey() + "</EntryKey>\n";
rep += "<GroupKey>" + this.getGroupKey() + "</GroupKey>\n";
rep += "<TerminationTime>"
+ this.getTerminationTime().getTimeInMillis()
+ "</TerminationTime>\n";
rep += "<TerminationTimeHuman>"
+ this.getTerminationTime().getTime().toString()
+ "</TerminationTimeHuman>\n";
rep += "<LastUpdateMs>" + this.lastUpdateTime.getTimeInMillis()
+ "</LastUpdateMs>\n";
rep += "<LastUpdateHuman>" + this.lastUpdateTime.getTime().toString()
+ "</LastUpdateHuman>\n";
rep += this.getData() + "\n";
rep += "</Document>\n";
return rep;
}
/**
*
* @return a String representation of the resource
*/
public String toString() {
if (this.resource_string == null)
return this.toXML();
else
return this.resource_string;
}
/**
* Accesses the type of resource to which the profile is related to (if any)
*
* @return null if the resource does not contain a profile
*/
public String getProfileType() {
if (this.profile_type != null) {
// the profile type has been already extracted
return this.profile_type;
}
if ((this.type != null) && (type == RESOURCETYPE.Profile)) {
try {
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
DocumentBuilder builder = factory.newDocumentBuilder();
StringReader reader = new StringReader(this.toXML());
InputSource source = new InputSource(reader);
Document internalDOM = builder.parse(source);
// gets the type
XPath path = XPathFactory.newInstance().newXPath();
this.profile_type = path
.evaluate(
"/Document/Data/child::*[local-name()='Profile']/Resource/Type",
internalDOM);
// uses the DILIGENT ID as resource ID
this.resourceID = path
.evaluate(
"/Document/Data/child::*[local-name()='Profile']/Resource/ID",
internalDOM);
} catch (Exception e) {
logger
.error(State.logPrefix
+ "Unable to extract the profile type from the resource "
+ e.getMessage());
}
}
return this.profile_type;
}
/**
* @return the terminationTime of this resource
*/
public Calendar getTerminationTime() {
return terminationTime;
}
/**
* @param terminationTime
* the terminationTime to set
*/
public void setTerminationTime(Calendar terminationTime) {
this.terminationTime = (Calendar) terminationTime.clone();
this.terminationTime.setTimeZone(TimeZone.getTimeZone("GMT"));
}
/**
* Compares two resources
*
* @param o
* the resource to compare
* @return true if the resources have the same ID
*/
public boolean equals(Object o) {
// check the class this object is instance of
if (!(o instanceof AggregatorPersistentResource))
return false;
// compare the two objects
AggregatorPersistentResource key = (AggregatorPersistentResource) o;
if (key.getID() == this.getID())
return true;
else
return false;
}
/**
* @return the lastUpdateTime in milliseconds
* @throws Exception if an error occurs when accessing the LastUpdateMs field
*/
public long getLastUpdateTimeinMills() throws Exception {
if (lastUpdateTime != null)
return lastUpdateTime.getTimeInMillis();
if ((lastUpdateTime == null) && (this.internalDOM != null)) {
String value = "";
try {
value = path.evaluate("Document/LastUpdateMs", this.internalDOM);
} catch (XPathExpressionException xpee) {
logger.error(State.logPrefix + "" + xpee.getMessage());
logger.error(State.logPrefix + "" + xpee.getStackTrace());
throw new Exception("XPath evaluation error");
}
try {
return Long.parseLong(value);
} catch (NumberFormatException nfe) {
logger.error("Invalid last update time format found in resource " + this.getID());
logger.error("Parsed string was " + value);
throw new Exception("Unable to retrieve last update time for resource " + this.getID());
}
} else
throw new Exception("unable to retrieve last update time for resource " + this.getID());
}
/**
* Loads the XML DOM from the resource string
*
*/
private void parseResource() throws Exception {
logger.debug("Parsing resource: " + this.resource_string);
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
DocumentBuilder builder = factory.newDocumentBuilder();
StringReader reader = new StringReader(this.resource_string);
InputSource source = new InputSource(reader);
this.internalDOM = builder.parse(source);
}
/*
* (non-Javadoc)
*
* @see
* org.gcube.informationsystem.collector.impl.persistence.PersistentResource
* #getPublisher()
*/
@Override
public String getPublisher() {
return null;
}
/*
* (non-Javadoc)
*
* @see
* org.gcube.informationsystem.collector.impl.persistence.PersistentResource
* #setPublisher(java.lang.String)
*/
@Override
public void setPublisher(String publisher) {
}
}

View File

@ -0,0 +1,98 @@
package org.gcube.informationsystem.collector.impl.persistence;
/**
* A resource handled by the XML repository
*
* @author Manuele Simi (ISTI-CNR)
*
*/
public abstract class PersistentResource {
public enum RESOURCETYPE {
Profile, Properties
}
protected String id;
/**
* Gets the resource ID
*
* @return the ID
*/
public abstract String getID();
/**
* @return a String representation of the resource
*/
public abstract String toString();
/**
* Gets the resource type.
*
* @return the resource type
*/
public abstract RESOURCETYPE getType();
/**
* Gets the resource profile type, if any
*
* @return the resource profile type
* @throws Exception
* if the resource has no profile type (i.e. it is not a
* profile)
*/
public abstract String getProfileType() throws Exception;
/**
* Gets the publisher of the resource
*
* @return the publisher
*/
public abstract String getPublisher();
/**
* Sets the resource's publisher
*
* @param publisher
* the publisher
*/
public abstract void setPublisher(String publisher);
/**
* @return
* @throws Exception
*/
public abstract long getLastUpdateTimeinMills() throws Exception;
/**
* {@inheritDoc}
*/
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((id == null) ? 0 : id.hashCode());
return result;
}
/**
* {@inheritDoc}
*/
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
PersistentResource other = (PersistentResource) obj;
if (id == null) {
if (other.id != null)
return false;
} else if (!id.equals(other.id))
return false;
return true;
}
}

View File

@ -0,0 +1,84 @@
package org.gcube.informationsystem.collector.impl.porttypes;
import java.util.Calendar;
import org.globus.wsrf.ResourceLifetime;
import org.globus.wsrf.ResourceProperties;
import org.globus.wsrf.ResourceProperty;
import org.globus.wsrf.ResourcePropertySet;
import org.globus.wsrf.impl.ReflectionResourceProperty;
import org.globus.wsrf.impl.SimpleResourcePropertyMetaData;
import org.globus.wsrf.impl.SimpleResourcePropertySet;
import org.gcube.common.core.utils.logging.GCUBELog;
/**
* <em>Sink</em> PortType's implementation class. It's the registration PortType
* for all the Aggregator Sources.
*
* @author Manuele Simi (ISTI-CNR)
*
*/
public class Sink implements ResourceLifetime, ResourceProperties {
// WS-Lifetime Properties
protected Calendar terminationTime, currentTime;
private final GCUBELog logger = new GCUBELog(Sink.class);
private ResourcePropertySet propSet;
/**
* Initializes a new Sink PortType by creating its
* {@link SimpleResourcePropertySet}
*
*/
public Sink() {
this.propSet = new SimpleResourcePropertySet(XMLCollectionAccess.RP_SET);
ResourceProperty prop = null;
try {
// ResourceLifeTime properties
prop = new ReflectionResourceProperty(SimpleResourcePropertyMetaData.TERMINATION_TIME, this);
this.propSet.add(prop);
prop = new ReflectionResourceProperty( SimpleResourcePropertyMetaData.CURRENT_TIME, this);
this.propSet.add(prop);
this.propSet.add(prop);
} catch (Exception e) {
logger.error("An error occurred during the Sink resource creation", e);
}
}
/**
*
* {@inheritDoc}
*/
public Calendar getCurrentTime() {
return Calendar.getInstance();
}
/**
*
* {@inheritDoc}
*/
public Calendar getTerminationTime() {
return this.terminationTime;
}
/**
*
* {@inheritDoc}
*/
public void setTerminationTime(Calendar time) {
this.terminationTime = time;
}
/**
*
* {@inheritDoc}
*/
public ResourcePropertySet getResourcePropertySet() {
return this.propSet;
}
}

View File

@ -0,0 +1,50 @@
package org.gcube.informationsystem.collector.impl.porttypes;
import java.rmi.RemoteException;
import java.util.Calendar;
import javax.xml.namespace.QName;
import org.oasis.wsrf.properties.ResourceUnknownFaultType;
import org.oasis.wsrf.properties.InvalidResourcePropertyQNameFaultType;
import org.oasis.wsrf.properties.GetResourcePropertyResponse;
import org.oasis.wsrf.servicegroup.ServiceGroupEntry;
import org.globus.wsrf.impl.properties.GetResourcePropertyProvider;
/**
* A ServiceGroupEntry implemenation.<br>
* It is used as base implementation both of the <em>SinkEntry</em> and of <em>Entry</em> portType.
*
* @author Manuele Simi (ISTI-CNR)
*
*/
public class SinkEntry implements ServiceGroupEntry {
private GetResourcePropertyProvider getResourcePropertyProvider = new GetResourcePropertyProvider();
// WS-Lifetime Properties
protected Calendar terminationTime, currentTime;
/**
* Gets WS-Resource property by using the {@link GetResourcePropertyProvider}
*
* @param name the full qualified name of the property
* @return the resource property
* @throws RemoteException throws by the GetResourcePropertyProvider
* @throws InvalidResourcePropertyQNameFaultType throws by the GetResourcePropertyProvider
* @throws ResourceUnknownFaultType throws by the GetResourcePropertyProvider
*
*/
public GetResourcePropertyResponse getResourceProperty(QName name)
throws RemoteException, InvalidResourcePropertyQNameFaultType, ResourceUnknownFaultType {
return getResourcePropertyProvider.getResourceProperty(name);
}
}

View File

@ -0,0 +1,252 @@
package org.gcube.informationsystem.collector.impl.porttypes;
import javax.xml.namespace.QName;
import org.oasis.wsrf.faults.BaseFaultType;
import org.gcube.common.core.contexts.GCUBEServiceContext;
import org.gcube.common.core.porttypes.GCUBEPortType;
import org.gcube.common.core.utils.logging.GCUBELog;
import org.gcube.informationsystem.collector.impl.contexts.ICServiceContext;
import org.gcube.informationsystem.collector.impl.xmlstorage.exist.State;
import org.gcube.informationsystem.collector.impl.xmlstorage.exist.Sweeper;
import org.gcube.informationsystem.collector.impl.xmlstorage.exist.XQuery;
import org.gcube.informationsystem.collector.stubs.DeleteProfileParams;
import org.globus.wsrf.utils.FaultHelper;
import org.xmldb.api.base.ResourceSet;
import org.xmldb.api.modules.XMLResource;
/**
* State service implementation class
*
* @author Manuele Simi (ISTI-CNR)
*
*/
public class XMLCollectionAccess extends GCUBEPortType {
/**
* WS Properties namespace
*/
public static final QName RP_SET = new QName(
"http://gcube-system.org/namespaces/informationsystem/collector/XMLCollectionAccess",
"ICRP");
private final GCUBELog logger = new GCUBELog(XMLCollectionAccess.class);
/**
* Executes the given XQuery on the embedded eXist DB instance
*
* @param xquery
* - a valid XQuery. It must be compliant with the syntax (with
* the exception of XML Schema-related features) as specified in
* W3C's recommendations outlined in the June 2006 candidate
* recommendation
* @return the result set wrapped in a &lt;Resultset&gt; tag. Each record is
* wrapped with a &lt;Recordt&gt;
* @throws BaseFaultType
* if the XQuery is not valid or the connection to eXist is
* broken
*/
public String executeXQuery(String xquery) throws BaseFaultType {
StringBuilder response = new StringBuilder();
try {
logger.debug("executing XQuery: " + xquery);
XQuery q = new XQuery(xquery);
ResourceSet result = State.query_manager.executeXQuery(q);
logger.debug("number of returned documents: " + result.getSize());
response.append("<Resultset>\n");
for (int i = 0; i < (int) result.getSize(); i++) {
XMLResource xmlres = (XMLResource) result.getResource((long) i);
// logger.debug("retrieved resource - " + xmlres.getContent());
response.append("<Record>\n" + xmlres.getContent()+ "\n</Record>\n");
}
response.append("</Resultset>");
} catch (Exception e) {
BaseFaultType fault = new BaseFaultType();
FaultHelper faultHelper = new FaultHelper(fault);
faultHelper.addFaultCause(e);
faultHelper.addDescription("IC service: Exception when executing the requested XQuery");
throw fault;
}
return response.toString();
}
/**
* Removes a profile from the Storage given its DILIGENT Resource ID
*
* @param params
* a stub class including private java.lang.String
* DILIGENTResourceID; the id of the profile to remove private
* java.lang.String profileType; the type of the profile to
* remove (e.g RunningInstance, DHN, Service, etc.);
* @return true if the resource is successfully deleted
* @throws BaseFaultType
* if the type parameter is not valid or an error occurs when
* deleting the profile
*/
public boolean deleteProfile(DeleteProfileParams params)
throws BaseFaultType {
boolean response = false;
String id = params.getID();
String type = params.getProfileType();
if ((id == "") || (id == null)) {
logger.warn("invalid id");
BaseFaultType fault = new BaseFaultType();
FaultHelper faultHelper = new FaultHelper(fault);
faultHelper.addDescription("invalid id");
throw fault;
}
if ((type == "") || (type == null)) {
logger.warn("invalid profile type");
BaseFaultType fault = new BaseFaultType();
FaultHelper faultHelper = new FaultHelper(fault);
faultHelper.addDescription("invalid profile type");
throw fault;
}
try {
logger.debug("deleting profile " + id + " from collection " + type);
State.storage_manager.retrieveAndDeleteProfileFromID(id, type);
if (type.equalsIgnoreCase("RunningInstance"))
Sweeper.cleanResourceForRI(id);
} catch (Exception e) {
logger.error("unable to remove resource: " + id, e);
BaseFaultType fault = new BaseFaultType();
FaultHelper faultHelper = new FaultHelper(fault);
faultHelper.addFaultCause(e);
faultHelper
.addDescription("IC service: Exception when deleting the requested resource");
throw fault;
}
return response;
}
/**
* Removes a resource from the Storage given its ID
*
* @param id
* - the id of the resoure to remove
* @return true if the resource is successfully deleted
* @throws BaseFaultType
* if the id parameter is null or an error occurs when deleting
* the profile
*/
public boolean deleteResource(String id) throws BaseFaultType {
boolean response = false;
if ((id == "") || (id == null)) {
logger.warn("invalid id");
BaseFaultType fault = new BaseFaultType();
FaultHelper faultHelper = new FaultHelper(fault);
faultHelper.addDescription("invalid id");
throw fault;
}
try {
logger.debug("deleting resource: " + id);
State.storage_manager.retrieveAndDeleteResourceFromID(id);
} catch (Exception e) {
logger.error("unable to remove resource: " + id, e);
BaseFaultType fault = new BaseFaultType();
FaultHelper faultHelper = new FaultHelper(fault);
faultHelper.addFaultCause(e);
faultHelper
.addDescription("IC service: Exception when deleting the requested resource");
throw fault;
}
return response;
}
/**
* Deletes the entire set of registered RPs from the storage
*
* @throws BaseFaultType
* if an error occurs when deleting the resources
*/
public void deleteAllRPs() throws BaseFaultType {
try {
logger.info("DeleteAllRPs operation invoked");
Sweeper.cleanRPs();
logger.info("All RPs have been deleted from the storage");
} catch (Exception e) {
logger.error("unable to clean RPs collction: ", e);
BaseFaultType fault = new BaseFaultType();
FaultHelper faultHelper = new FaultHelper(fault);
faultHelper.addFaultCause(e);
faultHelper.addDescription("IC service: Exception when deleting the requested resource");
throw fault;
}
}
/**
* Disposes the State service
*
* @throws BaseFaultType
* if the shutdown fails
*/
public void dispose() throws BaseFaultType {
try {
logger.info("Dispose operation invoked");
logger.info("trying to shutdown the storage instances...");
try {
State.storage_manager.shutdown();
State.query_manager.shutdown();
} catch (NullPointerException se) {/* nothng to do */
}
State.storage_manager = null;
State.query_manager = null;
// request the interruption of the sweeper thread
State.sweeperT.interrupt();
logger.info("done");
} catch (Exception e) {
logger.error("unable to pose the IC with success ", e);
BaseFaultType fault = new BaseFaultType();
FaultHelper faultHelper = new FaultHelper(fault);
faultHelper.addFaultCause(e);
faultHelper
.addDescription("-IC service: Unable to pose the service");
throw fault;
}
}
/**
* Initialized the State service
*
* @throws BaseFaultType
* if the initialization fails
*/
public void initialize() throws BaseFaultType {
try {
logger.info("Initialize operation invoked");
State.initialize();
logger.info("done");
} catch (Exception e) {
logger.error("Unable to initialize the IC state", e);
BaseFaultType fault = new BaseFaultType();
FaultHelper faultHelper = new FaultHelper(fault);
faultHelper.addFaultCause(e);
faultHelper.addDescription("-IC service: Unable to initialize the service");
throw fault;
}
}
/** {@inheritDoc} */
@Override
protected GCUBEServiceContext getServiceContext() {
return ICServiceContext.getContext();
}
}

View File

@ -0,0 +1,54 @@
package org.gcube.informationsystem.collector.impl.porttypes;
import org.globus.wsrf.utils.FaultHelper;
import org.oasis.wsrf.faults.BaseFaultType;
import org.gcube.common.core.contexts.GCUBEServiceContext;
import org.gcube.common.core.porttypes.GCUBEPortType;
import org.gcube.informationsystem.collector.impl.contexts.ICServiceContext;
import org.gcube.informationsystem.collector.impl.xmlstorage.exist.State;
/**
* TODO: Manuele, don't forget to add a comment for this new type!!
*
* @author Manuele Simi (ISTI-CNR)
*
*/
public class XMLStorageAccess extends GCUBEPortType {
/** {@inheritDoc} */
@Override
protected GCUBEServiceContext getServiceContext() {
return ICServiceContext.getContext();
}
/**
* Disposes the XMLStorage
*
* @throws BaseFaultType if the shutdown fails
*/
public void dispose() throws BaseFaultType {
try {
logger.info("Dispose operation invoked");
logger.info("trying to shutdown the storage instances...");
try {
State.storage_manager.shutdown();
State.query_manager.shutdown();
} catch (NullPointerException se) {/* nothng to do */
}
State.storage_manager = null;
State.query_manager = null;
// request the interruption of the sweeper thread
State.sweeperT.interrupt();
logger.info("done");
} catch (Exception e) {
logger.error("unable to pose the IC with success ", e);
BaseFaultType fault = new BaseFaultType();
FaultHelper faultHelper = new FaultHelper(fault);
faultHelper.addFaultCause(e);
faultHelper
.addDescription("-IC service: Unable to pose the service");
throw fault;
}
}
}

View File

@ -0,0 +1,26 @@
package org.gcube.informationsystem.collector.impl.porttypes;
import org.gcube.common.core.contexts.GCUBEServiceContext;
import org.gcube.common.core.porttypes.GCUBEPortType;
import org.gcube.informationsystem.collector.impl.contexts.ICServiceContext;
/**
* <em>XQueryAccess</em> portType implementation
*
* @author Manuele Simi (ISTI-CNR)
*
*/
public class XQueryAccess extends GCUBEPortType {
/** {@inheritDoc} */
@Override
protected GCUBEServiceContext getServiceContext() {
return ICServiceContext.getContext();
}
/*
public XQueryExecuteResponse XQueryExecute(XQueryExecuteRequest XQueryExecuteRequest) throw XQueryFaultType {
}*/
}

View File

@ -0,0 +1,307 @@
package org.gcube.informationsystem.collector.impl.state;
import java.util.Calendar;
import org.apache.axis.encoding.AnyContentType;
import org.apache.axis.message.MessageElement;
import org.apache.axis.message.addressing.EndpointReferenceType;
import org.apache.axis.message.addressing.ReferencePropertiesType;
import org.gcube.common.core.utils.logging.GCUBELog;
import org.gcube.informationsystem.collector.impl.persistence.AggregatorPersistentResource;
import org.gcube.informationsystem.collector.impl.persistence.PersistentResource.RESOURCETYPE;
import org.gcube.informationsystem.collector.impl.state.AggregatorRegisteredResource;
import org.gcube.informationsystem.collector.impl.utils.*;
import org.gcube.informationsystem.collector.impl.xmlstorage.exist.State;
import org.gcube.informationsystem.collector.impl.porttypes.XMLCollectionAccess;
import org.globus.mds.aggregator.impl.AggregatorServiceGroupResource;
import org.globus.mds.aggregator.impl.AggregatorServiceGroupEntryResource;
import org.globus.mds.aggregator.impl.AggregatorSource;
import org.globus.mds.aggregator.impl.AggregatorSink;
import org.globus.wsrf.ResourceKey;
import org.globus.wsrf.ResourceProperty;
import org.globus.wsrf.ResourcePropertySet;
import org.globus.wsrf.TopicList;
import org.globus.wsrf.impl.ReflectionResourceProperty;
import org.globus.wsrf.impl.SimpleTopicList;
import org.globus.wsrf.impl.SimpleResourcePropertyMetaData;
import org.globus.wsrf.impl.servicegroup.ServiceGroupConstants;
import org.globus.wsrf.impl.servicegroup.EntryResourcePropertyTopic;
/**
* This class implements an aggregating in-memory service group resource. <br>
* For every registered AggregatorSource instance one connected AggregatorRegisteredResource
* instance is created and it is delivered with its data, following the chosen registration mode
* (Push/Pull).
*
* @author Manuele Simi (ISTI-CNR)
*
*/
public class AggregatorRegisteredResource extends AggregatorServiceGroupResource
implements AggregatorSink, ICRegisteredResource {
private static GCUBELog logger = new GCUBELog(AggregatorRegisteredResource.class);
private ResourceKey resourceKey = null;
// private static I18n i18n = I18n.getI18n(Resources.class.getName());
private static final String registryNS = "gcube/informationsystem/registry/Registry";
protected Calendar terminationTime, currentTime;
private ResourcePropertySet propSet;
private TopicList topicList;
// private String baseDir;
/**
* Builds a new resource
*/
public AggregatorRegisteredResource() {
super.init(XMLCollectionAccess.RP_SET);
// this.baseDir = getBaseDirectory();
this.propSet = this.getResourcePropertySet();
this.topicList = new SimpleTopicList(this);
ResourceProperty prop = null;
EntryResourcePropertyTopic rpTopic = new EntryResourcePropertyTopic(this.propSet.get(ServiceGroupConstants.ENTRY));
this.propSet.add(rpTopic);
this.topicList.addTopic(rpTopic);
try {
// ResourceLifeTime properties
prop = new ReflectionResourceProperty(SimpleResourcePropertyMetaData.TERMINATION_TIME, this);
this.propSet.add(prop);
prop = new ReflectionResourceProperty(SimpleResourcePropertyMetaData.CURRENT_TIME, this);
this.propSet.add(prop);
this.propSet.add(prop);
// initialize aggregator
this.loadCompatibleSources(this);
} catch (Exception e) {
logger.error(State.logPrefix + "Error during DISICResource creation: ", e);
}
}
/**
* Used to inform the resource of its key.
*
* @param k the resource key
*
* @throws Exception if the resource key is already set
*/
public void setResourceKey(ResourceKey k) throws Exception {
if (resourceKey == null)
resourceKey = k;
else
throw new Exception("Resource key can only be set once.");
}
/**
*
* @return the resource key
*/
public ResourceKey getResourceKey() {
return resourceKey;
}
// ResourceLifetime methods
/**
* Sets the termination time
*
* @param time the new termination time
*/
public void setTerminationTime(Calendar time) {
logger.debug(State.logPrefix + "Set Termination time called: " + time.getTime());
this.terminationTime = time;
}
/**
*
*
* {@inheritDoc}
*/
public Calendar getTerminationTime() {
return this.terminationTime;
}
/**
* {@inheritDoc}
*
*/
public Calendar getCurrentTime() {
return Calendar.getInstance();
}
/**
*
* {@inheritDoc}
*/
public TopicList getTopicList() {
return this.topicList;
}
// AggregatorSink methods
/**
* Takes delivery of a message from an AggregatorSource. <br>
* This is called by an AggregatorSource to
* deliver a message with the assumption that the message data will be aggregated as its native
* type and into whatever data storage format is used by the underlying AggregatorSink class.
*
* @param messageObj the message content
* @param entry the related service group entry
*
*/
public void deliver(AnyContentType messageObj, AggregatorServiceGroupEntryResource entry) {
logger.info("New delivered resource");
try {
/*
* logger.debug(State.logPrefix + "delivered message -> " +
* AnyHelper.toSingleString(messageObj));
*/
// get the message content
MsgParser aentry = new MsgParser(messageObj);
String entryType = aentry.getEntryType();
logger.debug("Entry type " + entryType);
logger.debug("Entry RunningInstance ID " + aentry.getRunningInstanceID());
logger.debug("Entry Service Name " + aentry.getServiceName());
logger.debug("Entry Service Class " + aentry.getServiceClass());
// logger.debug(State.logPrefix + "getEntryAsString " +
// aentry.getEntryAsString());
// MessageElement[] message = messageObj.get_any();
// extract the entry EPR
EntryEPRParser eprparser = new EntryEPRParser(entry.getEntryEPR());
logger.debug("aggregator EntryEPR-> " + entry.getEntryEPR().toString());
// extract the member EPR
EndpointReferenceType memberEpr = entry.getMemberEPR();
logger.debug("aggregator MemberEPR-> " + memberEpr.toString());
// get RP set from entry
// ResourcePropertySet rpSet = entry.getResourcePropertySet();
// get content RP from entry
/*
* ResourceProperty contentRP = rpSet.get(ServiceGroupConstants.CONTENT);
*
* AggregatorContent content = entry.getContent();
*
* AggregatorConfig config = content.getAggregatorConfig();
*
* MessageElement[] any = config.get_any();
*/
// Build the new resource to store
logger.debug("Storing the new delivered resource");
AggregatorPersistentResource res = new AggregatorPersistentResource();
res.setData(aentry.getEntryAsString());
res.setEntryKey(eprparser.getEntryKey());
res.setGroupKey(eprparser.getGroupKey());
res.setTerminationTime(entry.getTerminationTime());
// select the resource type
if (memberEpr.getAddress().toString().endsWith(AggregatorRegisteredResource.registryNS)) {
res.setType(RESOURCETYPE.Profile);
} else {
res.setType(RESOURCETYPE.Properties);
}
// set the EPR and Key of the remote WS-Resource that publish the
// resource
res.setSource(memberEpr.getAddress().toString());
logger.debug("Source: " + memberEpr.getAddress().toString());
try {
ReferencePropertiesType prop = memberEpr.getProperties();
if (prop != null) {
MessageElement[] any = prop.get_any();
if (any.length > 0) {
res.setSourceKey(any[0].getValue());
res.setCompleteSourceKey(any[0].toString());
}
}
} catch (java.lang.NullPointerException npe) {
// nothing to do, the source key does not exist (may be the publisher is a singleton
// or stateless service)
}
synchronized (State.deletedResources) {
if (State.deletedResources.contains(res)) {
State.deletedResources.remove(res);
throw new Exception("the resource " + res.getID() + " is no longer available");
}
}
logger.trace("Resource: " + res.toString());
// store/update the new resource
State.storage_manager.storeResource(res);
aentry.dispose();
logger.info("Delivered resource stored with success");
} catch (Exception e) {
logger.error("When managing aggregator content:" + e.getMessage());
logger.error("returned exception ", e);
}
}
/**
* Called to initialize any necessary state.
*
* @param parameters any initialization parameters (not used)
*/
public void initialize(Object parameters) {
// NO OP
}
/**
* Sets the AggregatorSource connected to this sink
*
* @param source the source
*
*/
public void setSource(AggregatorSource source) {
// NO OP
}
/**
* Gets the AggregatorSource connected to this sink
*
* @return always null
*/
public AggregatorSource getSource() {
return null;
}
/**
* Called to free resources used by the sink.
*
*/
public void terminate() {
logger.debug("Resource terminated");
}
// RemoveCallback methods
// Notifies that the resource was removed
/**
* Callback method invoked when the resource is removed by the Aggregator Framework
*/
public void remove() {
logger.debug("Resource removed");
}
}

View File

@ -0,0 +1,62 @@
package org.gcube.informationsystem.collector.impl.state;
import org.gcube.common.core.utils.logging.GCUBELog;
import org.gcube.informationsystem.collector.impl.persistence.AggregatorPersistentResource;
import org.gcube.informationsystem.collector.impl.utils.EntryEPRParser;
import org.gcube.informationsystem.collector.impl.xmlstorage.exist.State;
import org.globus.mds.aggregator.impl.AggregatorServiceGroupEntryRemovedCallback;
import org.globus.mds.aggregator.impl.AggregatorServiceGroupEntryResource;
/**
* Whenever a AggregatorServiceGroupEntryResource is removed from an
* AggregatorServiceGroupEntryHome, the corresponding remove method of this class will be invoked
* passing as a parameter the instance of the resource that is about to be removed.
*
*
* @author Manuele Simi (ISTI-CNR)
*
*/
public class ICAggregatorRemoveCallback implements AggregatorServiceGroupEntryRemovedCallback {
private static GCUBELog logger = new GCUBELog(ICAggregatorRemoveCallback.class);
/**
* Creates a new Callback object
*
*/
public ICAggregatorRemoveCallback() {
super();
}
/**
* Removes from the storage the supplied resource
*
* @param entry the AggregatorServiceGroupEntryResource that is about to be removed
* @throws Exception
* if the delete operation fails
*/
public void remove(AggregatorServiceGroupEntryResource entry) throws Exception {
logger.debug("ICAggregatorRemoveCallback invoked " + entry.getEntryEPR().toString());
EntryEPRParser parser = new EntryEPRParser(entry.getEntryEPR());
AggregatorPersistentResource res = new AggregatorPersistentResource();
res.setEntryKey(parser.getEntryKey());
res.setGroupKey(parser.getGroupKey());
// mark the resource as no longer available
synchronized (State.deletedResources) {
State.deletedResources.add(res);
}
// delete the resource from the database
try {
State.storage_manager.retrieveAndDeleteResourceFromID(res.getID());
} catch (Exception e) {
logger.error(State.logPrefix + "unable to remove resource: " + res.getID(), e);
}
}
}

View File

@ -0,0 +1,15 @@
package org.gcube.informationsystem.collector.impl.state;
import org.globus.wsrf.ResourceLifetime;
import org.globus.wsrf.ResourceProperties;
import org.globus.wsrf.TopicListAccessor;
/**
* Marker interface for IC registered resources
*
* @author Manuele Simi (ISTI-CNR)
*
*/
public interface ICRegisteredResource extends TopicListAccessor, ResourceLifetime, ResourceProperties {
}

View File

@ -0,0 +1,104 @@
package org.gcube.informationsystem.collector.impl.utils;
import org.gcube.common.core.utils.logging.GCUBELog;
import org.gcube.informationsystem.collector.impl.utils.EntryEPRParser;
import javax.xml.xpath.XPath;
import javax.xml.xpath.XPathExpressionException;
import javax.xml.xpath.XPathFactory;
import org.apache.axis.message.addressing.EndpointReferenceType;
import org.apache.axis.message.addressing.ReferencePropertiesType;
import org.apache.axis.message.MessageElement;
import org.w3c.dom.*;
import org.xml.sax.InputSource;
import javax.xml.parsers.*;
import java.io.StringReader;
import java.lang.Exception;
/**
*
* Parser for EntryEPR of a WS-ServiceGroup resources
*
*
*/
public class EntryEPRParser {
private Document internalDOM;
private Element serviceGroup;
// xpath factory to evaluate Xpath expressions
private XPath path = XPathFactory.newInstance().newXPath();
private static GCUBELog logger = new GCUBELog(EntryEPRParser.class);
/**
*
* @param e
* the EPR of the service group resource to parse
* @throws Exception
* if the input EPR is no valid
*/
public EntryEPRParser(EndpointReferenceType e) throws Exception {
ReferencePropertiesType prop = e.getProperties();
MessageElement[] any = prop.get_any();
logger.debug("Aggregator EntryEPR-> " + e.toString());
if (any[0].getName().equalsIgnoreCase("ServiceGroupEntryKey")) {
serviceGroup = any[0];
DocumentBuilderFactory factory = DocumentBuilderFactory
.newInstance();
DocumentBuilder builder = factory.newDocumentBuilder();
StringReader reader = new StringReader(serviceGroup.toString());
InputSource source = new InputSource(reader);
this.internalDOM = builder.parse(source);
}
}
/**
*
* @return the service group's entry key
* @throws Exception
* if the parsing of the EPR fails
*/
public String getEntryKey() throws Exception {
String key = null;
try {
key = path.evaluate("ServiceGroupEntryKey/EntryKey", internalDOM);
} catch (XPathExpressionException xpee) {
logger.error(xpee.getMessage());
logger.error(xpee.getStackTrace());
throw new Exception("XPath evaluation error");
}
return key;
}
/**
*
* @return the service group's group key
* @throws Exception
* if the parsing of the EPR fails
*/
public String getGroupKey() throws Exception {
String key = null;
try {
key = path.evaluate("ServiceGroupEntryKey/GroupKey", internalDOM);
} catch (XPathExpressionException xpee) {
logger.error(xpee.getMessage());
logger.error(xpee.getStackTrace());
throw new Exception("XPath evaluation error");
}
return key;
}
}

View File

@ -0,0 +1,283 @@
package org.gcube.informationsystem.collector.impl.utils;
import org.apache.axis.encoding.AnyContentType;
import org.gcube.common.core.utils.logging.GCUBELog;
import org.gcube.informationsystem.collector.impl.utils.MsgParser;
import org.globus.wsrf.utils.AnyHelper;
import org.w3c.dom.*;
import org.xml.sax.InputSource;
import org.xml.sax.SAXParseException;
import javax.xml.parsers.*;
import javax.xml.xpath.*;
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerFactory;
import java.io.StringWriter;
import java.io.StringReader;
import java.lang.Exception;
/**
*
* @author manuele simi
*
* @version 1.0 June 2006
*
* @link http://www.diligentproject.org
*
*/
public class MsgParser {
private Document internalDOM;
private String originalMsgString;
private String type; // the entry type (profile or generic resource
// properties)
private XPath path = XPathFactory.newInstance().newXPath(); // object to
// evaluate
// Xpath
// expressions
private final String rootElement = "Data";
private final String typeElement = "Type";
private static GCUBELog logger = new GCUBELog(MsgParser.class);
public MsgParser(AnyContentType deliveredMsg) throws Exception {
try {
this.originalMsgString = AnyHelper.toSingleString(deliveredMsg);
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
DocumentBuilder builder = factory.newDocumentBuilder();
StringReader reader = new StringReader("<" + rootElement + ">"
+ this.originalMsgString + "</" + rootElement + ">");
InputSource source = new InputSource(reader);
this.internalDOM = builder.parse(source);
// check if the message has been sent in push or pull mode
this.checkMsgType();
// gets the entry type
this.type = path.evaluate("//" + rootElement
+ "/child::*[local-name() = '" + typeElement + "']", internalDOM);
} catch (ParserConfigurationException pce) {
logger.error("", pce);
throw new Exception("Parser configuration error");
} catch (SAXParseException spe) {
logger.error("", spe);
throw new Exception(" SAX parser error");
} catch (XPathExpressionException xpee) {
logger.error("", xpee);
throw new Exception("XPath evaluation error");
}
}
/**
* Returns the entry type. It can be "Properties" or "Profile"
*
* @return the entry type
*/
public String getEntryType() {
return this.type;
}
/**
* Returns the entry type if the entry is a profile
*
* @throws Exception
*
* @return the entry type
*/
public String getResourceType() throws Exception {
if (this.type.equalsIgnoreCase("Profile")) {
logger.warn("The entry does not have a ResourceType");
throw new Exception("Invalid resource (type = Properties)");
}
return this.getDILIGENTProperty("DILIGENTResourceType");
}
/**
* Returns the VO Name included in the entry
*
* @throws Exception
*
* @return the VO name
*/
public String getVOName() throws Exception {
return this.getDILIGENTProperty("VO");
}
/**
* Returns the Service Name included in the entry
*
* @throws Exception
*
* @return the service name
*/
public String getServiceName() throws Exception {
return this.getDILIGENTProperty("ServiceName");
}
/**
* Returns the Service Class included in the entry
*
* @throws Exception
*
* @return the service class
*/
public String getServiceClass() throws Exception {
return this.getDILIGENTProperty("ServiceClass");
}
/**
* Returns the Running Instance ID included in the entry
*
* @throws Exception
*
* @return the ID
*/
public String getRunningInstanceID() throws Exception {
return this.getDILIGENTProperty("RunningInstanceID");
}
/**
* Returns the Service ID included in the entry
*
* @throws Exception
*
* @return the service ID
*/
public String getServiceID() throws Exception {
return this.getDILIGENTProperty("ServiceID");
}
/**
* Returns the DHN ID included in the entry
*
* @throws Exception
*
* @return the DHN ID
*/
public String getDHNID() throws Exception {
return this.getDILIGENTProperty("GHN");
}
/**
* Extracts a given DILIGENT Property
*
* @throws Exception
*
* @return the property value
*/
private String getDILIGENTProperty(String propName) throws Exception {
String value = null;
try {
value = path.evaluate("//" + rootElement
+ "/child::*[local-name() = '" + propName + "']",
internalDOM);
} catch (XPathExpressionException xpee) {
logger.error("", xpee);
throw new Exception("XPath evaluation error");
}
return value;
}
/**
* Returns a XML representation of the Entry
*
* @return the XML string
*/
public String getEntryAsString() {
return "<" + rootElement + ">\n" + this.originalMsgString + "</"
+ rootElement + ">\n";
// return XMLUtils.DocumentToString(this.internalDOM);
}
/**
* Releases the allocated resources
*
*/
public void dispose() {
// remove the allocated DOM
internalDOM = null;
}
/**
* Checks if the message has been sent by a WS-Notification In that case,
* the NewValue is extracted by the msg
*
*/
private void checkMsgType() throws Exception {
Boolean isPush = false;
String notificationXpath = "/child::*[local-name() = 'value']";
notificationXpath += "/child::*[local-name() = 'ResourcePropertyValueChangeNotification']";
notificationXpath += "/child::*[local-name() = 'NewValue']";
try {
isPush = (Boolean) path.evaluate("//" + rootElement + notificationXpath, this.internalDOM,
XPathConstants.BOOLEAN);
} catch (NullPointerException n) {
logger.trace("The delivered message has been sent using the pull mode");
return;
} catch (XPathExpressionException xpee) {
logger.error("", xpee);
}
if (isPush) {
// replace the originalMsgString and the internalDOM with the
// newValue section of the delivered message
logger.trace("The delivered message has been sent using the push mode");
// String nodeString = (String) path.evaluate(notificationXpath,
// this.internalDOM, XPathConstants.STRING);
Node node = (Node) path.evaluate("//" + rootElement
+ notificationXpath, this.internalDOM, XPathConstants.NODE);
Transformer serializer = TransformerFactory.newInstance().newTransformer();
StringWriter sw = new StringWriter();
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
DocumentBuilder domBuilder = factory.newDocumentBuilder();
// create the nre data string
NodeList children = node.getChildNodes();
this.originalMsgString = "";
if (children != null) {
for (int i = 0; i < children.getLength(); i++) {
serializer.transform(new DOMSource(children.item(i)),
new StreamResult(sw));
this.originalMsgString += sw.toString();
}
}
logger.trace("Data string " + this.originalMsgString);
// trim the directive <?xml... ?>
this.originalMsgString = this.originalMsgString.substring(this.originalMsgString.indexOf("?>", 1) + 1);
logger.trace("Trimmed data string " + this.originalMsgString);
// create the new internalDOM
StringReader reader = new StringReader("<" + rootElement + ">"
+ this.originalMsgString + "</" + rootElement + ">");
InputSource source = new InputSource(reader);
this.internalDOM = domBuilder.parse(source);
} else {
logger.info("The delivered message has been sent using the pull mode");
}
}
}

View File

@ -0,0 +1,127 @@
package org.gcube.informationsystem.collector.impl.xmlstorage.exist;
import org.gcube.informationsystem.collector.impl.contexts.ICServiceContext;
import org.gcube.informationsystem.collector.impl.persistence.AggregatorPersistentResource;
import org.globus.wsrf.config.ContainerConfig;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import java.util.ArrayList;
import java.util.Enumeration;
import java.util.List;
import java.util.Collections;
/**
* This class groups the data globally scoped in an active RI
*
* @author manuele simi
*
*/
public class State {
/**
* Connection to eXist used to store data
*/
public static XMLStorageManager storage_manager;
/**
* Connection to eXist used to query the database
*/
public static XMLStorageManager query_manager;
/**
* DIS-IC's JNDI resource name as declared in the JNDI file
*/
public static final String JNDIResourceName = "DISICConfiguration";
/**
* Prefix to prepend to any log message
*/
public static final String logPrefix = "";
/**
* Thread that periodically sweeps the database from expired resources
*/
public static Thread sweeperT;
/**
* List of recently deleted resources. It is used to avoid the storage of RPs of a deleted
* resource
*/
public static List<AggregatorPersistentResource> deletedResources = Collections.synchronizedList(new ArrayList<AggregatorPersistentResource>());
private static Log logger = LogFactory.getLog(State.class.getName());
/**
* Initializes the eXist DB connections using during the service life
*
* @param configuration
* the RI configuration loaded from the JNDI resource
* @throws Exception
* if the intialization fails
*/
public static void initialize() throws Exception {
logger.info("starting IC service initialization...");
State.initializeStorageManager();
State.initializeQueryManager();
if (Boolean.valueOf((String) ICServiceContext.getContext().getProperty("deleteRPsOnStartup", true))) {
// cleanup the RPs collection
logger.info("deleting all RPs...");
State.storage_manager.deleteAllProperties();
} else {
logger.info("all RPs previously stored are keept in the storage");
}
// start the sweeper to periodically cleanup the storage and some data structures
Sweeper sweeper = new Sweeper(Long.valueOf((String) ICServiceContext.getContext().getProperty("sweeperIntervalinMillis", true)), Long.valueOf((String) ICServiceContext.getContext()
.getProperty("resourceExpirationTimeInMillis", true)));
State.sweeperT = new Thread(sweeper);
State.sweeperT.start();
logger.info("IC service initialization completed");
}
private static void initializeStorageManager() throws Exception {
// open the connection used to store resources
State.storage_manager = new XMLStorageManager();
storage_manager.initialize();
}
private static void initializeQueryManager() throws Exception {
// open the connection used to query stored resources
State.query_manager = new XMLStorageManager();
query_manager.initialize();
}
/**
*
* @return the container base dir
*/
public static String getBaseDirectory() {
return ContainerConfig.getBaseDirectory();
}
/**
* Releases all the State resources
*
* @throws Exception if the shutdown fails
*/
public static void dispose() throws Exception {
logger.info("Disposing IC service's resources...");
State.storage_manager.shutdown();
State.query_manager.shutdown();
}
/**
* Prints the enviromnet variables
*/
public void printEnv() {
java.util.Properties p = System.getProperties();
Enumeration<Object> keys = p.keys();
while (keys.hasMoreElements()) {
logger.debug(keys.nextElement());
}
logger.debug("Exist home: " + System.getProperty("exist.home"));
logger.debug("Class path: " + System.getProperty("java.class.path"));
}
}

View File

@ -0,0 +1,157 @@
/**
*
*/
package org.gcube.informationsystem.collector.impl.xmlstorage.exist;
import java.lang.InterruptedException;
import java.util.GregorianCalendar;
import java.util.Calendar;
import java.util.TimeZone;
import java.util.ArrayList;
import java.util.List;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.gcube.informationsystem.collector.impl.persistence.PersistentResource;
import org.gcube.informationsystem.collector.impl.xmlstorage.exist.State;
import org.gcube.informationsystem.collector.impl.xmlstorage.exist.Sweeper;
import org.gcube.informationsystem.collector.impl.xmlstorage.exist.XMLStorageManager;
/**
* This class provides some cleanup procedures to use to maintain a consistent
* content in the XML storage One of them is a thread, activated at RI startup
* time, that periodically drops the out to date resources from the storage
*
* @author Manuele Simi (ISTI-CNR)
*
*/
public class Sweeper implements Runnable {
private static long DELAY = 180000; // default value
private static long resourceExpirationTime = 1800000; // default value
private static Log logger = LogFactory.getLog(Sweeper.class.getName());
private static XMLStorageManager storage = null;
/**
* Initializes a new Sweeper
*
* @param delay the sweeper delay
* @param resourceExpirationTime the time after that a resource is classified as exipired
* @throws Exception if the eXist connection fails
*/
public Sweeper(long delay, long resourceExpirationTime) throws Exception {
Sweeper.DELAY = delay;
Sweeper.resourceExpirationTime = resourceExpirationTime;
logger.info("Starting sweeper thread with an interval of " + Sweeper.DELAY + " ms");
Sweeper.storage = new XMLStorageManager();
Sweeper.storage.initialize();
}
/**
* {@inheritDoc}
*/
public void run() {
try {
while (!Thread.interrupted()) {
Thread.sleep(Sweeper.DELAY);
logger.info("Starting IC sweeper...");
this.cleanDeletedResourcesList();
this.cleanExpiredResources();
}
} catch (InterruptedException ie) {
// thread was interrupted
storage.shutdown();
}
}
/**
* Deletes from the backend storage the expired resources
*
*/
public void cleanExpiredResources() {
Calendar now = new GregorianCalendar();
now.setTimeZone(TimeZone.getTimeZone("GMT"));
try {
String[] ids = Sweeper.storage.listAllPropertiesIDs();
for (String id : ids) {
try {
PersistentResource res = Sweeper.storage
.retrievePropertyResourceFromID(id);
if (now.getTimeInMillis() - res.getLastUpdateTimeinMills() > Sweeper.resourceExpirationTime)
// removes the resources from the database
State.storage_manager
.retrieveAndDeleteResourceFromID(id);
// break;
} catch (Exception e) {
logger.debug(State.logPrefix
+ "DIS-IC sweeper - the resource " + id
+ " is no longer available in the storage");
}
}
} catch (Exception e2) {
logger
.warn(
State.logPrefix
+ "DIS-IC sweeper - an exception was rised when trying to cleanup the storage ",
e2);
}
}
/**
* Removes all the properties documents related to the given Running
* Instance ID
*
* @param id
* the ID of the Running Instance whose properties documents have
* to be removed
*/
public static void cleanResourceForRI(String id) {
// TO DO
}
/**
* Deletes the Properties collection from the storage
*
*/
public static void cleanRPs() {
// cleanup the RPs collection
State.storage_manager.deleteAllProperties();
}
/**
* Deletes the expired resources from the list of deleted resources as
* notified by the AF
*
*/
public void cleanDeletedResourcesList() {
Calendar now = new GregorianCalendar();
now.setTimeZone(TimeZone.getTimeZone("GMT"));
List<PersistentResource> toRemove = new ArrayList<PersistentResource>();
for (PersistentResource res : State.deletedResources) {
try {
if (now.getTimeInMillis() - res.getLastUpdateTimeinMills() > Sweeper.resourceExpirationTime) {
toRemove.add(res);
}
} catch (Exception e) {
logger.error(State.logPrefix, e);
}
}// end loop on deletedResources
synchronized (State.deletedResources) {
for (PersistentResource res : toRemove) {
State.deletedResources.remove(res);
}
}// end synch block
}
}

View File

@ -0,0 +1,626 @@
package org.gcube.informationsystem.collector.impl.xmlstorage.exist;
import org.xmldb.api.base.XMLDBException;
import org.xmldb.api.base.Collection;
import org.xmldb.api.base.Database;
import org.xmldb.api.base.ResourceSet;
import org.xmldb.api.DatabaseManager;
import org.xmldb.api.modules.XMLResource;
import org.xmldb.api.modules.CollectionManagementService;
import org.exist.xmldb.DatabaseInstanceManager;
import org.exist.storage.DBBroker;
import org.gcube.common.core.utils.logging.GCUBELog;
import org.gcube.informationsystem.collector.impl.persistence.AggregatorPersistentResource;
import org.gcube.informationsystem.collector.impl.persistence.PersistentResource;
import org.gcube.informationsystem.collector.impl.persistence.PersistentResource.RESOURCETYPE;
import org.gcube.informationsystem.collector.impl.xmlstorage.exist.XMLStorageManager;
import org.gcube.informationsystem.collector.impl.xmlstorage.exist.XQuery;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;
;
/**
* A thread safe manager to interact with the XML Storage repository.
*
* @author Manuele Simi (ISTI-CNR)
*
*/
public class XMLStorageManager {
protected static String URI = "xmldb:exist://";
protected static String driver = "org.exist.xmldb.DatabaseImpl";
private static GCUBELog logger = new GCUBELog(XMLStorageManager.class);
private Database database;
// private Collection currentCollection;
private Collection rootCollection;
private Collection profilesRootCollection;
// lock for write operations
private Lock writeLock;
// flag to warn when the DB is locked
private boolean locked = false;
private static final String PROPERTIES_COLLECTION_NAME = "Properties";
protected static String PROFILES_COLLECTION_NAME = "Profiles";
/**
* Creates a new manager
*
*/
public XMLStorageManager() {
logger.debug("Creating a new XMLStorageManager");
writeLock = new ReentrantLock();
}
/**
* Initializes the local XML Storage repository
*
* @throws Exception
* if the connection to eXist or its initialization fail
*/
public void initialize() throws Exception {
try {
logger.info("connecting to eXist DB...");
// this.printEnv();
// lock the instance
writeLock.lock();
// register/create the DB instance
Class<?> cl = Class.forName(driver);
this.database = (Database) cl.newInstance();
database.setProperty("create-database", "true");
DatabaseManager.registerDatabase(this.database);
// try to load the collections for props and profiles
logger.debug("Initializing the root collection");
this.rootCollection = DatabaseManager.getCollection(URI + DBBroker.ROOT_COLLECTION, "admin", "admin");
if (this.rootCollection == null) {
logger.error("invalid root collection!");
throw new Exception("unable to load root collection");
}
logger.debug("Initializing the collection Profiles");
this.profilesRootCollection = this.rootCollection.getChildCollection(XMLStorageManager.PROFILES_COLLECTION_NAME);
if (this.profilesRootCollection == null) {
logger.debug("Creating Profiles collection");
this.profilesRootCollection = this.createCollection(this.rootCollection, XMLStorageManager.PROFILES_COLLECTION_NAME);
logger.debug("Profiles collection created");
}
if (this.profilesRootCollection == null) {
throw new Exception("Unable to load/create Profiles collection");
}
this.rootCollection.setProperty("pretty", "true");
this.rootCollection.setProperty("encoding", "UTF-8");
this.profilesRootCollection.setProperty("pretty", "true");
this.profilesRootCollection.setProperty("encoding", "UTF-8");
} catch (XMLDBException edb) {
logger.error("unable to initialize XML storage ", edb);
throw new Exception("unable to initialize XML storage");
} catch (Exception e) {
logger.debug("unable to initialize XML storage ", e);
throw new Exception("unable to initialize XML storage");
} catch (java.lang.NoClassDefFoundError ncdfe) {
logger.debug("unable to initialize XML storage", ncdfe);
throw new Exception("unable to initialize XML storage");
} finally {
writeLock.unlock();
}
}
/**
* Shutdowns the XML Storage repository
*
* @return true if the operation succeed
*/
public boolean shutdown() {
writeLock.lock();
try {
DatabaseInstanceManager manager = (DatabaseInstanceManager) rootCollection.getService("DatabaseInstanceManager", "1.0");
manager.shutdown();
} catch (XMLDBException edb) {
logger.error("Unable to shutdown XML storage");
logger.error("" + edb.getCause());
} finally {
writeLock.unlock();
}
return true;
}
/**
* Loads a collection. If it does not exist, the collection is created.
*
* @param parentCollection
* the parent collection of the collection to load
* @param collectionName
* name of the collection to load
* @return the collection
*/
private Collection loadCollection(Collection parentCollection, String collectionName) {
// set the current collection
Collection currentCollection = null;
try {
currentCollection = parentCollection.getChildCollection(collectionName);
if (currentCollection == null) {
// the collection does not exist, it is created
logger.info("Creating a new collection " + collectionName + "...");
currentCollection = this.createCollection(parentCollection, collectionName);
}
currentCollection.setProperty("pretty", "true");
currentCollection.setProperty("encoding", "UTF-8");
} catch (XMLDBException edb) {
logger.error("failed to create collection " + collectionName + "!");
logger.error("" + edb.getCause());
}
return currentCollection;
}
/**
* Discards the current collection
*
*/
private void resetCollection(Collection currentCollection) {
try {
currentCollection.close();
} catch (XMLDBException edb) {
// Catch any issues with closing the exception.
logger.error("unable to close collection " + edb.getMessage());
}
currentCollection = null;
}
/**
* Loads the collection containing the WS-ResourceProperties documents. It must be used when
* quering/storing/updating WS-ResourceProperties documents
*
* @return the Collection
*/
public Collection loadPropertiesCollection() {
logger.debug("Loading collection Properties... ");
return this.loadCollection(this.rootCollection, XMLStorageManager.PROPERTIES_COLLECTION_NAME);
}
/**
* Loads from the children of the Profile Collection, the collection identified by the given
* name. It must be used when quering/storing/updating a particular kind of profile
*
* @param collectionName
* the child collection of the Profile collection to load
* @return the Collection
*/
public Collection loadProfileCollection(String collectionName) {
logger.debug("Loading collection " + collectionName + "... ");
return this.loadCollection(this.profilesRootCollection, collectionName);
}
/**
* Loads the parent collection of all collections containing resources profiles. It must be used
* when quering all the profiles at the same time
*
* @return the Collection
*/
public Collection loadAllProfilesCollection() {
logger.debug("Loading all profiles collection... ");
return this.loadCollection(this.rootCollection, XMLStorageManager.PROFILES_COLLECTION_NAME);
}
/**
* Loads the root collection. It must be used when quering all the information maintained by the
* DB instance at the same time
*
* @return the Collection
*/
public Collection loadAllCollections() {
Collection currentCollection = null;
logger.debug("Loading all collections... ");
// return this.loadCollection(this.rootCollection,
// XMLStorageManager.PROFILES_COLLECTION_NAME);
try {
currentCollection = DatabaseManager.getCollection(URI + DBBroker.ROOT_COLLECTION, "admin", "admin");
} catch (XMLDBException edb) {
logger.error("Failed to load all collections!");
logger.error("", edb);
}
return currentCollection;
}
/**
* Stores a AggregatorPersistentResource in the current collection. If the resource already
* exists in the storage, it is updated.
*
* @param resource
* the resource to store
* @throws Exception
* if the storing fails
*/
public void storeResource(PersistentResource resource) throws Exception {
Collection currentCollection = null;
if (resource.getType() == RESOURCETYPE.Profile) {
// the entry contains a gCube resource profile
currentCollection = this.loadProfileCollection(resource.getProfileType());
} else {
// the entry contains generic properties
currentCollection = this.loadPropertiesCollection();
}
if (currentCollection == null) {
logger.error("Unable to open the Collection");
return;
}
writeLock.lock();
this.locked = true;
try {
XMLResource document = (XMLResource) currentCollection.createResource(resource.getID(), "XMLResource");
document.setContent(resource.toString());
logger.debug("Storing/updating resource " + document.getId() + " in collection " + currentCollection.getName() + "...");
currentCollection.storeResource(document);
logger.debug("...done");
} catch (XMLDBException edb) {
logger.error("Failed to store resource " + resource.getID());
logger.error("" + edb.errorCode + " " + edb.getMessage(), edb);
} catch (Exception e) {
logger.error("" + e.getMessage(), e);
} finally {
this.resetCollection(currentCollection);
writeLock.unlock();
this.locked = false;
}
}
/**
*
* @return true if the connection to eXist is locked
*/
public boolean isLocked() {
return this.locked;
}
/**
* Retrieves a resource from the storage given its ID
*
* @param resourceID
* @return
* @throws Exception
*/
public AggregatorPersistentResource retrieveResourceFromID(String resourceID) throws Exception {
XMLResource res = null;
Collection currentCollection = this.loadAllCollections();
try {
res = (XMLResource) currentCollection.getResource(resourceID);
if (res == null)
logger.warn("Resource " + resourceID + " not found!");
} catch (XMLDBException edb) {
logger.error("Failed to retrieve document " + resourceID);
logger.error("" + edb.errorCode + " " + edb.getMessage(), edb);
throw new Exception();
}
return new AggregatorPersistentResource(res);
}
/**
* Retrieves a resource from the storage given its ID
*
* @param resourceID
* @return
* @throws Exception
*/
public AggregatorPersistentResource retrievePropertyResourceFromID(String resourceID) throws Exception {
XMLResource res = null;
Collection currentCollection = this.loadPropertiesCollection();
try {
res = (XMLResource) currentCollection.getResource(resourceID);
if (res == null)
logger.warn("Resource " + resourceID + " not found!");
} catch (XMLDBException edb) {
logger.error("Failed to retrieve document " + resourceID);
logger.error("" + edb.errorCode + " " + edb.getMessage(), edb);
throw new Exception();
}
return new AggregatorPersistentResource(res);
}
/**
*
* @param xpathquery
* @return
*/
public AggregatorPersistentResource executeXPathQuery(String xpathquery) {
AggregatorPersistentResource res = null;
// ArrayList<AggregatorPersistentResource> results = new
// ArrayList<AggregatorPersistentResource>();
/*
* try { // get query-service XPathQueryServiceImpl service = (XPathQueryServiceImpl)
* currentCollection.getService("XPathQueryService", "1.0"); // set pretty-printing on
* service.setProperty(OutputKeys.INDENT, "yes"); service.setProperty(OutputKeys.ENCODING,
* "UTF-8"); ResourceSet set = service.query(xpathquery); logger.debug("number of returned
* documents: " + set.getSize()); ResourceIterator i = set.getIterator();
* while(i.hasMoreResources()) { res = new AggregatorPersistentResource((XMLResource)
* i.nextResource()); System.out.println("DILIGENT resource " + i + " " + res.toString()); }
*
* for (int i = 0; i < (int) set.getSize(); i++) { res = new
* AggregatorPersistentResource((XMLResource) set.getResource((long) i));
* System.out.println("DILIGENT resource " + i + " " + res.toString()); } } catch
* (XMLDBException edb) { logger.error("failed to execute Xpath query " + xpathquery);
* edb.printStackTrace(); } catch (Exception e) { logger.error("exception " + xpathquery);
* logger.error(e.getStackTrace()); }
*/
return res;
}
/**
* Executes the given query on the current collection or on the root collection if any was
* previously loaded
*
* @param query
* - the query to run
* @return
*/
public ResourceSet executeXQuery(XQuery query) {
boolean retry = true;
int attempts = 0, max_attempts = 3;
ResourceSet result = null;
Collection currentCollection = null;
currentCollection = this.loadAllCollections();
while ((retry) && (attempts < max_attempts)) {
try {
// wait until the DB is unlocked
while (State.storage_manager.isLocked())
Thread.sleep(1000);
// execute query and get results in ResourceSet
if (currentCollection == null)
result = query.execute(this.rootCollection);
else
result = query.execute(currentCollection);
retry = false;
} catch (XMLDBException edb) {
logger.error("Failed to execute XQuery " + query.toString());
logger.error("Error details: " + edb.errorCode + " " + edb.getMessage(), edb);
// if the cause is a NullPointer, this can be due to a temporary
// lock on the database instance
if (edb.getCause() instanceof java.lang.NullPointerException) {
retry = true;
attempts++;
logger.warn("Trying a new attempt for query execution");
} else
retry = false;
} catch (Exception e) {
logger.error("", e);
// if the cause is a NullPointer, this can be due to a temporary
// lock on the database instance
if (e instanceof java.lang.NullPointerException) {
retry = true;
attempts++;
logger.warn("Trying a new attempt for query execution");
} else
retry = false;
}
}
this.resetCollection(currentCollection);
return result;
}
/**
* Deletes a WS-ResourceProperties resource identified by the given ID
*/
synchronized public void retrieveAndDeleteResourceFromID(String resourceID) throws Exception {
if (resourceID == null) {
logger.warn("Invalid resource ID");
return;
}
Collection propCollection = this.loadPropertiesCollection();
if (propCollection == null) {
logger.error("Unable to load collection Properties!");
throw new Exception();
}
try {
logger.info("Trying to remove resource " + resourceID + " from collection " + propCollection.getName());
deleteResource(resourceID, propCollection);
} catch (XMLDBException edb) {
logger.error("Failed to remove the resource from the storage! ");
logger.error("", edb);
throw new Exception();
} finally {
this.resetCollection(propCollection);
}
}
/**
* Deletes a Profile resource identified by the given ID
*/
synchronized public void retrieveAndDeleteProfileFromID(String profileID, String profileType) throws Exception {
if (profileID == null) {
logger.warn("Invalid profile ID");
return;
}
Collection profileCollection = this.loadProfileCollection(profileType);
if (profileCollection == null) {
logger.error("Uunable to load collection Profile!");
throw new Exception("unable to load collection Profile");
}
try {
logger.info("Trying to remove profile '" + profileID + "' from collection " + profileCollection.getName());
deleteResource(profileID, profileCollection);
} catch (XMLDBException edb) {
logger.error("Failed to remove the profile from the storage! ");
logger.error("", edb);
throw new Exception();
} finally {
this.resetCollection(profileCollection);
}
}
/**
* Deletes the resource with the given ID from the local storage
*
* @param resourceID
* - the ID of the resource
* @param col
* - the collection from which the resource has to be removed
* @throws Exception
*/
private void deleteResource(String resourceID, Collection col) throws Exception {
XMLResource res = null;
// lock the instance
this.writeLock.lock();
this.locked = true;
try {
res = (XMLResource) col.getResource(resourceID);
if (res == null)
logger.warn("Resource " + resourceID + " not found!");
else {
col.removeResource(res);
logger.info("Resource successfully removed");
}
} catch (XMLDBException edb) {
logger.error("Failed to retrieve resource " + resourceID);
logger.error("", edb);
throw new Exception();
} finally {
this.resetCollection(col);
this.writeLock.unlock();
this.locked = false;
}
}
/**
* Prints all the IDs of the Resources stored in the DB instance
*
*/
public void printResourcesIDs() {
String[] ress;
Collection currentCollection = null;
currentCollection = this.loadAllCollections();
try {
if (currentCollection == null) {
ress = this.rootCollection.listResources();
} else {
ress = currentCollection.listResources();
}
for (int i = 0; i < ress.length; i++) {
logger.debug("Resource ID:" + ress[i]);
}
} catch (XMLDBException edb) {
logger.error("Failed to read resource IDs ", edb);
} finally {
this.resetCollection(currentCollection);
}
}
/**
* Creates a new collection
*
* @param collectionName
* @return the create Collection object
*/
private Collection createCollection(Collection parentCollection, String collectionName) {
Collection col = null;
this.writeLock.lock();
try {
CollectionManagementService mgtService = (CollectionManagementService) parentCollection.getService("CollectionManagementService", "1.0");
col = mgtService.createCollection(collectionName);
} catch (XMLDBException edb) {
logger.error("Failed to create collection " + collectionName, edb);
} finally {
this.writeLock.unlock();
}
return col;
}
/**
* Delete the collection named PROPERTIES_COLLECTION_NAME from the storage
*/
public void deleteAllProperties() {
this.writeLock.lock();
try {
logger.info("Trying to delete the collection " + XMLStorageManager.PROPERTIES_COLLECTION_NAME + "...");
CollectionManagementService mgtService = (CollectionManagementService) rootCollection.getService("CollectionManagementService", "1.0");
mgtService.removeCollection(XMLStorageManager.PROPERTIES_COLLECTION_NAME);
logger.info("Collection deleted");
} catch (XMLDBException edb) {
logger.warn("Unable to delete the collection " + XMLStorageManager.PROPERTIES_COLLECTION_NAME + ": " + edb.toString());
} finally {
this.writeLock.unlock();
}
}
public String[] listAllPropertiesIDs() {
return listAllColletionIDs(this.loadPropertiesCollection());
}
private String[] listAllColletionIDs(Collection collection) {
String[] ids = null;
String collectionName = "";
try {
collectionName = collection.getName();
logger.debug("Retrieving all resource IDs from collection " + collectionName);
ids = new String[collection.getResourceCount()];
ids = collection.listResources();
logger.debug("Retrieved " + ids.length + " elements");
} catch (XMLDBException edb) {
logger.warn("Unable to retrieve ids from collection " + collectionName + " " + edb.toString());
}
return ids;
}
/**
* Loads a file content in a String
*
* @param file
* path and name of the file to read
* @return the file content
* @throws IOException
*/
protected static String readFile(String file) throws IOException {
BufferedReader f = new BufferedReader(new FileReader(file));
String line;
StringBuffer content = new StringBuffer();
while ((line = f.readLine()) != null)
content.append(line);
f.close();
return content.toString();
}
}

View File

@ -0,0 +1,129 @@
package org.gcube.informationsystem.collector.impl.xmlstorage.exist;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import javax.xml.transform.OutputKeys;
import org.exist.xmldb.XQueryService;
import org.xmldb.api.base.Collection;
import org.xmldb.api.base.CompiledExpression;
import org.xmldb.api.base.ResourceSet;
import org.gcube.informationsystem.collector.impl.xmlstorage.exist.State;
import org.gcube.informationsystem.collector.impl.xmlstorage.exist.XQuery;
import org.globus.wsrf.config.ContainerConfig;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
/**
* Reads an XQuery file or string and executes it.
*
*/
public class XQuery {
private String query_string = null;
private static Log logger = LogFactory.getLog(XQuery.class.getName());
//testsuite constructor: TO REMOVE
public XQuery() throws IOException {
try {
this.query_string = this.getStaticQuery();
} catch (Exception e) {
logger.error(State.logPrefix + "Unable to read the XQuery file");
throw new IOException("Unable to read the XQuery file "
+ e.getStackTrace()[0].toString());
}
}
public XQuery(String xquery) {
this.query_string = xquery;
}
public XQuery(FileReader file) throws IOException {
try {
this.query_string = this.readFile(file);
} catch (IOException ioe) {
logger.error(State.logPrefix + "Unable to read the XQuery file");
throw new IOException("Unable to read the XQuery file "
+ ioe.getStackTrace()[0].toString());
}
}
/**
* Returns the xquery string
*/
public String toString() {
return this.query_string;
}
/**
* Executes the query on the given base collection
*
* @param col
*/
public ResourceSet execute(Collection col) throws Exception {
logger.info(State.logPrefix + "executing query on collection " + col.getName());
XQueryService service = (XQueryService) col.getService("XQueryService", "1.0");
// set pretty-printing on
service.setProperty(OutputKeys.INDENT, "yes");
service.setProperty(OutputKeys.ENCODING, "UTF-8");
CompiledExpression compiled = service.compile(this.query_string);
long start = System.currentTimeMillis();
// execute query and get results in ResourceSet
ResourceSet result = service.execute(compiled);
long qtime = System.currentTimeMillis() - start;
start = System.currentTimeMillis();
/*Properties outputProperties = new Properties();
outputProperties.setProperty(OutputKeys.INDENT, "yes");
SAXSerializer serializer = (SAXSerializer) SerializerPool.getInstance().borrowObject(SAXSerializer.class);
serializer.setOutput(new OutputStreamWriter(System.out), outputProperties);
SerializerPool.getInstance().returnObject(serializer); */
//long rtime = System.currentTimeMillis() - start;
logger.info(State.logPrefix + "hits: " + result.getSize());
logger.info(State.logPrefix + "query time: " + qtime + "ms");
//logger.info(State.logPrefix + "retrieve time: " + rtime);
return result;
}
/**
* Reads the xquery file and return as string.
*/
protected String readFile(FileReader file) throws IOException {
BufferedReader f = new BufferedReader(file);
String line;
StringBuffer xml = new StringBuffer();
while ((line = f.readLine()) != null)
xml.append(line + " ");
f.close();
return xml.toString();
}
/**
* Retrives the query from a local file
*
* @return the query
*/
private String getStaticQuery() throws Exception {
String file = ContainerConfig.getBaseDirectory() + "/etc/org_diligentproject_informationservice_disic/query-example.xq";
return this.readFile(new FileReader(file));
}
}

View File

@ -0,0 +1,31 @@
<ServiceGroupRegistrationParameters
xmlns="http://mds.globus.org/servicegroup/client" >
<!-- Specifies that the registration will be renewed every 600
seconds (= 10 minutes) -->
<RefreshIntervalSecs>600</RefreshIntervalSecs>
<Content xsi:type="agg:AggregatorContent"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:agg="http://mds.globus.org/aggregator/types">
<agg:AggregatorConfig xsi:type="agg:AggregatorConfig">
<agg:GetResourcePropertyPollType
xmlns:wssg= "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ServiceGroup-1.2-draft-01.xsd" >
<!-- Specifies that information from the downstream indexes
should be updated every 5 minutes -->
<agg:PollIntervalMillis>300000</agg:PollIntervalMillis>
<!-- specified that the upstream index should collect the
Entry resource properties from this index -->
<agg:ResourcePropertyName>wssg:Entry</agg:ResourcePropertyName>
</agg:GetResourcePropertyPollType>
</agg:AggregatorConfig>
<agg:AggregatorData/>
</Content>
</ServiceGroupRegistrationParameters>

View File

@ -0,0 +1,105 @@
/**
*
*/
package org.gcube.informationsystem.collector.testsuite;
import java.net.URL;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import org.gcube.informationsystem.collector.stubs.DeleteProfileParams;
import org.gcube.informationsystem.collector.stubs.XMLCollectionAccessPortType;
import org.gcube.informationsystem.collector.stubs.holders.VoidTypeHolder;
import org.gcube.informationsystem.collector.stubs.service.XMLCollectionAccessServiceAddressingLocator;
/**
*
* DIS-IC client testsuite class
* <ol>
* <li> <b>to compile</b>: javac -classpath MYPATH/org_diligentproject_informationservice_disic_stubs.jar:$CLASSPATH testsuite/Client.java
*
* <li> <b>to run</b> (make sure that the DIS-IC stub classes are in your CLASSPATH):
* </ol>
* <ul>
* <li> DELETE ALL RPs: java -classpath MYPATH//org_diligentproject_informationservice_disic_stubs.jar:$CLASSPATH testsuite/Client deleteAllRPs http://MYHOST:MYPORT/wsrf/services/diligentproject/informationservice/disic/DISICService
*
* <li> DELETE A PROFILE: java -classpath MYPATH//org_diligentproject_informationservice_disic_stubs.jar:$CLASSPATH testsuite/Client deleteprofile http://MYHOST:MYPORT/wsrf/services/diligentproject/informationservice/disic/DISICService <PROFILE ID> <PROFILE TYPE>
* (allowed type are: "DHN", "RI", "SERVICE", "CS", "CSInstance", "Collection", "gLiteResource"
* <li> DELETE A RESOURCE: java -classpath MYPATH//lib/org_diligentproject_informationservice_disic_stubs.jar:$CLASSPATH testsuite/Client delete http://MYHOST:MYPORT/wsrf/services/diligentproject/informationservice/disic/DISICService <RESOURCE_ID>
*
* <li> SEND A QUERY: java -classpath ./build/lib/org_diligentproject_informationservice_disic_stubs.jar:$CLASSPATH testsuite/Client query http://MYHOST:MYPORT/wsrf/services/diligentproject/informationservice/disic/DISICService <xquery-file>
* </ul>
*
* @author manuele simi
*
* @version 1.0 July 2006
*
* @link http://www.diligentproject.com
*/
public class Client {
public Client() {
}
/**
*
* @param file the file that contains the query
* @return a String with the file content
* @throws IOException
*/
protected static String readFile(String file) throws IOException {
BufferedReader f = new BufferedReader(new FileReader(file));
String line;
StringBuffer xml = new StringBuffer();
while ((line = f.readLine()) != null)
xml.append(line + " ");
f.close();
return xml.toString();
}
/**
* @param args
* 0 - the URI of an active DIS-IC service 1 - the file that
* contains the query to execute
*/
public static void main(String[] args) {
XMLCollectionAccessServiceAddressingLocator locator = new XMLCollectionAccessServiceAddressingLocator();
String uri = args[1];
try {
URL dis_ic_url = new URL(uri);
XMLCollectionAccessPortType ic = locator.getXMLCollectionAccessPortTypePort(dis_ic_url);
if (args[0].equalsIgnoreCase("delete")) {
ic.deleteResource(args[2]);
}
if (args[0].equalsIgnoreCase("deleteAllRPs")) {
ic.deleteAllRPs(new VoidTypeHolder());
}
if (args[0].equalsIgnoreCase("deleteprofile")) {
DeleteProfileParams prof = new DeleteProfileParams();
prof.setID(args[2]);
prof.setProfileType(args[3]);
ic.deleteProfile(prof);
}
if (args[0].equalsIgnoreCase("query")) {
String query = Client.readFile(args[2]);
String resp = ic.executeXQuery(query);
System.out.println(resp);
}
if (args[0].equalsIgnoreCase("dispose")) {
ic.dispose(new VoidTypeHolder());
}
if (args[0].equalsIgnoreCase("initialize")) {
ic.initialize(new VoidTypeHolder());
}
} catch (Exception e) {
e.printStackTrace();
}
}// end main
}

View File

@ -0,0 +1,5 @@
<ServiceMap>
<Service name ="ISICAllQueryPT" endpoint ="http://node10.d.d4science.research-infrastructures.eu:8080/wsrf/services/gcube/informationsystem/collector/XMLCollectionAccess"/>
<Service name ="ISICAllRegistrationPT" endpoint ="http://node10.d.d4science.research-infrastructures.eu:8080/wsrf/services/gcube/informationsystem/collector/Sink"/>
<!-- <Service name ="ISRegistry" endpoint="http://node6.d.d4science.research-infrastructures.eu:8080/wsrf/services/gcube/informationsystem/registry/RegistryFactory" /> -->
</ServiceMap>

View File

@ -0,0 +1,3 @@
xquery version "1.0";
for $doc in collection("/db/Properties")//Document return $doc