From 103acc089e924df35756ae0bcae2014cfd4956eb Mon Sep 17 00:00:00 2001 From: Claudio Atzori Date: Tue, 4 Jun 2019 18:03:36 +0200 Subject: [PATCH] added dnet-information-serice, which embeds old cnr-xmldb, cnr-enabling-services --- dnet-core-components/pom.xml | 6 - dnet-information-service/pom.xml | 152 ++++ .../is/lookup/ISLookUpServiceImpl.java | 394 ++++++++++ ...pplicationProfileResourceKindResolver.java | 77 ++ .../CompatPendingResourceManagerImpl.java | 141 ++++ .../is/registry/ISRegistryServiceImpl.java | 595 +++++++++++++++ ...dPreservingPendingResourceManagerImpl.java | 209 +++++ .../NameBasedResourceKindResolver.java | 44 ++ .../NoSuchPendingCategoryException.java | 14 + .../is/registry/PendingResourceManager.java | 41 + .../registry/RegistryBlackboardManager.java | 43 ++ .../RegistryBlackboardManagerImpl.java | 257 +++++++ .../is/registry/ResourceKindResolver.java | 8 + .../registry/ResourceKindResolverChain.java | 62 ++ .../schema/OpaqueResourceValidatorImpl.java | 57 ++ ...PermissiveOpaqueResourceValidatorImpl.java | 36 + .../is/registry/schema/ResourceSchemaDAO.java | 21 + .../schema/ResourceSchemaDAOImpl.java | 65 ++ .../validation/AbstractProfileValidator.java | 24 + .../AlwaysAcceptProfileValidator.java | 34 + .../EnsurePropertyExistsProfileValidator.java | 38 + .../validation/ProfileValidationStrategy.java | 34 + .../registry/validation/ProfileValidator.java | 23 + .../validation/RegistrationPhase.java | 12 + .../validation/TypeAwareProfileValidator.java | 25 + .../is/sn/AbstractNotificationDetector.java | 30 + .../is/sn/AbstractNotificationSender.java | 30 + .../is/sn/AbstractSubscriptionRegistry.java | 53 ++ .../AsynchronousNotificationSenderImpl.java | 119 +++ .../enabling/is/sn/DnetPathVerifier.java | 23 + .../eu/dnetlib/enabling/is/sn/EPRUtil.java | 65 ++ .../enabling/is/sn/ISSNServiceCore.java | 180 +++++ .../enabling/is/sn/ISSNServiceImpl.java | 203 +++++ .../MemoryNotificationInvocationLogger.java | 263 +++++++ .../enabling/is/sn/NotificationDetector.java | 17 + .../is/sn/NotificationDetectorImpl.java | 217 ++++++ .../is/sn/NotificationInvocationLogger.java | 142 ++++ .../enabling/is/sn/NotificationInvoker.java | 26 + .../is/sn/NotificationInvokerImpl.java | 61 ++ .../enabling/is/sn/NotificationMessage.java | 85 +++ .../enabling/is/sn/NotificationSender.java | 37 + .../is/sn/NotificationTriggerImpl.java | 80 ++ .../enabling/is/sn/SubscriptionDAO.java | 56 ++ .../enabling/is/sn/SubscriptionRegistry.java | 84 ++ .../enabling/is/sn/SubscriptionRequest.java | 88 +++ .../sn/SynchronousNotificationSenderImpl.java | 40 + .../enabling/is/sn/TestISSNServiceImpl.java | 40 + .../is/sn/TopicExpressionMatchResult.java | 46 ++ ...sourceStateNotificationDetectorFilter.java | 83 ++ ...sourceStateNotificationDetectorFilter.java | 39 + ...emoryResourceStateSubscriptionDAOImpl.java | 132 ++++ ...sourceStateNotificationDetectorFilter.java | 24 + .../ResourceStateNotificationDetector.java | 39 + .../ResourceStateSubscription.java | 225 ++++++ .../ResourceStateSubscriptionDAO.java | 24 + .../ResourceStateSubscriptionRegistry.java | 233 ++++++ .../SubscriptionRequestFilter.java | 43 ++ .../hib/EndpointReferenceType.java | 151 ++++ ...rnateResourceStateSubscriptionDAOImpl.java | 137 ++++ .../enabling/is/store/ISStoreServiceImpl.java | 323 ++++++++ .../is/store/TestContentInitializerJob.java | 180 +++++ .../dnetlib/enabling/is/store/xquery/dnet.xqm | 10 + .../CompatResourceIdentifierResolverImpl.java | 46 ++ .../enabling/tools/LogInterceptor.java | 27 + .../tools/ResourceIdentifierComposer.java | 18 + .../dnetlib/enabling/tools/ResourceType.java | 161 ++++ .../enabling/tools/XQueryUtilsImpl.java | 52 ++ .../dnetlib/xml/database/AbstractTrigger.java | 27 + .../dnetlib/xml/database/LoggingTrigger.java | 46 ++ .../java/eu/dnetlib/xml/database/Trigger.java | 56 ++ .../eu/dnetlib/xml/database/XMLDatabase.java | 175 +++++ .../database/exist/DelegatingDiffTrigger.java | 197 +++++ .../dnetlib/xml/database/exist/EventType.java | 10 + .../xml/database/exist/ExistDOMConverter.java | 82 ++ .../xml/database/exist/ExistDatabase.java | 635 ++++++++++++++++ .../database/exist/ExistTriggerRegistry.java | 72 ++ .../database/exist/ExistsTriggerEvent.java | 60 ++ .../exist/PersistentExistDatabase.java | 207 +++++ .../exist/TemporaryExistDatabase.java | 106 +++ .../org/hibernate/dialect/SQLiteDialect.java | 264 +++++++ .../dnetlib/applicationContext-services.xml | 54 ++ .../is/lookup/applicationContext-islookup.xml | 29 + ...IVERInformationSpaceApplicationProfile.xml | 245 ++++++ .../applicationContext-isregistry.properties | 2 + .../applicationContext-isregistry.xml | 75 ++ .../is/sn/applicationContext-issn.properties | 19 + .../is/sn/applicationContext-issn.xml | 86 +++ .../hib/applicationContext-issn-hib.xml | 54 ++ .../applicationContext-isstore.properties | 2 + .../is/store/applicationContext-isstore.xml | 116 +++ .../dnetlib/enabling/is/store/xquery/dnet.xqm | 10 + .../tools/applicationContext-tools.xml | 14 + .../xml/database/exist/default-exist-conf.xml | 85 +++ .../is/lookup/ISLookUpServiceImplTest.java | 145 ++++ ...cationProfileResourceKindResolverTest.java | 29 + .../CompatPendingResourceManagerImplTest.java | 149 ++++ .../registry/ISRegistryServiceImplTest.java | 489 ++++++++++++ .../NameBasedResourceKindResolverTest.java | 41 + .../RegistryBlackboardManagerImplTest.java | 293 +++++++ .../ResourceKindResolverChainTest.java | 36 + .../OpaqueResourceValidatorImplTest.java | 96 +++ .../schema/ResourceSchemaDAOImplTest.java | 70 ++ .../sn/AbstractSubscriptionRegistryTest.java | 75 ++ ...emoryNotificationInvocationLoggerTest.java | 114 +++ .../is/sn/NotificationDetectorImplTest.java | 185 +++++ .../is/sn/NotificationTriggerImplTest.java | 159 ++++ ...tResourceStateSubscriptionDAOImplTest.java | 263 +++++++ ...ResourceStateSubscriptionRegistryTest.java | 165 ++++ ...yResourceStateSubscriptionDAOImplTest.java | 51 ++ ...ResourceStateSubscriptionRegistryTest.java | 22 + ...ResourceStateSubscriptionRegistryTest.java | 179 +++++ ...eResourceStateSubscriptionDAOImplTest.java | 106 +++ ...ResourceStateSubscriptionRegistryTest.java | 53 ++ .../is/store/ISStoreServiceImplTest.java | 70 ++ .../enabling/is/store/ISStoreServiceTest.java | 266 +++++++ ...patResourceIdentifierResolverImplTest.java | 51 ++ .../enabling/tools/DOMOpaqueResourceTest.java | 122 +++ .../tools/JaxwsServiceResolverImplTest.java | 122 +++ .../blackboard/BlackboardMessageImplTest.java | 62 ++ .../InterfaceServiceNameGeneratorTest.java | 84 ++ ...eServiceNameResolverCompatibilityTest.java | 56 ++ .../ServiceRegistrationManagerImplTest.java | 93 +++ .../registration/ServiceRegistratorTest.java | 148 ++++ ...ingServiceRegistrationManagerImplTest.java | 121 +++ .../eu/dnetlib/test/SpringContextSharer.java | 42 + .../eu/dnetlib/test/utils/EPRTestUtil.java | 0 .../dnetlib/test/utils/MockBeanFactory.java | 55 ++ .../exist/DOMConverterTestTrigger.java | 83 ++ .../database/exist/ExistDOMConverterTest.java | 141 ++++ .../xml/database/exist/ExistDatabaseTest.java | 715 ++++++++++++++++++ .../exist/PersistentExistDatabaseTest.java | 46 ++ .../xml/database/exist/TestExistTrigger.java | 126 +++ .../xml/database/exist/TestTrigger.java | 124 +++ .../enabling/is/lookup/collProfile.xml | 36 + .../RepositoryServiceResourceType.xsd | 2 + .../is/registry/schema/any-schema.xsd | 166 ++++ .../is/registry/schema/invalid-profile.xml | 2 + .../enabling/is/registry/schema/schema.xsd | 2 + .../is/registry/schema/valid-any-optional.xml | 38 + .../is/registry/schema/valid-profile.xml | 2 + .../enabling/is/registry/securityProfile.xml | 27 + .../enabling/is/registry/serviceProfile.xml | 38 + .../is/registry/serviceProfileWithMessage.xml | 39 + .../enabling/is/registry/test-profile.xml | 154 ++++ .../enabling/is/registry/userProfile.xml | 34 + ...ceStateSubscriptionDAOImplTest-context.xml | 36 + .../is/sn/resourcestate/hib/hsql-context.xml | 45 ++ .../eu/dnetlib/enabling/tools/local-cxf.xml | 22 + .../dnetlib/enabling/tools/test-profile.xml | 154 ++++ .../applicationContext-integrationSupport.xml | 8 + .../eu/dnetlib/test/repositories/repo1.xml | 2 + .../eu/dnetlib/test/repositories/repo10.xml | 2 + .../eu/dnetlib/test/repositories/repo100.xml | 2 + .../eu/dnetlib/test/repositories/repo101.xml | 2 + .../eu/dnetlib/test/repositories/repo102.xml | 2 + .../eu/dnetlib/test/repositories/repo103.xml | 2 + .../eu/dnetlib/test/repositories/repo104.xml | 2 + .../eu/dnetlib/test/repositories/repo105.xml | 2 + .../eu/dnetlib/test/repositories/repo106.xml | 2 + .../eu/dnetlib/test/repositories/repo107.xml | 2 + .../eu/dnetlib/test/repositories/repo108.xml | 2 + .../eu/dnetlib/test/repositories/repo109.xml | 2 + .../eu/dnetlib/test/repositories/repo11.xml | 2 + .../eu/dnetlib/test/repositories/repo110.xml | 2 + .../eu/dnetlib/test/repositories/repo111.xml | 2 + .../eu/dnetlib/test/repositories/repo112.xml | 2 + .../eu/dnetlib/test/repositories/repo113.xml | 2 + .../eu/dnetlib/test/repositories/repo114.xml | 2 + .../eu/dnetlib/test/repositories/repo115.xml | 3 + .../eu/dnetlib/test/repositories/repo116.xml | 2 + .../eu/dnetlib/test/repositories/repo117.xml | 2 + .../eu/dnetlib/test/repositories/repo118.xml | 2 + .../eu/dnetlib/test/repositories/repo119.xml | 2 + .../eu/dnetlib/test/repositories/repo12.xml | 2 + .../eu/dnetlib/test/repositories/repo120.xml | 3 + .../eu/dnetlib/test/repositories/repo121.xml | 2 + .../eu/dnetlib/test/repositories/repo122.xml | 2 + .../eu/dnetlib/test/repositories/repo123.xml | 2 + .../eu/dnetlib/test/repositories/repo124.xml | 2 + .../eu/dnetlib/test/repositories/repo125.xml | 2 + .../eu/dnetlib/test/repositories/repo126.xml | 2 + .../eu/dnetlib/test/repositories/repo127.xml | 2 + .../eu/dnetlib/test/repositories/repo128.xml | 2 + .../eu/dnetlib/test/repositories/repo129.xml | 2 + .../eu/dnetlib/test/repositories/repo13.xml | 2 + .../eu/dnetlib/test/repositories/repo130.xml | 2 + .../eu/dnetlib/test/repositories/repo131.xml | 2 + .../eu/dnetlib/test/repositories/repo132.xml | 2 + .../eu/dnetlib/test/repositories/repo133.xml | 2 + .../eu/dnetlib/test/repositories/repo134.xml | 2 + .../eu/dnetlib/test/repositories/repo135.xml | 2 + .../eu/dnetlib/test/repositories/repo136.xml | 2 + .../eu/dnetlib/test/repositories/repo137.xml | 2 + .../eu/dnetlib/test/repositories/repo138.xml | 2 + .../eu/dnetlib/test/repositories/repo139.xml | 2 + .../eu/dnetlib/test/repositories/repo14.xml | 2 + .../eu/dnetlib/test/repositories/repo140.xml | 2 + .../eu/dnetlib/test/repositories/repo141.xml | 2 + .../eu/dnetlib/test/repositories/repo142.xml | 2 + .../eu/dnetlib/test/repositories/repo143.xml | 2 + .../eu/dnetlib/test/repositories/repo144.xml | 2 + .../eu/dnetlib/test/repositories/repo145.xml | 2 + .../eu/dnetlib/test/repositories/repo146.xml | 2 + .../eu/dnetlib/test/repositories/repo147.xml | 2 + .../eu/dnetlib/test/repositories/repo148.xml | 2 + .../eu/dnetlib/test/repositories/repo149.xml | 2 + .../eu/dnetlib/test/repositories/repo15.xml | 2 + .../eu/dnetlib/test/repositories/repo150.xml | 2 + .../eu/dnetlib/test/repositories/repo151.xml | 2 + .../eu/dnetlib/test/repositories/repo152.xml | 2 + .../eu/dnetlib/test/repositories/repo153.xml | 2 + .../eu/dnetlib/test/repositories/repo154.xml | 2 + .../eu/dnetlib/test/repositories/repo155.xml | 2 + .../eu/dnetlib/test/repositories/repo156.xml | 2 + .../eu/dnetlib/test/repositories/repo157.xml | 2 + .../eu/dnetlib/test/repositories/repo158.xml | 2 + .../eu/dnetlib/test/repositories/repo159.xml | 2 + .../eu/dnetlib/test/repositories/repo16.xml | 2 + .../eu/dnetlib/test/repositories/repo160.xml | 2 + .../eu/dnetlib/test/repositories/repo161.xml | 2 + .../eu/dnetlib/test/repositories/repo162.xml | 2 + .../eu/dnetlib/test/repositories/repo163.xml | 2 + .../eu/dnetlib/test/repositories/repo164.xml | 2 + .../eu/dnetlib/test/repositories/repo165.xml | 2 + .../eu/dnetlib/test/repositories/repo166.xml | 2 + .../eu/dnetlib/test/repositories/repo167.xml | 2 + .../eu/dnetlib/test/repositories/repo168.xml | 2 + .../eu/dnetlib/test/repositories/repo169.xml | 2 + .../eu/dnetlib/test/repositories/repo17.xml | 2 + .../eu/dnetlib/test/repositories/repo170.xml | 2 + .../eu/dnetlib/test/repositories/repo171.xml | 2 + .../eu/dnetlib/test/repositories/repo172.xml | 2 + .../eu/dnetlib/test/repositories/repo173.xml | 2 + .../eu/dnetlib/test/repositories/repo174.xml | 2 + .../eu/dnetlib/test/repositories/repo175.xml | 2 + .../eu/dnetlib/test/repositories/repo176.xml | 2 + .../eu/dnetlib/test/repositories/repo177.xml | 2 + .../eu/dnetlib/test/repositories/repo178.xml | 2 + .../eu/dnetlib/test/repositories/repo179.xml | 2 + .../eu/dnetlib/test/repositories/repo18.xml | 2 + .../eu/dnetlib/test/repositories/repo180.xml | 2 + .../eu/dnetlib/test/repositories/repo19.xml | 2 + .../eu/dnetlib/test/repositories/repo2.xml | 2 + .../eu/dnetlib/test/repositories/repo20.xml | 2 + .../eu/dnetlib/test/repositories/repo21.xml | 2 + .../eu/dnetlib/test/repositories/repo22.xml | 2 + .../eu/dnetlib/test/repositories/repo23.xml | 2 + .../eu/dnetlib/test/repositories/repo24.xml | 2 + .../eu/dnetlib/test/repositories/repo25.xml | 2 + .../eu/dnetlib/test/repositories/repo26.xml | 2 + .../eu/dnetlib/test/repositories/repo27.xml | 2 + .../eu/dnetlib/test/repositories/repo28.xml | 2 + .../eu/dnetlib/test/repositories/repo29.xml | 2 + .../eu/dnetlib/test/repositories/repo3.xml | 3 + .../eu/dnetlib/test/repositories/repo30.xml | 2 + .../eu/dnetlib/test/repositories/repo31.xml | 2 + .../eu/dnetlib/test/repositories/repo32.xml | 2 + .../eu/dnetlib/test/repositories/repo33.xml | 2 + .../eu/dnetlib/test/repositories/repo34.xml | 2 + .../eu/dnetlib/test/repositories/repo35.xml | 2 + .../eu/dnetlib/test/repositories/repo36.xml | 2 + .../eu/dnetlib/test/repositories/repo37.xml | 2 + .../eu/dnetlib/test/repositories/repo38.xml | 2 + .../eu/dnetlib/test/repositories/repo39.xml | 2 + .../eu/dnetlib/test/repositories/repo4.xml | 2 + .../eu/dnetlib/test/repositories/repo40.xml | 2 + .../eu/dnetlib/test/repositories/repo41.xml | 2 + .../eu/dnetlib/test/repositories/repo42.xml | 2 + .../eu/dnetlib/test/repositories/repo43.xml | 2 + .../eu/dnetlib/test/repositories/repo44.xml | 2 + .../eu/dnetlib/test/repositories/repo45.xml | 2 + .../eu/dnetlib/test/repositories/repo46.xml | 2 + .../eu/dnetlib/test/repositories/repo47.xml | 2 + .../eu/dnetlib/test/repositories/repo48.xml | 2 + .../eu/dnetlib/test/repositories/repo49.xml | 3 + .../eu/dnetlib/test/repositories/repo5.xml | 2 + .../eu/dnetlib/test/repositories/repo50.xml | 2 + .../eu/dnetlib/test/repositories/repo51.xml | 2 + .../eu/dnetlib/test/repositories/repo52.xml | 2 + .../eu/dnetlib/test/repositories/repo53.xml | 2 + .../eu/dnetlib/test/repositories/repo54.xml | 2 + .../eu/dnetlib/test/repositories/repo55.xml | 2 + .../eu/dnetlib/test/repositories/repo56.xml | 2 + .../eu/dnetlib/test/repositories/repo57.xml | 2 + .../eu/dnetlib/test/repositories/repo58.xml | 2 + .../eu/dnetlib/test/repositories/repo59.xml | 2 + .../eu/dnetlib/test/repositories/repo6.xml | 2 + .../eu/dnetlib/test/repositories/repo60.xml | 2 + .../eu/dnetlib/test/repositories/repo61.xml | 2 + .../eu/dnetlib/test/repositories/repo62.xml | 2 + .../eu/dnetlib/test/repositories/repo63.xml | 2 + .../eu/dnetlib/test/repositories/repo64.xml | 2 + .../eu/dnetlib/test/repositories/repo65.xml | 2 + .../eu/dnetlib/test/repositories/repo66.xml | 2 + .../eu/dnetlib/test/repositories/repo67.xml | 2 + .../eu/dnetlib/test/repositories/repo68.xml | 2 + .../eu/dnetlib/test/repositories/repo69.xml | 2 + .../eu/dnetlib/test/repositories/repo7.xml | 2 + .../eu/dnetlib/test/repositories/repo70.xml | 2 + .../eu/dnetlib/test/repositories/repo71.xml | 2 + .../eu/dnetlib/test/repositories/repo72.xml | 2 + .../eu/dnetlib/test/repositories/repo73.xml | 2 + .../eu/dnetlib/test/repositories/repo74.xml | 2 + .../eu/dnetlib/test/repositories/repo75.xml | 2 + .../eu/dnetlib/test/repositories/repo76.xml | 2 + .../eu/dnetlib/test/repositories/repo77.xml | 2 + .../eu/dnetlib/test/repositories/repo78.xml | 2 + .../eu/dnetlib/test/repositories/repo79.xml | 2 + .../eu/dnetlib/test/repositories/repo8.xml | 2 + .../eu/dnetlib/test/repositories/repo80.xml | 2 + .../eu/dnetlib/test/repositories/repo81.xml | 2 + .../eu/dnetlib/test/repositories/repo82.xml | 2 + .../eu/dnetlib/test/repositories/repo83.xml | 2 + .../eu/dnetlib/test/repositories/repo84.xml | 2 + .../eu/dnetlib/test/repositories/repo85.xml | 2 + .../eu/dnetlib/test/repositories/repo86.xml | 2 + .../eu/dnetlib/test/repositories/repo87.xml | 2 + .../eu/dnetlib/test/repositories/repo88.xml | 2 + .../eu/dnetlib/test/repositories/repo89.xml | 2 + .../eu/dnetlib/test/repositories/repo9.xml | 2 + .../eu/dnetlib/test/repositories/repo90.xml | 2 + .../eu/dnetlib/test/repositories/repo91.xml | 2 + .../eu/dnetlib/test/repositories/repo92.xml | 2 + .../eu/dnetlib/test/repositories/repo93.xml | 2 + .../eu/dnetlib/test/repositories/repo94.xml | 2 + .../eu/dnetlib/test/repositories/repo95.xml | 2 + .../eu/dnetlib/test/repositories/repo96.xml | 2 + .../eu/dnetlib/test/repositories/repo97.xml | 2 + .../eu/dnetlib/test/repositories/repo98.xml | 2 + .../eu/dnetlib/test/repositories/repo99.xml | 2 + .../xml/database/exist/exist-test-conf.xml | 84 ++ .../exist/userProfileResourceSchema.xsd | 182 +++++ .../exist/userProfileResourceSchemaClean.xsd | 180 +++++ pom.xml | 203 ++++- 334 files changed, 16114 insertions(+), 23 deletions(-) create mode 100644 dnet-information-service/pom.xml create mode 100644 dnet-information-service/src/main/java/eu/dnetlib/enabling/is/lookup/ISLookUpServiceImpl.java create mode 100644 dnet-information-service/src/main/java/eu/dnetlib/enabling/is/registry/ApplicationProfileResourceKindResolver.java create mode 100644 dnet-information-service/src/main/java/eu/dnetlib/enabling/is/registry/CompatPendingResourceManagerImpl.java create mode 100644 dnet-information-service/src/main/java/eu/dnetlib/enabling/is/registry/ISRegistryServiceImpl.java create mode 100644 dnet-information-service/src/main/java/eu/dnetlib/enabling/is/registry/IdPreservingPendingResourceManagerImpl.java create mode 100644 dnet-information-service/src/main/java/eu/dnetlib/enabling/is/registry/NameBasedResourceKindResolver.java create mode 100644 dnet-information-service/src/main/java/eu/dnetlib/enabling/is/registry/NoSuchPendingCategoryException.java create mode 100644 dnet-information-service/src/main/java/eu/dnetlib/enabling/is/registry/PendingResourceManager.java create mode 100644 dnet-information-service/src/main/java/eu/dnetlib/enabling/is/registry/RegistryBlackboardManager.java create mode 100644 dnet-information-service/src/main/java/eu/dnetlib/enabling/is/registry/RegistryBlackboardManagerImpl.java create mode 100644 dnet-information-service/src/main/java/eu/dnetlib/enabling/is/registry/ResourceKindResolver.java create mode 100644 dnet-information-service/src/main/java/eu/dnetlib/enabling/is/registry/ResourceKindResolverChain.java create mode 100644 dnet-information-service/src/main/java/eu/dnetlib/enabling/is/registry/schema/OpaqueResourceValidatorImpl.java create mode 100644 dnet-information-service/src/main/java/eu/dnetlib/enabling/is/registry/schema/PermissiveOpaqueResourceValidatorImpl.java create mode 100644 dnet-information-service/src/main/java/eu/dnetlib/enabling/is/registry/schema/ResourceSchemaDAO.java create mode 100644 dnet-information-service/src/main/java/eu/dnetlib/enabling/is/registry/schema/ResourceSchemaDAOImpl.java create mode 100644 dnet-information-service/src/main/java/eu/dnetlib/enabling/is/registry/validation/AbstractProfileValidator.java create mode 100644 dnet-information-service/src/main/java/eu/dnetlib/enabling/is/registry/validation/AlwaysAcceptProfileValidator.java create mode 100644 dnet-information-service/src/main/java/eu/dnetlib/enabling/is/registry/validation/EnsurePropertyExistsProfileValidator.java create mode 100644 dnet-information-service/src/main/java/eu/dnetlib/enabling/is/registry/validation/ProfileValidationStrategy.java create mode 100644 dnet-information-service/src/main/java/eu/dnetlib/enabling/is/registry/validation/ProfileValidator.java create mode 100644 dnet-information-service/src/main/java/eu/dnetlib/enabling/is/registry/validation/RegistrationPhase.java create mode 100644 dnet-information-service/src/main/java/eu/dnetlib/enabling/is/registry/validation/TypeAwareProfileValidator.java create mode 100644 dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/AbstractNotificationDetector.java create mode 100644 dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/AbstractNotificationSender.java create mode 100644 dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/AbstractSubscriptionRegistry.java create mode 100644 dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/AsynchronousNotificationSenderImpl.java create mode 100644 dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/DnetPathVerifier.java create mode 100644 dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/EPRUtil.java create mode 100644 dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/ISSNServiceCore.java create mode 100644 dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/ISSNServiceImpl.java create mode 100644 dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/MemoryNotificationInvocationLogger.java create mode 100644 dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/NotificationDetector.java create mode 100644 dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/NotificationDetectorImpl.java create mode 100644 dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/NotificationInvocationLogger.java create mode 100644 dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/NotificationInvoker.java create mode 100644 dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/NotificationInvokerImpl.java create mode 100644 dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/NotificationMessage.java create mode 100644 dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/NotificationSender.java create mode 100644 dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/NotificationTriggerImpl.java create mode 100644 dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/SubscriptionDAO.java create mode 100644 dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/SubscriptionRegistry.java create mode 100644 dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/SubscriptionRequest.java create mode 100644 dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/SynchronousNotificationSenderImpl.java create mode 100644 dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/TestISSNServiceImpl.java create mode 100644 dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/TopicExpressionMatchResult.java create mode 100644 dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/resourcestate/AbstractResourceStateNotificationDetectorFilter.java create mode 100644 dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/resourcestate/ConditionalResourceStateNotificationDetectorFilter.java create mode 100644 dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/resourcestate/MemoryResourceStateSubscriptionDAOImpl.java create mode 100644 dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/resourcestate/PendingResourceStateNotificationDetectorFilter.java create mode 100644 dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/resourcestate/ResourceStateNotificationDetector.java create mode 100644 dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/resourcestate/ResourceStateSubscription.java create mode 100644 dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/resourcestate/ResourceStateSubscriptionDAO.java create mode 100644 dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/resourcestate/ResourceStateSubscriptionRegistry.java create mode 100644 dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/resourcestate/SubscriptionRequestFilter.java create mode 100644 dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/resourcestate/hib/EndpointReferenceType.java create mode 100644 dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/resourcestate/hib/HibernateResourceStateSubscriptionDAOImpl.java create mode 100644 dnet-information-service/src/main/java/eu/dnetlib/enabling/is/store/ISStoreServiceImpl.java create mode 100644 dnet-information-service/src/main/java/eu/dnetlib/enabling/is/store/TestContentInitializerJob.java create mode 100644 dnet-information-service/src/main/java/eu/dnetlib/enabling/is/store/xquery/dnet.xqm create mode 100644 dnet-information-service/src/main/java/eu/dnetlib/enabling/tools/CompatResourceIdentifierResolverImpl.java create mode 100644 dnet-information-service/src/main/java/eu/dnetlib/enabling/tools/LogInterceptor.java create mode 100644 dnet-information-service/src/main/java/eu/dnetlib/enabling/tools/ResourceIdentifierComposer.java create mode 100644 dnet-information-service/src/main/java/eu/dnetlib/enabling/tools/ResourceType.java create mode 100644 dnet-information-service/src/main/java/eu/dnetlib/enabling/tools/XQueryUtilsImpl.java create mode 100644 dnet-information-service/src/main/java/eu/dnetlib/xml/database/AbstractTrigger.java create mode 100644 dnet-information-service/src/main/java/eu/dnetlib/xml/database/LoggingTrigger.java create mode 100644 dnet-information-service/src/main/java/eu/dnetlib/xml/database/Trigger.java create mode 100644 dnet-information-service/src/main/java/eu/dnetlib/xml/database/XMLDatabase.java create mode 100644 dnet-information-service/src/main/java/eu/dnetlib/xml/database/exist/DelegatingDiffTrigger.java create mode 100644 dnet-information-service/src/main/java/eu/dnetlib/xml/database/exist/EventType.java create mode 100644 dnet-information-service/src/main/java/eu/dnetlib/xml/database/exist/ExistDOMConverter.java create mode 100644 dnet-information-service/src/main/java/eu/dnetlib/xml/database/exist/ExistDatabase.java create mode 100644 dnet-information-service/src/main/java/eu/dnetlib/xml/database/exist/ExistTriggerRegistry.java create mode 100644 dnet-information-service/src/main/java/eu/dnetlib/xml/database/exist/ExistsTriggerEvent.java create mode 100644 dnet-information-service/src/main/java/eu/dnetlib/xml/database/exist/PersistentExistDatabase.java create mode 100644 dnet-information-service/src/main/java/eu/dnetlib/xml/database/exist/TemporaryExistDatabase.java create mode 100644 dnet-information-service/src/main/java/org/hibernate/dialect/SQLiteDialect.java create mode 100644 dnet-information-service/src/main/resources/eu/dnetlib/applicationContext-services.xml create mode 100644 dnet-information-service/src/main/resources/eu/dnetlib/enabling/is/lookup/applicationContext-islookup.xml create mode 100644 dnet-information-service/src/main/resources/eu/dnetlib/enabling/is/registry/DRIVERInformationSpaceApplicationProfile.xml create mode 100644 dnet-information-service/src/main/resources/eu/dnetlib/enabling/is/registry/applicationContext-isregistry.properties create mode 100644 dnet-information-service/src/main/resources/eu/dnetlib/enabling/is/registry/applicationContext-isregistry.xml create mode 100644 dnet-information-service/src/main/resources/eu/dnetlib/enabling/is/sn/applicationContext-issn.properties create mode 100644 dnet-information-service/src/main/resources/eu/dnetlib/enabling/is/sn/applicationContext-issn.xml create mode 100644 dnet-information-service/src/main/resources/eu/dnetlib/enabling/is/sn/resourcestate/hib/applicationContext-issn-hib.xml create mode 100644 dnet-information-service/src/main/resources/eu/dnetlib/enabling/is/store/applicationContext-isstore.properties create mode 100644 dnet-information-service/src/main/resources/eu/dnetlib/enabling/is/store/applicationContext-isstore.xml create mode 100644 dnet-information-service/src/main/resources/eu/dnetlib/enabling/is/store/xquery/dnet.xqm create mode 100644 dnet-information-service/src/main/resources/eu/dnetlib/enabling/tools/applicationContext-tools.xml create mode 100644 dnet-information-service/src/main/resources/eu/dnetlib/xml/database/exist/default-exist-conf.xml create mode 100644 dnet-information-service/src/test/java/eu/dnetlib/enabling/is/lookup/ISLookUpServiceImplTest.java create mode 100644 dnet-information-service/src/test/java/eu/dnetlib/enabling/is/registry/ApplicationProfileResourceKindResolverTest.java create mode 100644 dnet-information-service/src/test/java/eu/dnetlib/enabling/is/registry/CompatPendingResourceManagerImplTest.java create mode 100644 dnet-information-service/src/test/java/eu/dnetlib/enabling/is/registry/ISRegistryServiceImplTest.java create mode 100644 dnet-information-service/src/test/java/eu/dnetlib/enabling/is/registry/NameBasedResourceKindResolverTest.java create mode 100644 dnet-information-service/src/test/java/eu/dnetlib/enabling/is/registry/RegistryBlackboardManagerImplTest.java create mode 100644 dnet-information-service/src/test/java/eu/dnetlib/enabling/is/registry/ResourceKindResolverChainTest.java create mode 100644 dnet-information-service/src/test/java/eu/dnetlib/enabling/is/registry/schema/OpaqueResourceValidatorImplTest.java create mode 100644 dnet-information-service/src/test/java/eu/dnetlib/enabling/is/registry/schema/ResourceSchemaDAOImplTest.java create mode 100644 dnet-information-service/src/test/java/eu/dnetlib/enabling/is/sn/AbstractSubscriptionRegistryTest.java create mode 100644 dnet-information-service/src/test/java/eu/dnetlib/enabling/is/sn/MemoryNotificationInvocationLoggerTest.java create mode 100644 dnet-information-service/src/test/java/eu/dnetlib/enabling/is/sn/NotificationDetectorImplTest.java create mode 100644 dnet-information-service/src/test/java/eu/dnetlib/enabling/is/sn/NotificationTriggerImplTest.java create mode 100644 dnet-information-service/src/test/java/eu/dnetlib/enabling/is/sn/resourcestate/AbstractResourceStateSubscriptionDAOImplTest.java create mode 100644 dnet-information-service/src/test/java/eu/dnetlib/enabling/is/sn/resourcestate/AbstractResourceStateSubscriptionRegistryTest.java create mode 100644 dnet-information-service/src/test/java/eu/dnetlib/enabling/is/sn/resourcestate/MemoryResourceStateSubscriptionDAOImplTest.java create mode 100644 dnet-information-service/src/test/java/eu/dnetlib/enabling/is/sn/resourcestate/MemoryResourceStateSubscriptionRegistryTest.java create mode 100644 dnet-information-service/src/test/java/eu/dnetlib/enabling/is/sn/resourcestate/ResourceStateSubscriptionRegistryTest.java create mode 100644 dnet-information-service/src/test/java/eu/dnetlib/enabling/is/sn/resourcestate/hib/HibernateResourceStateSubscriptionDAOImplTest.java create mode 100644 dnet-information-service/src/test/java/eu/dnetlib/enabling/is/sn/resourcestate/hib/HibernateResourceStateSubscriptionRegistryTest.java create mode 100644 dnet-information-service/src/test/java/eu/dnetlib/enabling/is/store/ISStoreServiceImplTest.java create mode 100644 dnet-information-service/src/test/java/eu/dnetlib/enabling/is/store/ISStoreServiceTest.java create mode 100644 dnet-information-service/src/test/java/eu/dnetlib/enabling/tools/CompatResourceIdentifierResolverImplTest.java create mode 100644 dnet-information-service/src/test/java/eu/dnetlib/enabling/tools/DOMOpaqueResourceTest.java create mode 100644 dnet-information-service/src/test/java/eu/dnetlib/enabling/tools/JaxwsServiceResolverImplTest.java create mode 100644 dnet-information-service/src/test/java/eu/dnetlib/enabling/tools/blackboard/BlackboardMessageImplTest.java create mode 100644 dnet-information-service/src/test/java/eu/dnetlib/enabling/tools/registration/InterfaceServiceNameGeneratorTest.java create mode 100644 dnet-information-service/src/test/java/eu/dnetlib/enabling/tools/registration/InterfaceServiceNameResolverCompatibilityTest.java create mode 100644 dnet-information-service/src/test/java/eu/dnetlib/enabling/tools/registration/ServiceRegistrationManagerImplTest.java create mode 100644 dnet-information-service/src/test/java/eu/dnetlib/enabling/tools/registration/ServiceRegistratorTest.java create mode 100644 dnet-information-service/src/test/java/eu/dnetlib/enabling/tools/registration/ValidatingServiceRegistrationManagerImplTest.java create mode 100644 dnet-information-service/src/test/java/eu/dnetlib/test/SpringContextSharer.java rename {dnet-core-components => dnet-information-service}/src/test/java/eu/dnetlib/test/utils/EPRTestUtil.java (100%) create mode 100644 dnet-information-service/src/test/java/eu/dnetlib/test/utils/MockBeanFactory.java create mode 100644 dnet-information-service/src/test/java/eu/dnetlib/xml/database/exist/DOMConverterTestTrigger.java create mode 100644 dnet-information-service/src/test/java/eu/dnetlib/xml/database/exist/ExistDOMConverterTest.java create mode 100644 dnet-information-service/src/test/java/eu/dnetlib/xml/database/exist/ExistDatabaseTest.java create mode 100644 dnet-information-service/src/test/java/eu/dnetlib/xml/database/exist/PersistentExistDatabaseTest.java create mode 100644 dnet-information-service/src/test/java/eu/dnetlib/xml/database/exist/TestExistTrigger.java create mode 100644 dnet-information-service/src/test/java/eu/dnetlib/xml/database/exist/TestTrigger.java create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/enabling/is/lookup/collProfile.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/enabling/is/registry/RepositoryServiceResourceType.xsd create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/enabling/is/registry/schema/any-schema.xsd create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/enabling/is/registry/schema/invalid-profile.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/enabling/is/registry/schema/schema.xsd create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/enabling/is/registry/schema/valid-any-optional.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/enabling/is/registry/schema/valid-profile.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/enabling/is/registry/securityProfile.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/enabling/is/registry/serviceProfile.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/enabling/is/registry/serviceProfileWithMessage.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/enabling/is/registry/test-profile.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/enabling/is/registry/userProfile.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/enabling/is/sn/resourcestate/hib/HibernateResourceStateSubscriptionDAOImplTest-context.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/enabling/is/sn/resourcestate/hib/hsql-context.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/enabling/tools/local-cxf.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/enabling/tools/test-profile.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/applicationContext-integrationSupport.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo1.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo10.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo100.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo101.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo102.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo103.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo104.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo105.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo106.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo107.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo108.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo109.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo11.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo110.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo111.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo112.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo113.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo114.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo115.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo116.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo117.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo118.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo119.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo12.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo120.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo121.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo122.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo123.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo124.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo125.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo126.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo127.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo128.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo129.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo13.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo130.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo131.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo132.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo133.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo134.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo135.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo136.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo137.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo138.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo139.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo14.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo140.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo141.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo142.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo143.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo144.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo145.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo146.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo147.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo148.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo149.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo15.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo150.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo151.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo152.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo153.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo154.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo155.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo156.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo157.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo158.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo159.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo16.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo160.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo161.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo162.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo163.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo164.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo165.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo166.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo167.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo168.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo169.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo17.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo170.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo171.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo172.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo173.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo174.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo175.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo176.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo177.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo178.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo179.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo18.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo180.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo19.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo2.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo20.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo21.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo22.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo23.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo24.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo25.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo26.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo27.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo28.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo29.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo3.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo30.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo31.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo32.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo33.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo34.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo35.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo36.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo37.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo38.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo39.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo4.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo40.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo41.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo42.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo43.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo44.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo45.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo46.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo47.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo48.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo49.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo5.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo50.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo51.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo52.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo53.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo54.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo55.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo56.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo57.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo58.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo59.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo6.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo60.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo61.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo62.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo63.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo64.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo65.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo66.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo67.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo68.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo69.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo7.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo70.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo71.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo72.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo73.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo74.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo75.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo76.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo77.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo78.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo79.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo8.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo80.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo81.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo82.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo83.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo84.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo85.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo86.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo87.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo88.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo89.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo9.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo90.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo91.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo92.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo93.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo94.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo95.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo96.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo97.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo98.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo99.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/xml/database/exist/exist-test-conf.xml create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/xml/database/exist/userProfileResourceSchema.xsd create mode 100644 dnet-information-service/src/test/resources/eu/dnetlib/xml/database/exist/userProfileResourceSchemaClean.xsd diff --git a/dnet-core-components/pom.xml b/dnet-core-components/pom.xml index 08bdb1d..18ff3db 100644 --- a/dnet-core-components/pom.xml +++ b/dnet-core-components/pom.xml @@ -65,12 +65,6 @@ gson - - junit - junit - test - - log4j log4j diff --git a/dnet-information-service/pom.xml b/dnet-information-service/pom.xml new file mode 100644 index 0000000..307b41e --- /dev/null +++ b/dnet-information-service/pom.xml @@ -0,0 +1,152 @@ + + + 4.0.0 + + eu.dnetlib + dnet-core + 1.0.0-SNAPSHOT + + dnet-information-service + eu.dnetlib + jar + 1.0.0-SNAPSHOT + + + + eu.dnetlib + dnet-core-components + ${project.version} + + + eu.dnetlib + dnet-core-services + ${project.version} + + + + + org.springframework + spring-orm + + + + + + + org.exist-db + exist-core + + + org.exist-db + exist-start + + + + + + org.postgresql + postgresql + + + org.xerial + sqlite-jdbc + + + org.hibernate + hibernate-core + + + commons-collections + commons-collections + + + commons-dbcp + commons-dbcp + + + com.sun.xml.messaging.saaj + saaj-impl + + + jaxen + jaxen + + + + + + xerces + xercesImpl + + + + + org.aspectj + aspectjrt + + runtime + + + commons-codec + commons-codec + + + commons-beanutils + commons-beanutils + + + org.apache.cxf + cxf-rt-frontend-jaxws + + + + + + hsqldb + hsqldb + test + + + org.aspectj + aspectjweaver + test + + + org.hibernate + hibernate-annotations + test + + + org.springframework + spring-webmvc + test + + + org.springframework + spring-test + test + + + org.apache.cxf + cxf-rt-ws-policy + test + + + org.apache.cxf + cxf-rt-frontend-jaxrs + test + + + org.apache.cxf + cxf-rt-transports-local + test + + + org.apache.cxf + cxf-rt-ws-rm + test + + + + + diff --git a/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/lookup/ISLookUpServiceImpl.java b/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/lookup/ISLookUpServiceImpl.java new file mode 100644 index 0000000..816eec8 --- /dev/null +++ b/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/lookup/ISLookUpServiceImpl.java @@ -0,0 +1,394 @@ +package eu.dnetlib.enabling.is.lookup; + +import java.io.IOException; +import java.io.StringReader; +import java.util.ArrayList; +import java.util.List; +import java.util.regex.Matcher; +import java.util.regex.Pattern; +import javax.jws.WebService; +import javax.xml.parsers.ParserConfigurationException; +import javax.xml.xpath.XPathExpressionException; + +import com.sun.xml.messaging.saaj.util.Base64; +import eu.dnetlib.enabling.is.lookup.rmi.ISLookUpDocumentNotFoundException; +import eu.dnetlib.enabling.is.lookup.rmi.ISLookUpException; +import eu.dnetlib.enabling.is.lookup.rmi.ISLookUpService; +import eu.dnetlib.enabling.is.store.rmi.ISStoreException; +import eu.dnetlib.enabling.is.store.rmi.ISStoreService; +import eu.dnetlib.enabling.tools.*; +import org.apache.commons.lang3.StringUtils; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.dom4j.Document; +import org.dom4j.Element; +import org.dom4j.io.SAXReader; +import org.springframework.beans.factory.annotation.Required; +import org.xml.sax.SAXException; + +/** + * ISLookUpService implementation. + * + * @author marko + * @author michele + * + */ +@WebService(targetNamespace = "http://services.dnetlib.eu/") +public class ISLookUpServiceImpl extends AbstractBaseService implements ISLookUpService { // NOPMD + + /** + * error message when the given collection cannot be fetched. + */ + private static final String COLLECTION_ERROR = "cannot get collection"; + + /** + * base xmldb directory. + */ + private static final String DB_BASE_DIR = "/db/DRIVER"; + + /** + * error message when the profile is not present in the db. + */ + private static final String PROFILE_NOT_FOUND = "Profile not found"; + + private ISStoreService isStore; + + // NOPMD by marko on 11/24/08 + // 5:02 PM + /** + * logger. + */ + public static final Log log = LogFactory.getLog(ISLookUpServiceImpl.class); // NOPMD by marko on 11/24/08 5:02 PM + + /** + * resource identifier resolver. Resolves identifiers to xmldb file and collection names. + */ + private ResourceIdentifierResolver resIdManager = new CompatResourceIdentifierResolverImpl(); + + /** + * xquery utils. Used to obtain the xmldb collection mapping for resources. + */ + private XQueryUtils xqueryUtils; + + /** + * {@inheritDoc} + * + * @see eu.dnetlib.enabling.is.lookup.rmi.ISLookUpService#flushCachedResultSets() + */ + @Override + public Boolean flushCachedResultSets() { + // TODO Auto-generated method stub + return false; + } + + /** + * {@inheritDoc} + * + * @see eu.dnetlib.enabling.is.lookup.rmi.ISLookUpService#retrieveCollection(java.lang.String) + */ + @Override + public String retrieveCollection(final String profId) throws ISLookUpException { + try { + String profile = this.getResourceProfile(profId); + final List list = quickSearchProfile("for $x in collection('/db/DRIVER/CollectionDSResources') where $x//FATHER/@id = '" + profId + + "' return $x//RESOURCE_IDENTIFIER/@value/string()"); + + if (!list.isEmpty()) { + final SAXReader reader = new SAXReader(); + final Document doc = reader.read(new StringReader(profile)); + final Element childrenNode = (Element) doc.selectSingleNode("//CHILDREN"); // NOPMD + for (final String idC : list) { + childrenNode.addElement("CHILD").addAttribute("id", idC); + } + profile = doc.asXML(); + } + + return profile; + } catch (final Exception e) { + throw new ISLookUpException(e); + } + } + + /** + * {@inheritDoc} + * + * @see eu.dnetlib.enabling.is.lookup.rmi.ISLookUpService#getCollection(java.lang.String, java.lang.String) + */ + @Override + public String getCollection(final String profId, final String format) throws ISLookUpException { + OpaqueResource prof; + try { + prof = new StringOpaqueResource(profId); + + final StringBuilder query = new StringBuilder(); + if (format != null && format.equals("ui")) { + query.append("doc('"); + query.append(xqueryUtils.getCollectionAbsPath(prof)); + query.append('/'); + query.append(prof.getResourceId().split("_")[0]); + query.append("')"); + } else { + query.append("let $x := doc('"); + query.append(xqueryUtils.getCollectionAbsPath(prof)); + query.append('/'); + query.append(prof.getResourceId().split("_")[0]); + query.append("') return "); + query.append(""); + query.append("{$x//IMAGE_URL}{$x//DESCRIPTION}{$x//OWNER}{$x//FATHER}{$x//SUBJECT}{$x//CHILDREN}{$x//MEMBERSHIP_CONDITION}{$x//RETRIEVAL_CONDITION}"); + } + + return isStore.getXMLbyQuery(query.toString()); + } catch (final ISStoreException e) { + throw new ISLookUpException(e); + } catch (final XPathExpressionException e) { + throw new ISLookUpException(COLLECTION_ERROR, e); + } catch (final SAXException e) { + throw new ISLookUpException(COLLECTION_ERROR, e); + } catch (final IOException e) { + throw new ISLookUpException(COLLECTION_ERROR, e); + } catch (final ParserConfigurationException e) { + throw new ISLookUpException(COLLECTION_ERROR, e); + } + } + + /** + * {@inheritDoc} + * + * @see eu.dnetlib.enabling.is.lookup.rmi.ISLookUpService#getResourceProfile(java.lang.String) + */ + @Override + public String getResourceProfile(final String profId) throws ISLookUpException { + if (profId == null || profId.isEmpty()) { throw new ISLookUpException("Invalid null profile ID: " + profId); } + + try { + final String res = isStore.getXML(getFileNameForId(profId), + xqueryUtils.getRootCollection() + getFileCollForId(profId)); + if (res == null) { throw new ISLookUpDocumentNotFoundException("document " + profId + " not found"); } + return res; + } catch (final ISStoreException e) { + throw new ISLookUpException(e); + } + } + + /** + * obtain the xmldb file name from the profile identifier. + * + * @param profId + * profile id + * @return xml db file name + */ + String getFileNameForId(final String profId) { + return resIdManager.getFileName(profId); + } + + /** + * obtain the xmldb collection name from the profile identifier. + * + * @param profId + * profile id + * @return plaintext xmldb collection name + */ + String getFileCollForId(final String profId) { + return resIdManager.getCollectionName(profId); + } + + /** + * {@inheritDoc} + * + * @see eu.dnetlib.enabling.is.lookup.rmi.ISLookUpService#getResourceProfileByQuery(java.lang.String) + */ + @Override + public String getResourceProfileByQuery(final String xquery) throws ISLookUpException { + String resource; + //TODO remove following hack as soon as https://issue.openaire.research-infrastructures.eu/issues/2774 is closed. + if (StringUtils.isNotBlank(xquery) && xquery.trim().startsWith("//*[local-name() = 'complexType'")) { + final Pattern p = Pattern.compile(".*value = '([a-zA-z]+)']"); + final Matcher m = p.matcher(xquery); + if (m.matches()) { + final String serviceName = m.group(1); + log.debug(String.format("found service '%s', hacking response for xquery: %s", serviceName, xquery)); + return getResourceTypeSchema(serviceName); + } + } + try { + resource = isStore.getXMLbyQuery(xquery); + if (resource == null || resource.isEmpty()) { throw new ISLookUpDocumentNotFoundException(PROFILE_NOT_FOUND); } + return resource; + } catch (final ISStoreException e) { + throw new ISLookUpException(e); + } + } + + /** + * {@inheritDoc} + * + * @see eu.dnetlib.enabling.is.lookup.rmi.ISLookUpService#getResourceQoSParams(java.lang.String) + */ + @Override + public String getResourceQoSParams(final String profId) throws ISLookUpException { + final String query = "for $x in collection('/db/DRIVER/ServiceResources') where $x//RESOURCE_IDENTIFIER/@value = '" + profId + "' return $x//QOS"; + return getResourceProfileByQuery(query); + } + + /** + * {@inheritDoc} + * + * @see eu.dnetlib.enabling.is.lookup.rmi.ISLookUpService#getResourceTypeSchema(java.lang.String) + */ + @Override + public String getResourceTypeSchema(final String resourceType) throws ISLookUpException, ISLookUpDocumentNotFoundException { + if (resourceType == null || resourceType.isEmpty()) { throw new ISLookUpException("Invalid resourceType"); } + + try { + final String resource = isStore.getXML(resourceType, xqueryUtils.getRootCollection() + ResourceType.RESOURCE_TYPES); + if (resource == null || resource.isEmpty()) { throw new ISLookUpDocumentNotFoundException(PROFILE_NOT_FOUND); } + return resource; + } catch (final ISStoreException e) { + throw new ISLookUpException(e); + } + } + + /** + * {@inheritDoc} + * + * @see eu.dnetlib.enabling.is.lookup.rmi.ISLookUpService#listCollections(java.lang.String, java.lang.String, java.lang.String) + */ + @Override + public List listCollections(final String format, final String idfatherParam, final String owner) throws ISLookUpException { + String idfather = idfatherParam; // PMD + if (idfather == null || idfather.length() == 0) { + idfather = "InfoSpace"; + } + final String fileColl = xqueryUtils.getRootCollection() + "CollectionDSResources/CollectionDSResourceType"; + + final StringBuilder query = new StringBuilder(); + query.append("for $x in collection('" + fileColl + "') where $x//FATHER[@id='" + idfather + "'] "); // NOPMD + if (owner != null && owner.length() > 0) { + query.append("and $x//OWNER[@id='" + owner + "'] "); + } + if (format != null && format.equals("short")) { + query.append("return $x//RESOURCE_IDENTIFIER/@value/string()"); + } else { + query.append("return $x"); + } + + return quickSearchProfile(query.toString()); + } + + /** + * {@inheritDoc} + * + * @see eu.dnetlib.enabling.is.lookup.rmi.ISLookUpService#listDHNIDs() + */ + @Override + public List listDHNIDs() throws ISLookUpException { + final String fileColl = DB_BASE_DIR + "/InfrastructureResources/DRIVERHostingNodeDSResourceType"; + + final ArrayList ret = new ArrayList(); + try { + for (final String i : isStore.getFileNames(fileColl)) { + ret.add(i + ":" + fileColl); + } + return ret; + } catch (final ISStoreException e) { + throw new ISLookUpException(e); + } + } + + /** + * {@inheritDoc} + * + * @see eu.dnetlib.enabling.is.lookup.rmi.ISLookUpService#listResourceTypes() + */ + @Override + public List listResourceTypes() throws ISLookUpException { + try { + return isStore.getFileNames(DB_BASE_DIR + "/" + ResourceType.RESOURCE_TYPES); + } catch (final ISStoreException e) { + throw new ISLookUpException(e); + } + } + + /** + * {@inheritDoc} + * + * @see eu.dnetlib.enabling.is.lookup.rmi.ISLookUpService#listServiceIDs(java.lang.String) + */ + @Override + public List listServiceIDs(final String serviceType) throws ISLookUpException { + final String fileColl = "ServiceResources/" + serviceType; + final String encodedColl = "_" + new String(Base64.encode(fileColl.getBytes())); // NOPMD + + final List ret = new ArrayList(); + try { + for (final String i : isStore.getFileNames(DB_BASE_DIR + "/" + fileColl)) { + ret.add(i + encodedColl); + } + return ret; + } catch (final ISStoreException e) { + throw new ISLookUpException(e); + } + } + + /** + * {@inheritDoc} + * + * @see eu.dnetlib.enabling.is.lookup.rmi.ISLookUpService#listServiceTypes() + */ + @Override + public List listServiceTypes() throws ISLookUpException { + final List ret = new ArrayList(); + try { + for (final String i : isStore.getFileColls()) { + if (i.startsWith("ServiceResources/")) { + ret.add(i.substring("ServiceResources/".length())); + } + } + return ret; + } catch (final ISStoreException e) { + throw new ISLookUpException(e); + } + } + + /** + * {@inheritDoc} + * + * @see eu.dnetlib.enabling.is.lookup.rmi.ISLookUpService#quickSearchProfile(java.lang.String) + */ + @Override + public List quickSearchProfile(final String xquery) throws ISLookUpException { + try { + return isStore.quickSearchXML(xquery); + } catch (final ISStoreException e) { + throw new ISLookUpException(e); + } + } + + public ResourceIdentifierResolver getResIdManager() { + return resIdManager; + } + + public void setResIdManager(final ResourceIdentifierResolver resIdManager) { + this.resIdManager = resIdManager; + } + + @Required + public void setXqueryUtils(final XQueryUtils xqueryUtils) { + this.xqueryUtils = xqueryUtils; + } + + public XQueryUtils getXqueryUtils() { + return xqueryUtils; + } + + public ISStoreService getIsStore() { + return isStore; + } + + @Required + public void setIsStore(final ISStoreService isStore) { + this.isStore = isStore; + } + +} diff --git a/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/registry/ApplicationProfileResourceKindResolver.java b/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/registry/ApplicationProfileResourceKindResolver.java new file mode 100644 index 0000000..d59a20a --- /dev/null +++ b/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/registry/ApplicationProfileResourceKindResolver.java @@ -0,0 +1,77 @@ +package eu.dnetlib.enabling.is.registry; + +import java.io.IOException; + +import javax.xml.parsers.DocumentBuilderFactory; +import javax.xml.parsers.ParserConfigurationException; +import javax.xml.xpath.XPath; +import javax.xml.xpath.XPathExpressionException; +import javax.xml.xpath.XPathFactory; + +import org.w3c.dom.Document; +import org.xml.sax.SAXException; + +/** + * Resolves resource kinds (pending and normal from the application profile xml file). + * + * @author marko + * + */ +public class ApplicationProfileResourceKindResolver implements ResourceKindResolver { + + /** + * information space application profile. Contains, among others, mappings for the.. TODO: move to a DAO. + * + */ + private Document appProfile; + + public ApplicationProfileResourceKindResolver() { + try { + appProfile = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse( + getClass().getResourceAsStream("DRIVERInformationSpaceApplicationProfile.xml")); + } catch (SAXException e) { + throw new IllegalStateException("cannot parse information space application profile", e); + } catch (IOException e) { + throw new IllegalStateException("cannot parse information space application profile", e); + } catch (ParserConfigurationException e) { + throw new IllegalStateException("cannot parse information space application profile", e); + } + } + + /** + * get the default resource kind associated with a given resource type. + * + * @param resourceType + * resource type + * @return resourceType + * @throws XPathExpressionException + * happens? + */ + @Override + public String getNormalKindForType(final String resourceType) throws XPathExpressionException { + final XPath xpath = XPathFactory.newInstance().newXPath(); + final String res = xpath.evaluate("//RESOURCE_TYPE[text() = '" + resourceType + "']/../../RESOURCE_KIND", appProfile); + if (res.isEmpty()) + return null; + return res; + } + + /** + * find the associated pending typology for a given resource type. + * + * @param resourceType + * resource type + * @return pending resource kind + * @throws XPathExpressionException + * shouldn't happen + */ + @Override + public String getPendingKindForType(final String resourceType) throws XPathExpressionException { + final XPath xpath = XPathFactory.newInstance().newXPath(); + final String res = xpath.evaluate("//RESOURCE_TYPE[text() = '" + resourceType + "']/../../PENDING_TYPOLOGY", appProfile); + if (res.isEmpty()) + throw new NoSuchPendingCategoryException("no pending category for " + resourceType); + return res; + } + +} diff --git a/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/registry/CompatPendingResourceManagerImpl.java b/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/registry/CompatPendingResourceManagerImpl.java new file mode 100644 index 0000000..ceebc01 --- /dev/null +++ b/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/registry/CompatPendingResourceManagerImpl.java @@ -0,0 +1,141 @@ +package eu.dnetlib.enabling.is.registry; + +import javax.annotation.Resource; +import javax.xml.xpath.XPathExpressionException; + +import org.springframework.beans.factory.annotation.Required; + +import eu.dnetlib.enabling.is.registry.rmi.ISRegistryException; +import eu.dnetlib.enabling.is.registry.rmi.ISRegistryService; +import eu.dnetlib.enabling.is.registry.schema.ValidationException; +import eu.dnetlib.enabling.is.registry.validation.ProfileValidationStrategy; +import eu.dnetlib.enabling.is.registry.validation.RegistrationPhase; +import eu.dnetlib.enabling.tools.OpaqueResource; + +/** + * implement the compatibility pending profile policy. + * + *

+ * pending profiles receive their own special resource kind and are 'moved' to a different collection + *

+ * + * @author marko + * + */ +public class CompatPendingResourceManagerImpl implements PendingResourceManager, ResourceKindResolver { + + /** + * IS Registry + */ + private ISRegistryService isRegistry; + + /** + * This bean resolver + */ + private ResourceKindResolver resourceKindResolver; + + /** + * used to validate resources w.r.t. a set of defined properties. + */ + @Resource + private ProfileValidationStrategy profileValidationStrategy; + + /** + * {@inheritDoc} + * + * @see eu.dnetlib.enabling.is.registry.PendingResourceManager#setPending(eu.dnetlib.enabling.tools.OpaqueResource) + */ + @Override + public void setPending(final OpaqueResource resource, final boolean local) { + try { + resource.setResourceKind(getPendingKindForType(resource.getResourceType())); + + if (!local) { + isRegistry.deleteProfile(resource.getResourceId()); + final String newId = isRegistry.registerProfile(resource.asString()); + resource.setResourceId(newId); + } + + } catch (XPathExpressionException e) { + throw new IllegalStateException(e); + } catch (ISRegistryException e) { + throw new IllegalStateException(e); + } + } + + /** + * {@inheritDoc} + * + * @see eu.dnetlib.enabling.is.registry.PendingResourceManager#setPending(eu.dnetlib.enabling.tools.OpaqueResource) + */ + @Override + public void setPending(final OpaqueResource resource) { + setPending(resource, false); + } + + /** + * {@inheritDoc} + * + * @see eu.dnetlib.enabling.is.registry.PendingResourceManager#setValid(eu.dnetlib.enabling.tools.OpaqueResource) + */ + @Override + public void setValid(final OpaqueResource resource) { + try { + if (resource.getResourceKind() != null && resource.getResourceKind().equals(getNormalKindForType(resource.getResourceType()))) { throw new IllegalArgumentException( + "trying to validate an already valid resource"); } + + profileValidationStrategy.accept(resource, RegistrationPhase.Validate); + + resource.setResourceKind(getNormalKindForType(resource.getResourceType())); + + isRegistry.deleteProfile(resource.getResourceId()); + + final String newId = isRegistry.registerProfile(resource.asString()); + resource.setResourceId(newId); + + } catch (XPathExpressionException e) { + throw new IllegalStateException(e); + } catch (ISRegistryException e) { + throw new IllegalStateException(e); + } catch (ValidationException e) { + throw new IllegalStateException(e); + } + } + + @Override + public String getNormalKindForType(final String resourceType) throws XPathExpressionException { + return resourceKindResolver.getNormalKindForType(resourceType); + } + + @Override + public String getPendingKindForType(final String resourceType) throws XPathExpressionException { + return resourceKindResolver.getPendingKindForType(resourceType); + } + + public ResourceKindResolver getResourceKindResolver() { + return resourceKindResolver; + } + + @Required + public void setResourceKindResolver(final ResourceKindResolver resourceKindResolver) { + this.resourceKindResolver = resourceKindResolver; + } + + public ProfileValidationStrategy getProfileValidationStrategy() { + return profileValidationStrategy; + } + + public void setProfileValidationStrategy(final ProfileValidationStrategy profileValidationStrategy) { + this.profileValidationStrategy = profileValidationStrategy; + } + + public ISRegistryService getIsRegistry() { + return isRegistry; + } + + @Required + public void setIsRegistry(final ISRegistryService isRegistry) { + this.isRegistry = isRegistry; + } + +} diff --git a/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/registry/ISRegistryServiceImpl.java b/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/registry/ISRegistryServiceImpl.java new file mode 100644 index 0000000..6d312bf --- /dev/null +++ b/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/registry/ISRegistryServiceImpl.java @@ -0,0 +1,595 @@ +package eu.dnetlib.enabling.is.registry; // NOPMD + +import java.io.IOException; +import java.util.Date; +import java.util.List; + +import javax.annotation.Resource; +import javax.jws.WebService; +import javax.xml.parsers.ParserConfigurationException; +import javax.xml.xpath.XPath; +import javax.xml.xpath.XPathConstants; +import javax.xml.xpath.XPathExpressionException; +import javax.xml.xpath.XPathFactory; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.springframework.beans.factory.annotation.Required; +import org.w3c.dom.Element; +import org.xml.sax.SAXException; + +import com.sun.xml.messaging.saaj.util.Base64; + +import eu.dnetlib.common.rmi.APIDeprecatedException; +import eu.dnetlib.common.rmi.UnimplementedException; +import eu.dnetlib.enabling.is.lookup.rmi.ISLookUpDocumentNotFoundException; +import eu.dnetlib.enabling.is.lookup.rmi.ISLookUpException; +import eu.dnetlib.enabling.is.lookup.rmi.ISLookUpService; +import eu.dnetlib.enabling.is.registry.rmi.ISRegistryException; +import eu.dnetlib.enabling.is.registry.rmi.ISRegistryService; +import eu.dnetlib.enabling.is.registry.schema.OpaqueResourceValidator; +import eu.dnetlib.enabling.is.registry.schema.ValidationException; +import eu.dnetlib.enabling.is.registry.validation.ProfileValidationStrategy; +import eu.dnetlib.enabling.is.registry.validation.RegistrationPhase; +import eu.dnetlib.enabling.is.store.rmi.ISStoreException; +import eu.dnetlib.enabling.is.store.rmi.ISStoreService; +import eu.dnetlib.enabling.tools.AbstractBaseService; +import eu.dnetlib.enabling.tools.CompatResourceIdentifierResolverImpl; +import eu.dnetlib.enabling.tools.OpaqueResource; +import eu.dnetlib.enabling.tools.ResourceIdentifierResolver; +import eu.dnetlib.enabling.tools.ResourceType; +import eu.dnetlib.enabling.tools.StringOpaqueResource; +import eu.dnetlib.enabling.tools.UniqueIdentifierGenerator; +import eu.dnetlib.enabling.tools.UniqueIdentifierGeneratorImpl; +import eu.dnetlib.enabling.tools.XQueryUtils; + +/** + * Registry service implementation. + * + * @author marko + * + */ +@WebService(targetNamespace = "http://services.dnetlib.eu/") +public class ISRegistryServiceImpl extends AbstractBaseService implements ISRegistryService { // NOPMD by marko on + + /** + * logger. + */ + private static final Log log = LogFactory.getLog(ISRegistryServiceImpl.class); // NOPMD by marko on 11/24/08 5:02 PM + + /** + * error message: secure profile registration. + */ + private static final String ERROR_SEC_PROFILE = "cannot register secure profile"; + + /** + * error message: trying to retrieve the current stored version of the resource profile. + */ + private static final String CANT_FETCH = "cannot fetch original profile"; + + /** + * error message: cannot create a resource. + */ + private static final String CANT_CREATE = "cannot create resource"; + + /** + * IS Store + */ + private ISStoreService isStore; + + /** + * IS Lookup + */ + private ISLookUpService isLookup; + + /** + * uuid generator. + */ + @Resource + private UniqueIdentifierGenerator uuidGenerator = new UniqueIdentifierGeneratorImpl(); + + /** + * manages the pending state of resource. Different implementations can be plugged in. + */ + private PendingResourceManager pendingManager = new CompatPendingResourceManagerImpl(); + + /** + * manages resource identifier mappings with the abstract xmldb namespace (files/collections). + */ + @Resource + private ResourceIdentifierResolver resIdResolver = new CompatResourceIdentifierResolverImpl(); + + /** + * used to validate resources. + */ + private OpaqueResourceValidator resourceValidator; + + /** + * used to validate resources w.r.t. a set of defined properties. + */ + @Resource + private ProfileValidationStrategy profileValidationStrategy; + + /** + * query utils. Used to obtain xmldb collection names and other things useful for interacting with the IS_Store. + */ + private XQueryUtils xqueryUtils; + + /** + * the blackboard management stuff is factored out here. + */ + @Resource + private RegistryBlackboardManager blackboardManager; + + @Override + public void start() { + super.start(); + } + + /** + * {@inheritDoc} + * + * @see eu.dnetlib.enabling.is.registry.rmi.ISRegistryService#addBlackBoardMessage(java.lang.String, java.lang.String, java.lang.String) + */ + @Override + public void addBlackBoardMessage(final String profId, final String messageId, final String message) throws ISRegistryException { + blackboardManager.addMessage(profId, messageId, message); + } + + /** + * {@inheritDoc} + * + * @see eu.dnetlib.enabling.is.registry.rmi.ISRegistryService#addOrUpdateResourceType(java.lang.String, java.lang.String) + */ + @Override + public boolean addOrUpdateResourceType(final String resourceType, final String resourceSchema) throws ISRegistryException { + return addResourceType(resourceType, resourceSchema); + } + + /** + * {@inheritDoc} + * + * @see eu.dnetlib.enabling.is.registry.rmi.ISRegistryService#addProfileNode(java.lang.String, java.lang.String, java.lang.String) + */ + @Override + public boolean addProfileNode(final String profId, final String xpath, final String node) throws ISRegistryException { + // TODO Auto-generated method stub + throw new UnimplementedException(); + } + + /** + * {@inheritDoc} + * + * @see eu.dnetlib.enabling.is.registry.rmi.ISRegistryService#addResourceType(java.lang.String, java.lang.String) + */ + @Override + public boolean addResourceType(final String resourceType, final String resourceSchema) throws ISRegistryException { + try { + return isStore.insertXML(resourceType, xqueryUtils.getRootCollection() + ResourceType.RESOURCE_TYPES, + resourceSchema); + } catch (ISStoreException e) { + throw new ISRegistryException("cannot add resource type", e); + } + } + + /** + * {@inheritDoc} + * + * @see eu.dnetlib.enabling.is.registry.rmi.ISRegistryService#deleteBlackBoardMessage(java.lang.String, java.lang.String) + */ + @Override + public void deleteBlackBoardMessage(final String profId, final String messageId) throws ISRegistryException { + blackboardManager.deleteMessage(profId, messageId); + } + + /** + * {@inheritDoc} + * + * @see eu.dnetlib.enabling.is.registry.rmi.ISRegistryService#deleteProfile(java.lang.String) + */ + @Override + public boolean deleteProfile(final String resId) throws ISRegistryException { + try { + final boolean res = isStore.deleteXML(resIdResolver.getFileName(resId), + "/db/DRIVER/" + resIdResolver.getCollectionName(resId)); + if (!res) { throw new ISRegistryDocumentNotFoundException("document " + resId + " not found"); } + + return true; + } catch (ISStoreException e) { + throw new ISRegistryException("cannot delete profile " + resId, e); + } + } + + /** + * {@inheritDoc} + * + * @see eu.dnetlib.enabling.is.registry.rmi.ISRegistryService#deleteProfiles(java.util.List) + */ + @Override + public boolean deleteProfiles(final List arrayprofId) throws ISRegistryException { + throw new APIDeprecatedException(); + } + + /** + * {@inheritDoc} + * + * @see eu.dnetlib.enabling.is.registry.rmi.ISRegistryService#deleteResourceType(java.lang.String, java.lang.Boolean) + */ + @Override + public boolean deleteResourceType(final String resourceType, final Boolean hierarchical) throws ISRegistryException { + try { + return isStore.deleteXML(resourceType, xqueryUtils.getRootCollection() + ResourceType.RESOURCE_TYPES); + } catch (ISStoreException e) { + throw new ISRegistryException("error deleting resource type " + resourceType, e); + } + } + + /** + * {@inheritDoc} + * + * @see eu.dnetlib.enabling.is.registry.rmi.ISRegistryService#executeXUpdate(java.lang.String) + */ + @Override + public boolean executeXUpdate(final String xquery) throws ISRegistryException { + try { + return isStore.executeXUpdate(xquery); + } catch (ISStoreException e) { + throw new ISRegistryException(e); + } + } + + /** + * {@inheritDoc} + * + * @see eu.dnetlib.enabling.is.registry.rmi.ISRegistryService#insertProfileForValidation(java.lang.String, java.lang.String) + */ + @Override + public String insertProfileForValidation(final String resourceType, final String resourceProfile) throws ISRegistryException { + try { + final OpaqueResource resource = new StringOpaqueResource(resourceProfile); + if (!resourceType.equals(resource.getResourceType())) { throw new ISRegistryException("expected resource type doesn't match to resource"); } + + pendingManager.setPending(resource, true); + + return registerProfile(resource.asString()); + } catch (XPathExpressionException e) { + throw new ISRegistryException(e); + } catch (SAXException e) { + throw new ISRegistryException(e); + } catch (IOException e) { + throw new ISRegistryException(e); + } catch (ParserConfigurationException e) { + throw new ISRegistryException(e); + } + } + + /** + * {@inheritDoc} + * + * @see eu.dnetlib.enabling.is.registry.rmi.ISRegistryService#refreshProfile(java.lang.String, java.lang.String) + */ + @Override + public boolean refreshProfile(final String profId, final String resourceType) throws ISRegistryException { + // TODO Auto-generated method stub + throw new UnimplementedException(); + } + + /** + * {@inheritDoc} + * + * @see eu.dnetlib.enabling.is.registry.rmi.ISRegistryService#registerProfile(java.lang.String) + */ + @Override + public String registerProfile(final String resourceProfile) throws ISRegistryException { + log.debug("registering profile"); + + try { + final OpaqueResource resource = new StringOpaqueResource(resourceProfile); + + // TODO: factor this out (possibly not within the OpaqueResource class) + final String coll = xqueryUtils.getCollectionPath(resource); + final String fileName = uuidGenerator.generateIdentifier(); + final String newId = fileName + "_" + new String(Base64.encode(coll.getBytes())); + resource.setResourceId(newId); + + resource.setModificationDate(new Date()); + + // log.info("validating to xml schema: " + resource.asString()); + resourceValidator.validate(resource); + + profileValidationStrategy.accept(resource, RegistrationPhase.Register); + + // TODO: factor out ResourceType class + isStore.insertXML(fileName, xqueryUtils.getRootCollection() + coll, resource.asString()); + + return resource.getResourceId(); + } catch (XPathExpressionException e) { + throw new ISRegistryException(e); + } catch (SAXException e) { + throw new ISRegistryException(e); + } catch (IOException e) { + throw new ISRegistryException(e); + } catch (ParserConfigurationException e) { + throw new ISRegistryException(e); + } catch (ISStoreException e) { + throw new ISRegistryException(e); + } catch (ValidationException e) { + throw new ISRegistryException("profile is not conforming to the schema: " + e.getMessage(), e); + } + } + + /** + * {@inheritDoc} + * + * @see eu.dnetlib.enabling.is.registry.rmi.ISRegistryService#registerSecureProfile(java.lang.String, java.lang.String) + */ + @Override + public String registerSecureProfile(final String resourceProfId, final String secureProfId) throws ISRegistryException { + try { + synchronized (this) { + final String secureProfSrc; + try { + secureProfSrc = isLookup.getResourceProfile(secureProfId); // NOPMD + } catch (ISLookUpDocumentNotFoundException e) { + throw new ISRegistryException("cannot register secure profile, the given secure profile doesn't exist", e); + } + final OpaqueResource secureProf = new StringOpaqueResource(secureProfSrc); + + final String profId = validateProfile(resourceProfId); + + final XPath xpath = XPathFactory.newInstance().newXPath(); + final Element idEl = (Element) xpath.evaluate("/RESOURCE_PROFILE/BODY/CONFIGURATION/resourceId", secureProf.asDom(), XPathConstants.NODE); + idEl.setTextContent(profId); + + if (!updateProfile(secureProfId, secureProf.asString(), secureProf.getResourceType())) { throw new ISRegistryException( + "cannot update security profile (updateProfile returned false)"); } + + return profId; + } + } catch (XPathExpressionException e) { + throw new ISRegistryException(ERROR_SEC_PROFILE, e); + } catch (SAXException e) { + throw new ISRegistryException(ERROR_SEC_PROFILE, e); + } catch (IOException e) { + throw new ISRegistryException(ERROR_SEC_PROFILE, e); + } catch (ParserConfigurationException e) { + throw new ISRegistryException(ERROR_SEC_PROFILE, e); + } catch (ISLookUpException e) { + throw new ISRegistryException("cannot register secure profile, problem fetching the given secure profile", e); + } + } + + /** + * {@inheritDoc} + * + * @see eu.dnetlib.enabling.is.registry.rmi.ISRegistryService#removeProfileNode(java.lang.String, java.lang.String) + */ + @Override + public boolean removeProfileNode(final String profId, final String nodeId) throws ISRegistryException { + // TODO Auto-generated method stub + throw new UnimplementedException(); + } + + /** + * {@inheritDoc} + * + * @see eu.dnetlib.enabling.is.registry.rmi.ISRegistryService#replyBlackBoardMessage(java.lang.String, java.lang.String) + */ + @Override + public void replyBlackBoardMessage(final String profId, final String message) throws ISRegistryException { + blackboardManager.replyMessage(profId, message); + } + + /** + * {@inheritDoc} + * + * @see eu.dnetlib.enabling.is.registry.rmi.ISRegistryService#updateProfile(java.lang.String, java.lang.String, java.lang.String) + */ + @Override + public boolean updateProfile(final String resId, final String resourceProfile, final String resourceType) throws ISRegistryException { + try { + final String fileName = resIdResolver.getFileName(resId); + final String fileColl = "/db/DRIVER/" + resIdResolver.getCollectionName(resId); + + final String oldProfileSrc = isStore.getXML(fileName, fileColl); + + if (oldProfileSrc == null) { throw new ISRegistryException("cannot update a non existing profile " + resId); } + + final OpaqueResource oldResource = new StringOpaqueResource(oldProfileSrc); + + final StringOpaqueResource newResource = new StringOpaqueResource(resourceProfile); + newResource.setResourceId(oldResource.getResourceId()); + newResource.setResourceKind(oldResource.getResourceKind()); + newResource.setResourceType(oldResource.getResourceType()); + newResource.setModificationDate(new Date()); + + getResourceValidator().validate(newResource); + + return isStore.updateXML(fileName, fileColl, newResource.asString()); + } catch (ISStoreException e) { + throw new ISRegistryException(e); + } catch (XPathExpressionException e) { + throw new ISRegistryException(e); + } catch (ValidationException e) { + throw new ISRegistryException("profile not conforming to xml schema", e); + } catch (SAXException e) { + throw new ISRegistryException(e); + } catch (IOException e) { + throw new ISRegistryException(e); + } catch (ParserConfigurationException e) { + throw new ISRegistryException(e); + } + } + + /** + * {@inheritDoc} + * + * @see eu.dnetlib.enabling.is.registry.rmi.ISRegistryService#updateProfileDHN(java.lang.String) + */ + @Override + public String updateProfileDHN(final String resourceProfile) throws ISRegistryException { + // TODO Auto-generated method stub + throw new UnimplementedException(); + } + + /** + * {@inheritDoc} + * + * @see eu.dnetlib.enabling.is.registry.rmi.ISRegistryService#updateProfileNode(java.lang.String, java.lang.String, java.lang.String) + */ + @Override + public boolean updateProfileNode(final String profId, final String xpath, final String node) throws ISRegistryException { + return executeXUpdate("for $x in collection('/db/DRIVER')//RESOURCE_PROFILE[.//RESOURCE_IDENTIFIER/@value eq '" + profId + "']" + xpath + + " return update replace $x with " + node); + } + + /** + * {@inheritDoc} + * + * @see eu.dnetlib.enabling.is.registry.rmi.ISRegistryService#updateRegionDescription(java.lang.String, java.lang.String) + */ + @Override + public boolean updateRegionDescription(final String profId, final String resourceProfile) throws ISRegistryException { + // TODO Auto-generated method stub + throw new UnimplementedException(); + } + + /** + * {@inheritDoc} + * + * @see eu.dnetlib.enabling.is.registry.rmi.ISRegistryService#validateProfile(java.lang.String) + */ + @Override + public String validateProfile(final String profId) throws ISRegistryException { + try { + final String resourceProfile = isLookup.getResourceProfile(profId); + final OpaqueResource resource = new StringOpaqueResource(resourceProfile); + pendingManager.setValid(resource); + + return resource.getResourceId(); + } catch (ISLookUpException e) { + throw new ISRegistryException(CANT_FETCH, e); + } catch (XPathExpressionException e) { + throw new ISRegistryException(CANT_CREATE, e); + } catch (SAXException e) { + throw new ISRegistryException(CANT_CREATE, e); + } catch (IOException e) { + throw new ISRegistryException(CANT_CREATE, e); + } catch (ParserConfigurationException e) { + throw new ISRegistryException(CANT_CREATE, e); + } + } + + /** + * {@inheritDoc} + * + * @see eu.dnetlib.enabling.is.registry.rmi.ISRegistryService#invalidateProfile(java.lang.String) + */ + @Override + public String invalidateProfile(final String profId) throws ISRegistryException { + try { + final String resourceProfile = isLookup.getResourceProfile(profId); + final OpaqueResource resource = new StringOpaqueResource(resourceProfile); + pendingManager.setPending(resource); + + return resource.getResourceId(); + } catch (ISLookUpException e) { + throw new ISRegistryException(CANT_FETCH, e); + } catch (XPathExpressionException e) { + throw new ISRegistryException(CANT_CREATE, e); + } catch (SAXException e) { + throw new ISRegistryException(CANT_CREATE, e); + } catch (IOException e) { + throw new ISRegistryException(CANT_CREATE, e); + } catch (ParserConfigurationException e) { + throw new ISRegistryException(CANT_CREATE, e); + } + } + + /** + * {@inheritDoc} + * + * @see eu.dnetlib.enabling.is.registry.rmi.ISRegistryService#validateProfiles(java.util.List) + */ + @Override + public List validateProfiles(final List profIds) throws ISRegistryException { + throw new APIDeprecatedException(); + } + + public UniqueIdentifierGenerator getUuidGenerator() { + return uuidGenerator; + } + + public void setUuidGenerator(final UniqueIdentifierGenerator uuidGenerator) { + this.uuidGenerator = uuidGenerator; + } + + public PendingResourceManager getPendingManager() { + return pendingManager; + } + + public void setPendingManager(final PendingResourceManager pendingManager) { + this.pendingManager = pendingManager; + } + + public ResourceIdentifierResolver getResIdResolver() { + return resIdResolver; + } + + public void setResIdResolver(final ResourceIdentifierResolver resIdResolver) { + this.resIdResolver = resIdResolver; + } + + public OpaqueResourceValidator getResourceValidator() { + return resourceValidator; + } + + @Required + public void setResourceValidator(final OpaqueResourceValidator resourceValidator) { + this.resourceValidator = resourceValidator; + } + + @Required + public void setXqueryUtils(final XQueryUtils xqueryUtils) { + this.xqueryUtils = xqueryUtils; + } + + public XQueryUtils getXqueryUtils() { + return xqueryUtils; + } + + public RegistryBlackboardManager getBlackboardManager() { + return blackboardManager; + } + + public void setBlackboardManager(final RegistryBlackboardManager blackboardManager) { + this.blackboardManager = blackboardManager; + } + + public ProfileValidationStrategy getProfileValidationStrategy() { + return profileValidationStrategy; + } + + public void setProfileValidationStrategy(final ProfileValidationStrategy profileValidationStrategy) { + this.profileValidationStrategy = profileValidationStrategy; + } + + public ISStoreService getIsStore() { + return isStore; + } + + @Required + public void setIsStore(final ISStoreService isStore) { + this.isStore = isStore; + } + + public ISLookUpService getIsLookup() { + return isLookup; + } + + @Required + public void setIsLookup(final ISLookUpService isLookup) { + this.isLookup = isLookup; + } + +} diff --git a/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/registry/IdPreservingPendingResourceManagerImpl.java b/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/registry/IdPreservingPendingResourceManagerImpl.java new file mode 100644 index 0000000..81e77da --- /dev/null +++ b/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/registry/IdPreservingPendingResourceManagerImpl.java @@ -0,0 +1,209 @@ +package eu.dnetlib.enabling.is.registry; + +import java.util.Date; + +import javax.annotation.Resource; +import javax.xml.xpath.XPathExpressionException; + +import org.springframework.beans.factory.annotation.Required; + +import eu.dnetlib.enabling.is.registry.rmi.ISRegistryException; +import eu.dnetlib.enabling.is.registry.rmi.ISRegistryService; +import eu.dnetlib.enabling.is.registry.schema.OpaqueResourceValidator; +import eu.dnetlib.enabling.is.registry.schema.ValidationException; +import eu.dnetlib.enabling.is.registry.validation.ProfileValidationStrategy; +import eu.dnetlib.enabling.is.registry.validation.RegistrationPhase; +import eu.dnetlib.enabling.is.store.rmi.ISStoreException; +import eu.dnetlib.enabling.is.store.rmi.ISStoreService; +import eu.dnetlib.enabling.tools.CompatResourceIdentifierResolverImpl; +import eu.dnetlib.enabling.tools.OpaqueResource; +import eu.dnetlib.enabling.tools.ResourceIdentifierComposer; +import eu.dnetlib.enabling.tools.ResourceIdentifierResolver; +import eu.dnetlib.enabling.tools.XQueryUtils; + +public class IdPreservingPendingResourceManagerImpl implements PendingResourceManager, ResourceKindResolver { + + /** + * is registry + */ + private ISRegistryService isRegistry; + + /** + * is store + */ + private ISStoreService isStore; + + /** + * This bean resolver + */ + private ResourceKindResolver resourceKindResolver; + + /** + * used to validate resources. + */ + private OpaqueResourceValidator resourceValidator; + + /** + * used to get the root collection. + */ + private XQueryUtils xqueryUtils; + + /** + * manages resource identifier mappings with the abstract xmldb namespace (files/collections). + */ + @Resource + private ResourceIdentifierResolver resIdResolver = new CompatResourceIdentifierResolverImpl(); + + /** + * used to create a new resource id. + */ + @Resource + private ResourceIdentifierComposer resIdComposer = new CompatResourceIdentifierResolverImpl(); + + /** + * used to validate resources w.r.t. a set of defined properties. + */ + @Resource + private ProfileValidationStrategy profileValidationStrategy; + + /** + * {@inheritDoc} + * + * @see eu.dnetlib.enabling.is.registry.PendingResourceManager#setPending(eu.dnetlib.enabling.tools.OpaqueResource) + */ + @Override + public void setPending(final OpaqueResource resource, final boolean local) { + try { + resource.setResourceKind(getPendingKindForType(resource.getResourceType())); + + if (!local) { + isRegistry.deleteProfile(resource.getResourceId()); + + registerProfile(resource); + } + + } catch (XPathExpressionException e) { + throw new IllegalStateException(e); + } catch (ISRegistryException e) { + throw new IllegalStateException(e); + } + } + + /** + * {@inheritDoc} + * + * @see eu.dnetlib.enabling.is.registry.PendingResourceManager#setPending(eu.dnetlib.enabling.tools.OpaqueResource) + */ + @Override + public void setPending(final OpaqueResource resource) { + setPending(resource, false); + } + + /** + * {@inheritDoc} + * + * @see eu.dnetlib.enabling.is.registry.PendingResourceManager#setValid(eu.dnetlib.enabling.tools.OpaqueResource) + */ + @Override + public void setValid(final OpaqueResource resource) { + try { + if (resource.getResourceKind() != null && resource.getResourceKind().equals(getNormalKindForType(resource.getResourceType()))) { throw new IllegalArgumentException( + "trying to validate an already valid resource"); } + + profileValidationStrategy.accept(resource, RegistrationPhase.Validate); + + resource.setResourceKind(getNormalKindForType(resource.getResourceType())); + + isRegistry.deleteProfile(resource.getResourceId()); + + registerProfile(resource); + + } catch (XPathExpressionException e) { + throw new IllegalStateException(e); + } catch (ISRegistryException e) { + throw new IllegalStateException(e); + } catch (ValidationException e) { + throw new IllegalStateException(e); + } + } + + public String registerProfile(final OpaqueResource resource) throws ISRegistryException { + try { + final String oldId = resource.getResourceId(); + final String fileName = resIdResolver.getFileName(oldId); + final String newColl = xqueryUtils.getCollectionPath(resource); + + final String newId = resIdComposer.createResourceId(fileName, newColl); + + resource.setResourceId(newId); + + resource.setModificationDate(new Date()); + + // log.info("validating to xml schema: " + resource.asString()); + resourceValidator.validate(resource); + + // TODO: factor out ResourceType class + isStore.insertXML(fileName, xqueryUtils.getRootCollection() + newColl, resource.asString()); + + return resource.getResourceId(); + } catch (ISStoreException e) { + throw new ISRegistryException(e); + } catch (ValidationException e) { + throw new ISRegistryException("profile is not conforming to the schema: " + e.getMessage(), e); + } + } + + @Override + public String getNormalKindForType(final String resourceType) throws XPathExpressionException { + return resourceKindResolver.getNormalKindForType(resourceType); + } + + @Override + public String getPendingKindForType(final String resourceType) throws XPathExpressionException { + return resourceKindResolver.getPendingKindForType(resourceType); + } + + // ///////////////////////////// + + public ResourceKindResolver getResourceKindResolver() { + return resourceKindResolver; + } + + @Required + public void setResourceKindResolver(final ResourceKindResolver resourceKindResolver) { + this.resourceKindResolver = resourceKindResolver; + } + + @Required + public void setXqueryUtils(final XQueryUtils xqueryUtils) { + this.xqueryUtils = xqueryUtils; + } + + public OpaqueResourceValidator getResourceValidator() { + return resourceValidator; + } + + @Required + public void setResourceValidator(final OpaqueResourceValidator resourceValidator) { + this.resourceValidator = resourceValidator; + } + + public ISRegistryService getIsRegistry() { + return isRegistry; + } + + @Required + public void setIsRegistry(final ISRegistryService isRegistry) { + this.isRegistry = isRegistry; + } + + public ISStoreService getIsStore() { + return isStore; + } + + @Required + public void setIsStore(final ISStoreService isStore) { + this.isStore = isStore; + } + +} diff --git a/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/registry/NameBasedResourceKindResolver.java b/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/registry/NameBasedResourceKindResolver.java new file mode 100644 index 0000000..8746285 --- /dev/null +++ b/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/registry/NameBasedResourceKindResolver.java @@ -0,0 +1,44 @@ +package eu.dnetlib.enabling.is.registry; + +import javax.xml.xpath.XPathExpressionException; + +/** + * Uses current driver convention and tries to guess the correct resource kinds (both normal and pending) depending on + * the resource type name. + * + * @author marko + * + */ +public class NameBasedResourceKindResolver implements ResourceKindResolver { + + /** + * {@inheritDoc} + * @see eu.dnetlib.enabling.is.registry.ResourceKindResolver#getNormalKindForType(java.lang.String) + */ + @Override + public String getNormalKindForType(final String resourceType) throws XPathExpressionException { + if (isService(resourceType)) + return "ServiceResources"; + return generateKind(resourceType); + } + + /** + * {@inheritDoc} + * @see eu.dnetlib.enabling.is.registry.ResourceKindResolver#getPendingKindForType(java.lang.String) + */ + @Override + public String getPendingKindForType(final String resourceType) throws XPathExpressionException { + if (isService(resourceType)) + return "PendingServiceResources"; + return "PendingDSResources"; + } + + private boolean isService(final String resourceType) { + return resourceType.matches(".*ServiceResourceType$"); + } + + private String generateKind(final String resourceType) { + return resourceType.replaceAll("ResourceType$", "Resources"); + } + +} diff --git a/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/registry/NoSuchPendingCategoryException.java b/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/registry/NoSuchPendingCategoryException.java new file mode 100644 index 0000000..cd3b795 --- /dev/null +++ b/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/registry/NoSuchPendingCategoryException.java @@ -0,0 +1,14 @@ +package eu.dnetlib.enabling.is.registry; + +public class NoSuchPendingCategoryException extends IllegalStateException { + + public NoSuchPendingCategoryException(String message) { + super(message); + } + + /** + * + */ + private static final long serialVersionUID = 6934748076388947172L; + +} diff --git a/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/registry/PendingResourceManager.java b/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/registry/PendingResourceManager.java new file mode 100644 index 0000000..d898fd8 --- /dev/null +++ b/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/registry/PendingResourceManager.java @@ -0,0 +1,41 @@ +package eu.dnetlib.enabling.is.registry; + +import eu.dnetlib.enabling.tools.OpaqueResource; + +/** + * The IS registry has to handle the 'pending' state of the resources in several ways. + * + *

Implementors of this interface will change the profiles according to the pending profile management policy.

+ * + *

See implementors.

+ * + * @author marko + * + */ +public interface PendingResourceManager { + + /** + * change a profile to a pending state. + * + * @param resource opaque resource + */ + void setPending(OpaqueResource resource); + + /** + * change a profile to a valid state. + * + * same as setPending(resource, false); + * + * @param resource opaque resource + */ + void setValid(OpaqueResource resource); + + /** + * change a profile to a valid state. + * + * @param resource resource + * @param local true if the resource is not persistent + */ + void setPending(OpaqueResource resource, boolean local); + +} diff --git a/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/registry/RegistryBlackboardManager.java b/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/registry/RegistryBlackboardManager.java new file mode 100644 index 0000000..f3d77e3 --- /dev/null +++ b/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/registry/RegistryBlackboardManager.java @@ -0,0 +1,43 @@ +package eu.dnetlib.enabling.is.registry; + +/** + * Internally used by the Registry Service to perform modifications on the service blackboard, a funcionality provided + * by the registry API. + * + * @author marko + * + */ +public interface RegistryBlackboardManager { + /** + * add a new blackboard message. + * + * @param profId + * service profile id + * @param messageId + * message identifier, chosen by the client + * @param message + * message body + */ + void addMessage(String profId, String messageId, String message); + + /** + * Reply to a given message replacing the current message with the parameter. The message ID is inferred from the + * new message body. + * + * @param profId + * service profile id + * @param message + * message body + */ + void replyMessage(String profId, String message); + + /** + * delete a message for a given message id. + * + * @param profId + * service profile id + * @param messageId + * message id + */ + void deleteMessage(String profId, String messageId); +} diff --git a/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/registry/RegistryBlackboardManagerImpl.java b/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/registry/RegistryBlackboardManagerImpl.java new file mode 100644 index 0000000..19df3eb --- /dev/null +++ b/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/registry/RegistryBlackboardManagerImpl.java @@ -0,0 +1,257 @@ +package eu.dnetlib.enabling.is.registry; + +import javax.xml.transform.dom.DOMResult; +import javax.xml.xpath.XPathConstants; +import javax.xml.xpath.XPathExpressionException; +import javax.xml.xpath.XPathFactory; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.springframework.beans.factory.annotation.Required; +import org.w3c.dom.Document; +import org.w3c.dom.Element; +import org.w3c.dom.Node; + +import eu.dnetlib.enabling.is.lookup.rmi.ISLookUpService; +import eu.dnetlib.enabling.is.registry.rmi.ISRegistryService; +import eu.dnetlib.enabling.tools.OpaqueResource; +import eu.dnetlib.enabling.tools.StringOpaqueResource; +import eu.dnetlib.enabling.tools.blackboard.BlackboardMessage; +import eu.dnetlib.miscutils.datetime.DateUtils; +import eu.dnetlib.miscutils.jaxb.JaxbFactory; + +/** + * Simple registry blackboard manager implementation. + * + * @author marko + * + */ +public class RegistryBlackboardManagerImpl implements RegistryBlackboardManager { // NOPMD + + /** + * logger. + */ + private static final Log log = LogFactory.getLog(RegistryBlackboardManagerImpl.class); // NOPMD by marko on 11/24/08 5:02 PM + + /** + * timestamp padding. + */ + private static final String PADDING = "000"; + + /** + * milliseconds in a second. + */ + private static final int MILLIS = 1000; + + /** + * IS Lookup + */ + private ISLookUpService isLookup; + + /** + * the registry which is bound with this registry blackboard manager implementation. + */ + private ISRegistryService registryService; + + /** + * blackboard message factory. + */ + private JaxbFactory messageFactory; + + /** + * provides the current date. Testers can override. + */ + private MessageDater messageDater = new MessageDater(); + + /** + * Testers can override. + * + * @author marko + * + */ + public static class MessageDater { + + public String getCurrentDate() { + return DateUtils.now_ISO8601(); + } + + public String getNumericStamp() { + return Long.toString(System.currentTimeMillis() / MILLIS) + "." + System.currentTimeMillis() % MILLIS + PADDING; + } + } + + /** + * LAST_REQUEST or LAST_RESPONSE blackboard time stamp holders. + * + * @author marko + * + */ + public enum LastStamp { + /** + * LAST_REQUEST, used when the blackboard message flows from the client to the server. + */ + REQUEST, + + /** + * LAST_RESPONSE, used when the blackboard message flows from the server to the client, signaling the completion/progress of the + * action.. + */ + RESPONSE + } + + /** + * {@inheritDoc} + * + * @see eu.dnetlib.enabling.is.registry.RegistryBlackboardManager#addMessage(java.lang.String, java.lang.String, java.lang.String) + */ + @Override + public void addMessage(final String profId, final String messageId, final String message) { // NOPMD + try { + final BlackboardMessage bbm = messageFactory.parse(message); + bbm.setDate(messageDater.getCurrentDate()); // preserve compatibility. + + if (bbm.getId() == null || !bbm.getId().equals(messageId)) { throw new IllegalArgumentException("invalid blackboard message id"); } + + synchronized (this) { + final OpaqueResource serviceProfile = new StringOpaqueResource(isLookup.getResourceProfile(profId)); + + final Document doc = serviceProfile.asDom(); + final Node bboard = (Node) XPathFactory.newInstance().newXPath().evaluate("//BLACKBOARD", doc, XPathConstants.NODE); + + // delete current element if exists + final Node messageElement = (Node) XPathFactory.newInstance().newXPath().evaluate("//BLACKBOARD/MESSAGE[@id='" + messageId + "']", doc, + XPathConstants.NODE); + + if (messageElement != null) { + bboard.removeChild(messageElement); + } + + // append the serialized node to the blackboard node + messageFactory.serialize(bbm, new DOMResult(bboard)); + + updateLastStamps(doc, LastStamp.REQUEST, messageId); + + registryService.updateProfile(profId, serviceProfile.asString(), serviceProfile.getResourceType()); + } + } catch (Exception e) { + throw new IllegalStateException(e); + } + } + + /** + * Helper method which updates the LAST_* stamps in the blackboard header. + * + * @param doc + * profile DOM document + * @param stamp + * which stamp to modify + * @param messageId + * message id to point the stamp to + * @throws XPathExpressionException + * could happen + */ + protected void updateLastStamps(final Document doc, final LastStamp stamp, final String messageId) throws XPathExpressionException { + final Element lastRequest = (Element) XPathFactory.newInstance().newXPath().evaluate("//BLACKBOARD/LAST_" + stamp, doc, XPathConstants.NODE); + lastRequest.setTextContent(messageId); + lastRequest.setAttribute("date", messageDater.getNumericStamp()); + } + + /** + * {@inheritDoc} + * + * @see eu.dnetlib.enabling.is.registry.RegistryBlackboardManager#deleteMessage(java.lang.String, java.lang.String) + */ + @Override + public void deleteMessage(final String profId, final String messageId) { + try { + synchronized (this) { + final OpaqueResource serviceProfile = new StringOpaqueResource(isLookup.getResourceProfile(profId)); + final Document doc = serviceProfile.asDom(); + + final Node message = (Node) XPathFactory.newInstance().newXPath().evaluate("//BLACKBOARD/MESSAGE[@id='" + messageId + "']", doc, + XPathConstants.NODE); + + message.getParentNode().removeChild(message); + + registryService.updateProfile(profId, serviceProfile.asString(), serviceProfile.getResourceType()); + } + log.debug("Deleted bb message " + messageId + " from profile " + profId); + } catch (Exception e) { + log.error("Error deleting bb message " + messageId + " from profile " + profId, e); + throw new IllegalStateException(e); + } + } + + /** + * {@inheritDoc} + * + * @see eu.dnetlib.enabling.is.registry.RegistryBlackboardManager#replyMessage(java.lang.String, java.lang.String) + */ + @Override + public void replyMessage(final String profId, final String message) { + try { + final BlackboardMessage bbm = messageFactory.parse(message); + bbm.setDate(messageDater.getCurrentDate()); // preserve compatibility. + + final String messageId = bbm.getId(); + + synchronized (this) { + final OpaqueResource serviceProfile = new StringOpaqueResource(isLookup.getResourceProfile(profId)); + final Document doc = serviceProfile.asDom(); + + final Node messageElement = (Node) XPathFactory.newInstance().newXPath().evaluate("//BLACKBOARD/MESSAGE[@id='" + messageId + "']", doc, + XPathConstants.NODE); + + if (messageElement == null) { throw new IllegalArgumentException("no such blackboard message " + messageId + ". Unably to reply"); } + + final Node bboard = messageElement.getParentNode(); + bboard.removeChild(messageElement); + + // append the serialized node to the blackboard node + messageFactory.serialize(bbm, new DOMResult(bboard)); + + updateLastStamps(doc, LastStamp.RESPONSE, messageId); + + registryService.updateProfile(profId, serviceProfile.asString(), serviceProfile.getResourceType()); + } + } catch (Exception e) { + throw new IllegalStateException(e); + } + } + + public ISRegistryService getRegistryService() { + return registryService; + } + + @Required + public void setRegistryService(final ISRegistryService registryService) { + this.registryService = registryService; + } + + public JaxbFactory getMessageFactory() { + return messageFactory; + } + + @Required + public void setMessageFactory(final JaxbFactory messageFactory) { + this.messageFactory = messageFactory; + } + + public MessageDater getMessageDater() { + return messageDater; + } + + public void setMessageDater(final MessageDater messageDater) { + this.messageDater = messageDater; + } + + public ISLookUpService getIsLookup() { + return isLookup; + } + + @Required + public void setIsLookup(final ISLookUpService isLookup) { + this.isLookup = isLookup; + } + +} diff --git a/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/registry/ResourceKindResolver.java b/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/registry/ResourceKindResolver.java new file mode 100644 index 0000000..b8b9ac6 --- /dev/null +++ b/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/registry/ResourceKindResolver.java @@ -0,0 +1,8 @@ +package eu.dnetlib.enabling.is.registry; + +import javax.xml.xpath.XPathExpressionException; + +public interface ResourceKindResolver { + String getNormalKindForType(final String resourceType) throws XPathExpressionException; + String getPendingKindForType(final String resourceType) throws XPathExpressionException; +} diff --git a/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/registry/ResourceKindResolverChain.java b/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/registry/ResourceKindResolverChain.java new file mode 100644 index 0000000..91d6fb1 --- /dev/null +++ b/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/registry/ResourceKindResolverChain.java @@ -0,0 +1,62 @@ +package eu.dnetlib.enabling.is.registry; + +import java.util.List; + +import javax.xml.xpath.XPathExpressionException; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.springframework.beans.factory.annotation.Required; + +/** + * Returns the first resource resolver + * + * @author marko + * + */ +public class ResourceKindResolverChain implements ResourceKindResolver { + + private static final Log log = LogFactory.getLog(ResourceKindResolverChain.class); // NOPMD by marko on 11/24/08 5:02 PM + + /** + * resolvers. + */ + private List resolvers; + + @Override + public String getNormalKindForType(final String resourceType) throws XPathExpressionException { + for (final ResourceKindResolver resolver : resolvers) { + final String res = resolver.getNormalKindForType(resourceType); + if (res != null) + return res; + } + return null; + + } + + @Override + public String getPendingKindForType(final String resourceType) throws XPathExpressionException { + for (final ResourceKindResolver resolver : resolvers) { + try { + final String res = resolver.getPendingKindForType(resourceType); + if (res != null) + return res; + } catch (NoSuchPendingCategoryException e) { + log.debug("resolver didn't find pending category", e); + continue; + } + } + log.debug("cannot find pending category because no resolver found a pending category"); + throw new NoSuchPendingCategoryException("no pending category for " + resourceType); + } + + public List getResolvers() { + return resolvers; + } + + @Required + public void setResolvers(final List resolvers) { + this.resolvers = resolvers; + } + +} diff --git a/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/registry/schema/OpaqueResourceValidatorImpl.java b/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/registry/schema/OpaqueResourceValidatorImpl.java new file mode 100644 index 0000000..ced0d75 --- /dev/null +++ b/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/registry/schema/OpaqueResourceValidatorImpl.java @@ -0,0 +1,57 @@ +package eu.dnetlib.enabling.is.registry.schema; + +import java.io.IOException; +import java.io.StringReader; + +import javax.xml.transform.stream.StreamSource; +import javax.xml.validation.Schema; +import javax.xml.validation.Validator; + +import org.xml.sax.SAXException; + +import eu.dnetlib.enabling.tools.OpaqueResource; + +/** + * validates an opaque resource according to its declared resource type. + * + * @author marko + * + */ +public class OpaqueResourceValidatorImpl implements OpaqueResourceValidator { + + /** + * schema dao. + */ + private ResourceSchemaDAO schemaDao; + + /** + * {@inheritDoc} + * + * @see eu.dnetlib.enabling.is.registry.schema.OpaqueResourceValidator#validate(eu.dnetlib.enabling.tools.OpaqueResource) + */ + @Override + public void validate(final OpaqueResource resource) throws ValidationException { + final Schema schema = getSchemaDao().getResourceSchema(resource.getResourceType()); + if (schema == null) + throw new ValidationException("no registered schema for " + resource.getResourceType()); + final Validator validator = schema.newValidator(); + + try { + // hack to workaround for #1500 + validator.validate(new StreamSource(new StringReader(resource.asString()))); + } catch (SAXException e) { + throw new ValidationException(e); + } catch (IOException e) { + throw new ValidationException(e); + } + } + + public ResourceSchemaDAO getSchemaDao() { + return schemaDao; + } + + public void setSchemaDao(final ResourceSchemaDAO schemaDao) { + this.schemaDao = schemaDao; + } + +} diff --git a/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/registry/schema/PermissiveOpaqueResourceValidatorImpl.java b/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/registry/schema/PermissiveOpaqueResourceValidatorImpl.java new file mode 100644 index 0000000..4bf8641 --- /dev/null +++ b/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/registry/schema/PermissiveOpaqueResourceValidatorImpl.java @@ -0,0 +1,36 @@ +package eu.dnetlib.enabling.is.registry.schema; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import eu.dnetlib.enabling.tools.OpaqueResource; + +/** + * Unlike the OpaqueResourceValidatorImpl, this implementation only logs an error but accepts every resource as valid. + * + * Use only during testing/development! + * + * @author marko + * + */ +public class PermissiveOpaqueResourceValidatorImpl extends OpaqueResourceValidatorImpl { + /** + * logger. + */ + private static final Log log = LogFactory.getLog(PermissiveOpaqueResourceValidatorImpl.class); // NOPMD by marko on 11/24/08 5:02 PM + + /** + * {@inheritDoc} + * + * @see eu.dnetlib.enabling.is.registry.schema.OpaqueResourceValidatorImpl#validate(eu.dnetlib.enabling.tools.OpaqueResource) + */ + @Override + public void validate(final OpaqueResource resource) throws ValidationException { + try { + super.validate(resource); + } catch (ValidationException e) { + log.fatal("validation error, continuing (permissive mode)", e); + } + } + +} diff --git a/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/registry/schema/ResourceSchemaDAO.java b/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/registry/schema/ResourceSchemaDAO.java new file mode 100644 index 0000000..b42b47b --- /dev/null +++ b/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/registry/schema/ResourceSchemaDAO.java @@ -0,0 +1,21 @@ +package eu.dnetlib.enabling.is.registry.schema; + +import javax.xml.validation.Schema; + +/** + * data access object for managing resource schemas. + * + * @author marko + * + */ +public interface ResourceSchemaDAO { + + /** + * obtain a resource schema instance for a given resource type. + * + * @param resourceType resource type + * @return schema instance + */ + Schema getResourceSchema(String resourceType); + +} diff --git a/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/registry/schema/ResourceSchemaDAOImpl.java b/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/registry/schema/ResourceSchemaDAOImpl.java new file mode 100644 index 0000000..4fe1b49 --- /dev/null +++ b/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/registry/schema/ResourceSchemaDAOImpl.java @@ -0,0 +1,65 @@ +package eu.dnetlib.enabling.is.registry.schema; + +import java.io.StringReader; + +import javax.xml.XMLConstants; +import javax.xml.transform.stream.StreamSource; +import javax.xml.validation.Schema; +import javax.xml.validation.SchemaFactory; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.springframework.beans.factory.annotation.Required; +import org.xml.sax.SAXException; + +import eu.dnetlib.enabling.is.lookup.rmi.ISLookUpException; +import eu.dnetlib.enabling.is.lookup.rmi.ISLookUpService; + +/** + * manages the resource schemas through the registry service. + * + * @author marko + * + */ +public class ResourceSchemaDAOImpl implements ResourceSchemaDAO { + + private ISLookUpService isLookup; + + /** + * logger. + */ + private static final Log log = LogFactory.getLog(ResourceSchemaDAOImpl.class); // NOPMD by marko on 11/24/08 5:02 PM + + /** + * {@inheritDoc} + * + * @see eu.dnetlib.enabling.is.registry.schema.ResourceSchemaDAO#getResourceSchema(java.lang.String) + */ + @Override + public Schema getResourceSchema(final String resourceType) { + try { + final String schemaSource = isLookup.getResourceTypeSchema(resourceType); + if (schemaSource == null || schemaSource.isEmpty()) { + log.warn("cannot find resource type " + resourceType); + return null; + } + return SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI).newSchema(new StreamSource(new StringReader(schemaSource))); + } catch (ISLookUpException e) { + log.warn("cannot find resource type" + resourceType, e); + return null; + } catch (SAXException e) { + log.fatal("cannot parse resource type schema", e); + return null; + } + } + + public ISLookUpService getIsLookup() { + return isLookup; + } + + @Required + public void setIsLookup(final ISLookUpService isLookup) { + this.isLookup = isLookup; + } + +} diff --git a/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/registry/validation/AbstractProfileValidator.java b/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/registry/validation/AbstractProfileValidator.java new file mode 100644 index 0000000..13e2d31 --- /dev/null +++ b/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/registry/validation/AbstractProfileValidator.java @@ -0,0 +1,24 @@ +package eu.dnetlib.enabling.is.registry.validation; + +import org.springframework.beans.factory.annotation.Required; + +import eu.dnetlib.enabling.tools.OpaqueResource; + +public abstract class AbstractProfileValidator implements ProfileValidator { + + private RegistrationPhase phase; + + @Override + public boolean handle(final OpaqueResource resource, final RegistrationPhase phase) { + return this.phase == phase; + } + + @Required + public void setPhase(String phase) { + this.phase = RegistrationPhase.valueOf(phase); + } + + public String getPhase() { + return phase.name(); + } +} diff --git a/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/registry/validation/AlwaysAcceptProfileValidator.java b/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/registry/validation/AlwaysAcceptProfileValidator.java new file mode 100644 index 0000000..4649171 --- /dev/null +++ b/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/registry/validation/AlwaysAcceptProfileValidator.java @@ -0,0 +1,34 @@ +package eu.dnetlib.enabling.is.registry.validation; + +import eu.dnetlib.enabling.tools.OpaqueResource; + +/** + * Dummy bean used to populate the ProfileValidator list. + * @see eu.dnetlib.enabling.is.registry.validation.ProfileValidationStrategy + * + * @author claudio + * + */ +public class AlwaysAcceptProfileValidator implements ProfileValidator { + + /** + * {@inheritDoc} + * + * @see eu.dnetlib.enabling.is.registry.validation.ProfileValidator#accept(OpaqueResource) + */ + @Override + public boolean accept(OpaqueResource resource) { + return true; + } + + /** + * {@inheritDoc} + * + * @see eu.dnetlib.enabling.is.registry.validation.ProfileValidator#handle(OpaqueResource, RegistrationPhase) + */ + @Override + public boolean handle(OpaqueResource resource, RegistrationPhase phase) { + return false; + } + +} diff --git a/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/registry/validation/EnsurePropertyExistsProfileValidator.java b/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/registry/validation/EnsurePropertyExistsProfileValidator.java new file mode 100644 index 0000000..4ce336b --- /dev/null +++ b/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/registry/validation/EnsurePropertyExistsProfileValidator.java @@ -0,0 +1,38 @@ +package eu.dnetlib.enabling.is.registry.validation; + +import javax.xml.xpath.XPath; +import javax.xml.xpath.XPathExpressionException; +import javax.xml.xpath.XPathFactory; + +import eu.dnetlib.enabling.tools.OpaqueResource; + +public class EnsurePropertyExistsProfileValidator extends TypeAwareProfileValidator { + + private String name; // property name + + @Override + public boolean accept(OpaqueResource resource) { + try { + final XPath xpath = XPathFactory.newInstance().newXPath(); + + final String xquery = "//EXTRA_FIELDS/FIELD[./key = '" + getName() + "']/value/text()"; + final String value = xpath.evaluate(xquery, resource.asDom().getDocumentElement()) + ""; + + if (value.isEmpty()) + return false; + + return true; + + } catch (XPathExpressionException e) { + return false; + } + } + + public void setName(String name) { + this.name = name; + } + + public String getName() { + return name; + } +} diff --git a/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/registry/validation/ProfileValidationStrategy.java b/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/registry/validation/ProfileValidationStrategy.java new file mode 100644 index 0000000..a4e1bca --- /dev/null +++ b/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/registry/validation/ProfileValidationStrategy.java @@ -0,0 +1,34 @@ +package eu.dnetlib.enabling.is.registry.validation; + +import java.util.List; + +import javax.annotation.Resource; + +import eu.dnetlib.enabling.is.registry.schema.ValidationException; +import eu.dnetlib.enabling.tools.OpaqueResource; + +/** + * ProfileValidationStrategy iterates all the profile validators, + * once a suitable validator is found, it's called to accept or + * reject the given resource. + * + * @author claudio + * + */ +public class ProfileValidationStrategy { + + @Resource + private List profileValidators; + + public boolean accept(OpaqueResource resource, RegistrationPhase phase) throws ValidationException { + for(ProfileValidator validator : profileValidators) { + if (validator.handle(resource, phase)) { + if (validator.accept(resource)) + return true; + else throw new ValidationException("Cannot validate the given resource: " + resource.asString()); + } + } + // if no validator handles the resource + return true; + } +} diff --git a/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/registry/validation/ProfileValidator.java b/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/registry/validation/ProfileValidator.java new file mode 100644 index 0000000..d5f56a3 --- /dev/null +++ b/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/registry/validation/ProfileValidator.java @@ -0,0 +1,23 @@ +package eu.dnetlib.enabling.is.registry.validation; + +import eu.dnetlib.enabling.tools.OpaqueResource; + +public interface ProfileValidator { + /** + * True if this validator will handle this profile, false otherwise. + * 'accept' will be invoked only if 'handle' returns true + * + * @param resource + * @param phase + * @return + */ + public boolean handle(OpaqueResource resource, RegistrationPhase phase); + + /** + * true if accept, false reject. + * + * @param resource + * @return + */ + public boolean accept(OpaqueResource resource); +} diff --git a/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/registry/validation/RegistrationPhase.java b/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/registry/validation/RegistrationPhase.java new file mode 100644 index 0000000..7b45c62 --- /dev/null +++ b/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/registry/validation/RegistrationPhase.java @@ -0,0 +1,12 @@ +package eu.dnetlib.enabling.is.registry.validation; + +/** + * Resources registration phases. + * + * @author claudio + * + */ +public enum RegistrationPhase { + Register, + Validate // as in 'validateProfile', not this 'validation'. +} \ No newline at end of file diff --git a/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/registry/validation/TypeAwareProfileValidator.java b/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/registry/validation/TypeAwareProfileValidator.java new file mode 100644 index 0000000..10cf299 --- /dev/null +++ b/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/registry/validation/TypeAwareProfileValidator.java @@ -0,0 +1,25 @@ +package eu.dnetlib.enabling.is.registry.validation; + +import org.springframework.beans.factory.annotation.Required; + +import eu.dnetlib.enabling.tools.OpaqueResource; + +public abstract class TypeAwareProfileValidator extends AbstractProfileValidator { + + private String resourceType; + + @Override + public boolean handle(OpaqueResource resource, RegistrationPhase phase) { + return super.handle(resource, phase) && getResourceType().equals(resource.getResourceType()); + } + + @Required + public void setResourceType(String resourceType) { + this.resourceType = resourceType; + } + + public String getResourceType() { + return resourceType; + } + +} diff --git a/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/AbstractNotificationDetector.java b/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/AbstractNotificationDetector.java new file mode 100644 index 0000000..9fe64e1 --- /dev/null +++ b/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/AbstractNotificationDetector.java @@ -0,0 +1,30 @@ +package eu.dnetlib.enabling.is.sn; + +/** + * NotificationDetector interface defines an injection point for the NotificationSender instance. + * + *

+ * It will be fairly common for implementors of NotificatiorDetector to back the sender reference into an instance + * variable. This abstract class offers this for free. + *

+ * + * @author marko + * + */ +public abstract class AbstractNotificationDetector implements NotificationDetector { + + /** + * notification sender which will receive events triggered by this detector. + */ + private NotificationSender sender; + + public NotificationSender getSender() { + return sender; + } + + @Override + public void setSender(final NotificationSender sender) { + this.sender = sender; + } + +} diff --git a/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/AbstractNotificationSender.java b/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/AbstractNotificationSender.java new file mode 100644 index 0000000..a7ef6b0 --- /dev/null +++ b/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/AbstractNotificationSender.java @@ -0,0 +1,30 @@ +package eu.dnetlib.enabling.is.sn; + + +/** + * NotificationSender interface defines an injection point for the NotificationInvoker instance. + * + *

+ * It will be fairly common for implementors of NotificationSender to back the invoker reference into an instance + * variable. This abstract class offers this for free.

+ * + * @author marko + * + */ +public abstract class AbstractNotificationSender implements NotificationSender { + + /** + * notification invoker used to send messages to destinations. + */ + private NotificationInvoker invoker; + + public NotificationInvoker getInvoker() { + return invoker; + } + + @Override + public void setInvoker(final NotificationInvoker invoker) { + this.invoker = invoker; + } + +} diff --git a/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/AbstractSubscriptionRegistry.java b/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/AbstractSubscriptionRegistry.java new file mode 100644 index 0000000..9b49a6e --- /dev/null +++ b/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/AbstractSubscriptionRegistry.java @@ -0,0 +1,53 @@ +package eu.dnetlib.enabling.is.sn; + +import java.util.Collection; + +import org.apache.oro.text.perl.Perl5Util; + +/** + * Provides common functionality for subscription registries. + * + * @author marko + * + */ +public abstract class AbstractSubscriptionRegistry { + + /** + * prefix position in regular expression. + */ + private static final int PREFIX_POSITION = 1; + + /** + * rest of string position in regular expression. + */ + private static final int REST_POSITION = 3; + + /** + * Return true if the subscription prefix is acceptable. + * + * Topic expressions are made of slash-delimited components. The "prefix" here is the first slash (/) delimited + * string of the topic expression. + * + * TODO: stupid implementation. + * + * @param subscription + * subscription request + * @return true if accepted + */ + protected TopicExpressionMatchResult matchPrefix(final SubscriptionRequest subscription) { + final Perl5Util matcher = new Perl5Util(); // NOPMD + + for (String prefix : getAcceptedPrefixes()) + if (matcher.match("/^(" + prefix + ")($|/)(.*)$/", subscription.getTopicExpression())) { + return new TopicExpressionMatchResult(matcher.getMatch().group(PREFIX_POSITION), matcher.getMatch().group(REST_POSITION)); + } + return null; + } + + /** + * A collection of accepted prefixes. + * + * @return prefix list + */ + protected abstract Collection getAcceptedPrefixes(); +} diff --git a/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/AsynchronousNotificationSenderImpl.java b/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/AsynchronousNotificationSenderImpl.java new file mode 100644 index 0000000..f507da4 --- /dev/null +++ b/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/AsynchronousNotificationSenderImpl.java @@ -0,0 +1,119 @@ +package eu.dnetlib.enabling.is.sn; + +import java.util.concurrent.BlockingQueue; +import java.util.concurrent.LinkedBlockingQueue; + +import javax.xml.ws.wsaddressing.W3CEndpointReference; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +/** + * Asynchronous but in-order delivery of notifications. + * + * @author marko + * + */ +public class AsynchronousNotificationSenderImpl extends AbstractNotificationSender implements Runnable { // NOPMD + /** + * logger. + */ + private static final Log log = LogFactory.getLog(AsynchronousNotificationSenderImpl.class); // NOPMD by marko on 11/24/08 5:02 PM + + /** + * Encapsulates an notification job. + * + * @author marko + * + */ + class NotificationJob { + /** + * notification destination. + */ + private final transient W3CEndpointReference destination; + + /** + * notification message. + */ + private final transient NotificationMessage message; + + /** + * construct a new notification job. + * + * @param destination destination + * @param message message + */ + public NotificationJob(final W3CEndpointReference destination, final NotificationMessage message) { + super(); + this.destination = destination; + this.message = message; + } + + public W3CEndpointReference getDestination() { + return destination; + } + + public NotificationMessage getMessage() { + return message; + } + + } + + /** + * job queue. + */ + private BlockingQueue jobQueue = new LinkedBlockingQueue(); + + /** + * {@inheritDoc} + * + * @see eu.dnetlib.enabling.is.sn.NotificationSender#send(javax.xml.ws.wsaddressing.W3CEndpointReference, + * eu.dnetlib.enabling.is.sn.NotificationMessage) + */ + @Override + public void send(final W3CEndpointReference destination, final NotificationMessage message) { + log.debug("queuing asynchronous notification"); + try { + jobQueue.put(new NotificationJob(destination, message)); + } catch (InterruptedException e) { + log.warn("possibly lost notification", e); + } + } + + /** + * start this notification sender (called by spring lifecycle). + */ + void start() { + new Thread(this).start(); // NOPMD + } + + /** + * {@inheritDoc} + * @see java.lang.Runnable#run() + */ + @Override + public void run() { + while (true) { + try { + final NotificationJob job = jobQueue.take(); + + try { + getInvoker().send(job.getDestination(), job.getMessage(), 0); + } catch (javax.xml.ws.soap.SOAPFaultException t) { + log.fatal("error sending notification to " + job.getDestination().toString(), t); + } + } catch (InterruptedException e) { + log.warn("possibly lost notification", e); + } + } + } + + public BlockingQueue getJobQueue() { + return jobQueue; + } + + public void setJobQueue(final BlockingQueue jobQueue) { + this.jobQueue = jobQueue; + } + +} diff --git a/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/DnetPathVerifier.java b/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/DnetPathVerifier.java new file mode 100644 index 0000000..f832c6c --- /dev/null +++ b/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/DnetPathVerifier.java @@ -0,0 +1,23 @@ +package eu.dnetlib.enabling.is.sn; + +import java.io.File; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +public class DnetPathVerifier { + + /** + * logger. + */ + private static final Log log = LogFactory.getLog(DnetPathVerifier.class); // NOPMD by marko on 11/24/08 5:02 PM + + public DnetPathVerifier(final String dnetPath) { + File f = new File(dnetPath); + if (f.exists() == false) { + log.info("path '" + dnetPath + "' not found, creating..."); + f.mkdirs(); + } + } + +} diff --git a/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/EPRUtil.java b/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/EPRUtil.java new file mode 100644 index 0000000..e5cf920 --- /dev/null +++ b/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/EPRUtil.java @@ -0,0 +1,65 @@ +package eu.dnetlib.enabling.is.sn; + +import javax.xml.transform.dom.DOMResult; +import javax.xml.ws.wsaddressing.W3CEndpointReference; +import javax.xml.xpath.XPathExpressionException; +import javax.xml.xpath.XPathFactory; + +/** + * Extracts useful low level informations from an EPR, so that these can be encoded in the OAI + * resumption token. + * + * @author michele + * + */ +public final class EPRUtil { + + /** + * prevents instantiation. + */ + private EPRUtil() { + // prevents instantiation + } + + /** + * Extracts the service address out of the EPR. + * + * @param epr epr + * @return address + */ + public static String getAddress(final W3CEndpointReference epr) { + return getValue(epr, "Address"); + } + + /** + * Extracts the resource identifier out of the EPR. + * @param epr epr + * @return resource identifier + */ + public static String getResourceIdentifier(final W3CEndpointReference epr) { + return getValue(epr, "ResourceIdentifier"); + } + + /** + * Extracts an element with a given local name out of the resource identifier. + * + * @param epr epr + * @param name element name + * @return element value + */ + private static String getValue(final W3CEndpointReference epr, final String name) { + final DOMResult dom = new DOMResult(); + epr.writeTo(dom); + + try { + return XPathFactory.newInstance().newXPath().evaluate("//*[local-name() = '" + name + "']", dom.getNode()); + } catch (final XPathExpressionException e) { + throw new IllegalStateException("cannot construct xpath expression", e); + } + } + + + + + +} diff --git a/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/ISSNServiceCore.java b/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/ISSNServiceCore.java new file mode 100644 index 0000000..3432377 --- /dev/null +++ b/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/ISSNServiceCore.java @@ -0,0 +1,180 @@ +package eu.dnetlib.enabling.is.sn; + +import java.io.File; +import java.io.FileOutputStream; +import java.io.FileWriter; +import java.io.IOException; +import java.text.SimpleDateFormat; +import java.util.Collection; +import java.util.Date; +import java.util.HashMap; +import java.util.Map; +import java.util.zip.ZipEntry; +import java.util.zip.ZipOutputStream; + +import javax.xml.ws.wsaddressing.W3CEndpointReference; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.springframework.beans.factory.annotation.Required; + +import com.google.gson.Gson; +import com.google.gson.reflect.TypeToken; + +import eu.dnetlib.enabling.is.sn.resourcestate.ResourceStateSubscription; +import eu.dnetlib.enabling.is.sn.resourcestate.ResourceStateSubscriptionRegistry; +import eu.dnetlib.enabling.is.sn.rmi.ISSNException; +import eu.dnetlib.enabling.is.sn.rmi.SubscriptionRequestRejectedException; +import eu.dnetlib.enabling.tools.UniqueIdentifierGenerator; +import eu.dnetlib.enabling.tools.UniqueIdentifierGeneratorImpl; +import eu.dnetlib.miscutils.datetime.DateUtils; + +/** + * Core business logic of ISSN service, decouple from compatibility RMI interface. + * + * @author marko + * + */ +public class ISSNServiceCore { + + /** + * logger. + */ + private static final Log log = LogFactory.getLog(ISSNServiceCore.class); // NOPMD by marko on 11/24/08 5:02 PM + + /** + * subscription registries to lookup. + */ + private SubscriptionRegistry registry; + + /** + * generates subscription identifiers. + */ + private UniqueIdentifierGenerator uuidGenerator = new UniqueIdentifierGeneratorImpl("sn"); + + /** + * Directory in which backups are saved. + */ + private String backupDir; + + /** + * subscribe a consumer to topics matching the topic expression. + * + * @param consumerReference + * EPR to the service to be notified + * @param topicExpression + * topic expression + * @param ttl + * time to live in seconds + * @return subscription identifier + */ + public String subscribe(final W3CEndpointReference consumerReference, final String topicExpression, final int ttl) throws SubscriptionRequestRejectedException { + log.debug("subscribing"); + final SubscriptionRequest srq = new SubscriptionRequest(uuidGenerator.generateIdentifier(), consumerReference, topicExpression, ttl); // NOPMD + + final String subId = getRegistry().registerSubscription(srq); + if (subId != null) { + return subId; + } + return null; + } + + /** + * Unsubscribe a subscription, by id. + * + * @param subscrId subscription id + * @return true if unsubscribed + */ + public boolean unsubscribe(final String subscrId) { + return getRegistry().unsubscribe(subscrId); + } + + public String backup() throws ISSNException { + log.info("Starting backup..."); + try { + + verifyBackupDir(); + + String seq = (new SimpleDateFormat("yyyyMMdd-HHmm")).format(new Date()); + + ZipOutputStream zip = new ZipOutputStream(new FileOutputStream(backupDir + "/data-" + seq + ".zip")); + + FileWriter logFile = new FileWriter(backupDir + "/report-" + seq + ".log"); + logFile.write("Backup started at: " + DateUtils.now_ISO8601() + "\n\n"); + + backup(zip, logFile); + + logFile.write("\nBackup finished at: " + DateUtils.now_ISO8601() + "\n"); + + logFile.flush(); + logFile.close(); + + zip.flush(); + zip.close(); + + log.info("Backup finished"); + return backupDir; + } catch (final Exception e) { + log.error("Backup failed", e); + throw new ISSNException("cannot backup", e); + } + } + + private void backup(ZipOutputStream zip, FileWriter logFile) throws IOException { + + for (ResourceStateSubscription sub : getRegistry().listSubscriptions()) { + + logFile.write("SUBSCRIPTION: " + sub.getSubscriptionId() + "\n"); + log.info("Backup of subscription: " + sub.getSubscriptionId()); + + final Map attrs = new HashMap(); // NOPMD + attrs.put("prefix", sub.getPrefix()); + attrs.put("type", sub.getType()); + attrs.put("resourceId", sub.getResourceId()); + attrs.put("xpath", sub.getXpath()); + attrs.put("id", sub.getSubscriptionId()); + attrs.put("subscriber", sub.getSubscriber().toString()); + + zip.putNextEntry(new ZipEntry(sub.getSubscriptionId())); + zip.write(encodeJSon(attrs).getBytes()); + zip.closeEntry(); + } + } + + private String encodeJSon(final Map map) { + return new Gson().toJson( + map, + new TypeToken>() {}.getType() + ); + } + + private void verifyBackupDir() { + File d = new File(backupDir); + if (!d.exists()) d.mkdirs(); + } + + public UniqueIdentifierGenerator getUuidGenerator() { + return uuidGenerator; + } + + public void setUuidGenerator(final UniqueIdentifierGenerator uuidGenerator) { + this.uuidGenerator = uuidGenerator; + } + + public String getBackupDir() { + return backupDir; + } + + @Required + public void setBackupDir(String backupDir) { + this.backupDir = backupDir; + } + + public SubscriptionRegistry getRegistry() { + return registry; + } + + public void setRegistry(final SubscriptionRegistry registry) { + this.registry = registry; + } +} diff --git a/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/ISSNServiceImpl.java b/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/ISSNServiceImpl.java new file mode 100644 index 0000000..e6752b0 --- /dev/null +++ b/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/ISSNServiceImpl.java @@ -0,0 +1,203 @@ +package eu.dnetlib.enabling.is.sn; + +import java.util.Calendar; +import java.util.List; + +import javax.annotation.Resource; +import javax.xml.ws.Endpoint; +import javax.xml.ws.wsaddressing.W3CEndpointReference; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import eu.dnetlib.enabling.is.sn.rmi.ISSNException; +import eu.dnetlib.enabling.is.sn.rmi.ISSNService; +import eu.dnetlib.enabling.is.sn.rmi.SubscriptionRequestRejectedException; +import eu.dnetlib.enabling.tools.AbstractBaseService; +import eu.dnetlib.soap.EndpointReferenceBuilder; + +/** + * implementation of ISSNService. + * + * @author marko + * + */ +public class ISSNServiceImpl extends AbstractBaseService implements ISSNService { + + /** + * logger. + */ + private static final Log log = LogFactory.getLog(ISSNServiceImpl.class); // NOPMD by marko on 11/24/08 5:02 PM + + /** + * obvious constant. + */ + private static final int MILLIS_IN_SECOND = 1000; + + /** + * service endpoint. + */ + private Endpoint endpoint; + + /** + * core business logic. + */ + private ISSNServiceCore core; + + /** + * injected EPR builder. + */ + @Resource(name = "jaxwsEndpointReferenceBuilder") + private EndpointReferenceBuilder eprBuilder; + + /** + * {@inheritDoc} + * + * @see eu.dnetlib.enabling.is.sn.rmi.ISSNService#actionCreatePerformed(java.lang.String, java.lang.String, java.lang.String) + */ + @Override + public boolean actionCreatePerformed(final String resourceType, final String profileId, final String profile) throws ISSNException { + log.fatal("actionCreatePerformed(String, String, String) not implemented"); + return false; + } + + /** + * {@inheritDoc} + * + * @see eu.dnetlib.enabling.is.sn.rmi.ISSNService#actionDeletePerformed(java.lang.String, java.lang.String) + */ + @Override + public boolean actionDeletePerformed(final String resourceType, final String profileId) throws ISSNException { + log.fatal("actionDeletePerformed(String, String) not implemented"); + return false; + } + + /** + * {@inheritDoc} + * + * @see eu.dnetlib.enabling.is.sn.rmi.ISSNService#actionUpdatePerformed(java.lang.String, java.lang.String, java.lang.String, + * java.lang.String) + */ + @Override + public boolean actionUpdatePerformed(final String resourceType, final String profileId, final String profileBefore, final String profileAfter) + throws ISSNException { + log.fatal("actionUpdatePerformed(String, String, String, String) not implemented"); + return false; + } + + /** + * {@inheritDoc} + * + * @see eu.dnetlib.enabling.is.sn.rmi.ISSNService#getCurrentMessage(java.lang.String) + */ + @Override + public String getCurrentMessage(final String topic) throws ISSNException { + log.fatal("getCurrentMessage(String) not implemented"); + return null; + } + + /** + * {@inheritDoc} + * + * @see eu.dnetlib.enabling.is.sn.rmi.ISSNService#listSubscriptions() + */ + @Override + public List listSubscriptions() { + log.fatal("listSubscriptions() not implemented"); + return null; + } + + /** + * {@inheritDoc} + * + * @see eu.dnetlib.enabling.is.sn.rmi.ISSNService#pauseSubscription(java.lang.String) + */ + @Override + public boolean pauseSubscription(final String subscrId) throws ISSNException { + log.fatal("pauseSubscription(String) not implemented"); + return false; + } + + /** + * {@inheritDoc} + * + * @see eu.dnetlib.enabling.is.sn.rmi.ISSNService#renew(java.lang.String, int) + */ + @Override + public boolean renew(final String subscrId, final int terminationTime) throws ISSNException { + log.fatal("renew(String, int) not implemented"); + return false; + } + + /** + * {@inheritDoc} + * + * @see eu.dnetlib.enabling.is.sn.rmi.ISSNService#resumeSubscription(java.lang.String) + */ + @Override + public boolean resumeSubscription(final String subscrId) throws ISSNException { + log.fatal("resumeSubscription(String) not implemented"); + return false; + } + + /** + * {@inheritDoc} + * + * @see eu.dnetlib.enabling.is.sn.rmi.ISSNService#subscribe(javax.xml.ws.wsaddressing.W3CEndpointReference, java.lang.String, int) + */ + @Override + public String subscribe(final W3CEndpointReference consumerReference, final String topicExpression, final int termTime) throws ISSNException, SubscriptionRequestRejectedException { + + log.debug("subscribe request from: " + consumerReference.toString() + " topic: " + topicExpression); + + int ttl; + if (termTime == 0) { + ttl = 0; + } else { + ttl = (int) (termTime - (Calendar.getInstance().getTimeInMillis() / MILLIS_IN_SECOND)); + } + + final String res = core.subscribe(consumerReference, topicExpression, ttl); + if (res == null) throw new ISSNException("couldn't find a subscription registry for the given topic: " + topicExpression); + + log.debug("subscribe success, subscriptionId: " + res); + + return res; + } + + /** + * {@inheritDoc} + * + * @see eu.dnetlib.enabling.is.sn.rmi.ISSNService#unsubscribe(java.lang.String) + */ + @Override + public boolean unsubscribe(final String subscrId) throws ISSNException { + log.debug("unsubscribe request for: " + subscrId); + return core.unsubscribe(subscrId); + } + + public Endpoint getEndpoint() { + return endpoint; + } + + public void setEndpoint(final Endpoint endpoint) { + this.endpoint = endpoint; + } + + public ISSNServiceCore getCore() { + return core; + } + + public void setCore(final ISSNServiceCore core) { + this.core = core; + } + + public EndpointReferenceBuilder getEprBuilder() { + return eprBuilder; + } + + public void setEprBuilder(final EndpointReferenceBuilder eprBuilder) { + this.eprBuilder = eprBuilder; + } + +} diff --git a/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/MemoryNotificationInvocationLogger.java b/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/MemoryNotificationInvocationLogger.java new file mode 100644 index 0000000..6b48e21 --- /dev/null +++ b/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/MemoryNotificationInvocationLogger.java @@ -0,0 +1,263 @@ +package eu.dnetlib.enabling.is.sn; + +import java.util.Collection; +import java.util.Date; +import java.util.concurrent.ConcurrentLinkedQueue; + +import javax.xml.ws.wsaddressing.W3CEndpointReference; + +/** + * In memory implementation of a notification invocation logger. + * + * @author marko + * + */ +public class MemoryNotificationInvocationLogger implements NotificationInvocationLogger { + + /** + * default log size. + */ + private static final int DEFAULT_SIZE = 100; + + /** + * Entry. + * + * @author marko + * + */ + public class MemoryEntry implements Entry { + + /** + * logged message. + */ + private NotificationMessage message; + + /** + * message status. + */ + private Status status = Status.Queued; + + /** + * saved exception in case of Failed state. + */ + private Throwable exception; + + /** + * destination. + */ + private W3CEndpointReference destinationEpr; + + /** + * start date time. + */ + private Date start; + + /** + * finish date time. + */ + private Date finish; + + /** + * construct a new message. + * + * @param endpointReference + * destination + * + * @param message + * message + */ + public MemoryEntry(final W3CEndpointReference endpointReference, final NotificationMessage message) { + this.destinationEpr = endpointReference; + this.message = message; + this.start = new Date(); + } + + /** + * {@inheritDoc} + * + * @see eu.dnetlib.enabling.is.sn.NotificationInvocationLogger.Entry#ongoing() + */ + @Override + public void ongoing() { + status = Status.Ongoing; + } + + /** + * {@inheritDoc} + * + * @see eu.dnetlib.enabling.is.sn.NotificationInvocationLogger.Entry#failure(java.lang.Throwable) + */ + @Override + public void failure(final Throwable exc) { + status = Status.Failed; + this.exception = exc; + commit(); + } + + /** + * {@inheritDoc} + * + * @see eu.dnetlib.enabling.is.sn.NotificationInvocationLogger.Entry#success() + */ + @Override + public void success() { + status = Status.Succeeded; + commit(); + } + + /** + * finalize log entry. + */ + protected void commit() { + this.finish = new Date(); + } + + @Override + public NotificationMessage getMessage() { + return message; + } + + public void setMessage(final NotificationMessage message) { + this.message = message; + } + + @Override + public Throwable getException() { + return exception; + } + + public void setException(final Throwable exception) { + this.exception = exception; + } + + @Override + public Status getStatus() { + return status; + } + + public void setStatus(final Status status) { + this.status = status; + } + + public W3CEndpointReference getDestinationEpr() { + return destinationEpr; + } + + public void setDestinationEpr(final W3CEndpointReference destinationEpr) { + this.destinationEpr = destinationEpr; + } + + @Override + public String getDestination() { + return EPRUtil.getAddress(destinationEpr); + } + + /** + * {@inheritDoc} + * + * @see eu.dnetlib.enabling.is.sn.NotificationInvocationLogger.Entry#getErrorMessage() + */ + @Override + public String getErrorMessage() { + if (getException() == null) + return ""; + return getException().getMessage(); + } + + @Override + public Date getStart() { + return start; + } + + public void setStart(final Date start) { + this.start = start; + } + + @Override + public Date getFinish() { + return finish; + } + + public void setFinish(final Date finish) { + this.finish = finish; + } + + /** + * {@inheritDoc} + * @see eu.dnetlib.enabling.is.sn.NotificationInvocationLogger.Entry#getDuration() + */ + @Override + public String getDuration() { + if (finish == null || start == null) + return "-"; + return (finish.getTime() - start.getTime()) + " ms"; + } + } + + /** + * the actual log storage. + */ + private ConcurrentLinkedQueue queue = new ConcurrentLinkedQueue(); + + /** + * max log size. + */ + private int size = DEFAULT_SIZE; + + /** + * {@inheritDoc} + * + * @see eu.dnetlib.enabling.is.sn.NotificationInvocationLogger#startLogging(eu.dnetlib.enabling.is.sn.NotificationMessage) + */ + @Override + public Entry startLogging(final W3CEndpointReference dest, final NotificationMessage message) { + final Entry entry = createLoggingEntry(dest, message); + queue.add(entry); + ensureQueueLength(); + return entry; + } + + /** + * ensure that the queue doesn't grow beyond size. + */ + private void ensureQueueLength() { + if (queue.size() > size) + queue.poll(); + } + + /** + * create a new memory log object. + * + * @param dest + * destination + * + * @param message + * message to be logged + * @return new entry instance + */ + protected Entry createLoggingEntry(final W3CEndpointReference dest, final NotificationMessage message) { + return new MemoryEntry(dest, message); + } + + public ConcurrentLinkedQueue getQueue() { + return queue; + } + + public void setQueue(final ConcurrentLinkedQueue queue) { + this.queue = queue; + } + + public int getSize() { + return size; + } + + public void setSize(final int size) { + this.size = size; + } + + @Override + public Collection getEntries() { + return getQueue(); + } + +} diff --git a/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/NotificationDetector.java b/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/NotificationDetector.java new file mode 100644 index 0000000..e92f925 --- /dev/null +++ b/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/NotificationDetector.java @@ -0,0 +1,17 @@ +package eu.dnetlib.enabling.is.sn; + + +/** + * Implementors of this interface are able to detect events which will trigger notifications. + * @author marko + * + */ +public interface NotificationDetector { + + /** + * injection point for NotificationSender. + * + * @param sender sender + */ + void setSender(NotificationSender sender); +} diff --git a/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/NotificationDetectorImpl.java b/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/NotificationDetectorImpl.java new file mode 100644 index 0000000..060bae4 --- /dev/null +++ b/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/NotificationDetectorImpl.java @@ -0,0 +1,217 @@ +package eu.dnetlib.enabling.is.sn; + +import java.io.StringWriter; +import java.util.Collection; + +import javax.xml.transform.Transformer; +import javax.xml.transform.TransformerException; +import javax.xml.transform.TransformerFactory; +import javax.xml.transform.dom.DOMSource; +import javax.xml.transform.stream.StreamResult; +import javax.xml.xpath.XPath; +import javax.xml.xpath.XPathConstants; +import javax.xml.xpath.XPathExpressionException; +import javax.xml.xpath.XPathFactory; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.w3c.dom.Node; + +import eu.dnetlib.enabling.is.sn.resourcestate.ResourceStateNotificationDetector; +import eu.dnetlib.enabling.is.sn.resourcestate.ResourceStateSubscription; +import eu.dnetlib.enabling.is.sn.resourcestate.ResourceStateSubscriptionRegistry; +import eu.dnetlib.enabling.tools.OpaqueResource; + +/** + * This notification detector uses a local xmldb trigger as a source of events. + * + * @author marko + * + */ +public class NotificationDetectorImpl extends AbstractNotificationDetector implements ResourceStateNotificationDetector { + + /** + * logger. + */ + private static final Log log = LogFactory.getLog(NotificationDetectorImpl.class); // NOPMD by marko on 11/24/08 5:02 PM + + /** + * subscription registries to lookup. + */ + private SubscriptionRegistry registry; + + /** + * {@inheritDoc} + * + * @see eu.dnetlib.enabling.is.sn.resourcestate.ResourceStateNotificationDetector#resourceCreated(java.lang.Object) + */ + @Override + public void resourceCreated(final OpaqueResource newResource) { + log.debug("resource created: " + getRegistry()); + + final Collection subs = + getRegistry().listMatchingSubscriptions(ResourceStateSubscription.PREFIX_CREATE, newResource.getResourceType(), newResource.getResourceId()); + for (ResourceStateSubscription sub : subs) { + if (matchPath(newResource, sub.getXpath())) { + send(sub, newResource, ResourceStateSubscription.PREFIX_CREATE); + } + } + } + + /** + * helper method. sends a notification for a given prefix. + * + * @param sub + * subscription + * @param resource + * resource + * @param prefix + * prefix + */ + private void send(final ResourceStateSubscription sub, final OpaqueResource resource, final String prefix) { + log.debug("RESOURCE " + resource); + log.debug("id: " + resource.getResourceId()); + log.debug("dom: " + resource.asDom()); + + final StringBuffer topicBuffer = new StringBuffer(); + + if (sub.getPrefix() == null && "*".equals(sub.getPrefix())) + topicBuffer.append(prefix); + else + topicBuffer.append(sub.getPrefix()); + + topicBuffer.append('.'); + topicBuffer.append(sub.getType()); + topicBuffer.append('.'); + topicBuffer.append(sub.getResourceId()); + if (sub.getXpath() != null && !sub.getXpath().isEmpty()) { + topicBuffer.append(sub.getXpath().replace('/', '.')); + } + + getSender().send(sub.getSubscriberAsEpr(), new NotificationMessage(sub.getSubscriptionId(), topicBuffer.toString(), resource.getResourceId(), // NOPMD + resource.asString())); + } + + /** + * {@inheritDoc} + * + * @see eu.dnetlib.enabling.is.sn.resourcestate.ResourceStateNotificationDetector#resourceDeleted(java.lang.Object) + */ + @Override + public void resourceDeleted(final OpaqueResource oldResource) { + log.debug("resource deleted: " + getRegistry()); + + final Collection subs = + registry.listMatchingSubscriptions(ResourceStateSubscription.PREFIX_DELETE, oldResource.getResourceType(), oldResource.getResourceId()); + for (ResourceStateSubscription sub : subs) { + if (matchPath(oldResource, sub.getXpath())) { + send(sub, oldResource, ResourceStateSubscription.PREFIX_DELETE); + } + } + } + + /** + * {@inheritDoc} + * + * @see eu.dnetlib.enabling.is.sn.resourcestate.ResourceStateNotificationDetector#resourceUpdated(java.lang.Object, + * java.lang.Object) + */ + @Override + public void resourceUpdated(final OpaqueResource oldResource, final OpaqueResource newResource) { + log.debug("resource updated: " + getRegistry()); + + final Collection subs = + registry.listMatchingSubscriptions(ResourceStateSubscription.PREFIX_UPDATE, oldResource.getResourceType(), oldResource.getResourceId()); + for (ResourceStateSubscription sub : subs) { + if (comparePath(oldResource, newResource, sub.getXpath())) { + log.debug("updated, sending: " + newResource.asString()); + send(sub, newResource, ResourceStateSubscription.PREFIX_UPDATE); + } + } + } + + /** + * check if an xpath matches a given resource. + * + * @param resource + * resource + * @param xpath + * xpath + * @return true if the resource has some value for the given path + */ + private boolean matchPath(final OpaqueResource resource, final String xpath) { + // by convention empty xpath matches any document + if (xpath == null || xpath.isEmpty()) + return true; + + final XPath xpa = XPathFactory.newInstance().newXPath(); + try { + return !xpa.evaluate(xpath, resource.asDom()).isEmpty(); + } catch (XPathExpressionException e) { + log.warn("wrong xpath expression, notification possibly missed", e); + } + return false; + } + + /** + * compare the content of two profiles for the same xpath. Return true if some change has been made so that the + * notification can be delivered. + * + * @param oldResource + * old version + * @param newResource + * new version + * @param xpath + * XPath + * @return true if the two documents differ under a given path + */ + private boolean comparePath(final OpaqueResource oldResource, final OpaqueResource newResource, final String xpath) { + // by convention empty xpath matches any document + if (oldResource == null || newResource == null || xpath == null || xpath.isEmpty()) + return true; + + final XPath xpa = XPathFactory.newInstance().newXPath(); + try { + final Transformer transformer = TransformerFactory.newInstance().newTransformer(); + + final Node left = (Node) xpa.evaluate(xpath, oldResource.asDom(), XPathConstants.NODE); + final Node right = (Node) xpa.evaluate(xpath, newResource.asDom(), XPathConstants.NODE); + + if (left==null || right==null) { + if (left != null) { + return true; + } + else { + if (right != null) { + return true; + } + else { + return false; + } + } + } + + final StringWriter leftWriter = new StringWriter(); + final StringWriter rightWriter = new StringWriter(); + + transformer.transform(new DOMSource(left), new StreamResult(leftWriter)); + transformer.transform(new DOMSource(right), new StreamResult(rightWriter)); + + return !leftWriter.toString().equals(rightWriter.toString()); + } catch (XPathExpressionException e) { + log.warn("wrong xpath expression, notification possibly missed", e); + } catch (TransformerException e) { + log.warn("serialization problem", e); + } + + return false; + } + + public SubscriptionRegistry getRegistry() { + return registry; + } + + public void setRegistry(final SubscriptionRegistry registry) { + this.registry = registry; + } +} diff --git a/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/NotificationInvocationLogger.java b/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/NotificationInvocationLogger.java new file mode 100644 index 0000000..6fde9a6 --- /dev/null +++ b/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/NotificationInvocationLogger.java @@ -0,0 +1,142 @@ +package eu.dnetlib.enabling.is.sn; + +import java.util.Collection; +import java.util.Date; + +import javax.xml.ws.wsaddressing.W3CEndpointReference; + +/** + * A notification logger maintains a log of sent notifications, and their status (succes or failure with exception etc). + * + * @author marko + * + */ +public interface NotificationInvocationLogger { + + /** + * A log entry. Used to create log entries in two phases. First a log entry is created with "startLogging" and after + * the notification is sent the log entry is committed with success() of failure(). + * + * @author marko + * + */ + interface Entry { + /** + * log entry status. + * + * @author marko + * + */ + enum Status { + /** + * notification is queued but not started to be sent. + */ + Queued, + /** + * notification is ongoing. + */ + Ongoing, + /** + * notification succeeded. + */ + Succeeded, + /** + * notification failed. + */ + Failed + }; + + /** + * sets the status to ongoing. + */ + void ongoing(); + + /** + * commits the log entry tagging it as succeeded. + */ + void success(); + + /** + * commits the log entry tagging it as failed. + * + * @param exception + * throwable, cause of failure + */ + void failure(Throwable exception); + + /** + * get start date time. + * + * @return date + */ + Date getStart(); + + /** + * get finish date time. + * + * @return date + */ + Date getFinish(); + + /** + * get log status. + * + * @return log status + */ + Status getStatus(); + + /** + * get log message. + * + * @return log message + */ + NotificationMessage getMessage(); + + /** + * get destination. + * + * @return destination url + */ + String getDestination(); + + /** + * get exception. + * + * @return exception + */ + Throwable getException(); + + /** + * Get exception error message or empty string if succeded. + * + * @return error message + */ + String getErrorMessage(); + + /** + * Human readable duration. + * + * @return human readable duration + */ + String getDuration(); + } + + /** + * Start logging a notification invocation. + * + * @param destination + * destination + * @param message + * message to be logged. + * @return an entry object which has to be committed. + * + */ + Entry startLogging(W3CEndpointReference destination, NotificationMessage message); + + /** + * get all entries. + * + * @return all entries + */ + Collection getEntries(); +} diff --git a/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/NotificationInvoker.java b/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/NotificationInvoker.java new file mode 100644 index 0000000..6d74f30 --- /dev/null +++ b/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/NotificationInvoker.java @@ -0,0 +1,26 @@ +package eu.dnetlib.enabling.is.sn; + +import javax.xml.ws.wsaddressing.W3CEndpointReference; + +/** + * Implementors of this interface decouple the notification producing and dispatching policies + * with the actually on-wire sending of the notification message. + * + *

+ * Notification invokers expose a fairly low level interface to notification dispatchers, so that + * dispatching policies can configure various aspects of the underlying transport. + *

+ * + * @author marko + * + */ +public interface NotificationInvoker { + /** + * for now only timeout is exposed. + * + * @param destination destination EPR + * @param message message + * @param timeout timeout in seconds + */ + void send(W3CEndpointReference destination, NotificationMessage message, int timeout); +} diff --git a/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/NotificationInvokerImpl.java b/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/NotificationInvokerImpl.java new file mode 100644 index 0000000..550de34 --- /dev/null +++ b/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/NotificationInvokerImpl.java @@ -0,0 +1,61 @@ +package eu.dnetlib.enabling.is.sn; + +import javax.xml.ws.WebServiceFeature; +import javax.xml.ws.wsaddressing.W3CEndpointReference; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.springframework.beans.factory.annotation.Required; + +import eu.dnetlib.common.rmi.BaseService; + +/** + * This is a basic notification invoker which calls dnet1.0 compatible notify() methods. + * + * @author marko + * + */ +public class NotificationInvokerImpl implements NotificationInvoker { + /** + * logger. + */ + private static final Log log = LogFactory.getLog(NotificationInvokerImpl.class); // NOPMD by marko on 11/24/08 5:02 PM + + /** + * invocation logger. + */ + private NotificationInvocationLogger invocationLogger; + + /** + * {@inheritDoc} + * + * @see eu.dnetlib.enabling.is.sn.NotificationInvoker#send(javax.xml.ws.wsaddressing.W3CEndpointReference, + * eu.dnetlib.enabling.is.sn.NotificationMessage, int) + */ + @Override + public void send(final W3CEndpointReference destination, final NotificationMessage message, final int timeout) { + final BaseService service = destination.getPort(BaseService.class, new WebServiceFeature[] {}); + log.info("phisically sending notification: " + message.getTopic()); + + final NotificationInvocationLogger.Entry logEntry = invocationLogger.startLogging(destination, message); + logEntry.ongoing(); + + try { + service.notify(message.getSubscriptionId(), message.getTopic(), message.getResourceId(), message.getBody()); + logEntry.success(); + } catch (final Throwable e) { // NOPMD + log.debug("notification error", e); + logEntry.failure(e); + } + } + + public NotificationInvocationLogger getInvocationLogger() { + return invocationLogger; + } + + @Required + public void setInvocationLogger(final NotificationInvocationLogger invocationLogger) { + this.invocationLogger = invocationLogger; + } + +} diff --git a/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/NotificationMessage.java b/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/NotificationMessage.java new file mode 100644 index 0000000..8b5bcd7 --- /dev/null +++ b/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/NotificationMessage.java @@ -0,0 +1,85 @@ +package eu.dnetlib.enabling.is.sn; + +/** + * This class encapsulates the notification message sent to ISSN subscribers. + * + * @author marko + * + */ +public class NotificationMessage { + + /** + * subscription identifier. + */ + private String subscriptionId; + + /** + * subscription topic that triggered the notification. + */ + private String topic; + + /** + * resource identifier that triggered the notification. + */ + private String resourceId; + + /** + * message body. + */ + private String body; + + /** + * default constructor. + */ + public NotificationMessage() { + // no operation + } + + /** + * constructor with full parameters. + * + * @param subscriptionId subscription identifier + * @param topic produced topic + * @param resourceId resource identifier of the resource which triggered the notification, or null + * @param body body of the document which triggered the notification, or null + */ + public NotificationMessage(final String subscriptionId, final String topic, final String resourceId, final String body) { + super(); + this.subscriptionId = subscriptionId; + this.topic = topic; + this.resourceId = resourceId; + this.body = body; + } + + public String getSubscriptionId() { + return subscriptionId; + } + + public void setSubscriptionId(final String subscriptionId) { + this.subscriptionId = subscriptionId; + } + + public String getTopic() { + return topic; + } + + public void setTopic(final String topic) { + this.topic = topic; + } + + public String getResourceId() { + return resourceId; + } + + public void setResourceId(final String resourceId) { + this.resourceId = resourceId; + } + + public String getBody() { + return body; + } + + public void setBody(final String body) { + this.body = body; + } +} diff --git a/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/NotificationSender.java b/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/NotificationSender.java new file mode 100644 index 0000000..ee18f7a --- /dev/null +++ b/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/NotificationSender.java @@ -0,0 +1,37 @@ +package eu.dnetlib.enabling.is.sn; + +import javax.xml.ws.wsaddressing.W3CEndpointReference; + +/** + * Instances implementing this interfaces will send notifications to consumers. + * + *

+ * Notifications will be already detected and the message body will be already computed. + *

+ * + *

+ * There will be different NotificationSenders, depending on the performance and reliability characteristics required by + * the message type. + *

+ * + *

Each notification sender will use a NotificationInvoker to actually forward the notification

+ * + * @author marko + * @see eu.dnetlib.enabling.is.sn.NotificationInvoker + */ +public interface NotificationSender { + /** + * sends a given message according to specific policies. + * + * @param destination destination EPR + * @param message message + */ + void send(W3CEndpointReference destination, NotificationMessage message); + + /** + * Sets the notification invoker which will actually perform the notification delivery. + * + * @param invoker notification invoker + */ + void setInvoker(NotificationInvoker invoker); +} diff --git a/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/NotificationTriggerImpl.java b/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/NotificationTriggerImpl.java new file mode 100644 index 0000000..8d5b32c --- /dev/null +++ b/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/NotificationTriggerImpl.java @@ -0,0 +1,80 @@ +package eu.dnetlib.enabling.is.sn; + +import javax.xml.xpath.XPathExpressionException; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.w3c.dom.Document; + +import eu.dnetlib.enabling.is.sn.resourcestate.ResourceStateNotificationDetector; +import eu.dnetlib.enabling.tools.DOMOpaqueResource; +import eu.dnetlib.enabling.tools.OpaqueResource; +import eu.dnetlib.xml.database.LoggingTrigger; + +/** + * This trigger generates notification events for the subscription notification layer. + * + * @author marko + * + */ +public class NotificationTriggerImpl extends LoggingTrigger { + /** + * logger. + */ + private static final Log log = LogFactory.getLog(NotificationTriggerImpl.class); // NOPMD by marko on 11/24/08 5:02 PM + + /** + * notification detector to notify on events. + */ + private ResourceStateNotificationDetector detector; + + /** + * {@inheritDoc} + * @see eu.dnetlib.xml.database.LoggingTrigger#created(java.lang.String, java.lang.String, org.w3c.dom.Document) + */ + @Override + public void created(final String file, final String collection, final Document newDoc) { + super.created(file, collection, newDoc); + try { + getDetector().resourceCreated(new DOMOpaqueResource(newDoc)); + } catch (XPathExpressionException e) { + log.fatal("cannot detect notification because of xpath error; notification possibly missed", e); + } + } + + /** + * {@inheritDoc} + * @see eu.dnetlib.xml.database.LoggingTrigger#deleted(java.lang.String, java.lang.String, org.w3c.dom.Document) + */ + @Override + public void deleted(final String file, final String collection, final Document oldDoc) { + super.deleted(file, collection, oldDoc); + try { + getDetector().resourceDeleted(new DOMOpaqueResource(oldDoc)); + } catch (XPathExpressionException e) { + log.fatal("cannot detect notification because of xpath error; notification possibly missed", e); + } + } + + /** + * {@inheritDoc} + * @see eu.dnetlib.xml.database.LoggingTrigger#updated(java.lang.String, java.lang.String, org.w3c.dom.Document, org.w3c.dom.Document) + */ + @Override + public void updated(final String file, final String collection, final Document oldDoc, final Document newDoc) { + super.updated(file, collection, oldDoc, newDoc); + try { + getDetector().resourceUpdated(new DOMOpaqueResource(oldDoc), new DOMOpaqueResource(newDoc)); + } catch (XPathExpressionException e) { + log.fatal("cannot detect notification because of xpath error; notification possibly missed", e); + } + } + + public ResourceStateNotificationDetector getDetector() { + return detector; + } + + public void setDetector(final ResourceStateNotificationDetector detector) { + this.detector = detector; + } +} diff --git a/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/SubscriptionDAO.java b/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/SubscriptionDAO.java new file mode 100644 index 0000000..4583db1 --- /dev/null +++ b/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/SubscriptionDAO.java @@ -0,0 +1,56 @@ +package eu.dnetlib.enabling.is.sn; + +import java.util.Collection; + +/** + * Stores subscriptions. + * + * @author marko + * + * @param + * subscription type + */ +public interface SubscriptionDAO { + /** + * add a new subscription to the subscription store. + * + * TODO: throw some exception on already existing subscription + * + * @param subscription + * subscription + */ + void addSubscription(T subscription); + + /** + * get a particular subscription. + * + * @param subscriptionId identifier + * @return null if none + */ + T getSubscription(String subscriptionId); + + + /** + * lists all subscriptions. + * + * @return all subscriptions + */ + Collection listSubscriptions(); + + /** + * lists all subscriptions for a given prefix. + * + * @param prefix topic expression prefix + * @return all matching subscriptions + */ + Collection listSubscriptions(String prefix); + + /** + * removes a particular subscription. + * + * @param subscriptionId identifier + * @return true if successful + */ + boolean removeSubscription(String subscriptionId); + +} diff --git a/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/SubscriptionRegistry.java b/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/SubscriptionRegistry.java new file mode 100644 index 0000000..9f6cfc2 --- /dev/null +++ b/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/SubscriptionRegistry.java @@ -0,0 +1,84 @@ +package eu.dnetlib.enabling.is.sn; + +import java.util.Collection; + +import eu.dnetlib.enabling.is.sn.resourcestate.ResourceStateSubscription; +import eu.dnetlib.enabling.is.sn.rmi.SubscriptionRequestRejectedException; +import org.springframework.cache.annotation.CacheEvict; +import org.springframework.cache.annotation.Cacheable; + +/** + * A subscription registry stores subscriptions. + * + *

+ * Different subscription registries know how to to store different kind of subscriptions. Each registry is specialized + * in one type of subscriptions and knows how to quickly find all potentially interesting subscriptions so that a + * particular NotificationDetector can do his job the quickest way possible. + *

+ * + *

+ * This interface is generic only for subscription purposes because the Subscriber component simply tries to register a + * new subscription to all available subscription registries. + *

+ * + *

+ * Normally a subscription registry manages only a set of topic expression prefixes, but this interface doesn't force + * the Subscriber to know this information; instead the subscription registry itself will decide whether to accept the + * subscription or not. + *

+ *

+ * Since many subscription registries may accept the same subscription, the identifier is preallocated by the + * Subscriber, since the subscription is only one, and even if we give the possibility for several detectors to detect + * it from different sources only one event will be generated. + *

+ * + * @author marko + * + */ +public interface SubscriptionRegistry { + + /** + * register a subscription. + * + * @param subscription + * subscription request + * @return if we can accept this subcription we return the (possibly changed) identifier, otherwise null + */ + String registerSubscription(SubscriptionRequest subscription) throws SubscriptionRequestRejectedException; + + /** + * Unsubscribe a subscription if it exists. + * + * @param subId subscription identifier + * @return true if this subscription existed and was successfully removed + */ + boolean unsubscribe(final String subId); + + /** + * return all subscriptions matching a given prefix and a given type. Wildcard subscriptions will match any resource type. + * + * @param prefix + * prefix + * @param type + * concrete type + * @param resId + * resource identifier + * @return all matching subscriptions + */ + Collection listMatchingSubscriptions(final String prefix, final String type, final String resId); + + /** + * return all subscriptions. + * + * @return all subscriptions + */ + Collection listSubscriptions(); + + /** + * removes a particular subscription. + * + * @param subscriptionId identifier + * @return true if successful + */ + boolean removeSubscription(String subscriptionId); +} diff --git a/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/SubscriptionRequest.java b/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/SubscriptionRequest.java new file mode 100644 index 0000000..a54ffe3 --- /dev/null +++ b/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/SubscriptionRequest.java @@ -0,0 +1,88 @@ +package eu.dnetlib.enabling.is.sn; + +import javax.xml.ws.wsaddressing.W3CEndpointReference; + +/** + * A SubscriptionRequest encapsulates various information about a subscription request. + * + * @author marko + * + */ +public class SubscriptionRequest { + + /** + * subscriber. + */ + private W3CEndpointReference subscriber; + + /** + * topic expression. + */ + private String topicExpression; + + /** + * Preallocated subscription Id. If registries accept the subscription, they will store this in the subscription + * identifier. + */ + private String subscriptionId; + + /** + * time to live. + */ + private int ttl; + + /** + * default constructor. + */ + public SubscriptionRequest() { + // no operation + } + + /** + * construct with fields. + * + * @param subscriptionId subscription id + * @param subscriber subscriber + * @param topicExpression topic expression + * @param ttl time to live + */ + public SubscriptionRequest(final String subscriptionId, final W3CEndpointReference subscriber, final String topicExpression, final int ttl) { + super(); + this.subscriptionId = subscriptionId; + this.subscriber = subscriber; + this.topicExpression = topicExpression; + this.ttl = ttl; + } + + public W3CEndpointReference getSubscriber() { + return subscriber; + } + + public void setSubscriber(final W3CEndpointReference subscriber) { + this.subscriber = subscriber; + } + + public String getTopicExpression() { + return topicExpression; + } + + public void setTopicExpression(final String topicExpression) { + this.topicExpression = topicExpression; + } + + public String getSubscriptionId() { + return subscriptionId; + } + + public void setSubscriptionId(final String subscriptionId) { + this.subscriptionId = subscriptionId; + } + + public int getTtl() { + return ttl; + } + + public void setTtl(final int ttl) { + this.ttl = ttl; + } +} diff --git a/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/SynchronousNotificationSenderImpl.java b/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/SynchronousNotificationSenderImpl.java new file mode 100644 index 0000000..b4a1ac5 --- /dev/null +++ b/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/SynchronousNotificationSenderImpl.java @@ -0,0 +1,40 @@ +package eu.dnetlib.enabling.is.sn; + +import javax.xml.ws.wsaddressing.W3CEndpointReference; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +/** + * This implementation of NotificationSender simply sends notification synchronously. + * + * NOTE: this is only for testing. Real-wold cases should use AsynchrnonousNotificationSender, because we have to + * get out the thread serving eXist queries. + * + * @author marko + * + */ +public class SynchronousNotificationSenderImpl extends AbstractNotificationSender { + + /** + * logger. + */ + private static final Log log = LogFactory.getLog(SynchronousNotificationSenderImpl.class); // NOPMD by marko on 11/24/08 5:02 PM + + /** + * {@inheritDoc} + * + * @see eu.dnetlib.enabling.is.sn.NotificationSender#send(javax.xml.ws.wsaddressing.W3CEndpointReference, + * eu.dnetlib.enabling.is.sn.NotificationMessage) + */ + @Override + public void send(final W3CEndpointReference destination, final NotificationMessage message) { + log.info("synchronously sending message " + message.getSubscriptionId() + ", " + message.getTopic() + ", " + message.getResourceId() + ", " + + message.getBody()); + try { + getInvoker().send(destination, message, 0); + } catch (javax.xml.ws.soap.SOAPFaultException t) { + log.fatal("error sending notification to " + destination.toString(), t); + } + } +} diff --git a/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/TestISSNServiceImpl.java b/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/TestISSNServiceImpl.java new file mode 100644 index 0000000..c23eff2 --- /dev/null +++ b/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/TestISSNServiceImpl.java @@ -0,0 +1,40 @@ +package eu.dnetlib.enabling.is.sn; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import eu.dnetlib.enabling.is.sn.rmi.ISSNException; + +/** + * As a complementary approach w.r.t unit tests, this class is an extension of + * the default ISSN Service which creates a number of initial subscriptions so that we can play + * with some notifications. + * + * This class plays well with TestISStoreServiceImpl, which creates some profiles at startup time + * and schedules some automated mutations. + * + * @author marko + * + */ +public class TestISSNServiceImpl extends ISSNServiceImpl { + /** + * logger. + */ + private static final Log log = LogFactory.getLog(TestISSNServiceImpl.class); // NOPMD by marko on 11/24/08 5:02 PM + + /** + * {@inheritDoc} + * @see eu.dnetlib.enabling.tools.AbstractBaseService#start() + */ + @Override + public void start() { + super.start(); + + try { + subscribe(getEprBuilder().getEndpointReference(getEndpoint()), "CREATE/TestResourceType/*", 0); + } catch (ISSNException e) { + log.fatal("cannot subscribe test subscriptions", e); + } + } + +} diff --git a/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/TopicExpressionMatchResult.java b/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/TopicExpressionMatchResult.java new file mode 100644 index 0000000..20434f9 --- /dev/null +++ b/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/TopicExpressionMatchResult.java @@ -0,0 +1,46 @@ +package eu.dnetlib.enabling.is.sn; + +/** + * Groups a topic expression prefix match result. + * + *

+ * Utility class. + *

+ * + * @author marko + * + */ +public class TopicExpressionMatchResult { + /** + * Topic expression prefix. + */ + private final transient String prefix; + + /** + * RestOf the topic expression. + */ + private final transient String rest; + + /** + * construct a new topic expression prefix match result. + * @param prefix + * prefix + * @param rest + * rest + */ + public TopicExpressionMatchResult(final String prefix, final String rest) { + super(); + this.prefix = prefix; + this.rest = rest; + } + + public String getPrefix() { + return prefix; + } + + public String getRest() { + return rest; + } + + +} diff --git a/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/resourcestate/AbstractResourceStateNotificationDetectorFilter.java b/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/resourcestate/AbstractResourceStateNotificationDetectorFilter.java new file mode 100644 index 0000000..c103731 --- /dev/null +++ b/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/resourcestate/AbstractResourceStateNotificationDetectorFilter.java @@ -0,0 +1,83 @@ +package eu.dnetlib.enabling.is.sn.resourcestate; + +import eu.dnetlib.enabling.is.sn.NotificationSender; + +/** + * sits on top of a ResourceStateNotificationDetector and filters out resources for which we don't want to generate + * notifications. + * + * @author marko + * + * @param + * type of the resource object + */ +public abstract class AbstractResourceStateNotificationDetectorFilter implements ResourceStateNotificationDetector { + + /** + * delegate. + */ + private ResourceStateNotificationDetector delegate; + + /** + * implement this in order to decide which resources are interesting for notifications, and which are not (for + * example pending resources are by ignored in dnet 1.0). + * + * @param resource + * resource + * @return true if the resource is potentially accepted for notification + */ + abstract boolean accept(T resource); + + /** + * {@inheritDoc} + * + * @see eu.dnetlib.enabling.is.sn.resourcestate.ResourceStateNotificationDetector#resourceCreated(java.lang.Object) + */ + @Override + public void resourceCreated(final T newResource) { + if (accept(newResource)) + delegate.resourceCreated(newResource); + } + + /** + * {@inheritDoc} + * + * @see eu.dnetlib.enabling.is.sn.resourcestate.ResourceStateNotificationDetector#resourceDeleted(java.lang.Object) + */ + @Override + public void resourceDeleted(final T oldResource) { + if (accept(oldResource)) + delegate.resourceDeleted(oldResource); + } + + /** + * {@inheritDoc} + * + * @see eu.dnetlib.enabling.is.sn.resourcestate.ResourceStateNotificationDetector#resourceUpdated(java.lang.Object, + * java.lang.Object) + */ + @Override + public void resourceUpdated(final T oldResource, final T newResource) { + if (accept(oldResource) || accept(newResource)) + delegate.resourceUpdated(oldResource, newResource); + } + + /** + * {@inheritDoc} + * + * @see eu.dnetlib.enabling.is.sn.NotificationDetector#setSender(eu.dnetlib.enabling.is.sn.NotificationSender) + */ + @Override + public void setSender(final NotificationSender sender) { + delegate.setSender(sender); + } + + public ResourceStateNotificationDetector getDelegate() { + return delegate; + } + + public void setDelegate(final ResourceStateNotificationDetector delegate) { + this.delegate = delegate; + } + +} diff --git a/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/resourcestate/ConditionalResourceStateNotificationDetectorFilter.java b/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/resourcestate/ConditionalResourceStateNotificationDetectorFilter.java new file mode 100644 index 0000000..c5640d6 --- /dev/null +++ b/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/resourcestate/ConditionalResourceStateNotificationDetectorFilter.java @@ -0,0 +1,39 @@ +package eu.dnetlib.enabling.is.sn.resourcestate; + +import org.springframework.beans.factory.annotation.Required; + +import eu.dnetlib.enabling.tools.OpaqueResource; +import eu.dnetlib.miscutils.coupling.ExternalCondition; + +/** + * Ignores pending profiles from notification detection. + * + * @author marko + * + */ +public class ConditionalResourceStateNotificationDetectorFilter extends AbstractResourceStateNotificationDetectorFilter { + + /** + * external condition that drives this filter. We accept notification while the external condition is false. + */ + private ExternalCondition inhibitionCondition; // NOPMD + + /** + * {@inheritDoc} + * @see eu.dnetlib.enabling.is.sn.resourcestate.AbstractResourceStateNotificationDetectorFilter#accept(java.lang.Object) + */ + @Override + boolean accept(final OpaqueResource resource) { + return !inhibitionCondition.isTrue(); + } + + public ExternalCondition getInhibitionCondition() { + return inhibitionCondition; + } + + @Required + public void setInhibitionCondition(final ExternalCondition inhibitionCondition) { // NOPMD + this.inhibitionCondition = inhibitionCondition; + } + +} diff --git a/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/resourcestate/MemoryResourceStateSubscriptionDAOImpl.java b/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/resourcestate/MemoryResourceStateSubscriptionDAOImpl.java new file mode 100644 index 0000000..0830b6a --- /dev/null +++ b/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/resourcestate/MemoryResourceStateSubscriptionDAOImpl.java @@ -0,0 +1,132 @@ +package eu.dnetlib.enabling.is.sn.resourcestate; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.HashMap; +import java.util.Map; + +/** + * + * dummy implementation of the resource state subscription DAO layer, using an in-memory map. + * + * @author marko + * + */ +public class MemoryResourceStateSubscriptionDAOImpl implements ResourceStateSubscriptionDAO { + + /** + * by id. + */ + private Map byId = new HashMap(); + + /** + * groups subscriptions with the same prefix and type. + */ + private Map> byPrefixAndType = new HashMap>(); + + /** + * {@inheritDoc} + * + * @see eu.dnetlib.enabling.is.sn.resourcestate.ResourceStateSubscriptionDAO#listSubscriptions(java.lang.String, + * java.lang.String, java.lang.String) + */ + @Override + public Collection listSubscriptions(final String prefix, final String resourceType, final String resourceId) { + return orDefault(getByPrefixAndType().get(prefix + "/" + resourceType + "/" + resourceId)); + } + + /** + * {@inheritDoc} + * + * @see eu.dnetlib.enabling.is.sn.SubscriptionDAO#addSubscription(java.lang.Object) + */ + @Override + public void addSubscription(final ResourceStateSubscription subscription) { + getById().put(subscription.getSubscriptionId(), subscription); + + final String key = subscription.getPrefix() + "/" + subscription.getType() + "/" + subscription.getResourceId(); + final Collection prefTypeList = getByPrefixAndType().get(key); + if (prefTypeList == null) + getByPrefixAndType().put(key, new ArrayList()); + getByPrefixAndType().get(key).add(subscription); + + } + + /** + * {@inheritDoc} + * + * @see eu.dnetlib.enabling.is.sn.SubscriptionDAO#getSubscription(java.lang.String) + */ + @Override + public ResourceStateSubscription getSubscription(final String subscriptionId) { + return getById().get(subscriptionId); + } + + /** + * {@inheritDoc} + * + * @see eu.dnetlib.enabling.is.sn.SubscriptionDAO#listSubscriptions() + */ + @Override + public Collection listSubscriptions() { + return orDefault(getById().values()); + } + + /** + * {@inheritDoc} + * + * @see eu.dnetlib.enabling.is.sn.SubscriptionDAO#listSubscriptions(java.lang.String) + */ + @Override + public Collection listSubscriptions(final String prefix) { + return listSubscriptions(prefix, "*", "*"); + } + + /** + * {@inheritDoc} + * + * @see eu.dnetlib.enabling.is.sn.SubscriptionDAO#removeSubscription(java.lang.String) + */ + @Override + public boolean removeSubscription(final String subscriptionId) { + final ResourceStateSubscription subscription = getSubscription(subscriptionId); + if (subscription == null) + return false; + final String key = subscription.getPrefix() + "/" + subscription.getType() + "/" + subscription.getResourceId(); + + final Collection prefTypeList = getByPrefixAndType().get(key); + prefTypeList.remove(subscription); + + getById().remove(subscriptionId); + return true; + } + + /** + * inner helper method. returns an empty collection instead of a null. + * + * @param collection + * some collection + * @return input collection or empty collection + */ + private Collection orDefault(final Collection collection) { + if (collection == null) + return new ArrayList(); + return collection; + } + + public Map getById() { + return byId; + } + + public void setById(final Map byId) { + this.byId = byId; + } + + public Map> getByPrefixAndType() { + return byPrefixAndType; + } + + public void setByPrefixAndType(final Map> byPrefixAndType) { + this.byPrefixAndType = byPrefixAndType; + } +} diff --git a/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/resourcestate/PendingResourceStateNotificationDetectorFilter.java b/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/resourcestate/PendingResourceStateNotificationDetectorFilter.java new file mode 100644 index 0000000..a6daac3 --- /dev/null +++ b/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/resourcestate/PendingResourceStateNotificationDetectorFilter.java @@ -0,0 +1,24 @@ +package eu.dnetlib.enabling.is.sn.resourcestate; + +import eu.dnetlib.enabling.tools.OpaqueResource; + +/** + * Ignores pending profiles from notification detection. + * + * @author marko + * + */ +public class PendingResourceStateNotificationDetectorFilter extends AbstractResourceStateNotificationDetectorFilter { + + /** + * {@inheritDoc} + * @see eu.dnetlib.enabling.is.sn.resourcestate.AbstractResourceStateNotificationDetectorFilter#accept(java.lang.Object) + */ + @Override + boolean accept(final OpaqueResource resource) { + if (resource.getResourceKind().startsWith("Pending")) + return false; + return true; + } + +} diff --git a/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/resourcestate/ResourceStateNotificationDetector.java b/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/resourcestate/ResourceStateNotificationDetector.java new file mode 100644 index 0000000..8bd8961 --- /dev/null +++ b/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/resourcestate/ResourceStateNotificationDetector.java @@ -0,0 +1,39 @@ +package eu.dnetlib.enabling.is.sn.resourcestate; + +import eu.dnetlib.enabling.is.sn.NotificationDetector; + +/** + * Implementors detect topic assertions by sensing changes in resource state. + * + * @author marko + * @param + * type of resource + */ +public interface ResourceStateNotificationDetector extends NotificationDetector { + /** + * called when a new resource is created. + * + * @param newResource + * new resource + */ + void resourceCreated(T newResource); + + /** + * called when a resource is modified. + * + * @param oldResource + * old resource + * @param newResource + * new resource + */ + void resourceUpdated(T oldResource, T newResource); + + /** + * called when a resource is deleted. + * + * @param oldResource + * old resource + */ + void resourceDeleted(T oldResource); + +} diff --git a/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/resourcestate/ResourceStateSubscription.java b/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/resourcestate/ResourceStateSubscription.java new file mode 100644 index 0000000..35e3fdb --- /dev/null +++ b/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/resourcestate/ResourceStateSubscription.java @@ -0,0 +1,225 @@ +package eu.dnetlib.enabling.is.sn.resourcestate; + +import java.io.StringReader; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Id; +import javax.persistence.Table; +import javax.xml.transform.stream.StreamSource; +import javax.xml.ws.EndpointReference; +import javax.xml.ws.wsaddressing.W3CEndpointReference; + +import eu.dnetlib.enabling.is.sn.SubscriptionRequest; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; + +/** + * This class describes a ResourceState subscription, i.e. a subscription that is registered on a topic that depends on + * some xpath on some resource, and which is triggered when the value of this xpath changes. + * + * Topics of this type could not be there. + * + * @author marko + * + */ +@Entity(name = "subscriptions") +@Table(name = "subscriptions") +public class ResourceStateSubscription { + + /** + * hash seed. + */ + private static final int HASH_SEED_2 = 59; + + /** + * hash seed. + */ + private static final int HASH_SEED = 47; + + /** + * create topic prefix. + */ + public static final String PREFIX_CREATE = "CREATE"; + + /** + * delete topic prefix. + */ + public static final String PREFIX_DELETE = "DELETE"; + + /** + * update topic prefix. + */ + public static final String PREFIX_UPDATE = "UPDATE"; + + /** + * pending create topic prefix. + */ + public static final String PREFIX_PENDING_CREATE = "PENDING_CREATE"; + + /** + * pending delete topic prefix. + */ + public static final String PREFIX_PENDING_DELETE = "PENDING_DELETE"; + + /** + * pending update topic prefix. + */ + public static final String PREFIX_PENDING_UPDATE = "PENDING_UPDATE"; + + + /** + * subscription identifier. + */ + @Id + @Column(name = "subscriptionid") + private String subscriptionId; + + /** + * prefix: crude. + */ + @Column(name = "prefix") + private String prefix; + + /** + * resource type. + */ + @Column(name = "type") + private String type; + + /** + * resource id. + */ + @Column(name = "resourceid") + private String resourceId; + + /** + * xpath. + */ + @Column(name = "xpath") + private String xpath; + + /** + * consumer (subscriber) reference. + */ + @Column(name = "subscriber", length = 4096) + private String subscriber; + + /** + * default constructor. for unit testing. + */ + public ResourceStateSubscription() { + this.type = "*"; + this.resourceId = "*"; + } + + /** + * create a new instance. + * + * @param request + * original request. + * @param prefix + * prefix + * @param type + * resource type + * @param resourceId + * resource identifier + * @param xpath + * xpath + */ + public ResourceStateSubscription(final SubscriptionRequest request, final String prefix, final String type, final String resourceId, + final String xpath) { + super(); + setSubscriptionId(request.getSubscriptionId()); + setSubscriber(request.getSubscriber()); + setPrefix(prefix); + setType(type); + setResourceId(resourceId); + setXpath(xpath); + } + + /** + * {@inheritDoc} + * + * @see java.lang.Object#hashCode() + */ + @Override + public int hashCode() { + return new HashCodeBuilder(HASH_SEED, HASH_SEED_2).append(subscriptionId).append(subscriber.toString()).append(prefix).append(type).append(xpath) + .toHashCode(); + } + + /** + * {@inheritDoc} + * + * @see java.lang.Object#equals(java.lang.Object) + */ + @Override + public boolean equals(final Object obj) { + if (!(obj instanceof ResourceStateSubscription)) + return false; + + if (this == obj) + return true; + + final ResourceStateSubscription rhs = (ResourceStateSubscription) obj; + return new EqualsBuilder().append(subscriptionId, rhs.getSubscriptionId()).append(prefix, rhs.getPrefix()).append( + resourceId, rhs.getResourceId()).append(xpath, rhs.getXpath()).isEquals(); + } + + public String getSubscriptionId() { + return subscriptionId; + } + + public void setSubscriptionId(final String subscriptionId) { + this.subscriptionId = subscriptionId; + } + + public String getPrefix() { + return prefix; + } + + public void setPrefix(final String prefix) { + this.prefix = prefix; + } + + public String getType() { + return type; + } + + public void setType(final String type) { + this.type = type == null || type.isEmpty() ? "*" : type; + } + + public String getXpath() { + return xpath; + } + + public void setXpath(final String xpath) { + this.xpath = xpath; + } + + public String getSubscriber() { + return subscriber; + } + + public W3CEndpointReference getSubscriberAsEpr() { + return (W3CEndpointReference) EndpointReference.readFrom(new StreamSource(new StringReader(getSubscriber()))); + } + + public void setSubscriber(final W3CEndpointReference epr) { + this.subscriber = (epr != null) ? epr.toString() : null;; + } + + public void setSubscriber(final String subscriber) { + this.subscriber = subscriber; + } + + public void setResourceId(final String resourceId) { + this.resourceId = resourceId == null || resourceId.isEmpty() ? "*" : resourceId; + } + + public String getResourceId() { + return resourceId; + } + +} diff --git a/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/resourcestate/ResourceStateSubscriptionDAO.java b/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/resourcestate/ResourceStateSubscriptionDAO.java new file mode 100644 index 0000000..18a223d --- /dev/null +++ b/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/resourcestate/ResourceStateSubscriptionDAO.java @@ -0,0 +1,24 @@ +package eu.dnetlib.enabling.is.sn.resourcestate; + +import java.util.Collection; + +import eu.dnetlib.enabling.is.sn.SubscriptionDAO; + +/** + * Stores ResourceState subscriptions. + * + * @author marko + * + */ +public interface ResourceStateSubscriptionDAO extends SubscriptionDAO { + + /** + * get all subscriptions matching a given prefix and a given resource type. + * + * @param prefix null means any prefix + * @param resourceType resource type. + * @param resourceId resource identifier + * @return matching subscriptions + */ + Collection listSubscriptions(String prefix, String resourceType, String resourceId); +} diff --git a/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/resourcestate/ResourceStateSubscriptionRegistry.java b/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/resourcestate/ResourceStateSubscriptionRegistry.java new file mode 100644 index 0000000..f573b82 --- /dev/null +++ b/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/resourcestate/ResourceStateSubscriptionRegistry.java @@ -0,0 +1,233 @@ +package eu.dnetlib.enabling.is.sn.resourcestate; + +import java.util.Arrays; +import java.util.Collection; +import java.util.HashSet; +import java.util.Set; + +import javax.xml.transform.dom.DOMResult; +import javax.xml.ws.wsaddressing.W3CEndpointReference; +import javax.xml.xpath.XPathExpressionException; +import javax.xml.xpath.XPathFactory; + +import com.google.common.collect.Sets; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.apache.oro.text.perl.Perl5Util; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Required; + +import eu.dnetlib.enabling.is.sn.AbstractSubscriptionRegistry; +import eu.dnetlib.enabling.is.sn.SubscriptionRegistry; +import eu.dnetlib.enabling.is.sn.SubscriptionRequest; +import eu.dnetlib.enabling.is.sn.TopicExpressionMatchResult; +import eu.dnetlib.enabling.is.sn.rmi.SubscriptionRequestRejectedException; +import org.springframework.cache.annotation.CacheEvict; +import org.springframework.cache.annotation.Cacheable; + +/** + * Manage subscription for UPDATE/CREATE/DELETE resource-related topic prefixes. + * + * @author marko + * + */ +public class ResourceStateSubscriptionRegistry extends AbstractSubscriptionRegistry implements SubscriptionRegistry { + + private static final Log log = LogFactory.getLog(ResourceStateSubscriptionRegistry.class); + + /** + * subscription DAO. + */ + private ResourceStateSubscriptionDAO subscriptionDao; + + /** + * subscription request filter. + */ + @Autowired + private SubscriptionRequestFilter subscriptionRequestFilter; + + /** + * {@inheritDoc} + * + * @see eu.dnetlib.enabling.is.sn.SubscriptionRegistry#registerSubscription(eu.dnetlib.enabling.is.sn.SubscriptionRequest) + */ + @Override + @CacheEvict(value = "subscriptions", allEntries = true) + public String registerSubscription(final SubscriptionRequest subscription) throws SubscriptionRequestRejectedException { + final TopicExpressionMatchResult prefixMatch = matchPrefix(subscription); + if (prefixMatch == null) + return null; + + final TopicExpressionMatchResult typeMatch = matchType(prefixMatch.getRest()); + if (typeMatch == null) + return null; // TODO: decide whether to fail or not + + final TopicExpressionMatchResult idMatch = matchId(typeMatch.getRest()); + + if (idMatch == null) + return null; // TODO: decide whether to fail or not + + final ResourceStateSubscription rss = new ResourceStateSubscription(subscription, prefixMatch.getPrefix(), typeMatch.getPrefix(), idMatch.getPrefix(), + idMatch.getRest()); + + if (!getSubscriptionRequestFilter().accept(rss)) + throw new SubscriptionRequestRejectedException(String.format("rejected subscription request, resourceId: '%s', xpath: '%s', from: %s", + rss.getResourceId(), rss.getXpath(), rss.getSubscriber())); + + return registerSubscription(rss); + } + + /** + * this registers the real subscription. + * + * TODO: am I sure that the overload is a good thing here? + * + * @param subscription + * subscription + * @return subscription id (potentially changed) + */ + private String registerSubscription(final ResourceStateSubscription subscription) { + if(log.isDebugEnabled()) { + log.debug("evict subscriptions cache"); + } + + // TODO: change the dao, and implement a method which finds a given subscription directly. + final Collection similar = subscriptionDao.listSubscriptions(subscription.getPrefix(), subscription.getType(), + subscription.getResourceId()); + for (final ResourceStateSubscription r : similar) { + if (r != null && getAddress(subscription.getSubscriberAsEpr()).equals(getAddress(r.getSubscriberAsEpr())) + && (subscription.getXpath() == r.getXpath() || subscription.getXpath().equals(r.getXpath())) + && (subscription.getResourceId() == r.getResourceId() || subscription.getResourceId().equals(r.getResourceId()))) + return r.getSubscriptionId(); + } + + subscriptionDao.addSubscription(subscription); + + return subscription.getSubscriptionId(); + } + + /** + * {@inheritDoc} + * + * @see eu.dnetlib.enabling.is.sn.SubscriptionRegistry#unsubscribe(java.lang.String) + */ + @Override + @CacheEvict(value = "subscriptions", allEntries = true) + public boolean unsubscribe(final String subId) { + log.info("evict subscriptions cache"); + return subscriptionDao.removeSubscription(subId); + } + + /** + * Obtains the address component of the EPR. + * + * TODO: refactor in a utility class. + * + * @param epr + * endpoint reference + * @return address contained in the endpoint reference + */ + private Object getAddress(final W3CEndpointReference epr) { + final DOMResult dom = new DOMResult(); + epr.writeTo(dom); + + try { + return XPathFactory.newInstance().newXPath().evaluate("//*[local-name() = 'Address']", dom.getNode()); + } catch (final XPathExpressionException e) { + throw new IllegalStateException("cannot construct xpath expression", e); + } + } + + /** + * extract resource type name. + * + * @param rest + * topic expression without prefix + * @return tuple containing type name and rest of the prefix + */ + public TopicExpressionMatchResult matchType(final String rest) { + final Perl5Util matcher = new Perl5Util(); // NOPMD + if (!matcher.match("/^(\\*|[a-zA-Z_0-9]*)($|/)(.*)$/", rest)) + return null; + + return new TopicExpressionMatchResult(matcher.getMatch().group(1), matcher.getMatch().group(2 + 1)); + } + + /** + * extract resource id. + * + * @param rest + * topic expression without prefix + * @return tuple containing type name and rest of the prefix + */ + public TopicExpressionMatchResult matchId(final String rest) { + final Perl5Util matcher = new Perl5Util(); // NOPMD + if (!matcher.match("/^([^/]*)(.*)/", rest)) + return null; + + return new TopicExpressionMatchResult(matcher.getMatch().group(1), matcher.getMatch().group(2)); + } + + /** + * return all subscriptions matching a given prefix and a given type. Wildcard subscriptions will match any resource type. + * + * @param prefix + * prefix + * @param type + * concrete type + * @param resId + * resource identifier + * @return all matching subscriptions + */ + @Override + @Cacheable(value="subscriptions", key="{ #prefix, #type, #resId }") + public Collection listMatchingSubscriptions(final String prefix, final String type, final String resId) { + + if(log.isDebugEnabled()) { + log.debug(String.format("uncached list subscriptions [prefix: '%s', type: '%s', resourceId: '%s']", prefix, type, resId)); + } + final Set merged = new HashSet(); + merged.addAll(subscriptionDao.listSubscriptions(prefix, type, resId)); + merged.addAll(subscriptionDao.listSubscriptions(prefix, type, "*")); + merged.addAll(subscriptionDao.listSubscriptions(prefix, "*", "*")); + return merged; + } + + @Override + @Cacheable(value="subscriptions") + public Collection listSubscriptions() { + log.info("uncached list subscriptions"); + + return Sets.newHashSet(subscriptionDao.listSubscriptions()); + } + + @Override + @CacheEvict(value = "subscriptions", allEntries = true) + public boolean removeSubscription(final String subscriptionId) { + return subscriptionDao.removeSubscription(subscriptionId); + } + + @Override + protected Collection getAcceptedPrefixes() { + return Arrays.asList(new String[] { ResourceStateSubscription.PREFIX_CREATE, ResourceStateSubscription.PREFIX_DELETE, + ResourceStateSubscription.PREFIX_UPDATE }); + } + + public ResourceStateSubscriptionDAO getSubscriptionDao() { + return subscriptionDao; + } + + @Required + public void setSubscriptionDao(final ResourceStateSubscriptionDAO subscriptionDao) { + this.subscriptionDao = subscriptionDao; + } + + public SubscriptionRequestFilter getSubscriptionRequestFilter() { + return subscriptionRequestFilter; + } + + public void setSubscriptionRequestFilter(final SubscriptionRequestFilter subscriptionRequestFilter) { + this.subscriptionRequestFilter = subscriptionRequestFilter; + } + +} diff --git a/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/resourcestate/SubscriptionRequestFilter.java b/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/resourcestate/SubscriptionRequestFilter.java new file mode 100644 index 0000000..e42c44c --- /dev/null +++ b/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/resourcestate/SubscriptionRequestFilter.java @@ -0,0 +1,43 @@ +package eu.dnetlib.enabling.is.sn.resourcestate; + +import org.apache.commons.lang3.StringUtils; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.springframework.beans.factory.annotation.Value; + +public class SubscriptionRequestFilter { + + /** + * logger. + */ + private static final Log log = LogFactory.getLog(SubscriptionRequestFilter.class); // NOPMD by marko on 11/24/08 5:02 PM + + /** + * resource wildcard + */ + private static final String ANY_RESOURCE = "*"; + + @Value("${services.issn.subscription.filter.active}") + private boolean active = false; + + public boolean accept(final ResourceStateSubscription rss) { + + if (!isActive()) return true; + + if (StringUtils.isBlank(rss.getXpath()) & StringUtils.equals(rss.getResourceId(), ANY_RESOURCE)) { + log.debug(String.format("rejected subscription request, resourceId: '%s', xpath: '%s', from: %s", rss.getResourceId(), rss.getXpath(), + rss.getSubscriber())); + return false; // we reject wide subscriptions + } + + return true; + } + + public boolean isActive() { + return active; + } + + public void setActive(boolean active) { + this.active = active; + } +} diff --git a/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/resourcestate/hib/EndpointReferenceType.java b/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/resourcestate/hib/EndpointReferenceType.java new file mode 100644 index 0000000..b75fa22 --- /dev/null +++ b/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/resourcestate/hib/EndpointReferenceType.java @@ -0,0 +1,151 @@ +package eu.dnetlib.enabling.is.sn.resourcestate.hib; + +import static java.sql.Types.VARCHAR; + +import java.io.Serializable; +import java.io.StringReader; +import java.io.StringWriter; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; + +import javax.xml.transform.stream.StreamResult; +import javax.xml.transform.stream.StreamSource; +import javax.xml.ws.EndpointReference; +import javax.xml.ws.wsaddressing.W3CEndpointReference; + +import org.hibernate.HibernateException; +import org.hibernate.engine.spi.SessionImplementor; +import org.hibernate.usertype.UserType; + +/** + * Serializes Endpoint reference types to database columns (strings). + * + * @author marko + * + */ +public class EndpointReferenceType implements UserType { // NOPMD + + /** + * {@inheritDoc} + * + * @see org.hibernate.usertype.UserType#assemble(java.io.Serializable, java.lang.Object) + */ + @Override + public Object assemble(final Serializable arg0, final Object owner) { + if (arg0 == null) return null; + return EndpointReference.readFrom(new StreamSource(new StringReader((String) arg0))); + } + + /** + * {@inheritDoc} + * + * @see org.hibernate.usertype.UserType#deepCopy(java.lang.Object) + */ + @Override + public Object deepCopy(final Object arg0) { + if (arg0 == null) return null; + + return arg0; + } + + /** + * {@inheritDoc} + * + * @see org.hibernate.usertype.UserType#disassemble(java.lang.Object) + */ + @Override + public Serializable disassemble(final Object arg0) { + final StringWriter buffer = new StringWriter(); + ((W3CEndpointReference) arg0).writeTo(new StreamResult(buffer)); + return buffer.toString(); + } + + /** + * {@inheritDoc} + * + * @see org.hibernate.usertype.UserType#equals(java.lang.Object, java.lang.Object) + */ + @Override + public boolean equals(final Object arg0, final Object arg1) { + if (arg0 == arg1) // NOPMD + return true; + if ((arg0 == null) || (arg1 == null)) return false; + return arg0.equals(arg1); + } + + /** + * {@inheritDoc} + * + * @see org.hibernate.usertype.UserType#hashCode(java.lang.Object) + */ + @Override + public int hashCode(final Object arg0) { + return disassemble(arg0).hashCode(); + } + + @Override + public boolean isMutable() { + return false; + } + + /** + * + * {@inheritDoc} + * + * @see org.hibernate.usertype.UserType#nullSafeGet(java.sql.ResultSet, java.lang.String[], org.hibernate.engine.spi.SessionImplementor, + * java.lang.Object) + */ + @Override + public Object nullSafeGet(final ResultSet rset, final String[] names, final SessionImplementor si, final Object owner) throws SQLException { + return assemble(rset.getString(names[0]), owner); + } + + /** + * {@inheritDoc} + * + * @see org.hibernate.usertype.UserType#nullSafeSet(java.sql.PreparedStatement, java.lang.Object, int, + * org.hibernate.engine.spi.SessionImplementor) + */ + @Override + public void nullSafeSet(final PreparedStatement statement, final Object epr, final int index, final SessionImplementor arg3) throws HibernateException, + SQLException { + if (epr != null) { + statement.setString(index, (String) disassemble(epr)); + } + + } + + /** + * {@inheritDoc} + * + * @see org.hibernate.usertype.UserType#replace(java.lang.Object, java.lang.Object, java.lang.Object) + */ + @Override + public Object replace(final Object arg0, final Object arg1, final Object arg2) { + // is not mutable + return null; + } + + /** + * {@inheritDoc} + * + * @see org.hibernate.usertype.UserType#returnedClass() + */ + @Override + @SuppressWarnings("rawtypes") + public Class returnedClass() { + return W3CEndpointReference.class; + } + + /** + * {@inheritDoc} + * + * @see org.hibernate.usertype.UserType#sqlTypes() + */ + @Override + public int[] sqlTypes() { + return new int[] { VARCHAR }; + } + +} diff --git a/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/resourcestate/hib/HibernateResourceStateSubscriptionDAOImpl.java b/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/resourcestate/hib/HibernateResourceStateSubscriptionDAOImpl.java new file mode 100644 index 0000000..7d618ac --- /dev/null +++ b/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/sn/resourcestate/hib/HibernateResourceStateSubscriptionDAOImpl.java @@ -0,0 +1,137 @@ +package eu.dnetlib.enabling.is.sn.resourcestate.hib; + +import java.util.Collection; +import java.util.List; +import java.util.stream.Collectors; + +import eu.dnetlib.enabling.is.sn.resourcestate.ResourceStateSubscription; +import eu.dnetlib.enabling.is.sn.resourcestate.ResourceStateSubscriptionDAO; +import org.apache.commons.lang3.StringUtils; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.hibernate.Criteria; +import org.hibernate.SessionFactory; +import org.hibernate.criterion.Example; +import org.springframework.beans.factory.annotation.Required; +import org.springframework.transaction.annotation.Transactional; + +/** + * Hibernate storage for resource state subscriptions. + * + * @author marko + * + */ +public class HibernateResourceStateSubscriptionDAOImpl implements ResourceStateSubscriptionDAO { + + private static final Log log = LogFactory.getLog(HibernateResourceStateSubscriptionDAOImpl.class); + + private SessionFactory sessionFactory; + + private Collection transformToSubscription(final List inputList) { + return inputList.stream() + .map(o -> (ResourceStateSubscription) o) + .collect(Collectors.toList()); + } + + /** + * {@inheritDoc} + * + * @see eu.dnetlib.enabling.is.sn.resourcestate.ResourceStateSubscriptionDAO#listSubscriptions(java.lang.String, java.lang.String, + * java.lang.String) + */ + @Override + @Transactional(readOnly = true) + public Collection listSubscriptions(final String prefix, final String resourceType, final String resourceId) { + + final ResourceStateSubscription exampleEntity = new ResourceStateSubscription(); + exampleEntity.setPrefix(prefix); + exampleEntity.setType(resourceType); + exampleEntity.setResourceId(resourceId); + + return transformToSubscription(queryByCriteria(exampleEntity)); + } + + /** + * {@inheritDoc} + * + * @see eu.dnetlib.enabling.is.sn.SubscriptionDAO#addSubscription(java.lang.Object) + */ + @Override + @Transactional + public void addSubscription(final ResourceStateSubscription subscription) { + + log.debug("evict cached subscriptions"); + + getSessionFactory().getCurrentSession().save(subscription); + } + + /** + * {@inheritDoc} + * + * @see eu.dnetlib.enabling.is.sn.SubscriptionDAO#getSubscription(java.lang.String) + */ + @Override + @Transactional(readOnly = true) + public ResourceStateSubscription getSubscription(final String subscriptionId) { + return (ResourceStateSubscription) getSessionFactory().getCurrentSession().get(ResourceStateSubscription.class, subscriptionId); + } + + /** + * {@inheritDoc} + * + * @see eu.dnetlib.enabling.is.sn.SubscriptionDAO#listSubscriptions() + */ + @Override + @SuppressWarnings("unchecked") + @Transactional(readOnly = true) + public Collection listSubscriptions() { + return getSessionFactory().getCurrentSession().createQuery("from subscriptions").list(); + } + + /** + * {@inheritDoc} + * + * @see eu.dnetlib.enabling.is.sn.SubscriptionDAO#listSubscriptions(java.lang.String) + */ + @Override + @Transactional(readOnly = true) + public Collection listSubscriptions(final String prefix) { + final ResourceStateSubscription exampleEntity = new ResourceStateSubscription(); + exampleEntity.setPrefix(prefix); + + return transformToSubscription(queryByCriteria(exampleEntity)); + } + + /** + * {@inheritDoc} + * + * @see eu.dnetlib.enabling.is.sn.SubscriptionDAO#removeSubscription(java.lang.String) + */ + @Override + @Transactional + public boolean removeSubscription(final String subscriptionId) { + if (StringUtils.isBlank(subscriptionId)) return false; + + final ResourceStateSubscription entity = getSubscription(subscriptionId); + + if (entity == null) return false; + + getSessionFactory().getCurrentSession().delete(entity); + return true; + } + + @SuppressWarnings("unchecked") + private List queryByCriteria(final ResourceStateSubscription exampleEntity) { + Criteria criteria = getSessionFactory().getCurrentSession().createCriteria(ResourceStateSubscription.class).add(Example.create(exampleEntity)); + return criteria.list(); + } + + public SessionFactory getSessionFactory() { + return sessionFactory; + } + + @Required + public void setSessionFactory(SessionFactory sessionFactory) { + this.sessionFactory = sessionFactory; + } +} diff --git a/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/store/ISStoreServiceImpl.java b/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/store/ISStoreServiceImpl.java new file mode 100644 index 0000000..aeac473 --- /dev/null +++ b/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/store/ISStoreServiceImpl.java @@ -0,0 +1,323 @@ +package eu.dnetlib.enabling.is.store; + +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; +import javax.annotation.Resource; +import javax.jws.WebService; +import javax.xml.ws.Endpoint; + +import com.google.common.collect.Iterators; +import eu.dnetlib.enabling.is.store.rmi.ISStoreException; +import eu.dnetlib.enabling.is.store.rmi.ISStoreService; +import eu.dnetlib.enabling.tools.AbstractBaseService; +import eu.dnetlib.soap.EndpointReferenceBuilder; +import eu.dnetlib.xml.database.XMLDatabase; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.quartz.Job; +import org.quartz.JobExecutionException; +import org.xmldb.api.base.XMLDBException; + +/** + * ISStore service implementation. + * + * @author marko + * + */ +@WebService(targetNamespace = "http://services.dnetlib.eu/") +public class ISStoreServiceImpl extends AbstractBaseService implements ISStoreService { // NOPMD by marko on 11/24/08 + + /** + * logger. + */ + private static final Log log = LogFactory.getLog(ISStoreServiceImpl.class); // NOPMD by marko on 11/24/08 4:46 PM + + /** + * xml database used by the ISStore. + */ + private XMLDatabase xmlDatabase; + + /** + * Service endpoint. + */ + private Endpoint endpoint; + + /** + * injected EPR builder. + */ + @Resource(name = "jaxwsEndpointReferenceBuilder") + private EndpointReferenceBuilder eprBuilder; + + /** + * initializer job + */ + private Job contentInitializerJob; + + @Override + public void start() { + super.start(); + + new Thread(new Runnable() { + + @Override + public void run() { + try { + Thread.sleep(500); + contentInitializerJob.execute(null); + } catch (JobExecutionException e) { + log.fatal("failed to initialize xmldb", e); + } catch (InterruptedException e) { + log.fatal("failed to initialize xmldb", e); + } + } + }).start(); + + } + + /** + * web service context (not really useful right now). + */ + // @Resource + // private WebServiceContext context; + /** + * {@inheritDoc} + * + * @see eu.dnetlib.enabling.is.store.rmi.ISStoreService#createFileColl(java.lang.String) + */ + @Override + public boolean createFileColl(final String fileColl) throws ISStoreException { + try { + xmlDatabase.createCollection(fileColl); + } catch (XMLDBException e) { + throw new ISStoreException(e); + } + return true; + } + + /** + * {@inheritDoc} + * + * @see eu.dnetlib.enabling.is.store.rmi.ISStoreService#deleteFileColl(java.lang.String) + */ + @Override + public boolean deleteFileColl(final String fileColl) throws ISStoreException { + try { + xmlDatabase.removeCollection(fileColl); + } catch (XMLDBException e) { + throw new ISStoreException(e); + } + return true; + } + + /** + * {@inheritDoc} + * + * @see eu.dnetlib.enabling.is.store.rmi.ISStoreService#deleteXML(java.lang.String, java.lang.String) + */ + @Override + public boolean deleteXML(final String fileName, final String fileColl) throws ISStoreException { + try { + return xmlDatabase.remove(fileName, fileColl); + } catch (XMLDBException e) { + throw new ISStoreException(e); + } + } + + /** + * {@inheritDoc} + * + * @see eu.dnetlib.enabling.is.store.rmi.ISStoreService#executeXUpdate(java.lang.String) + */ + @Override + public boolean executeXUpdate(final String query) throws ISStoreException { + getXMLbyQuery(query); + return true; + } + + /** + * {@inheritDoc} + * + * @see eu.dnetlib.enabling.is.store.rmi.ISStoreService#getFileColls() + */ + @Override + public List getFileColls() throws ISStoreException { + try { + return xmlDatabase.listChildCollections(xmlDatabase.getRootCollection()); + } catch (XMLDBException e) { + throw new ISStoreException(e); + } + } + + /** + * {@inheritDoc} + * + * @see eu.dnetlib.enabling.is.store.rmi.ISStoreService#getFileNames(java.lang.String) + */ + @Override + public List getFileNames(final String fileColl) throws ISStoreException { + try { + return xmlDatabase.list(fileColl); + } catch (XMLDBException e) { + throw new ISStoreException(e); + } + } + + /** + * {@inheritDoc} + * + * @see eu.dnetlib.enabling.is.store.rmi.ISStoreService#getXML(java.lang.String, java.lang.String) + */ + @Override + public String getXML(final String fileName, final String fileColl) throws ISStoreException { + try { + return xmlDatabase.read(fileName, fileColl); + } catch (XMLDBException e) { + throw new ISStoreException(e); + } + } + + /** + * {@inheritDoc} + * + * @see eu.dnetlib.enabling.is.store.rmi.ISStoreService#getXMLbyQuery(java.lang.String) + */ + @Override + public String getXMLbyQuery(final String query) throws ISStoreException { + log.debug(query); + + try { + final Iterator res = xmlDatabase.xquery(query); + if (res == null) return null; + if (!res.hasNext()) return null; + return res.next(); + } catch (XMLDBException e) { + throw new ISStoreException(e); + } + } + + /** + * {@inheritDoc} + * + * @see eu.dnetlib.enabling.is.store.rmi.ISStoreService#insertXML(java.lang.String, java.lang.String, java.lang.String) + */ + @Override + public boolean insertXML(final String fileName, final String fileColl, final String file) throws ISStoreException { + try { + xmlDatabase.create(fileName, fileColl, file); + } catch (XMLDBException e) { + throw new ISStoreException(e); + } + return true; + } + + /** + * {@inheritDoc} + * + * @see eu.dnetlib.enabling.is.store.rmi.ISStoreService#quickSearchXML(java.lang.String) + */ + @Override + public List quickSearchXML(final String query) throws ISStoreException { + log.debug(query); + try { + final Iterator res = xmlDatabase.xquery(query); + if (res == null) return new ArrayList<>(); + + final ArrayList ans = new ArrayList(); + Iterators.addAll(ans, res); + return ans; + } catch (XMLDBException e) { + log.fatal("searching", e); + throw new ISStoreException(e); + } + } + + /** + * {@inheritDoc} + * + * @see eu.dnetlib.enabling.is.store.rmi.ISStoreService#reindex() + */ + @Override + public boolean reindex() { + return true; + } + + /** + * {@inheritDoc} + * + * @see eu.dnetlib.enabling.is.store.rmi.ISStoreService#sync() + */ + @Override + public boolean sync() { + log.info("TEST: " + endpoint); + + return true; + } + + /** + * {@inheritDoc} + * + * @see eu.dnetlib.enabling.is.store.rmi.ISStoreService#updateXML(java.lang.String, java.lang.String, java.lang.String) + */ + @Override + public boolean updateXML(final String fileName, final String fileColl, final String file) throws ISStoreException { + try { + xmlDatabase.update(fileName, fileColl, file); + } catch (XMLDBException e) { + throw new ISStoreException(e); + } + return true; + } + + /** + * {@inheritDoc} + * + * @see eu.dnetlib.enabling.is.store.rmi.ISStoreService#backup() + */ + @Override + public String backup() throws ISStoreException { + try { + return xmlDatabase.backup(); + } catch (Exception e) { + throw new ISStoreException(e); + } + } + + public XMLDatabase getXmlDatabase() { + return xmlDatabase; + } + + public void setXmlDatabase(final XMLDatabase xmlDatabase) { + this.xmlDatabase = xmlDatabase; + } + + @Override + public boolean isRunning() { + return true; + } + + public Endpoint getEndpoint() { + return endpoint; + } + + public void setEndpoint(final Endpoint endpoint) { + this.endpoint = endpoint; + } + + protected EndpointReferenceBuilder getEprBuilder() { + return eprBuilder; + } + + protected void setEprBuilder(final EndpointReferenceBuilder eprBuilder) { + this.eprBuilder = eprBuilder; + } + + public Job getContentInitializerJob() { + return contentInitializerJob; + } + + public void setContentInitializerJob(final Job contentInitializerJob) { + this.contentInitializerJob = contentInitializerJob; + } + +} diff --git a/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/store/TestContentInitializerJob.java b/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/store/TestContentInitializerJob.java new file mode 100644 index 0000000..d121309 --- /dev/null +++ b/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/store/TestContentInitializerJob.java @@ -0,0 +1,180 @@ +package eu.dnetlib.enabling.is.store; + +import java.io.IOException; + +import javax.xml.parsers.ParserConfigurationException; +import javax.xml.xpath.XPathExpressionException; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.quartz.Job; +import org.quartz.JobExecutionContext; +import org.quartz.JobExecutionException; +import org.springframework.beans.factory.annotation.Required; +import org.springframework.core.io.Resource; +import org.xml.sax.SAXException; + +import eu.dnetlib.enabling.is.registry.rmi.ISRegistryException; +import eu.dnetlib.enabling.tools.ResourceLoaderHelper; +import eu.dnetlib.miscutils.coupling.StaticCondition; + +/** + * This job is scheduled at startup of a test environment to load some data into the store. + * + *

+ * You should configure this bean with paths to the profile and schema files you want to add. This can be done setting + * the 'resources' and 'schemas' properties using the syntax documented here + *

+ * + * @author marko + * + */ +public class TestContentInitializerJob extends AbstractContentInitializer implements Job { + /** + * milliseconds in a second. + */ + private static final double MILLIS = 1000.0; + + /** + * logger. + */ + static final Log log = LogFactory.getLog(TestContentInitializerJob.class); // NOPMD by marko on 11/24/08 5:02 PM + + /** + * hackish way of communicating to the integration tester that we have finished. + */ + private static boolean initialized = false; + + /** + * resourceLoader compatible pattern matching all files to load. + */ + private String resources; + + /** + * resourceLoader compatible pattern matching all xsd files to load. + */ + private String schemas; + + /** + * resource loader helper. we cannot implement the ResourceLoaderAware interface. + */ + private ResourceLoaderHelper resourceLoader; + + /** + * set to true in order to disable notification detection. Useful for bulk profile insertion. + */ + private StaticCondition snDisable; + + public TestContentInitializerJob() { + super(); + } + + /** + * {@inheritDoc} + * + * @see org.quartz.Job#execute(org.quartz.JobExecutionContext) + */ + @Override + public void execute(final JobExecutionContext arg0) throws JobExecutionException { + initialize(); + setInitialized(true); + } + + public void initialize() throws JobExecutionException { + log.info("Initializing store with some profiles and collections for test and development ..."); + + if (!getBulkImporter().isEnabled()) { + log.info("skipping store initialization because the database already exists"); + return; + } + + log.info("loading resources: " + getResources()); + + try { + String type = "schema/profile"; // NOPMD + String name = "none"; // NOPMD + try { + final long start = System.currentTimeMillis(); + + type = "schema"; // NOPMD + for (Resource res : resourceLoader.getResourcePatternResolver().getResources(schemas)) { + name = res.getURL().toString(); // NOPMD + registerSchema(res.getURL()); + } + + try { + snDisable.setCondition(true); + type = "profile"; + for (Resource res : resourceLoader.getResourcePatternResolver().getResources(resources)) { + name = res.getURL().toString(); // NOPMD + registerProfile(res.getURL()); + } + } finally { + snDisable.setCondition(false); + } + + log.info("bulk registration finished in: " + ((System.currentTimeMillis() - start) / MILLIS) + "s"); + } catch (ISRegistryException e) { + log.fatal("cannot register " + type + ": " + name, e); + throw new JobExecutionException("registry exception", e); + } catch (IOException e) { + throw new JobExecutionException("io exception", e); + } catch (XPathExpressionException e) { + throw new JobExecutionException("xpath exception", e); + } catch (SAXException e) { + throw new JobExecutionException("sax exception", e); + } catch (ParserConfigurationException e) { + throw new JobExecutionException("parser exception", e); + } + } finally { + log.info("INITIALIZED"); + setInitialized(true); + } + } + + public static void setInitialized(final boolean initialized) { + TestContentInitializerJob.initialized = initialized; + } + + public static boolean isInitialized() { + return initialized; + } + + public void setResources(final String resources) { + this.resources = resources; + } + + public String getResources() { + return resources; + } + + @Required + public ResourceLoaderHelper getResourceLoader() { + return resourceLoader; + } + + @Required + public void setResourceLoader(final ResourceLoaderHelper resourceLoader) { + this.resourceLoader = resourceLoader; + } + + @Required + public void setSchemas(final String schemas) { + this.schemas = schemas; + } + + public String getSchemas() { + return schemas; + } + + public void setSnDisable(final StaticCondition snDisable) { + this.snDisable = snDisable; + } + + public StaticCondition getSnDisable() { + return snDisable; + } + +} diff --git a/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/store/xquery/dnet.xqm b/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/store/xquery/dnet.xqm new file mode 100644 index 0000000..0a654f1 --- /dev/null +++ b/dnet-information-service/src/main/java/eu/dnetlib/enabling/is/store/xquery/dnet.xqm @@ -0,0 +1,10 @@ +xquery version "1.0"; + +module namespace dnet="http://namespace.dnetlib.eu/xquery/dnet"; +declare namespace xmldb="http://exist-db.org/xquery/xmldb"; + +declare function dnet:deleteDocument($x as element()) { + + xmldb:remove(replace($x/base-uri(),'/[^/]*$', ''), replace($x/base-uri(),'^.*/([^/]*)$', '$1')) + +}; diff --git a/dnet-information-service/src/main/java/eu/dnetlib/enabling/tools/CompatResourceIdentifierResolverImpl.java b/dnet-information-service/src/main/java/eu/dnetlib/enabling/tools/CompatResourceIdentifierResolverImpl.java new file mode 100644 index 0000000..7f90e5d --- /dev/null +++ b/dnet-information-service/src/main/java/eu/dnetlib/enabling/tools/CompatResourceIdentifierResolverImpl.java @@ -0,0 +1,46 @@ +package eu.dnetlib.enabling.tools; + +import com.sun.xml.messaging.saaj.util.Base64; + +/** + * resolve resource file and collection names from the resource identifier according to the DNet 1.0 policy, by encoding + * the collection path in the identifier itself (as base64). + * + * @author marko + * + */ +public class CompatResourceIdentifierResolverImpl implements ResourceIdentifierResolver, ResourceIdentifierComposer { + + /** + * {@inheritDoc} + * + * @see eu.dnetlib.enabling.tools.ResourceIdentifierResolver#getCollectionName(java.lang.String) + */ + @Override + public String getCollectionName(final String resId) { + final String[] components = resId.split("_"); + if (components.length == 1) + return "DefaultCollection"; + return Base64.base64Decode(components[1]); + } + + /** + * {@inheritDoc} + * + * @see eu.dnetlib.enabling.tools.ResourceIdentifierResolver#getFileName(java.lang.String) + */ + @Override + public String getFileName(final String resId) { + return resId.split("_")[0]; + } + + /** + * {@inheritDoc} + * + * @see eu.dnetlib.enabling.tools.ResourceIdentifierComposer#createResourceId(java.lang.String, java.lang.String) + */ + @Override + public String createResourceId(final String fileName, final String coll) { + return fileName + "_" + new String(Base64.encode(coll.getBytes())); + } +} diff --git a/dnet-information-service/src/main/java/eu/dnetlib/enabling/tools/LogInterceptor.java b/dnet-information-service/src/main/java/eu/dnetlib/enabling/tools/LogInterceptor.java new file mode 100644 index 0000000..447be47 --- /dev/null +++ b/dnet-information-service/src/main/java/eu/dnetlib/enabling/tools/LogInterceptor.java @@ -0,0 +1,27 @@ +package eu.dnetlib.enabling.tools; + +import org.aopalliance.intercept.MethodInvocation; +import org.apache.commons.logging.Log; +import org.springframework.aop.interceptor.CustomizableTraceInterceptor; + +/** + * This class intercepts calls to the OAICore to measure its execution time. It uses Spring AOP. + * + * @author alessia + */ +public class LogInterceptor extends CustomizableTraceInterceptor { + + @Override + protected void writeToLog(final Log logger, final String message, final Throwable ex) { + if (ex != null) { + logger.error(message, ex); + } else { + logger.debug(message); + } + } + + @Override + protected boolean isInterceptorEnabled(final MethodInvocation invocation, final Log logger) { + return true; + } +} diff --git a/dnet-information-service/src/main/java/eu/dnetlib/enabling/tools/ResourceIdentifierComposer.java b/dnet-information-service/src/main/java/eu/dnetlib/enabling/tools/ResourceIdentifierComposer.java new file mode 100644 index 0000000..f752864 --- /dev/null +++ b/dnet-information-service/src/main/java/eu/dnetlib/enabling/tools/ResourceIdentifierComposer.java @@ -0,0 +1,18 @@ +package eu.dnetlib.enabling.tools; + +/** + * Abstracts the creation of a resource identifier from xmldb file name and xmldb collection name. + * + * @author marko + * + */ +public interface ResourceIdentifierComposer { + /** + * Create a resId from a xmldb filename and collection name. + * + * @param fileName + * @param coll + * @return + */ + String createResourceId(final String fileName, final String coll); +} diff --git a/dnet-information-service/src/main/java/eu/dnetlib/enabling/tools/ResourceType.java b/dnet-information-service/src/main/java/eu/dnetlib/enabling/tools/ResourceType.java new file mode 100644 index 0000000..77ea7c9 --- /dev/null +++ b/dnet-information-service/src/main/java/eu/dnetlib/enabling/tools/ResourceType.java @@ -0,0 +1,161 @@ +package eu.dnetlib.enabling.tools; + +import java.io.BufferedWriter; +import java.io.File; +import java.io.FileWriter; +import java.io.IOException; + +import eu.dnetlib.enabling.is.sn.rmi.ISSNService; +import eu.dnetlib.enabling.is.store.rmi.ISStoreException; +import eu.dnetlib.enabling.is.store.rmi.ISStoreService; + +/** + * + * TODO: document. TODO: Too low level, why the interfacing the Store and not the Registry ? + * + * @author michele + * + */ +public class ResourceType { + + /** + * xmldb collection where resource types are stored. + */ + public static final String RESOURCE_TYPES = "DRIVERResourceTypes"; + + /** + * resource type. (Including kind?) + */ + private String resourceType; // NOPMD + + /** + * resource schema. (Body?) + */ + private String resourceSchema; // NOPMD + /** + * file where a copy of the schema is stored locally TODO: why ? + */ + private File fileSchema; + + /** + * instanciate an already registered resource type, fetching it from the store. + * + * @param resourceType + * resourceType name + * @param store + * store service where the type is stored + * @param basedir + * base dir where a local copy is held (why?) + * @throws ISStoreException + * happens + */ + public ResourceType(final String resourceType, final ISStoreService store, final String basedir) throws ISStoreException { + this(resourceType, store.getXML(resourceType, RESOURCE_TYPES), basedir); + } + + /** + * construct a resource type. + * + * @param resourceType + * resourceType name + * @param resourceSchema + * resourceSchema xsd body + * @param basedir + * base directory of some local copy (?) + * @throws ISStoreException + * happens + */ + public ResourceType(final String resourceType, final String resourceSchema, final String basedir) throws ISStoreException { + this.resourceType = resourceType; + this.resourceSchema = resourceSchema; + if (basedir != null) + this.fileSchema = saveSchemaAsFile(basedir); + } + + /** + * stores the schema on the xmldb. + * + * @param store + * store service + * @throws ISStoreException + * happens + */ + public void store(final ISStoreService store) throws ISStoreException { + store.insertXML(resourceType, RESOURCE_TYPES, resourceSchema); + } + + /** + * updates the in memory resource instance from the store. + * + * @param store store service + * @throws ISStoreException happens + */ + public void update(final ISStoreService store) throws ISStoreException { + store.updateXML(resourceType, RESOURCE_TYPES, resourceSchema); + } + + /** + * save the schema to a file. + * + * @param basedir + * base directory + * @return the newly created file + * @throws ISStoreException + * happens, even if the file cannot be created. + */ + private File saveSchemaAsFile(final String basedir) throws ISStoreException { + fileSchema = new File(basedir + "/" + resourceType); + if (!fileSchema.exists()) { + try { + final BufferedWriter out = new BufferedWriter(new FileWriter(fileSchema)); + out.write(resourceSchema); + out.close(); + } catch (IOException e) { + throw new ISStoreException("Error saving file", e); + } + } + return fileSchema; + } + + /** + * it says "delete and notify" but it only deletes the schema from the filesystem and from the store. + * + * TODO: document and possibly refactor. + * + * @param store + * store service + * @param issn + * ISSN service + * @throws ISStoreException + * happens + */ + public void deleteAndNotify(final ISStoreService store, final ISSNService issn) throws ISStoreException { + fileSchema.delete(); + store.deleteXML(resourceType, RESOURCE_TYPES); + } + + public String getResourceType() { + return resourceType; + } + + public void setResourceType(final String resourceType) { + this.resourceType = resourceType; + } + + public String getResourceSchema() { + return resourceSchema; + } + + public void setResourceSchema(final String resourceSchema) { + this.resourceSchema = resourceSchema; + } + + public File getFileSchema() { + return fileSchema; + } + + public void setFileSchema(final File fileSchema) { + this.fileSchema = fileSchema; + } + +} diff --git a/dnet-information-service/src/main/java/eu/dnetlib/enabling/tools/XQueryUtilsImpl.java b/dnet-information-service/src/main/java/eu/dnetlib/enabling/tools/XQueryUtilsImpl.java new file mode 100644 index 0000000..3394354 --- /dev/null +++ b/dnet-information-service/src/main/java/eu/dnetlib/enabling/tools/XQueryUtilsImpl.java @@ -0,0 +1,52 @@ +package eu.dnetlib.enabling.tools; + + +/** + * Standard DNet-1.0 compat xquery utils. + * + * @author marko + * + */ +public class XQueryUtilsImpl implements XQueryUtils { + + /** + * {@inheritDoc} + * @see eu.dnetlib.enabling.tools.XQueryUtils#getCollectionAbsPath(eu.dnetlib.enabling.tools.OpaqueResource) + */ + @Override + public String getCollectionAbsPath(final OpaqueResource resource) { + return getRootCollection() + getCollectionPath(resource); + } + + /** + * {@inheritDoc} + * @see eu.dnetlib.enabling.tools.XQueryUtils#getCollectionPath(eu.dnetlib.enabling.tools.OpaqueResource) + */ + @Override + public String getCollectionPath(final OpaqueResource resource) { + final StringBuilder buffer = new StringBuilder(); + buffer.append(resource.getResourceKind()); + buffer.append('/'); + buffer.append(resource.getResourceType()); + return buffer.toString(); + } + + /** + * {@inheritDoc} + * @see eu.dnetlib.enabling.tools.XQueryUtils#getRootCollection() + */ + @Override + public String getRootCollection() { + return "/db/DRIVER/"; + } + + /** + * {@inheritDoc} + * @see eu.dnetlib.enabling.tools.XQueryUtils#getFileName(eu.dnetlib.enabling.tools.OpaqueResource) + */ + @Override + public String getFileName(final OpaqueResource resource) { + return resource.getResourceId().split("_")[0]; + } + +} diff --git a/dnet-information-service/src/main/java/eu/dnetlib/xml/database/AbstractTrigger.java b/dnet-information-service/src/main/java/eu/dnetlib/xml/database/AbstractTrigger.java new file mode 100644 index 0000000..dfc3be6 --- /dev/null +++ b/dnet-information-service/src/main/java/eu/dnetlib/xml/database/AbstractTrigger.java @@ -0,0 +1,27 @@ +package eu.dnetlib.xml.database; + +/** + * most trigger will hold the trigger name in an instance variable. + * + * The Trigger contract requires a getter (getName()). This class implements the setter too. + * + * @author marko + * + */ +public abstract class AbstractTrigger implements Trigger { + + /** + * trigger name. + */ + private String name; + + @Override + public String getName() { + return name; + } + + public void setName(final String name) { + this.name = name; + } + +} diff --git a/dnet-information-service/src/main/java/eu/dnetlib/xml/database/LoggingTrigger.java b/dnet-information-service/src/main/java/eu/dnetlib/xml/database/LoggingTrigger.java new file mode 100644 index 0000000..71cb20c --- /dev/null +++ b/dnet-information-service/src/main/java/eu/dnetlib/xml/database/LoggingTrigger.java @@ -0,0 +1,46 @@ +package eu.dnetlib.xml.database; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.w3c.dom.Document; + +/** + * This trigger simply logs all xmldb CRUDE events. + * + * @author marko + * + */ +public class LoggingTrigger extends AbstractTrigger { + /** + * logger. + */ + private static final Log log = LogFactory.getLog(LoggingTrigger.class); // NOPMD by marko on 11/24/08 5:02 PM + + /** + * {@inheritDoc} + * @see eu.dnetlib.xml.database.Trigger#created(java.lang.String, java.lang.String, org.w3c.dom.Document) + */ + @Override + public void created(final String file, final String collection, final Document newDoc) { + log.info("xml resource created: " + collection + "/" + file); + } + + /** + * {@inheritDoc} + * @see eu.dnetlib.xml.database.Trigger#deleted(java.lang.String, java.lang.String, org.w3c.dom.Document) + */ + @Override + public void deleted(final String file, final String collection, final Document oldDoc) { + log.info("xml resource deleted: " + collection + "/" + file); + } + + /** + * {@inheritDoc} + * @see eu.dnetlib.xml.database.Trigger#updated(java.lang.String, java.lang.String, org.w3c.dom.Document, org.w3c.dom.Document) + */ + @Override + public void updated(final String file, final String collection, final Document oldDoc, final Document newDoc) { + log.info("xml resource updated: " + collection + "/" + file); + } + +} diff --git a/dnet-information-service/src/main/java/eu/dnetlib/xml/database/Trigger.java b/dnet-information-service/src/main/java/eu/dnetlib/xml/database/Trigger.java new file mode 100644 index 0000000..66a5b68 --- /dev/null +++ b/dnet-information-service/src/main/java/eu/dnetlib/xml/database/Trigger.java @@ -0,0 +1,56 @@ +package eu.dnetlib.xml.database; + +import org.w3c.dom.Document; + +/** + * xml db trigger. + * + * @author marko + * + */ +public interface Trigger { + /** + * each trigger has a user defined unique name. + * + * @return trigger name + */ + String getName(); + + /** + * triggered when a new document is created. + * + * @param file + * file name + * @param collection + * collection name + * @param newDoc + * newly created document + */ + void created(String file, String collection, Document newDoc); + + /** + * triggered when a document is updated. + * + * @param file + * file name + * @param collection + * collection name + * @param oldDoc + * old version + * @param newDoc + * new version + */ + void updated(String file, String collection, Document oldDoc, Document newDoc); + + /** + * triggered when a document is deleted. + * + * @param file + * file name + * @param collection + * collection name + * @param oldDoc + * deleted document + */ + void deleted(String file, String collection, Document oldDoc); +} diff --git a/dnet-information-service/src/main/java/eu/dnetlib/xml/database/XMLDatabase.java b/dnet-information-service/src/main/java/eu/dnetlib/xml/database/XMLDatabase.java new file mode 100644 index 0000000..dfec79c --- /dev/null +++ b/dnet-information-service/src/main/java/eu/dnetlib/xml/database/XMLDatabase.java @@ -0,0 +1,175 @@ +package eu.dnetlib.xml.database; + +import java.util.Iterator; +import java.util.List; + +import org.exist.util.DatabaseConfigurationException; +import org.xmldb.api.base.XMLDBException; + +/** + * xmldb API is ugly. + * + * This is a thin wrapper to the xmldb API with focus on the primary operations used by dnet + * + * @author marko + * + */ +public interface XMLDatabase { // NOPMD + /** + * creates a new resource or updates the resource if it already exists. + * + * @param name + * file name + * @param collection + * collection name + * @param content + * serialized xml string + * @throws XMLDBException + * happens + */ + void create(String name, String collection, String content) throws XMLDBException; + + /** + * updates and already existing resource. + * + * @param name + * file name + * @param collection + * collection name + * @param content + * serialized xml string + * @throws XMLDBException + * fails if the resource doesn't exist + */ + void update(String name, String collection, String content) throws XMLDBException; + + /** + * removes a resource. + * + * @param name + * file name + * @param collection + * collection name + * @return false if the resource doesn't exist + * @throws XMLDBException + * could happen + */ + boolean remove(String name, String collection) throws XMLDBException; + + /** + * read a resource string xml. + * + * @param name + * file name + * @param collection + * collection name + * @return null if the resource doesn't exist, otherwise it returns the xml string serialization + * @throws XMLDBException + * happens + */ + String read(String name, String collection) throws XMLDBException; + + /** + * Execute an xquery. + * + * @param xquery + * xquery source + * @return a xmldb resultset object + * @throws XMLDBException + * happens + */ + Iterator xquery(String xquery) throws XMLDBException; + + /** + * creates a new collection, non recursively. + * + * @param collection + * collection name + * @throws XMLDBException + * happens + */ + void createCollection(String collection) throws XMLDBException; + + + /** + * remove a collection. + * + * @param collection + * collection name + * @throws XMLDBException + * happens also when the collection doesn't eXist + */ + void removeCollection(String collection) throws XMLDBException; + + void xupdate(String query) throws XMLDBException; + + /** + * check whether a collection exists. + * + * @param collection + * collection name + * @return true if the collection exists + * @throws XMLDBException + * happens + */ + boolean collectionExists(String collection) throws XMLDBException; + + /** + * lists child collections. + * + * @param collection + * parent collections + * @return list of collection names + * @throws XMLDBException + * happens + */ + List listChildCollections(String collection) throws XMLDBException; + + /** + * list the content of a collection. + * + * @param collection + * parent collection + * @return list of resource names + * @throws XMLDBException + * happens + */ + List list(String collection) throws XMLDBException; + + /** + * returns the name of the root collection. + * + * @return collection name + */ + String getRootCollection(); + + /** + * register a new trigger on a collection. + * + * @param trigger + * trigger instance + * @param collection + * collection pattern + * @throws XMLDBException + * happens + */ + void registerTrigger(Trigger trigger, String collection) throws XMLDBException; + + + /** + * make a backup of entire database. + * + * @throws XMLDBException could happen + * @throws DatabaseConfigurationException could happen + * @return the path in which the Backup has been saved + */ + String backup() throws XMLDBException, DatabaseConfigurationException; + + /** + * Return the dir that contains all backups. + * + * @return the path in which the Backup has been saved + */ + String getBackupDir(); + +} diff --git a/dnet-information-service/src/main/java/eu/dnetlib/xml/database/exist/DelegatingDiffTrigger.java b/dnet-information-service/src/main/java/eu/dnetlib/xml/database/exist/DelegatingDiffTrigger.java new file mode 100644 index 0000000..ed568fa --- /dev/null +++ b/dnet-information-service/src/main/java/eu/dnetlib/xml/database/exist/DelegatingDiffTrigger.java @@ -0,0 +1,197 @@ +package eu.dnetlib.xml.database.exist; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import eu.dnetlib.miscutils.functional.xml.IndentXmlString; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.exist.collections.Collection; +import org.exist.collections.triggers.SAXTrigger; +import org.exist.collections.triggers.TriggerException; +import org.exist.dom.persistent.DocumentImpl; +import org.exist.storage.DBBroker; +import org.exist.storage.txn.Txn; +import org.exist.xmldb.XmldbURI; + +import eu.dnetlib.xml.database.Trigger; + +/** + * this trigger delegates diffs for CRUDE events to an non-exist dependent eu.dnetlib.xml.database.Trigger instance. + * + * Since eXist triggers are instantiated by eXist, we need to locate the Trigger instances which are registered to the database instance. + * + * @author marko + * + */ +public class DelegatingDiffTrigger extends SAXTrigger { + + /** + * logger. + */ + private static final Log log = LogFactory.getLog(DelegatingDiffTrigger.class); // NOPMD by marko on 11/24/08 5:02 PM + + /** + * trigger identifier, from configuration. + */ + private String triggerName; + + private Map existsTriggerEventMap = new HashMap<>(); + + /** + * {@inheritDoc} + * + * @see org.exist.collections.triggers.FilteringTrigger#configure(org.exist.storage.DBBroker, org.exist.collections.Collection, + * java.util.Map) + */ + @SuppressWarnings("unchecked") + @Override + public void configure(final DBBroker dbBroker, final Collection parent, final Map> parameters) throws TriggerException { + super.configure(dbBroker, parent, parameters); + + if (parameters == null) { return; } + + final Map> params = parameters; + if (parameters.containsKey("triggerName")) { + final List myTriggerName = parameters.get("triggerName"); + if ((myTriggerName != null) && (myTriggerName.size() == 1)) { + setTriggerName(myTriggerName.get(0).toString()); + } + } + if (getTriggerName() == null) { + log.fatal("trigger id not configured"); + throw new TriggerException("trigger name not configured"); + } + } + + /** + * find the trigger instance associated with this delegation. + * + * @return trigger instance + */ + protected Trigger getTrigger() { + final Trigger trigger = ExistTriggerRegistry.defaultInstance().getTrigger(getTriggerName()); + if (trigger == null) { + log.fatal("no trigger " + triggerName + " but there is a registered callback for it"); + return null; + } + + return trigger; + } + + public String getTriggerName() { + return triggerName; + } + + public void setTriggerName(final String triggerId) { + triggerName = triggerId; + } + + @Override + public void beforeCreateDocument(final DBBroker dbBroker, final Txn txn, final XmldbURI xmldbURI) throws TriggerException { + + } + + @Override + public void afterCreateDocument(final DBBroker dbBroker, final Txn txn, final DocumentImpl document) throws TriggerException { + + try { + final Trigger trigger = getTrigger(); + final String collection = document.getCollection().getURI().toString(); + final String fileName = document.getFileURI().toString(); + if (trigger != null) { + trigger.created(fileName, collection, document); + } + } catch (final Exception e) { + throw new TriggerException(e); + } + } + + @Override + public void beforeUpdateDocument(final DBBroker dbBroker, final Txn txn, final DocumentImpl document) throws TriggerException { + + try { + final String collection = document.getCollection().getURI().toString(); + final String fileName = document.getFileURI().toString(); + final ExistsTriggerEvent event = new ExistsTriggerEvent(); + event.setOldDocument(IndentXmlString.apply(document)); + event.setEventType(EventType.UPDATE); + event.setCollection(collection); + event.setName(fileName); + existsTriggerEventMap.put(String.valueOf(txn.getId()), event); + } catch (final Exception e) { + throw new TriggerException(e); + } + } + + @Override + public void afterUpdateDocument(final DBBroker dbBroker, final Txn txn, final DocumentImpl document) throws TriggerException { + + try { + if (!existsTriggerEventMap.containsKey( + String.valueOf(txn.getId()))) { throw new TriggerException("Error on trigger missing previous operation beforeUpdateTrigger"); } + final ExistsTriggerEvent existsTriggerEvent = existsTriggerEventMap.remove(String.valueOf(txn.getId())); + + existsTriggerEvent.setDocument(IndentXmlString.apply(document)); + final Trigger trigger = getTrigger(); + if (trigger != null) { + trigger.updated(existsTriggerEvent.getName(), existsTriggerEvent.getCollection(), existsTriggerEvent.getOldDocument(), + existsTriggerEvent.getDocument()); + } + } catch (final Exception e) { + throw new TriggerException(e); + } + } + + @Override + public void beforeUpdateDocumentMetadata(final DBBroker dbBroker, final Txn txn, final DocumentImpl document) throws TriggerException { + + } + + @Override + public void afterUpdateDocumentMetadata(final DBBroker dbBroker, final Txn txn, final DocumentImpl document) throws TriggerException { + + } + + @Override + public void beforeCopyDocument(final DBBroker dbBroker, final Txn txn, final DocumentImpl document, final XmldbURI xmldbURI) throws TriggerException { + + } + + @Override + public void afterCopyDocument(final DBBroker dbBroker, final Txn txn, final DocumentImpl document, final XmldbURI xmldbURI) throws TriggerException { + + } + + @Override + public void beforeMoveDocument(final DBBroker dbBroker, final Txn txn, final DocumentImpl document, final XmldbURI xmldbURI) throws TriggerException { + + } + + @Override + public void afterMoveDocument(final DBBroker dbBroker, final Txn txn, final DocumentImpl document, final XmldbURI xmldbURI) throws TriggerException { + + } + + @Override + public void beforeDeleteDocument(final DBBroker dbBroker, final Txn txn, final DocumentImpl document) throws TriggerException { + + try { + final Trigger trigger = getTrigger(); + final String collection = document.getCollection().getURI().toString(); + final String fileName = document.getFileURI().toString(); + if (trigger != null) { + trigger.deleted(fileName, collection, IndentXmlString.apply(document)); + } + } catch (final Exception e) { + throw new TriggerException(e); + } + } + + @Override + public void afterDeleteDocument(final DBBroker dbBroker, final Txn txn, final XmldbURI xmldbURI) throws TriggerException { + + } + +} diff --git a/dnet-information-service/src/main/java/eu/dnetlib/xml/database/exist/EventType.java b/dnet-information-service/src/main/java/eu/dnetlib/xml/database/exist/EventType.java new file mode 100644 index 0000000..30718db --- /dev/null +++ b/dnet-information-service/src/main/java/eu/dnetlib/xml/database/exist/EventType.java @@ -0,0 +1,10 @@ +package eu.dnetlib.xml.database.exist; + +/** + * Created by claudio on 20/12/2016. + */ +public enum EventType { + UPDATE, + CREATE, + DELETE +} diff --git a/dnet-information-service/src/main/java/eu/dnetlib/xml/database/exist/ExistDOMConverter.java b/dnet-information-service/src/main/java/eu/dnetlib/xml/database/exist/ExistDOMConverter.java new file mode 100644 index 0000000..050894f --- /dev/null +++ b/dnet-information-service/src/main/java/eu/dnetlib/xml/database/exist/ExistDOMConverter.java @@ -0,0 +1,82 @@ +package eu.dnetlib.xml.database.exist; + +import java.io.IOException; +import java.io.StringReader; +import java.io.StringWriter; + +import javax.xml.parsers.DocumentBuilder; +import javax.xml.parsers.DocumentBuilderFactory; +import javax.xml.parsers.ParserConfigurationException; + +import org.apache.xml.serialize.OutputFormat; +import org.apache.xml.serialize.XMLSerializer; +import org.w3c.dom.Document; +import org.xml.sax.InputSource; +import org.xml.sax.SAXException; + +/** + * Exist has an internal DOM implementation. + * + * @author marko + * + */ +@SuppressWarnings("deprecation") +public class ExistDOMConverter { + + /** + * convert a DOM document to InputSource on which you can run an XPath. + * + * The internal eXist DOM implementation has some problems. + * + * @param input + * DOM document + * @return sax input source + * @throws IOException + * happens ? + */ + public InputSource asInputSource(final Document input) throws IOException { + return new InputSource(new StringReader(asString(input))); + } + + /** + * serialize a dom document to a string. + * + * TODO: avoid using deprecated XMLSerializer + * + * cannot use Transformer because eXist DOM impl is incomplete. + * + * @param input + * DOM document + * @return sax input source + * @throws IOException + * happens ? + */ + + public String asString(final Document input) throws IOException { + final StringWriter writer = new StringWriter(); + + new XMLSerializer(writer, new OutputFormat()).serialize(input.getDocumentElement()); + + return writer.toString(); + } + + /** + * convert a DOM document to a w3c DOM Document on which you can run an XPath. + * + * The internal eXist DOM implementation has some problems. + * + * @param input + * input eXist DOM document + * @return good DOM document + * @throws IOException + * happens + * @throws ParserConfigurationException + * happens + * @throws SAXException + * happens + */ + public Document asDocument(final Document input) throws IOException, ParserConfigurationException, SAXException { + final DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder(); + return builder.parse(asInputSource(input)); + } +} diff --git a/dnet-information-service/src/main/java/eu/dnetlib/xml/database/exist/ExistDatabase.java b/dnet-information-service/src/main/java/eu/dnetlib/xml/database/exist/ExistDatabase.java new file mode 100644 index 0000000..5307d87 --- /dev/null +++ b/dnet-information-service/src/main/java/eu/dnetlib/xml/database/exist/ExistDatabase.java @@ -0,0 +1,635 @@ +package eu.dnetlib.xml.database.exist; // NOPMD + +import java.io.File; +import java.io.FileOutputStream; +import java.io.FileWriter; +import java.io.IOException; +import java.text.SimpleDateFormat; +import java.util.*; +import java.util.Map.Entry; +import java.util.concurrent.locks.Lock; +import java.util.concurrent.locks.ReentrantReadWriteLock; +import java.util.zip.ZipEntry; +import java.util.zip.ZipOutputStream; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.exist.collections.CollectionConfiguration; +import org.exist.util.DatabaseConfigurationException; +import org.exist.xmldb.DatabaseImpl; +import org.exist.xmldb.DatabaseInstanceManager; +import org.exist.xmldb.EXistResource; +import org.exist.xmldb.XmldbURI; +import org.springframework.beans.factory.annotation.Required; +import org.springframework.context.Lifecycle; +import org.xmldb.api.DatabaseManager; +import org.xmldb.api.base.*; +import org.xmldb.api.base.Collection; +import org.xmldb.api.modules.CollectionManagementService; +import org.xmldb.api.modules.XPathQueryService; + +import eu.dnetlib.miscutils.datetime.DateUtils; +import eu.dnetlib.xml.database.Trigger; + +import eu.dnetlib.xml.database.XMLDatabase; + +/** + * eXist database wrapper. + * + * @author marko + * + */ +public class ExistDatabase implements XMLDatabase, Lifecycle { // NOPMD by marko + + /** + * logger. + */ + private static final Log log = LogFactory.getLog(ExistDatabase.class); // NOPMD + + /** + * eXist collection configuration special file. + */ + public static final String COLLECTION_XCONF = "collection.xconf"; + + /** + * exist xml resource type code. + */ + private static final String XMLRESOURCE = "XMLResource"; + + /** + * collection name to trigger instance map. + * + * all triggers declared here will be registered at startup. + * + */ + private Map triggerConf = new HashMap<>(); + + private final ReentrantReadWriteLock rwl = new ReentrantReadWriteLock(); + + private final Lock readLock = rwl.readLock(); + + private final Lock writeLock = rwl.writeLock(); + + /** + * eXist database. + */ + private Database database; + + /** + * eXist collection. + */ + private Collection root; + /** + * eXist database manager. + */ + private DatabaseInstanceManager manager; + /** + * eXist xpath service. + */ + private XPathQueryService queryService; + /** + * eXist collection manager. + */ + private CollectionManagementService colman; + /** + * eXist configuration file. + */ + private String configFile; + + /** + * Directory in which backups are saved. + */ + private String backupDir; + + /** + * {@inheritDoc} + * + * @see org.springframework.context.Lifecycle#start() + */ + @Override + public void start() { + log.info("starting database"); + try { + if (getDatabase() == null) { + setDatabase(new DatabaseImpl()); + getDatabase().setProperty("configuration", getConfigFile()); + getDatabase().setProperty("create-database", "true"); + } + + DatabaseManager.registerDatabase(getDatabase()); + + setRoot(DatabaseManager.getCollection("xmldb:exist://" + getRootCollection(), "admin", "")); + setManager((DatabaseInstanceManager) getRoot().getService("DatabaseInstanceManager", "1.0")); + setQueryService((XPathQueryService) getRoot().getService("XPathQueryService", "1.0")); + setColman((CollectionManagementService) getRoot().getService("CollectionManagementService", "1.0")); + + for (final Entry entry : getTriggerConf().entrySet()) + registerTrigger(entry.getValue(), entry.getKey()); + + } catch (final XMLDBException e) { + throw new IllegalStateException("cannot open eXist database", e); + } + } + + /** + * helper method. + * + * @param collection + * collection name + * @return an eXist collection + * @throws XMLDBException + * happens + */ + protected Collection getCollection(final String collection) throws XMLDBException { + readLock.lock(); + try { + if (!collection.startsWith("/db")) + throw new XMLDBException(0, "collection path should begin with /db"); + return database.getCollection("exist://" + collection, "admin", ""); + }finally { + readLock.unlock(); + } + } + + /** + * {@inheritDoc} + * + * @see eu.dnetlib.xml.database.XMLDatabase#create(java.lang.String, java.lang.String, java.lang.String) + */ + @Override + public void create(final String name, final String collection, final String content) throws XMLDBException { + writeLock.lock(); + try { + if ("".equals(name)) + throw new XMLDBException(0, "cannot create a xml file with an empty file name"); + + Collection col = getCollection(collection); + + if (col == null) { + // create parent collections + createCollection(collection, true); + col = getCollection(collection); + } + + final Resource res = col.createResource(name, XMLRESOURCE); + res.setContent(content); + col.storeResource(res); + + ((EXistResource) res).freeResources(); + col.close(); + }finally { + writeLock.unlock(); + } + } + + /** + * {@inheritDoc} + * + * @see eu.dnetlib.xml.database.XMLDatabase#remove(java.lang.String, java.lang.String) + */ + @Override + public boolean remove(final String name, final String collection) throws XMLDBException { + writeLock.lock(); + try { + final Collection col = getCollection(collection); + + final Resource res = col.getResource(name); + if (res == null) + return false; + + col.removeResource(res); + col.close(); + return true; + } finally { + writeLock.unlock(); + } + } + + /** + * {@inheritDoc} + * + * @see eu.dnetlib.xml.database.XMLDatabase#update(java.lang.String, java.lang.String, java.lang.String) + */ + @Override + public void update(final String name, final String collection, final String content) throws XMLDBException { + writeLock.lock(); + try{ + final Collection col = getCollection(collection); + + final Resource res = col.getResource(name); + if (res == null) { + throw new XMLDBException(0, "resource doesn't exist"); + } + res.setContent(content); + col.storeResource(res); + ((EXistResource) res).freeResources(); + col.close(); + } finally { + writeLock.unlock(); + } + + } + + /** + * {@inheritDoc} + * + * @see eu.dnetlib.xml.database.XMLDatabase#read(java.lang.String, java.lang.String) + */ + @Override + public String read(final String name, final String collection) throws XMLDBException { + readLock.lock(); + try { + Resource res = null; + final Collection coll = getCollection(collection); + try { + if (coll == null) + return null; + res = coll.getResource(name); + if (res != null) + return (String) res.getContent(); + return null; + } finally { + if (res != null) + ((EXistResource) res).freeResources(); + coll.close(); + } + }finally { + readLock.unlock(); + } + } + + /** + * {@inheritDoc} + * + * @see eu.dnetlib.xml.database.XMLDatabase#xquery(java.lang.String) + */ + @Override + public Iterator xquery(final String query) throws XMLDBException { + readLock.lock(); + try { + final ResourceSet result = getQueryService().query(query); + if (result == null) + return null; + final ResourceIterator iterator = result.getIterator(); + return new Iterator() { + @Override + public boolean hasNext() { + try { + return iterator.hasMoreResources(); + } catch (XMLDBException e) { + throw new RuntimeException("Error while getting next element", e); + } + } + + @Override + public String next() { + Resource res = null; + try { + res = iterator.nextResource(); + return (String) res.getContent(); + } catch (XMLDBException e) { + throw new RuntimeException("Error while getting next element", e); + } finally { + if (res != null) + try { + ((EXistResource) res).freeResources(); + } catch (XMLDBException e) { + log.error("error on free resource"); + } + } + } + }; + } finally { + readLock.unlock(); + } + } + + + @Override + public void xupdate(final String query) throws XMLDBException { + writeLock.lock(); + try{ + getQueryService().query(query); + } finally { + writeLock.unlock(); + } + + + } + + + /** + * {@inheritDoc} + * + * @see org.springframework.context.Lifecycle#stop() + */ + @Override + public void stop() { + // no operation + try { + getManager().shutdown(); + DatabaseManager.deregisterDatabase(database); + } catch (final XMLDBException e) { + log.fatal("cannot close database", e); + } + } + + /** + * {@inheritDoc} + * + * @see eu.dnetlib.xml.database.XMLDatabase#collectionExists(java.lang.String) + */ + @Override + public boolean collectionExists(final String collection) throws XMLDBException { + Collection col = null; + try{ + col = getCollection(collection); + return col != null; + } finally { + if (col!=null) + col.close(); + } + + } + + /** + * {@inheritDoc} + * + * @see eu.dnetlib.xml.database.XMLDatabase#createCollection(java.lang.String) + */ + @Override + public void createCollection(final String collection) throws XMLDBException { + writeLock.lock(); + try { + createCollection(collection, false); + }finally { + writeLock.unlock(); + } + } + + + + private void createCollection(final String collection, final boolean recursive) throws XMLDBException { + if (recursive) { + final XmldbURI uri = XmldbURI.create(collection).removeLastSegment(); + if (!collectionExists(uri.toString())) + createCollection(uri.toString(), true); + } + getColman().createCollection(collection); + } + + /** + * {@inheritDoc} + * + * @see eu.dnetlib.xml.database.XMLDatabase#removeCollection(java.lang.String) + */ + @Override + public void removeCollection(final String collection) throws XMLDBException { + writeLock.lock(); + try { + getColman().removeCollection(collection); + }finally { + writeLock.unlock(); + } + } + + public String getConfigFile() { + return configFile; + } + + public void setConfigFile(final String configFile) { + this.configFile = configFile; + } + + + @Override + public String getBackupDir() { + return backupDir; + } + + @Required + public void setBackupDir(final String backupDir) { + this.backupDir = backupDir; + } + + + + /** + * {@inheritDoc} + * + * @see org.springframework.context.Lifecycle#isRunning() useless contract with spring. + * + */ + @Override + public boolean isRunning() { + return false; + } + + protected Database getDatabase() { + return database; + } + + protected void setDatabase(final Database database) { + this.database = database; + } + + protected Collection getRoot() { + return root; + } + + protected void setRoot(final Collection root) { + this.root = root; + } + + protected DatabaseInstanceManager getManager() { + return manager; + } + + protected void setManager(final DatabaseInstanceManager manager) { + this.manager = manager; + } + + protected XPathQueryService getQueryService() { + return queryService; + } + + protected void setQueryService(final XPathQueryService queryService) { + this.queryService = queryService; + } + + protected CollectionManagementService getColman() { + return colman; + } + + protected void setColman(final CollectionManagementService colman) { + this.colman = colman; + } + + @Override + public String getRootCollection() { + return "/db"; + } + + /** + * {@inheritDoc} + * + * @see eu.dnetlib.xml.database.XMLDatabase#listChildCollections(java.lang.String) + */ + @Override + public List listChildCollections(final String collection) throws XMLDBException { + readLock.lock(); + try { + final Collection col = getCollection(collection); + if (col == null) + return new ArrayList<>(); + return Arrays.asList(col.listChildCollections()); + } finally { + readLock.unlock(); + } + } + + /** + * {@inheritDoc} + * + * @see eu.dnetlib.xml.database.XMLDatabase#list(java.lang.String) + */ + @Override + public List list(final String collection) throws XMLDBException { + readLock.lock(); + try { + final Collection col = getCollection(collection); + if(col == null) + return new ArrayList(); + return Arrays.asList(col.listResources()); + } finally { + readLock.unlock(); + } + } + + /** + * sets an underlying eXist trigger class for a given collection. + * + * @param triggerClass + * exist trigger class + * @param collection + * collection name + * @param events + * list of event names + * @param parameters + * parameter map + * @throws XMLDBException + * happens + */ + void setExistTrigger(final Class triggerClass, final String collection, final List events, final Map parameters) + throws XMLDBException { + + // Arrays.asList(new String[] { "store", "update", "delete" } + + final StringBuilder conf = new StringBuilder(); + conf.append(""); + + final String className = triggerClass.getCanonicalName(); // PMD + + conf.append(""); + if (parameters != null) + for (final Entry entry : parameters.entrySet()) + conf.append(""); + conf.append(""); + + conf.append(""); + + log.info(conf.toString()); + createCollection("/db/system/config" + collection, true); + create(CollectionConfiguration.DEFAULT_COLLECTION_CONFIG_FILE_URI.toString(), "/db/system/config" + collection, conf.toString()); + } + + /** + * {@inheritDoc} + * + * @see eu.dnetlib.xml.database.XMLDatabase#registerTrigger(eu.dnetlib.xml.database.Trigger, java.lang.String) + */ + @Override + public void registerTrigger(final Trigger trigger, final String collection) throws XMLDBException { + final Map params = new HashMap(); + params.put("triggerName", trigger.getName()); + + ExistTriggerRegistry.defaultInstance().registerTrigger(trigger.getName(), trigger); + + setExistTrigger(DelegatingDiffTrigger.class, collection, Arrays.asList("store", "update", "delete" ), params); + } + + public Map getTriggerConf() { + return triggerConf; + } + + public void setTriggerConf(final Map triggerConf) { + this.triggerConf = triggerConf; + } + + /** + * {@inheritDoc} + * + * @see eu.dnetlib.xml.database.XMLDatabase#backup() + */ + @Override + public String backup() throws XMLDBException, DatabaseConfigurationException { + log.info("Starting backup..."); + readLock.lock(); + try { + verifyBackupDir(); + + String seq = (new SimpleDateFormat("yyyyMMdd-HHmm")).format(new Date()); + + ZipOutputStream zip = new ZipOutputStream(new FileOutputStream(backupDir + "/data-" + seq + ".zip")); + + FileWriter logFile = new FileWriter(backupDir + "/report-" + seq + ".log"); + logFile.write("Backup started at: " + DateUtils.now_ISO8601() + "\n\n"); + + backup(getRoot().getName(), zip, logFile); + + logFile.write("\nBackup finished at: " + DateUtils.now_ISO8601() + "\n"); + + logFile.flush(); + logFile.close(); + + zip.flush(); + zip.close(); + + log.info("Backup finished"); + return backupDir; + } catch (final Exception e) { + log.error("Backup failed", e); + throw new XMLDBException(0, "cannot backup", e); + } + finally { + readLock.unlock(); + } + } + + + private void verifyBackupDir() { + File d = new File(backupDir); + if (!d.exists()) d.mkdirs(); + } + + private void backup(String coll, ZipOutputStream zip, FileWriter logFile) throws XMLDBException, IOException { + readLock.lock(); + logFile.write("COLLECTION: " + coll + "\n"); + log.info("Backup of collection " + coll); + try { + for (String file : list(coll)) { + zip.putNextEntry(new ZipEntry(coll + "/" + file + ".xml")); + Resource resource = getCollection(coll).getResource(file); + zip.write(resource.getContent().toString().getBytes()); + zip.closeEntry(); + } + + for (String c : listChildCollections(coll)) { + backup(coll + "/" + c, zip, logFile); + } + }finally { + readLock.unlock(); + } + + } +} diff --git a/dnet-information-service/src/main/java/eu/dnetlib/xml/database/exist/ExistTriggerRegistry.java b/dnet-information-service/src/main/java/eu/dnetlib/xml/database/exist/ExistTriggerRegistry.java new file mode 100644 index 0000000..6414f58 --- /dev/null +++ b/dnet-information-service/src/main/java/eu/dnetlib/xml/database/exist/ExistTriggerRegistry.java @@ -0,0 +1,72 @@ +package eu.dnetlib.xml.database.exist; + +import java.util.HashMap; +import java.util.Map; + +import eu.dnetlib.xml.database.Trigger; + +/** + * eXist triggers are instantiated directly by the exist database via reflection. + * + * we need a way to manage trigger objects from outside, in order to manage them manage them from the IoC container. + * + * @author marko + * + */ +public final class ExistTriggerRegistry { + + /** + * singleton object. + */ + private static ExistTriggerRegistry singleton = new ExistTriggerRegistry(); + + /** + * get the singleton instance. + * + * @return singleton object + */ + public static ExistTriggerRegistry defaultInstance() { + return singleton; + } + + /** + * forbids instantiation. + */ + private ExistTriggerRegistry() { + } + + /** + * maps trigger names to trigger instances. + */ + private Map triggerRegistry = new HashMap(); + + /** + * get a trigger for a given id. + * + * @param triggerId trigger identifier + * @return trigger instance + */ + public Trigger getTrigger(final String triggerId) { + return getTriggerRegistry().get(triggerId); + } + + /** + * associate a new trigger. + * + * @param name trigger name + * @param trigger trigger instance + */ + public void registerTrigger(final String name, final Trigger trigger) { + triggerRegistry.put(name, trigger); + } + + Map getTriggerRegistry() { + return triggerRegistry; + } + + void setTriggerRegistry(final Map triggerRegistry) { + this.triggerRegistry = triggerRegistry; + } + + +} diff --git a/dnet-information-service/src/main/java/eu/dnetlib/xml/database/exist/ExistsTriggerEvent.java b/dnet-information-service/src/main/java/eu/dnetlib/xml/database/exist/ExistsTriggerEvent.java new file mode 100644 index 0000000..096c4b1 --- /dev/null +++ b/dnet-information-service/src/main/java/eu/dnetlib/xml/database/exist/ExistsTriggerEvent.java @@ -0,0 +1,60 @@ +package eu.dnetlib.xml.database.exist; + +import org.w3c.dom.Document; + +/** + * Created by sandro on 3/14/16. + */ +public class ExistsTriggerEvent { + + private String collection; + + private String name; + + private EventType eventType; + + private Document document; + + private Document oldDocument; + + + public String getCollection() { + return collection; + } + + public void setCollection(final String collection) { + this.collection = collection; + } + + public String getName() { + return name; + } + + public void setName(final String name) { + this.name = name; + } + + public EventType getEventType() { + return eventType; + } + + public void setEventType(final EventType eventType) { + this.eventType = eventType; + } + + public Document getDocument() { + return document; + } + + public void setDocument(final Document document) { + this.document = document; + } + + public Document getOldDocument() { + return oldDocument; + } + + public void setOldDocument(final Document oldDocument) { + this.oldDocument = oldDocument; + } +} diff --git a/dnet-information-service/src/main/java/eu/dnetlib/xml/database/exist/PersistentExistDatabase.java b/dnet-information-service/src/main/java/eu/dnetlib/xml/database/exist/PersistentExistDatabase.java new file mode 100644 index 0000000..af18d82 --- /dev/null +++ b/dnet-information-service/src/main/java/eu/dnetlib/xml/database/exist/PersistentExistDatabase.java @@ -0,0 +1,207 @@ +package eu.dnetlib.xml.database.exist; + +import java.io.File; +import java.io.FileNotFoundException; +import java.io.FileOutputStream; +import java.io.FileReader; +import java.io.FileWriter; +import java.io.IOException; +import java.io.InputStream; +import java.io.StringReader; +import java.io.StringWriter; + +import eu.dnetlib.enabling.is.store.BulkResourceImporter; +import org.apache.commons.io.IOUtils; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Required; + +/** + * Persistent exist. + * + * TODO: this is copy&paste from TemporaryExistDatase. Refactor common stuff. + * + * @author marko + * + */ +public class PersistentExistDatabase extends ExistDatabase { + + /** + * logger. + */ + private static final Log log = LogFactory.getLog(PersistentExistDatabase.class); // NOPMD by marko on 11/24/08 5:02 PM + + /** + * db directory. + */ + private transient File dbDirectory; + + /** + * this config file will be copied to a newly created temporary directory. + */ + private String configTemplate = "default-exist-conf.xml"; + + /** + * db root path. + */ + private String dbRootPath; + + /** + * bulk importer. + */ + @Autowired + private BulkResourceImporter bulkImporter; + + /** + * exist config file. + */ + private File existConfigFile; + + /** + * true if the database permits execution of java code from xquery. + */ + private boolean XQueryJavaEnabled; + + /** + * {@inheritDoc} + * + * @see eu.dnetlib.xml.database.exist.ExistDatabase#start() + */ + @Override + public void start() { + log.warn("STARTING PERSISTENT EXIST DATABASE"); + dbDirectory = new File(dbRootPath); + + if (dbDirectory.exists()) { + getBulkImporter().setEnabled(false); + existConfigFile = new File(dbDirectory, "conf.xml"); + enableJava(existConfigFile, isXQueryJavaEnabled()); + setConfigFile(existConfigFile.getAbsolutePath()); + } else { + createPersistentDatabase(); + } + + super.start(); + } + + @Override + public void stop() { + log.info("shutting down xmldb"); + super.stop(); + log.info("xmldb closed"); + } + + protected void enableJava(final File conf, final boolean enabled) { + final StringWriter buffer = new StringWriter(); + if (conf.exists()) { + try { + IOUtils.copy(new FileReader(conf), buffer); + final String newConf = patchConfigFileEnableJava(buffer.toString(), enabled); + if (!newConf.equals(buffer.toString())) { + FileWriter writer = new FileWriter(conf); + try { + IOUtils.copy(new StringReader(newConf), writer); + } finally { + writer.close(); + } + } + } catch (final FileNotFoundException e) { + log.warn("cannot patch eXist conf file", e); + } catch (final IOException e) { + log.warn("cannot patch eXist conf file", e); + } + } + } + + /** + * @param conf + * content of the configuration file + * @param enabled + * enabled or disabled + * @return new conf file + */ + protected String patchConfigFileEnableJava(final String conf, final boolean enabled) { + return conf.replaceAll("enable-java-binding=\"[^\"]*\"", "enable-java-binding=\"" + (enabled ? "yes" : "no") + "\""); + } + + /** + * create a temporary directory and copy the default configuration file. + */ + protected void createPersistentDatabase() { + log.debug("creating persistent database"); + try { + new File(dbDirectory, "data").mkdirs(); + + final InputStream defaultConf = getClass().getResourceAsStream(getConfigTemplate()); + if (defaultConf == null) + throw new IOException("cannot find " + getConfigTemplate()); + + existConfigFile = new File(dbDirectory, "conf.xml"); + final FileOutputStream confOutput = new FileOutputStream(existConfigFile); + + try { + IOUtils.copy(defaultConf, confOutput); + } finally { + confOutput.close(); + } + enableJava(existConfigFile, isXQueryJavaEnabled()); + + setConfigFile(existConfigFile.getAbsolutePath()); + } catch (final IOException e) { + log.fatal("creating database dir", e); + throw new IllegalStateException(e); + } + log.debug("created temp database"); + } + + public File getDbDirectory() { + return dbDirectory; + } + + public void setDbDirectory(final File dbDirectory) { + this.dbDirectory = dbDirectory; + } + + public String getConfigTemplate() { + return configTemplate; + } + + public void setConfigTemplate(final String configTemplate) { + this.configTemplate = configTemplate; + } + + public BulkResourceImporter getBulkImporter() { + return bulkImporter; + } + + public void setBulkImporter(final BulkResourceImporter bulkImporter) { + this.bulkImporter = bulkImporter; + } + + public File getExistConfigFile() { + return existConfigFile; + } + + public void setExistConfigFile(final File existConfigFile) { + this.existConfigFile = existConfigFile; + } + + @Required + public String getDbRootPath() { + return dbRootPath; + } + + public void setDbRootPath(final String dbRootPath) { + this.dbRootPath = dbRootPath; + } + + public boolean isXQueryJavaEnabled() { + return XQueryJavaEnabled; + } + + public void setXQueryJavaEnabled(final boolean xQueryJavaEnabled) { + XQueryJavaEnabled = xQueryJavaEnabled; + } + +} diff --git a/dnet-information-service/src/main/java/eu/dnetlib/xml/database/exist/TemporaryExistDatabase.java b/dnet-information-service/src/main/java/eu/dnetlib/xml/database/exist/TemporaryExistDatabase.java new file mode 100644 index 0000000..c6c5a98 --- /dev/null +++ b/dnet-information-service/src/main/java/eu/dnetlib/xml/database/exist/TemporaryExistDatabase.java @@ -0,0 +1,106 @@ +package eu.dnetlib.xml.database.exist; + +import java.io.File; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.InputStream; + +import org.apache.commons.io.FileUtils; +import org.apache.commons.io.IOUtils; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +/** + * This class creates a temporary exist database instances. + * + * @author marko + * + */ +public class TemporaryExistDatabase extends ExistDatabase { + /** + * logger. + */ + private static final Log log = LogFactory.getLog(TemporaryExistDatabase.class); // NOPMD by marko on 11/24/08 5:02 PM + + /** + * temporary directory. this way we won't delete other things on shutdown if somebody changes the configuration file + * location with setConfigFile(). + */ + private transient File tempDirectory; + + /** + * this config file will be copied to a newly created temporary directory. + */ + private String configTemplate = "default-exist-conf.xml"; + + /** + * {@inheritDoc} + * + * @see eu.dnetlib.xml.database.exist.ExistDatabase#start() + */ + @Override + public void start() { + log.warn("STARTING TEMPORARY EXIST DATABASE"); + createTemporaryDatabase(); + super.start(); + } + + /** + * {@inheritDoc} + * + * @see eu.dnetlib.xml.database.exist.ExistDatabase#stop() + */ + @Override + public void stop() { + super.stop(); + try { + FileUtils.deleteDirectory(tempDirectory); + } catch (IOException e) { + log.fatal("cannot delete temporary exist directory", e); + } + } + + /** + * create a temporary directory and copy the default configuration file. + */ + protected void createTemporaryDatabase() { + log.debug("creating temp database"); + try { + File tmpName; + tmpName = File.createTempFile("exist", ""); + + tmpName.delete(); + + tempDirectory = new File(tmpName.getAbsolutePath()); + new File(tempDirectory, "data").mkdirs(); + + final InputStream defaultConf = getClass().getResourceAsStream(getConfigTemplate()); + if (defaultConf == null) + throw new IOException("cannot find " + getConfigTemplate()); + + final File existConfigFile = new File(tempDirectory, "conf.xml"); + final FileOutputStream confOutput = new FileOutputStream(existConfigFile); + + try { + IOUtils.copy(defaultConf, confOutput); + } finally { + confOutput.close(); + } + + setConfigFile(existConfigFile.getAbsolutePath()); + } catch (IOException e) { + log.fatal("creating database dir", e); + throw new IllegalStateException(e); + } + log.debug("created temp database"); + } + + protected String getConfigTemplate() { + return configTemplate; + } + + protected void setConfigTemplate(final String configTemplate) { + this.configTemplate = configTemplate; + } + +} diff --git a/dnet-information-service/src/main/java/org/hibernate/dialect/SQLiteDialect.java b/dnet-information-service/src/main/java/org/hibernate/dialect/SQLiteDialect.java new file mode 100644 index 0000000..3c9d72d --- /dev/null +++ b/dnet-information-service/src/main/java/org/hibernate/dialect/SQLiteDialect.java @@ -0,0 +1,264 @@ +package org.hibernate.dialect; + +import java.sql.SQLException; +import java.sql.Types; + +import org.hibernate.dialect.function.*; +import org.hibernate.exception.*; +import org.hibernate.exception.spi.SQLExceptionConverter; +import org.hibernate.exception.spi.TemplatedViolatedConstraintNameExtracter; +import org.hibernate.exception.spi.ViolatedConstraintNameExtracter; +import org.hibernate.internal.util.JdbcExceptionHelper; +import org.hibernate.type.StandardBasicTypes; + +public class SQLiteDialect extends Dialect { + + public SQLiteDialect() { + registerColumnType(Types.BIT, "boolean"); + registerColumnType(Types.TINYINT, "tinyint"); + registerColumnType(Types.SMALLINT, "smallint"); + registerColumnType(Types.INTEGER, "integer"); + registerColumnType(Types.BIGINT, "bigint"); + registerColumnType(Types.FLOAT, "float"); + registerColumnType(Types.REAL, "real"); + registerColumnType(Types.DOUBLE, "double"); + registerColumnType(Types.NUMERIC, "numeric($p, $s)"); + registerColumnType(Types.DECIMAL, "decimal"); + registerColumnType(Types.CHAR, "char"); + registerColumnType(Types.VARCHAR, "varchar($l)"); + registerColumnType(Types.LONGVARCHAR, "longvarchar"); + registerColumnType(Types.DATE, "date"); + registerColumnType(Types.TIME, "time"); + registerColumnType(Types.TIMESTAMP, "datetime"); + registerColumnType(Types.BINARY, "blob"); + registerColumnType(Types.VARBINARY, "blob"); + registerColumnType(Types.LONGVARBINARY, "blob"); + registerColumnType(Types.BLOB, "blob"); + registerColumnType(Types.CLOB, "clob"); + registerColumnType(Types.BOOLEAN, "boolean"); + + registerFunction("concat", new VarArgsSQLFunction(StandardBasicTypes.STRING, "", "||", "")); + registerFunction("mod", new SQLFunctionTemplate(StandardBasicTypes.INTEGER, "?1 % ?2")); + registerFunction("quote", new StandardSQLFunction("quote", StandardBasicTypes.STRING)); + registerFunction("random", new NoArgSQLFunction("random", StandardBasicTypes.INTEGER)); + registerFunction("round", new StandardSQLFunction("round")); + registerFunction("substr", new StandardSQLFunction("substr", StandardBasicTypes.STRING)); + registerFunction("trim", new AbstractAnsiTrimEmulationFunction() { + + @Override + protected SQLFunction resolveBothSpaceTrimFunction() { + return new SQLFunctionTemplate(StandardBasicTypes.STRING, "trim(?1)"); + } + + @Override + protected SQLFunction resolveBothSpaceTrimFromFunction() { + return new SQLFunctionTemplate(StandardBasicTypes.STRING, "trim(?2)"); + } + + @Override + protected SQLFunction resolveLeadingSpaceTrimFunction() { + return new SQLFunctionTemplate(StandardBasicTypes.STRING, "ltrim(?1)"); + } + + @Override + protected SQLFunction resolveTrailingSpaceTrimFunction() { + return new SQLFunctionTemplate(StandardBasicTypes.STRING, "rtrim(?1)"); + } + + @Override + protected SQLFunction resolveBothTrimFunction() { + return new SQLFunctionTemplate(StandardBasicTypes.STRING, "trim(?1, ?2)"); + } + + @Override + protected SQLFunction resolveLeadingTrimFunction() { + return new SQLFunctionTemplate(StandardBasicTypes.STRING, "ltrim(?1, ?2)"); + } + + @Override + protected SQLFunction resolveTrailingTrimFunction() { + return new SQLFunctionTemplate(StandardBasicTypes.STRING, "rtrim(?1, ?2)"); + } + }); + } + + @Override + public boolean supportsIdentityColumns() { + return true; + } + + /* + * public boolean supportsInsertSelectIdentity() { return true; // As specified in NHibernate dialect } + */ + + @Override + public boolean hasDataTypeInIdentityColumn() { + return false; // As specified in NHibernate dialect + } + + /* + * public String appendIdentitySelectToInsert(String insertString) { return new StringBuffer(insertString.length()+30). // As specified + * in NHibernate dialect append(insertString). append("; ").append(getIdentitySelectString()). toString(); } + */ + + @Override + public String getIdentityColumnString() { + // return "integer primary key autoincrement"; + return "integer"; + } + + @Override + public String getIdentitySelectString() { + return "select last_insert_rowid()"; + } + + @Override + public boolean supportsLimit() { + return true; + } + + @Override + public boolean bindLimitParametersInReverseOrder() { + return true; + } + + @Override + protected String getLimitString(final String query, final boolean hasOffset) { + return query + (hasOffset ? " limit ? offset ?" : " limit ?"); + } + + @Override + public boolean supportsTemporaryTables() { + return true; + } + + @Override + public String getCreateTemporaryTableString() { + return "create temporary table if not exists"; + } + + @Override + public Boolean performTemporaryTableDDLInIsolation() { + return Boolean.FALSE; + } + + /* + * @Override public boolean dropTemporaryTableAfterUse() { return true; // temporary tables are only dropped when the connection is + * closed. If the connection is pooled... } + */ + + @Override + public boolean supportsCurrentTimestampSelection() { + return true; + } + + @Override + public boolean isCurrentTimestampSelectStringCallable() { + return false; + } + + @Override + public String getCurrentTimestampSelectString() { + return "select current_timestamp"; + } + + private static final int SQLITE_BUSY = 5; + private static final int SQLITE_LOCKED = 6; + private static final int SQLITE_IOERR = 10; + private static final int SQLITE_CORRUPT = 11; + private static final int SQLITE_NOTFOUND = 12; + private static final int SQLITE_FULL = 13; + private static final int SQLITE_CANTOPEN = 14; + private static final int SQLITE_PROTOCOL = 15; + private static final int SQLITE_TOOBIG = 18; + private static final int SQLITE_CONSTRAINT = 19; + private static final int SQLITE_MISMATCH = 20; + private static final int SQLITE_NOTADB = 26; + + @Override + public SQLExceptionConverter buildSQLExceptionConverter() { + return (SQLExceptionConverter) (sqlException, message, sql) -> { + final int errorCode = JdbcExceptionHelper.extractErrorCode(sqlException); + if (errorCode == SQLITE_CONSTRAINT) { + final String constraintName = EXTRACTER.extractConstraintName(sqlException); + return new ConstraintViolationException(message, sqlException, sql, constraintName); + } else if ((errorCode == SQLITE_TOOBIG) || (errorCode == SQLITE_MISMATCH)) return new DataException(message, sqlException, sql); + else if ((errorCode == SQLITE_BUSY) || (errorCode == SQLITE_LOCKED)) return new LockAcquisitionException(message, sqlException, sql); + else if (((errorCode >= SQLITE_IOERR) && (errorCode <= SQLITE_PROTOCOL)) || (errorCode == SQLITE_NOTADB)) + return new JDBCConnectionException(message, sqlException, sql); + return new GenericJDBCException(message, sqlException, sql); + }; + } + + public static final ViolatedConstraintNameExtracter EXTRACTER = new TemplatedViolatedConstraintNameExtracter() { + + @Override + public String extractConstraintName(final SQLException sqle) { + return extractUsingTemplate("constraint ", " failed", sqle.getMessage()); + } + }; + + @Override + public boolean supportsUnionAll() { + return true; + } + + @Override + public boolean hasAlterTable() { + return false; // As specified in NHibernate dialect + } + + @Override + public boolean dropConstraints() { + return false; + } + + @Override + public String getAddColumnString() { + return "add column"; + } + + @Override + public String getForUpdateString() { + return ""; + } + + @Override + public boolean supportsOuterJoinForUpdate() { + return false; + } + + @Override + public String getDropForeignKeyString() { + throw new UnsupportedOperationException("No drop foreign key syntax supported by SQLiteDialect"); + } + + @Override + public String getAddForeignKeyConstraintString(final String constraintName, + final String[] foreignKey, + final String referencedTable, + final String[] primaryKey, + final boolean referencesPrimaryKey) { + throw new UnsupportedOperationException("No add foreign key syntax supported by SQLiteDialect"); + } + + @Override + public String getAddPrimaryKeyConstraintString(final String constraintName) { + throw new UnsupportedOperationException("No add primary key syntax supported by SQLiteDialect"); + } + + @Override + public boolean supportsIfExistsBeforeTableName() { + return true; + } + + @Override + public boolean supportsTupleDistinctCounts() { + return false; + } + + @Override + public String getSelectGUIDString() { + return "select hex(randomblob(16))"; + } +} diff --git a/dnet-information-service/src/main/resources/eu/dnetlib/applicationContext-services.xml b/dnet-information-service/src/main/resources/eu/dnetlib/applicationContext-services.xml new file mode 100644 index 0000000..a43cd89 --- /dev/null +++ b/dnet-information-service/src/main/resources/eu/dnetlib/applicationContext-services.xml @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/dnet-information-service/src/main/resources/eu/dnetlib/enabling/is/lookup/applicationContext-islookup.xml b/dnet-information-service/src/main/resources/eu/dnetlib/enabling/is/lookup/applicationContext-islookup.xml new file mode 100644 index 0000000..d886239 --- /dev/null +++ b/dnet-information-service/src/main/resources/eu/dnetlib/enabling/is/lookup/applicationContext-islookup.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + diff --git a/dnet-information-service/src/main/resources/eu/dnetlib/enabling/is/registry/DRIVERInformationSpaceApplicationProfile.xml b/dnet-information-service/src/main/resources/eu/dnetlib/enabling/is/registry/DRIVERInformationSpaceApplicationProfile.xml new file mode 100644 index 0000000..4d616c1 --- /dev/null +++ b/dnet-information-service/src/main/resources/eu/dnetlib/enabling/is/registry/DRIVERInformationSpaceApplicationProfile.xml @@ -0,0 +1,245 @@ + + + +
+ + + + + +
+ + + DRIVER Information Space Application + + + + + + PendingRepositoryResources + RepositoryServiceResources + + RepositoryServiceResourceType + + + + PendingServiceResources + ServiceResources + + IS_StoreServiceResourceType + IS_SNServiceResourceType + IS_LookUpServiceResourceType + IS_UIServiceResourceType + IS_RegistryServiceResourceType + MS_RMServiceResourceType + MS_ROServiceResourceType + HostingNodeManagerServiceResourceType + HostingContextManagerServiceResourceType + MDStoreServiceResourceType + DepotServiceResourceType + DataAccessServiceResourceType + AggregatorServiceResourceType + HarvestingServiceResourceType + HarvestingManagerServiceResourceType + TransformationServiceResourceType + TransformationManagerServiceResourceType + TransformationRuleEditorServiceResourceType + FeatureExtractionServiceResourceType + IndexServiceResourceType + BrowseServiceResourceType + DownloadServiceResourceType + CS_EngineServiceResourceType + CS_UIServiceResourceType + ResultSetServiceResourceType + OAIServiceResourceType + A2ServiceResourceType + ObjectPackagingServiceResourceType + DLMServiceResourceType + TextEngineServiceResourceType + PublisherServiceResourceType + DriverTesterServiceResourceType + SearchServiceResourceType + CollectionServiceResourceType + CommunityServiceResourceType + ForumServiceResourceType + RatingServiceResourceType + RecommendationServiceResourceType + UserProfileServiceResourceType + ValidatorServiceResourceType + ValidatorUserInterfaceServiceResourceType + WebInterfaceServiceResourceType + CitationServiceResourceType + SimilarityServiceResourceType + DLMSConnectionServiceResourceType + + TagSessionManagerServiceResourceType + TagStoreServiceResourceType + PIDBridgeServiceResourceType + PIDAssignerServiceResourceType + CleanerServiceResourceType + + + + PendingDSResources + DRIVERHostingNodeDSResources + + DRIVERHostingNodeDSResourceType + + + + PendingDSResources + UserDSResources + + UserDSResourceType + + + + + CommunityDSResources + + CommunityDSResourceType + + + + + DriverTestDSResources + + DriverTestDSResourceType + + + + PendingDSResources + DriverPendingTestDSResources + + DriverPendingTestDSResourceType + + + + + CollectionDSResources + + CollectionDSResourceType + + + + + HarvestingInstanceDSResources + + HarvestingInstanceDSResourceType + + + + + HarvestingDSResources + + HarvestingDSResourceType + + + + + IndexDSResources + + IndexDSResourceType + + + + + MDStoreDSResources + + MDStoreDSResourceType + + + + + StoreDSResources + + StoreDSResourceType + + + + + ResultSetDSResources + + ResultSetDSResourceType + + + + + RecommendationDSResources + + RecommendationResourceType + + + + + TransformationDSResources + + TransformationDSResourceType + + + + + VocabularyDSResources + + VocabularyDSResourceType + + + + + SystemManagementDSResources + + SystemManagementDSResourceType + + + + + + dr:CobjContentSynthesis + dr:CobjTypology + dr:CobjIdentifier + dr:CobjModel + dr:CobjMDFormats + dr:CobjDescriptionSynthesis + dr:repositoryName + dr:repositoryLink + dr:repositoryCountry + dr:repositoryInstitution + dc:creator + dc:title + dc:subject + dr:CobjCategory + dc:language + dc:dateAccepted + dc:identifier + dc:publisher + dc:source + dc:contributor + dc:relation + dc:description + + + dr:repositoryCountry + + + * + + + dr:repositoryName + dr:repositoryLink + dr:repositoryCountry + dr:repositoryInstitution + + + ENGLISH_NAME + REPOSITORY_WEBPAGE + COUNTRY + REPOSITORY_INSTITUTION + + + + + + + + +
diff --git a/dnet-information-service/src/main/resources/eu/dnetlib/enabling/is/registry/applicationContext-isregistry.properties b/dnet-information-service/src/main/resources/eu/dnetlib/enabling/is/registry/applicationContext-isregistry.properties new file mode 100644 index 0000000..3676cb6 --- /dev/null +++ b/dnet-information-service/src/main/resources/eu/dnetlib/enabling/is/registry/applicationContext-isregistry.properties @@ -0,0 +1,2 @@ +# values: idPreservingPendingManager, compatPendingManager +services.registry.pending.resource.manager=idPreservingPendingManager diff --git a/dnet-information-service/src/main/resources/eu/dnetlib/enabling/is/registry/applicationContext-isregistry.xml b/dnet-information-service/src/main/resources/eu/dnetlib/enabling/is/registry/applicationContext-isregistry.xml new file mode 100644 index 0000000..3fa3a0b --- /dev/null +++ b/dnet-information-service/src/main/resources/eu/dnetlib/enabling/is/registry/applicationContext-isregistry.xml @@ -0,0 +1,75 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dnet-information-service/src/main/resources/eu/dnetlib/enabling/is/sn/applicationContext-issn.properties b/dnet-information-service/src/main/resources/eu/dnetlib/enabling/is/sn/applicationContext-issn.properties new file mode 100644 index 0000000..4fff392 --- /dev/null +++ b/dnet-information-service/src/main/resources/eu/dnetlib/enabling/is/sn/applicationContext-issn.properties @@ -0,0 +1,19 @@ +services.issn.path=${dnet.data.path}/issn +services.issn.hib.issndb.url=jdbc:sqlite:${services.issn.path}/dnet_issn.db +services.issn.hib.issndb.username=dnet +services.issn.hib.issndb.password=dnetPwd +services.issn.hibernate.hbm.auto=update +services.issn.hib.issndb.dialect=org.hibernate.dialect.SQLiteDialect +services.issn.hib.driverName = org.sqlite.JDBC + +services.issn.subscription.filter.active = false +services.is.sn.subscriptions.cache.ttl = 86400 +services.is.sn.subscriptions.cache.size = 1000 + +#TO USE POSTGRES YOU NEED TO UNCOMMENT THIS +#services.issn.hib.issndb.url=jdbc:postgresql://localhost:5432/dnet_issn +#services.issn.hib.issndb.username=dnet +#services.issn.hib.issndb.password=dnetPwd +#services.issn.hibernate.hbm.auto=update +#services.issn.hib.issndb.dialect=org.hibernate.dialect.PostgreSQLDialect +#services.issn.hib.driverName = org.postgresql.Driver diff --git a/dnet-information-service/src/main/resources/eu/dnetlib/enabling/is/sn/applicationContext-issn.xml b/dnet-information-service/src/main/resources/eu/dnetlib/enabling/is/sn/applicationContext-issn.xml new file mode 100644 index 0000000..df533c2 --- /dev/null +++ b/dnet-information-service/src/main/resources/eu/dnetlib/enabling/is/sn/applicationContext-issn.xml @@ -0,0 +1,86 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dnet-information-service/src/main/resources/eu/dnetlib/enabling/is/sn/resourcestate/hib/applicationContext-issn-hib.xml b/dnet-information-service/src/main/resources/eu/dnetlib/enabling/is/sn/resourcestate/hib/applicationContext-issn-hib.xml new file mode 100644 index 0000000..bf0beef --- /dev/null +++ b/dnet-information-service/src/main/resources/eu/dnetlib/enabling/is/sn/resourcestate/hib/applicationContext-issn-hib.xml @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + + eu.dnetlib.enabling.is.sn.resourcestate.ResourceStateSubscription + + + + + ${services.issn.hib.issndb.dialect} + false + ${services.issn.hibernate.hbm.auto} + + + + + + + + + + diff --git a/dnet-information-service/src/main/resources/eu/dnetlib/enabling/is/store/applicationContext-isstore.properties b/dnet-information-service/src/main/resources/eu/dnetlib/enabling/is/store/applicationContext-isstore.properties new file mode 100644 index 0000000..77b4a83 --- /dev/null +++ b/dnet-information-service/src/main/resources/eu/dnetlib/enabling/is/store/applicationContext-isstore.properties @@ -0,0 +1,2 @@ +services.is.store.enable.java=true +services.is.store.initializer.timetosleep = 4000 diff --git a/dnet-information-service/src/main/resources/eu/dnetlib/enabling/is/store/applicationContext-isstore.xml b/dnet-information-service/src/main/resources/eu/dnetlib/enabling/is/store/applicationContext-isstore.xml new file mode 100644 index 0000000..ede190d --- /dev/null +++ b/dnet-information-service/src/main/resources/eu/dnetlib/enabling/is/store/applicationContext-isstore.xml @@ -0,0 +1,116 @@ + + + + + + + + + + + + + + + + + + + + + + + + persistentExistLogInterceptor + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dnet-information-service/src/main/resources/eu/dnetlib/enabling/is/store/xquery/dnet.xqm b/dnet-information-service/src/main/resources/eu/dnetlib/enabling/is/store/xquery/dnet.xqm new file mode 100644 index 0000000..0a654f1 --- /dev/null +++ b/dnet-information-service/src/main/resources/eu/dnetlib/enabling/is/store/xquery/dnet.xqm @@ -0,0 +1,10 @@ +xquery version "1.0"; + +module namespace dnet="http://namespace.dnetlib.eu/xquery/dnet"; +declare namespace xmldb="http://exist-db.org/xquery/xmldb"; + +declare function dnet:deleteDocument($x as element()) { + + xmldb:remove(replace($x/base-uri(),'/[^/]*$', ''), replace($x/base-uri(),'^.*/([^/]*)$', '$1')) + +}; diff --git a/dnet-information-service/src/main/resources/eu/dnetlib/enabling/tools/applicationContext-tools.xml b/dnet-information-service/src/main/resources/eu/dnetlib/enabling/tools/applicationContext-tools.xml new file mode 100644 index 0000000..1fb1285 --- /dev/null +++ b/dnet-information-service/src/main/resources/eu/dnetlib/enabling/tools/applicationContext-tools.xml @@ -0,0 +1,14 @@ + + + + + \ No newline at end of file diff --git a/dnet-information-service/src/main/resources/eu/dnetlib/xml/database/exist/default-exist-conf.xml b/dnet-information-service/src/main/resources/eu/dnetlib/xml/database/exist/default-exist-conf.xml new file mode 100644 index 0000000..bfdec64 --- /dev/null +++ b/dnet-information-service/src/main/resources/eu/dnetlib/xml/database/exist/default-exist-conf.xml @@ -0,0 +1,85 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/dnet-information-service/src/test/java/eu/dnetlib/enabling/is/lookup/ISLookUpServiceImplTest.java b/dnet-information-service/src/test/java/eu/dnetlib/enabling/is/lookup/ISLookUpServiceImplTest.java new file mode 100644 index 0000000..e25f719 --- /dev/null +++ b/dnet-information-service/src/test/java/eu/dnetlib/enabling/is/lookup/ISLookUpServiceImplTest.java @@ -0,0 +1,145 @@ +package eu.dnetlib.enabling.is.lookup; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; +import static org.mockito.Matchers.anyString; +import static org.mockito.Mockito.when; + +import java.io.IOException; +import java.io.StringReader; +import java.io.StringWriter; +import java.util.Arrays; +import java.util.List; + +import org.apache.commons.io.IOUtils; +import org.dom4j.Document; +import org.dom4j.DocumentException; +import org.dom4j.io.SAXReader; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.mockito.Mock; +import org.mockito.junit.MockitoJUnitRunner; + +import eu.dnetlib.enabling.is.lookup.rmi.ISLookUpDocumentNotFoundException; +import eu.dnetlib.enabling.is.lookup.rmi.ISLookUpException; +import eu.dnetlib.enabling.is.store.rmi.ISStoreException; +import eu.dnetlib.enabling.is.store.rmi.ISStoreService; +import eu.dnetlib.enabling.tools.XQueryUtilsImpl; + +/** + * ISLookUpService test. + * + * @author marko + * + */ +@RunWith(MockitoJUnitRunner.class) +public class ISLookUpServiceImplTest { + + /** + * test profile id. + */ + private static final String PROF_ID = "first_c2Vjb25k"; + + /** + * List of ids. + */ + private static final List ID_LIST = Arrays.asList(new String[] { "fff", "ggg", "hhh" }); + + /** + * class under test. + */ + private transient ISLookUpServiceImpl lookup; + + /** + * is store service mock. + */ + @Mock + private transient ISStoreService storeService; + + /** + * common test case init. + */ + @Before + public void setUp() { + lookup = new ISLookUpServiceImpl(); + lookup.setXqueryUtils(new XQueryUtilsImpl()); + lookup.setIsStore(storeService); + } + + /** + * test get file name from id. + */ + @Test + public void testGetFileNameForId() { + assertEquals("check", "first", lookup.getFileNameForId(PROF_ID)); + } + + /** + * test get file coll from id. + */ + @Test + public void testGetFileCollForId() { + assertEquals("check", "second", lookup.getFileCollForId(PROF_ID)); + } + + /** + * test get resource profile. + * + * @throws ISLookUpException + * shouldn't happen + * @throws ISStoreException + * shouldn't happen + */ + @Test + public void testGetResourceProfile() throws ISLookUpException, ISStoreException { + when(storeService.getXML("first", "/db/DRIVER/second")).thenReturn(""); + + assertNotNull("get profile", lookup.getResourceProfile(PROF_ID)); + } + + /** + * test get resource profile when no such document exists. + * + * @throws ISLookUpException + * expected + */ + @Test(expected = ISLookUpDocumentNotFoundException.class) + public void testGetResourceProfileNonExisting() throws ISLookUpException { + lookup.getResourceProfile(PROF_ID); + } + + /** + * test getCollection. + * + * @throws IOException + * could happen + * @throws ISStoreException + * could happen + * @throws ISLookUpException + * could happen + * @throws DocumentException + * could happen + */ + @Test + public void testGetCollection() throws IOException, ISStoreException, ISLookUpException, DocumentException { + final StringWriter writer = new StringWriter(); + IOUtils.copy(getClass().getResourceAsStream("collProfile.xml"), writer); + final String simpleProf = writer.getBuffer().toString(); + + when(storeService.getXML(anyString(), anyString())).thenReturn(simpleProf); + when( + storeService.quickSearchXML("for $x in collection('/db/DRIVER/CollectionDSResources') where $x//FATHER/@id = '" + PROF_ID + + "' return $x//RESOURCE_IDENTIFIER/@value/string()")).thenReturn(ID_LIST); + + final String profile = lookup.retrieveCollection(PROF_ID); + final SAXReader reader = new SAXReader(); + final Document doc = reader.read(new StringReader(profile)); + + assertEquals("children", ID_LIST.size(), doc.selectNodes("//CHILDREN/CHILD").size()); + for (final String id : ID_LIST) { + assertNotNull("child", doc.selectSingleNode("//CHILDREN/CHILD[@id='" + id + "']")); + } + } + +} diff --git a/dnet-information-service/src/test/java/eu/dnetlib/enabling/is/registry/ApplicationProfileResourceKindResolverTest.java b/dnet-information-service/src/test/java/eu/dnetlib/enabling/is/registry/ApplicationProfileResourceKindResolverTest.java new file mode 100644 index 0000000..3f80807 --- /dev/null +++ b/dnet-information-service/src/test/java/eu/dnetlib/enabling/is/registry/ApplicationProfileResourceKindResolverTest.java @@ -0,0 +1,29 @@ +package eu.dnetlib.enabling.is.registry; + +import static org.junit.Assert.*; + +import javax.xml.xpath.XPathExpressionException; + +import org.junit.Before; +import org.junit.Test; + +public class ApplicationProfileResourceKindResolverTest { + + private ApplicationProfileResourceKindResolver resolver; + + @Before + public void setUp() throws Exception { + resolver = new ApplicationProfileResourceKindResolver(); + } + + @Test(expected = NoSuchPendingCategoryException.class) + public void testPending() throws XPathExpressionException { + resolver.getPendingKindForType("TestType"); + } + + @Test + public void testPendingExisting() throws XPathExpressionException { + assertEquals("PendingServiceResources", resolver.getPendingKindForType("IndexServiceResourceType")); + } + +} diff --git a/dnet-information-service/src/test/java/eu/dnetlib/enabling/is/registry/CompatPendingResourceManagerImplTest.java b/dnet-information-service/src/test/java/eu/dnetlib/enabling/is/registry/CompatPendingResourceManagerImplTest.java new file mode 100644 index 0000000..438dc5b --- /dev/null +++ b/dnet-information-service/src/test/java/eu/dnetlib/enabling/is/registry/CompatPendingResourceManagerImplTest.java @@ -0,0 +1,149 @@ +package eu.dnetlib.enabling.is.registry; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertNull; +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.Matchers.anyObject; +import static org.mockito.Matchers.anyString; +import static org.mockito.Matchers.eq; +import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.when; + +import javax.xml.xpath.XPathExpressionException; + +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.mockito.Mock; +import org.mockito.junit.MockitoJUnitRunner; + +import eu.dnetlib.enabling.is.registry.rmi.ISRegistryException; +import eu.dnetlib.enabling.is.registry.rmi.ISRegistryService; +import eu.dnetlib.enabling.is.registry.schema.ValidationException; +import eu.dnetlib.enabling.is.registry.validation.ProfileValidationStrategy; +import eu.dnetlib.enabling.is.registry.validation.RegistrationPhase; +import eu.dnetlib.enabling.tools.OpaqueResource; + +/** + * test compatibility pending resource manager implementation. + * + * @author marko + * + */ +@RunWith(MockitoJUnitRunner.class) +public class CompatPendingResourceManagerImplTest { + + /** + * instance under test. + */ + private transient CompatPendingResourceManagerImpl pendingManager; + + /** + * registry service mock. + */ + @Mock + private transient ISRegistryService registryService; + + /** + * resource mock. + */ + @Mock + private transient OpaqueResource resource; + /** + * used to validate resources w.r.t. a set of defined properties. + */ + @Mock + private ProfileValidationStrategy profileValidationStrategy; + + /** + * prepare instance for testing. + */ + @Before + public void setUp() { + pendingManager = new CompatPendingResourceManagerImpl(); + pendingManager.setIsRegistry(registryService); + pendingManager.setResourceKindResolver(new ApplicationProfileResourceKindResolver()); + pendingManager.setProfileValidationStrategy(profileValidationStrategy); + } + + /** + * test that the application profile can be queried correctly. + * + * @throws XPathExpressionException + * shouldn't happen + */ + @Test + public void testGetPendingKindForType() throws XPathExpressionException { + assertEquals("check pending", "PendingRepositoryResources", pendingManager.getPendingKindForType("RepositoryServiceResourceType")); + assertEquals("check pending", "PendingDSResources", pendingManager.getPendingKindForType("UserDSResourceType")); + } + + /** + * check that unexistent types throw an exception. + * + * @throws XPathExpressionException + * shouldn't happen + */ + @Test(expected = IllegalStateException.class) + public void testGetPendingKindForNoSuchType() throws XPathExpressionException { + pendingManager.getPendingKindForType("NoSuchType"); + } + + /** + * test that the application profile can be queried correctly. + * + * @throws XPathExpressionException + * shouldn't happen + */ + @Test + public void testGetNormalKindForType() throws XPathExpressionException { + assertEquals("check kind", "RepositoryServiceResources", pendingManager.getNormalKindForType("RepositoryServiceResourceType")); + assertEquals("check kind", "UserDSResources", pendingManager.getNormalKindForType("UserDSResourceType")); + assertNull("check unexisting type", pendingManager.getNormalKindForType("NoSuchType")); + } + + /** + * test that the resource is correctly moved from the pending collection to the new collection. + * + * @throws ISRegistryException + * shoudn't happen + * @throws ValidationException + */ + @Test + public void testSetValid() throws ISRegistryException, ValidationException { + final String profId = "123"; + when(resource.asString()).thenReturn(""); + when(resource.getResourceId()).thenReturn(profId); + //when(profileValidationStrategy.accept(any(OpaqueResource.class), eq(RegistrationPhase.Register))).thenReturn(true); + + pendingManager.setValid(resource); + + verify(registryService).deleteProfile(profId); + verify(registryService).registerProfile(anyString()); + + assertNotNull("dummy", registryService); + } + + /** + * test that the resource is correctly moved from the current collection to the correct pending collection. + * + * @throws ISRegistryException + * shoudn't happen + */ + @Test + public void testSetPending() throws ISRegistryException { + final String profId = "321"; + when(resource.asString()).thenReturn(""); + when(resource.getResourceId()).thenReturn(profId); + when(resource.getResourceType()).thenReturn("RepositoryServiceResourceType"); + + pendingManager.setPending(resource); + + verify(registryService).deleteProfile(profId); + verify(registryService).registerProfile(anyString()); + + assertNotNull("dummy", registryService); + } + +} diff --git a/dnet-information-service/src/test/java/eu/dnetlib/enabling/is/registry/ISRegistryServiceImplTest.java b/dnet-information-service/src/test/java/eu/dnetlib/enabling/is/registry/ISRegistryServiceImplTest.java new file mode 100644 index 0000000..41812af --- /dev/null +++ b/dnet-information-service/src/test/java/eu/dnetlib/enabling/is/registry/ISRegistryServiceImplTest.java @@ -0,0 +1,489 @@ +package eu.dnetlib.enabling.is.registry; // NOPMD + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; +import static org.mockito.Matchers.anyObject; +import static org.mockito.Matchers.anyString; +import static org.mockito.Matchers.eq; +import static org.mockito.Mockito.doThrow; +import static org.mockito.Mockito.never; +import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.when; + +import java.io.IOException; +import java.io.StringWriter; + +import javax.xml.parsers.ParserConfigurationException; +import javax.xml.xpath.XPathExpressionException; + +import org.apache.commons.io.IOUtils; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.mockito.Mock; +import org.mockito.junit.MockitoJUnitRunner; +import org.xml.sax.SAXException; + +import eu.dnetlib.enabling.is.lookup.rmi.ISLookUpException; +import eu.dnetlib.enabling.is.lookup.rmi.ISLookUpService; +import eu.dnetlib.enabling.is.registry.rmi.ISRegistryException; +import eu.dnetlib.enabling.is.registry.schema.OpaqueResourceValidator; +import eu.dnetlib.enabling.is.registry.schema.ValidationException; +import eu.dnetlib.enabling.is.registry.validation.ProfileValidationStrategy; +import eu.dnetlib.enabling.is.registry.validation.RegistrationPhase; +import eu.dnetlib.enabling.is.store.rmi.ISStoreException; +import eu.dnetlib.enabling.is.store.rmi.ISStoreService; +import eu.dnetlib.enabling.tools.CompatResourceIdentifierResolverImpl; +import eu.dnetlib.enabling.tools.OpaqueResource; +import eu.dnetlib.enabling.tools.ResourceType; +import eu.dnetlib.enabling.tools.StringOpaqueResource; +import eu.dnetlib.enabling.tools.XQueryUtils; +import eu.dnetlib.enabling.tools.XQueryUtilsImpl; + +/** + * test registry service. + * + * @author marko + * + */ +@RunWith(MockitoJUnitRunner.class) +public class ISRegistryServiceImplTest { // NOPMD + + /** + * a test resource type. + */ + private static final String REPOSITORY_TYPE = "RepositoryServiceResourceType"; + + /** + * TODO: use a shared constant for this. + */ + private static final String DB_DRIVER = "/db/DRIVER/"; + + /** + * class under test. + */ + private transient ISRegistryServiceImpl registry; + + /** + * store service mock. + */ + @Mock + private transient ISStoreService storeService; + + /** + * lookup service mock. + */ + @Mock + private transient ISLookUpService lookUpService; + + /** + * xml source of a test profile, loaded from test-profile.xml. + */ + private transient String profileSource; + + /** + * resource identifier resolver, converts IDs to filename/collection pairs. + */ + private transient CompatResourceIdentifierResolverImpl resIdResolver; + + /** + * schema validator. + */ + @Mock + private transient OpaqueResourceValidator validator; + + /** + * xquery utils, used for xmldb root path. + */ + private final transient XQueryUtils xqueryUtils = new XQueryUtilsImpl(); + + /** + * used to validate resources w.r.t. a set of defined properties. + */ + @Mock + private ProfileValidationStrategy profileValidationStrategy; + + /** + * common initialization. + * + * @throws IOException + * shouldn't happen + */ + @Before + public void setUp() throws IOException { + registry = new ISRegistryServiceImpl(); + registry.setXqueryUtils(new XQueryUtilsImpl()); + resIdResolver = new CompatResourceIdentifierResolverImpl(); + registry.setResIdResolver(resIdResolver); + + final CompatPendingResourceManagerImpl pendingManager = new CompatPendingResourceManagerImpl(); + pendingManager.setResourceKindResolver(new ApplicationProfileResourceKindResolver()); + pendingManager.setProfileValidationStrategy(profileValidationStrategy); + + registry.setPendingManager(pendingManager); + pendingManager.setIsRegistry(registry); + registry.setIsStore(storeService); + registry.setIsLookup(lookUpService); + + registry.setResourceValidator(validator); + + final StringWriter writer = new StringWriter(); + IOUtils.copy(getClass().getResourceAsStream("test-profile.xml"), writer); + profileSource = writer.getBuffer().toString(); + + registry.setProfileValidationStrategy(profileValidationStrategy); + } + + /** + * test the deletion of a profile. + * + * @throws ISRegistryException + * shouldn't happen + * @throws XPathExpressionException + * shouldn't happen + * @throws SAXException + * shouldn't happen + * @throws IOException + * shouldn't happen + * @throws ParserConfigurationException + * shouldn't happen + * @throws ISStoreException + * shouldn't happen + */ + @Test + public void testDeleteProfile() throws ISRegistryException, XPathExpressionException, SAXException, IOException, ParserConfigurationException, + ISStoreException { + final OpaqueResource resource = new StringOpaqueResource(profileSource); + final String resId = resource.getResourceId(); + + boolean catched = false; // NOPMD + try { + registry.deleteProfile(resId); + } catch (ISRegistryDocumentNotFoundException e) { + catched = true; + } + + assertTrue("exception raised", catched); + verify(storeService).deleteXML(registry.getResIdResolver().getFileName(resId), DB_DRIVER + registry.getResIdResolver().getCollectionName(resId)); + + assertNotNull("dummy", storeService); + } + + /** + * test the deletion of an inexitent profile. It should throwa specific exception + * + * @throws ISRegistryException + * shouldn't happen + * @throws XPathExpressionException + * shouldn't happen + * @throws SAXException + * shouldn't happen + * @throws IOException + * shouldn't happen + * @throws ParserConfigurationException + * shouldn't happen + * @throws ISStoreException + * shouldn't happen + */ + @Test(expected = ISRegistryDocumentNotFoundException.class) + public void testDeleteInexistentProfile() throws ISRegistryException, XPathExpressionException, SAXException, IOException, + ParserConfigurationException, ISStoreException { + final OpaqueResource resource = new StringOpaqueResource(profileSource); + final String resId = resource.getResourceId(); + final String wrongId = "xx" + resId; + + when(storeService.deleteXML(registry.getResIdResolver().getFileName(wrongId), DB_DRIVER + registry.getResIdResolver().getCollectionName(wrongId))) + .thenReturn(false); + + registry.deleteProfile(wrongId); + } + + /** + * test register profile. + * + * @throws ISRegistryException + * shouldn't happen + * @throws ISStoreException + * shouldn't happen + * @throws IOException + * shouldn't happen + * @throws ParserConfigurationException + * shouldn't happen + * @throws SAXException + * shouldn't happen + * @throws XPathExpressionException + * shouldn't happen + * @throws ValidationException + */ + @Test + public void testRegisterProfile() throws ISRegistryException, ISStoreException, IOException, XPathExpressionException, SAXException, + ParserConfigurationException, ValidationException { + + when(profileValidationStrategy.accept((OpaqueResource) anyObject(), eq(RegistrationPhase.Register))).thenReturn(true); + final String newId = registry.registerProfile(profileSource); + + verify(storeService).insertXML(eq(resIdResolver.getFileName(newId)), eq(DB_DRIVER + resIdResolver.getCollectionName(newId)), anyString()); + + final OpaqueResource resource = new StringOpaqueResource(profileSource); + assertFalse("new identifier is generated", newId.equals(resource.getResourceId())); + + } + + /** + * test update profile. + * + * @throws XPathExpressionException + * should'nt happen + * @throws SAXException + * should'nt happen + * @throws IOException + * should'nt happen + * @throws ParserConfigurationException + * should'nt happen + * @throws ISRegistryException + * should'nt happen + * @throws ISStoreException + * should'nt happen + */ + @Test + public void testUpdateProfile() throws XPathExpressionException, SAXException, IOException, ParserConfigurationException, ISRegistryException, + ISStoreException { + final OpaqueResource resource = new StringOpaqueResource(profileSource); + + final String fileName = resIdResolver.getFileName(resource.getResourceId()); + final String fileColl = resIdResolver.getCollectionName(resource.getResourceId()); + when(storeService.updateXML(eq(fileName), eq(DB_DRIVER + fileColl), anyString())).thenReturn(true); + + when(storeService.getXML(fileName, DB_DRIVER + fileColl)).thenReturn(resource.asString()); + + final boolean res = registry.updateProfile(resource.getResourceId(), resource.asString(), resource.getResourceType()); + assertTrue("success", res); + } + + /** + * Check that the xml schema is correctly validated even on updateProfile. + * + * @throws XPathExpressionException + * cannot happen + * @throws SAXException + * cannot happen + * @throws IOException + * cannot happen + * @throws ParserConfigurationException + * cannot happen + * @throws ISRegistryException + * mock + * @throws ValidationException + * mock + */ + @Test(expected = ISRegistryException.class) + public void testUpdateProfileSchemaValidate() throws XPathExpressionException, SAXException, IOException, ParserConfigurationException, + ISRegistryException, ValidationException { + final OpaqueResource resource = new StringOpaqueResource(profileSource); + + //doThrow(new ValidationException("invalid xml")).when(validator).validate((OpaqueResource) anyObject()); + + registry.updateProfile(resource.getResourceId(), "", resource.getResourceType()); + } + + /** + * test profile validation. + * + * @throws XPathExpressionException + * shouldn't happen + * @throws SAXException + * shouldn't happen + * @throws IOException + * shouldn't happen + * @throws ParserConfigurationException + * shouldn't happen + * @throws ISRegistryException + * shouldn't happen + * @throws ISStoreException + * shouldn't happen + * @throws ISLookUpException + * shouldn't happen + * @throws ValidationException + */ + @Test + public void testValidateProfile() throws XPathExpressionException, SAXException, IOException, ParserConfigurationException, ISRegistryException, + ISStoreException, ISLookUpException, ValidationException { + final OpaqueResource resource = new StringOpaqueResource(profileSource); + + final String oldId = registry.insertProfileForValidation(resource.getResourceType(), resource.asString()); + resource.setResourceKind("PendingRepositoryResources"); // simulate the validation + + resource.setResourceId(oldId); + when(lookUpService.getResourceProfile(oldId)).thenReturn(resource.asString()); + when(storeService.deleteXML(resIdResolver.getFileName(oldId), DB_DRIVER + resIdResolver.getCollectionName(oldId))).thenReturn(true); + when(profileValidationStrategy.accept((OpaqueResource) anyObject(), eq(RegistrationPhase.Register))).thenReturn(true); + + final String newId = registry.validateProfile(oldId); + + verify(storeService).deleteXML(resIdResolver.getFileName(oldId), DB_DRIVER + resIdResolver.getCollectionName(oldId)); + verify(storeService).insertXML(eq(resIdResolver.getFileName(newId)), eq(DB_DRIVER + resIdResolver.getCollectionName(newId)), anyString()); + + assertFalse("the id should be be unstable", resIdResolver.getFileName(oldId).equals(resIdResolver.getFileName(newId))); + } + + /** + * test invalidate profile. + * + * @throws XPathExpressionException + * shouldn't happen + * @throws SAXException + * shouldn't happen + * @throws IOException + * shouldn't happen + * @throws ParserConfigurationException + * shouldn't happen + * @throws ISRegistryException + * shouldn't happen + * @throws ISStoreException + * shouldn't happen + * @throws ISLookUpException + * shouldn't happen + */ + @Test + public void testInvalidateProfile() throws XPathExpressionException, SAXException, IOException, ParserConfigurationException, ISRegistryException, + ISStoreException, ISLookUpException { + + final OpaqueResource resource = new StringOpaqueResource(profileSource); + resource.setResourceKind("PendingResources"); + + final String oldId = registry.registerProfile(resource.asString()); + + resource.setResourceId(oldId); + when(lookUpService.getResourceProfile(oldId)).thenReturn(resource.asString()); + when(storeService.deleteXML(resIdResolver.getFileName(oldId), DB_DRIVER + resIdResolver.getCollectionName(oldId))).thenReturn(true); + + final String newId = registry.invalidateProfile(oldId); + + verify(storeService).deleteXML(resIdResolver.getFileName(oldId), DB_DRIVER + resIdResolver.getCollectionName(oldId)); + verify(storeService).insertXML(eq(resIdResolver.getFileName(newId)), eq(DB_DRIVER + resIdResolver.getCollectionName(newId)), anyString()); + + assertFalse("the id should be be unstable", resIdResolver.getFileName(oldId).equals(resIdResolver.getFileName(newId))); + + } + + /** + * test that the resource kind is correctly changed when inserting for validation. + * + * @throws IOException + * shouldn't happen + * @throws ISRegistryException + * shouldn't happen + * @throws ISStoreException + * shouldn't happen + * @throws XPathExpressionException + * shouldn't happen + * @throws SAXException + * shouldn't happen + * @throws ParserConfigurationException + * shouldn't happen + */ + @Test + public void testInsertProfileForValidation() throws IOException, ISRegistryException, ISStoreException, XPathExpressionException, SAXException, + ParserConfigurationException { + + final OpaqueResource resource = new StringOpaqueResource(profileSource); + final String newId = registry.insertProfileForValidation(resource.getResourceType(), resource.asString()); + + verify(storeService).insertXML(eq(resIdResolver.getFileName(newId)), eq(DB_DRIVER + "PendingRepositoryResources/RepositoryServiceResourceType"), + anyString()); + + verify(storeService, never()).deleteXML(anyString(), anyString()); + + assertEquals("check pending id", "PendingRepositoryResources/RepositoryServiceResourceType", resIdResolver.getCollectionName(newId)); + } + + /** + * The ISRegistry's insertProfileForValidation contract specifies that an exception should be raised if the argument doesn't match the + * type. + * + * @throws IOException + * shouldn't happen + * @throws ISRegistryException + * expected + */ + @Test(expected = ISRegistryException.class) + public void testInsertProfileForValidationInvalid() throws IOException, ISRegistryException { + registry.insertProfileForValidation("WrongRepositoryServiceResourceType", profileSource); + } + + /** + * test resource type addition. + * + * @throws ISRegistryException + * shouldn't happen + * @throws IOException + * shouldn't happen + * @throws ISStoreException + * cannot happen, mock + */ + @Test + public void testAddResourceType() throws ISRegistryException, IOException, ISStoreException { + final StringWriter resourceSchema = new StringWriter(); + + IOUtils.copy(getClass().getResourceAsStream("RepositoryServiceResourceType.xsd"), resourceSchema); + assertNotNull("check schema", resourceSchema.toString()); + + registry.addResourceType(REPOSITORY_TYPE, resourceSchema.toString()); + + verify(storeService).insertXML(REPOSITORY_TYPE, xqueryUtils.getRootCollection() + ResourceType.RESOURCE_TYPES, resourceSchema.toString()); + } + + /** + * test resource type deletion. + * + * @throws ISRegistryException + * shouldn't happen + * @throws ISStoreException + * cannot happen, mock + */ + @Test + public void testDeleteResourceType() throws ISRegistryException, ISStoreException { + assertNotNull("dummy", registry); + + registry.deleteResourceType(REPOSITORY_TYPE, false); + + verify(storeService).deleteXML(REPOSITORY_TYPE, xqueryUtils.getRootCollection() + ResourceType.RESOURCE_TYPES); + } + + /** + * register secure profile. + * + * @throws ISRegistryException + * shouldn't happen + * @throws ISLookUpException + * mocked + * @throws IOException + * shouldn't happen + * @throws ISStoreException + * mock + * @throws ValidationException + */ + @Test + public void testRegisterSecureProfile() throws ISRegistryException, ISLookUpException, IOException, ISStoreException, ValidationException { // NOPMD + final String resourceProfId = "12-70b2a9e0-7d53-4ffb-be43-f3c571ae21a6_VXNlckRTUmVzb3VyY2VzL1VzZXJEU1Jlc291cmNlVHlwZQ=="; + final String secureProfId = "sec123_U2VjdXJpdHlQcm9maWxlRFNSZXNvdXJjZXMvU2VjdXJpdHlQcm9maWxlRFNSZXNvdXJjZVR5cGU="; + + final StringWriter profile = new StringWriter(); + IOUtils.copy(getClass().getResourceAsStream("userProfile.xml"), profile); + when(lookUpService.getResourceProfile(resourceProfId)).thenReturn(profile.toString()); + when(profileValidationStrategy.accept((OpaqueResource) anyObject(), eq(RegistrationPhase.Register))).thenReturn(true); + + final StringWriter secure = new StringWriter(); + IOUtils.copy(getClass().getResourceAsStream("securityProfile.xml"), secure); + when(lookUpService.getResourceProfile(secureProfId)).thenReturn(secure.toString()); + when(storeService.deleteXML(resIdResolver.getFileName(resourceProfId), DB_DRIVER + resIdResolver.getCollectionName(resourceProfId))).thenReturn( + true); + when(storeService.updateXML(eq("sec123"), eq(DB_DRIVER + "SecurityProfileDSResources/SecurityProfileDSResourceType"), anyString())).thenReturn( + true); + when(storeService.getXML("sec123", DB_DRIVER + "SecurityProfileDSResources/SecurityProfileDSResourceType")).thenReturn(""); + + registry.registerSecureProfile(resourceProfId, secureProfId); + } +} diff --git a/dnet-information-service/src/test/java/eu/dnetlib/enabling/is/registry/NameBasedResourceKindResolverTest.java b/dnet-information-service/src/test/java/eu/dnetlib/enabling/is/registry/NameBasedResourceKindResolverTest.java new file mode 100644 index 0000000..606765b --- /dev/null +++ b/dnet-information-service/src/test/java/eu/dnetlib/enabling/is/registry/NameBasedResourceKindResolverTest.java @@ -0,0 +1,41 @@ +package eu.dnetlib.enabling.is.registry; + + +import static org.junit.Assert.*; + +import javax.xml.xpath.XPathExpressionException; + +import org.junit.Before; +import org.junit.Test; + +/** + * Test the name based resource kind resolver. + * + * @author marko + * + */ +public class NameBasedResourceKindResolverTest { + + /** + * instance under test. + */ + private NameBasedResourceKindResolver resolver; + + @Before + public void setUp() throws Exception { + resolver = new NameBasedResourceKindResolver(); + } + + @Test + public void testService() throws XPathExpressionException { + assertEquals("ServiceResources", resolver.getNormalKindForType("MyNewServiceResourceType")); + assertEquals("PendingServiceResources", resolver.getPendingKindForType("MyNewServiceResourceType")); + } + + @Test + public void testGeneric() throws XPathExpressionException { + assertEquals("MyNewResources", resolver.getNormalKindForType("MyNewResourceType")); + assertEquals("PendingDSResources", resolver.getPendingKindForType("MyNewResourceType")); + } + +} diff --git a/dnet-information-service/src/test/java/eu/dnetlib/enabling/is/registry/RegistryBlackboardManagerImplTest.java b/dnet-information-service/src/test/java/eu/dnetlib/enabling/is/registry/RegistryBlackboardManagerImplTest.java new file mode 100644 index 0000000..b7ff226 --- /dev/null +++ b/dnet-information-service/src/test/java/eu/dnetlib/enabling/is/registry/RegistryBlackboardManagerImplTest.java @@ -0,0 +1,293 @@ +package eu.dnetlib.enabling.is.registry; // NOPMD + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNull; +import static org.junit.Assert.fail; +import static org.mockito.Matchers.anyString; +import static org.mockito.Matchers.argThat; +import static org.mockito.Matchers.eq; +import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.when; + +import java.io.IOException; +import java.io.StringWriter; + +import javax.xml.bind.JAXBException; +import javax.xml.transform.dom.DOMSource; +import javax.xml.xpath.XPathConstants; +import javax.xml.xpath.XPathFactory; + +import org.apache.commons.io.IOUtils; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.mockito.ArgumentMatcher; +import org.mockito.Mock; +import org.mockito.junit.MockitoJUnitRunner; +import org.w3c.dom.Element; +import org.w3c.dom.Node; + +import eu.dnetlib.enabling.is.lookup.rmi.ISLookUpException; +import eu.dnetlib.enabling.is.lookup.rmi.ISLookUpService; +import eu.dnetlib.enabling.is.registry.rmi.ISRegistryException; +import eu.dnetlib.enabling.is.registry.rmi.ISRegistryService; +import eu.dnetlib.enabling.tools.OpaqueResource; +import eu.dnetlib.enabling.tools.StringOpaqueResource; +import eu.dnetlib.enabling.tools.blackboard.ActionStatus; +import eu.dnetlib.enabling.tools.blackboard.BlackboardMessage; +import eu.dnetlib.enabling.tools.blackboard.BlackboardMessageImpl; +import eu.dnetlib.enabling.tools.blackboard.BlackboardParameter; +import eu.dnetlib.enabling.tools.blackboard.BlackboardParameterImpl; +import eu.dnetlib.miscutils.jaxb.JaxbFactory; + +/** + * RegistryBlackboardManagerImpl test. + * + * @author marko + * + */ +@RunWith(MockitoJUnitRunner.class) +public class RegistryBlackboardManagerImplTest { + + /** + * logger. + */ + private static final Log log = LogFactory.getLog(RegistryBlackboardManagerImplTest.class); // NOPMD by marko on 11/24/08 5:02 PM + + /** + * test message id. + */ + private static final String MSG_ID = "xxx"; + + /** + * fake message date. + */ + private static final String MSG_DATE = "2009-03-19T17:55:45+01:00"; + + /** + * service profile ID. + */ + private static final String PROF_ID = "123"; + + /** + * lookup service mock. + */ + @Mock + private transient ISLookUpService lookupService; + + /** + * registry service mock. + */ + @Mock + private transient ISRegistryService registryService; + + /** + * instance under test. + */ + private transient RegistryBlackboardManagerImpl manager; + + /** + * common setup. + * + * @throws JAXBException + * could happen + * @throws IOException + * shouldn't happen + * @throws ISLookUpException + * mock + */ + @Before + public void setUp() throws JAXBException, IOException, ISLookUpException { + manager = new RegistryBlackboardManagerImpl(); + manager.setIsLookup(lookupService); + manager.setRegistryService(registryService); + + manager.setMessageFactory(new JaxbFactory(BlackboardMessageImpl.class)); + + manager.setMessageDater(new RegistryBlackboardManagerImpl.MessageDater() { + + @Override + public String getCurrentDate() { + return MSG_DATE; + } + + @Override + public String getNumericStamp() { + return "1237483712.666000"; + } + }); + } + + /** + * add message. + * + * @throws JAXBException + * could happen + * @throws ISRegistryException + * could happen + * @throws IOException + * could happen + * @throws ISLookUpException + * mock + */ + @Test + public void testAddMessage() throws JAXBException, ISRegistryException, IOException, ISLookUpException { + final StringWriter serviceProfile = new StringWriter(); + IOUtils.copy(getClass().getResourceAsStream("serviceProfile.xml"), serviceProfile); + when(lookupService.getResourceProfile(PROF_ID)).thenReturn(serviceProfile.toString()); + + final BlackboardMessage message = manager.getMessageFactory().newInstance(); + message.setId(MSG_ID); + message.setDate(MSG_DATE); + message.setAction("CREATE"); + message.setActionStatus(ActionStatus.ASSIGNED); + + final BlackboardParameter param1 = new BlackboardParameterImpl(); + param1.setName("format"); + param1.setValue("DMF"); + message.getParameters().add(param1); + + final BlackboardParameter param2 = new BlackboardParameterImpl(); + param1.setName("id"); + param1.setValue(""); + message.getParameters().add(param2); + + manager.addMessage(PROF_ID, MSG_ID, manager.getMessageFactory().serialize(message)); + + verify(registryService).updateProfile(eq(PROF_ID), argThat(new ArgumentMatcher() { + + @Override + public boolean matches(final String argument) { + log.info("arg: " + argument); + + try { + final OpaqueResource updatedResource = new StringOpaqueResource((String) argument); + final Node messageNode = (Node) XPathFactory.newInstance().newXPath().evaluate("//BLACKBOARD/MESSAGE[last()]", + updatedResource.asDom(), XPathConstants.NODE); + + final BlackboardMessage updatedMessage = manager.getMessageFactory().parse(new DOMSource(messageNode)); + + assertEquals("messages should match", message, updatedMessage); + + final Element lastUpdated = (Element) XPathFactory.newInstance().newXPath().evaluate("//BLACKBOARD/LAST_REQUEST", + updatedResource.asDom(), XPathConstants.NODE); + assertEquals("stamp date", manager.getMessageDater().getNumericStamp(), lastUpdated.getAttribute("date")); + assertEquals("stamp message", MSG_ID, lastUpdated.getTextContent()); + } catch (Exception e) { + fail("got exception" + e); + } + return true; + } + }), anyString()); + } + + /** + * delete message. + * + * @throws ISLookUpException + * mock + * @throws IOException + * could happen + * @throws ISRegistryException + * mock + */ + @Test + public void testDeleteMessage() throws ISLookUpException, IOException, ISRegistryException { + final StringWriter serviceProfile = new StringWriter(); + + IOUtils.copy(getClass().getResourceAsStream("serviceProfileWithMessage.xml"), serviceProfile); + when(lookupService.getResourceProfile(PROF_ID)).thenReturn(serviceProfile.toString()); + + manager.deleteMessage(PROF_ID, MSG_ID); + + verify(registryService).updateProfile(eq(PROF_ID), argThat(new ArgumentMatcher() { + + @Override + public boolean matches(final String argument) { + log.debug("arg: " + argument); + + try { + final OpaqueResource updatedResource = new StringOpaqueResource((String) argument); + + final Node messageNode = (Node) XPathFactory.newInstance().newXPath().evaluate("//BLACKBOARD/MESSAGE[last()]", + updatedResource.asDom(), XPathConstants.NODE); + + assertNull("message should be deleted", messageNode); + } catch (Exception e) { + fail("got exception" + e); + } + return true; + } + }), anyString()); + + // assertNotNull("dummy", manager); + } + + /** + * replay message. + * + * @throws ISLookUpException + * mock + * @throws IOException + * shouldn't happen + * @throws ISRegistryException + * mock + * @throws JAXBException + * could happen + */ + @Test + public void testReplyMessage() throws ISLookUpException, IOException, ISRegistryException, JAXBException { + final StringWriter serviceProfile = new StringWriter(); + + IOUtils.copy(getClass().getResourceAsStream("serviceProfileWithMessage.xml"), serviceProfile); + when(lookupService.getResourceProfile(PROF_ID)).thenReturn(serviceProfile.toString()); + + final BlackboardMessage message = manager.getMessageFactory().newInstance(); + message.setId(MSG_ID); + message.setDate(MSG_DATE); + message.setAction("CREATE"); + message.setActionStatus(ActionStatus.ONGOING); + + final BlackboardParameter param1 = new BlackboardParameterImpl(); + param1.setName("format"); + param1.setValue("DMF"); + message.getParameters().add(param1); + + final BlackboardParameter param2 = new BlackboardParameterImpl(); + param1.setName("id"); + param1.setValue(""); + message.getParameters().add(param2); + + manager.replyMessage(PROF_ID, manager.getMessageFactory().serialize(message)); + + verify(registryService).updateProfile(eq(PROF_ID), argThat(new ArgumentMatcher() { + + @Override + public boolean matches(final String argument) { + log.info("arg: " + argument); + + try { + final OpaqueResource updatedResource = new StringOpaqueResource((String) argument); + + final Node messageNode = (Node) XPathFactory.newInstance().newXPath().evaluate("//BLACKBOARD/MESSAGE[last()]", + updatedResource.asDom(), XPathConstants.NODE); + + final BlackboardMessage updatedMessage = manager.getMessageFactory().parse(new DOMSource(messageNode)); + + assertEquals("messages should match", message, updatedMessage); + + final Element lastUpdated = (Element) XPathFactory.newInstance().newXPath().evaluate("//BLACKBOARD/LAST_RESPONSE", + updatedResource.asDom(), XPathConstants.NODE); + assertEquals("stamp date", manager.getMessageDater().getNumericStamp(), lastUpdated.getAttribute("date")); + assertEquals("stamp message", MSG_ID, lastUpdated.getTextContent()); + } catch (Exception e) { + fail("got exception" + e); + } + return true; + } + }), anyString()); + } + +} diff --git a/dnet-information-service/src/test/java/eu/dnetlib/enabling/is/registry/ResourceKindResolverChainTest.java b/dnet-information-service/src/test/java/eu/dnetlib/enabling/is/registry/ResourceKindResolverChainTest.java new file mode 100644 index 0000000..87cd4b4 --- /dev/null +++ b/dnet-information-service/src/test/java/eu/dnetlib/enabling/is/registry/ResourceKindResolverChainTest.java @@ -0,0 +1,36 @@ +package eu.dnetlib.enabling.is.registry; + +import static org.junit.Assert.*; + +import javax.xml.xpath.XPathExpressionException; + +import org.junit.Before; +import org.junit.Test; + +import com.google.common.collect.Lists; + +/** + * Test if the kind resolver chain correctly fails back. + * + * @author marko + * + */ +public class ResourceKindResolverChainTest { + + private ResourceKindResolverChain chain; + + @Before + public void setUp() throws Exception { + chain = new ResourceKindResolverChain(); + chain.setResolvers(Lists.newArrayList(new ApplicationProfileResourceKindResolver(), new NameBasedResourceKindResolver())); + } + + @Test + public void testChain() throws XPathExpressionException { + assertEquals("ServiceResources", chain.getNormalKindForType("MyServiceResourceType")); + assertEquals("PendingServiceResources", chain.getPendingKindForType("MyServiceResourceType")); + + assertEquals("RepositoryServiceResources", chain.getNormalKindForType("RepositoryServiceResourceType")); + assertEquals("PendingRepositoryResources", chain.getPendingKindForType("RepositoryServiceResourceType")); + } +} diff --git a/dnet-information-service/src/test/java/eu/dnetlib/enabling/is/registry/schema/OpaqueResourceValidatorImplTest.java b/dnet-information-service/src/test/java/eu/dnetlib/enabling/is/registry/schema/OpaqueResourceValidatorImplTest.java new file mode 100644 index 0000000..7c3acbe --- /dev/null +++ b/dnet-information-service/src/test/java/eu/dnetlib/enabling/is/registry/schema/OpaqueResourceValidatorImplTest.java @@ -0,0 +1,96 @@ +package eu.dnetlib.enabling.is.registry.schema; + +import static org.junit.Assert.assertNotNull; +import static org.mockito.Matchers.anyString; +import static org.mockito.Mockito.when; + +import javax.xml.XMLConstants; +import javax.xml.transform.stream.StreamSource; +import javax.xml.validation.Schema; +import javax.xml.validation.SchemaFactory; + +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.mockito.Mock; +import org.mockito.junit.MockitoJUnitRunner; +import org.xml.sax.SAXException; + +import eu.dnetlib.enabling.tools.StreamOpaqueResource; + +/** + * test schema validator. + * + * @author marko + * + */ +@RunWith(MockitoJUnitRunner.class) +public class OpaqueResourceValidatorImplTest { + + /** + * instance under test. + */ + private transient OpaqueResourceValidatorImpl validator; + + /** + * resource schema dao mock. + */ + @Mock + private transient ResourceSchemaDAO schemaDao; + + /** + * prepare tests. + * + * @throws SAXException + * schema related + */ + @Before + public void setUp() throws SAXException { + final SchemaFactory schemaFactory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI); + final Schema schema = schemaFactory.newSchema(new StreamSource(getClass().getResourceAsStream("schema.xsd"))); + + when(schemaDao.getResourceSchema(anyString())).thenReturn(schema); + + validator = new OpaqueResourceValidatorImpl(); + validator.setSchemaDao(schemaDao); + } + + /** + * test profile validation. + * + * @throws Exception + * could happen + */ + @Test + public void testValid() throws Exception { // NOPMD + validator.validate(new StreamOpaqueResource(getClass().getResourceAsStream("valid-profile.xml"))); + assertNotNull("dummy", validator); + } + + /** + * test profile validation. + * + * @throws Exception + * could happen + */ + @Test(expected = ValidationException.class) + public void testInvalid() throws Exception { // NOPMD + validator.validate(new StreamOpaqueResource(getClass().getResourceAsStream("invalid-profile.xml"))); + } + + /** + * Validate a profile which has an optional "any" element, possible non-standard behavior in java validator. + * + * @throws Exception could happen + */ + @Test + public void testValidAnyOptional() throws Exception { // NOPMD + final SchemaFactory schemaFactory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI); + final Schema schema = schemaFactory.newSchema(new StreamSource(getClass().getResourceAsStream("any-schema.xsd"))); + + when(schemaDao.getResourceSchema(anyString())).thenReturn(schema); + + validator.validate(new StreamOpaqueResource(getClass().getResourceAsStream("valid-any-optional.xml"))); + } + +} diff --git a/dnet-information-service/src/test/java/eu/dnetlib/enabling/is/registry/schema/ResourceSchemaDAOImplTest.java b/dnet-information-service/src/test/java/eu/dnetlib/enabling/is/registry/schema/ResourceSchemaDAOImplTest.java new file mode 100644 index 0000000..a24e262 --- /dev/null +++ b/dnet-information-service/src/test/java/eu/dnetlib/enabling/is/registry/schema/ResourceSchemaDAOImplTest.java @@ -0,0 +1,70 @@ +package eu.dnetlib.enabling.is.registry.schema; + +import static org.mockito.Matchers.anyString; +import static org.mockito.Mockito.when; + +import java.io.StringWriter; + +import org.apache.commons.io.IOUtils; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.mockito.Mock; +import org.mockito.junit.MockitoJUnitRunner; + +import eu.dnetlib.enabling.is.lookup.rmi.ISLookUpService; +import eu.dnetlib.enabling.tools.StreamOpaqueResource; + +/** + * test resource schema dao. + * + * @author marko + * + */ +@RunWith(MockitoJUnitRunner.class) +public class ResourceSchemaDAOImplTest { + + /** + * instance under test. + */ + private transient ResourceSchemaDAOImpl dao; + + /** + * lookup service. + */ + @Mock + private transient ISLookUpService lookupService; + + /** + * prepare common stuff. + * + * @throws Exception + * shouldn't happen + */ + @Before + public void setUp() throws Exception { + final StringWriter writer = new StringWriter(); + IOUtils.copy(getClass().getResourceAsStream("schema.xsd"), writer); + + when(lookupService.getResourceTypeSchema(anyString())).thenReturn(writer.getBuffer().toString()); + + dao = new ResourceSchemaDAOImpl(); + dao.setIsLookup(lookupService); + + } + + /** + * test dao by validating a resource. + * + * @throws Exception + * shouldn't happen + */ + @Test + public void testGetResourceSchema() throws Exception { // NOPMD + final OpaqueResourceValidatorImpl validator = new OpaqueResourceValidatorImpl(); + validator.setSchemaDao(dao); + + validator.validate(new StreamOpaqueResource(getClass().getResourceAsStream("valid-profile.xml"))); + } + +} diff --git a/dnet-information-service/src/test/java/eu/dnetlib/enabling/is/sn/AbstractSubscriptionRegistryTest.java b/dnet-information-service/src/test/java/eu/dnetlib/enabling/is/sn/AbstractSubscriptionRegistryTest.java new file mode 100644 index 0000000..5ef75c9 --- /dev/null +++ b/dnet-information-service/src/test/java/eu/dnetlib/enabling/is/sn/AbstractSubscriptionRegistryTest.java @@ -0,0 +1,75 @@ +package eu.dnetlib.enabling.is.sn; + +import static org.junit.Assert.*; // NOPMD + +import java.util.Collection; + +import org.junit.Before; +import org.junit.Test; + +import java.util.Arrays; + +/** + * abstract subscription registry test. + * + * @author marko + * + */ +public class AbstractSubscriptionRegistryTest { + + /** + * object under test. + */ + private transient AbstractSubscriptionRegistry registry; + + /** + * setup . + * + * @throws Exception + */ + @Before + public void setUp() { + registry = new AbstractSubscriptionRegistry() { + + @Override + protected Collection getAcceptedPrefixes() { + return Arrays.asList(new String[] { "CREATE", "DELETE", "UPDATE", "DEEP/SUB" }); + } + + }; + + } + + /** + * test prefixes. + */ + @Test + public void testMatchPrefix() { + final SubscriptionRequest sub = new SubscriptionRequest(); + + sub.setTopicExpression("CREATE/MyResourceType"); + assertNotNull("check create", registry.matchPrefix(sub)); + + sub.setTopicExpression("DELETE/MyResourceType"); + assertNotNull("check delete", registry.matchPrefix(sub)); + + sub.setTopicExpression("UPDATE/MyResourceType"); + assertNotNull("check update", registry.matchPrefix(sub)); + + sub.setTopicExpression("VERIFY/MyResourceType"); + assertNull("check non declared prefix", registry.matchPrefix(sub)); + + sub.setTopicExpression("UPDATED/MyResourceType"); + assertNull("check non delimited prefix", registry.matchPrefix(sub)); + + sub.setTopicExpression("UPDATE"); + assertNotNull("check only prefix", registry.matchPrefix(sub)); + + sub.setTopicExpression("DEEP/MyResourceType"); + assertNull("check deep", registry.matchPrefix(sub)); + + sub.setTopicExpression("DEEP/SUB/MyResourceType"); + assertNotNull("check deep sub", registry.matchPrefix(sub)); + } + +} diff --git a/dnet-information-service/src/test/java/eu/dnetlib/enabling/is/sn/MemoryNotificationInvocationLoggerTest.java b/dnet-information-service/src/test/java/eu/dnetlib/enabling/is/sn/MemoryNotificationInvocationLoggerTest.java new file mode 100644 index 0000000..1105a85 --- /dev/null +++ b/dnet-information-service/src/test/java/eu/dnetlib/enabling/is/sn/MemoryNotificationInvocationLoggerTest.java @@ -0,0 +1,114 @@ +package eu.dnetlib.enabling.is.sn; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; + +import java.util.Queue; + +import org.junit.Before; +import org.junit.Test; +import org.mockito.Mock; + +import eu.dnetlib.enabling.is.sn.NotificationInvocationLogger.Entry; +import eu.dnetlib.enabling.is.sn.NotificationInvocationLogger.Entry.Status; + +/** + * Memory notification logger test. + * + * @author marko + * + */ +public class MemoryNotificationInvocationLoggerTest { + + /** + * some size. + */ + private static final int SOME_SIZE = 300; + + /** + * instance under test. + */ + private transient MemoryNotificationInvocationLogger logger; + + /** + * message bock. + */ + @Mock + private transient NotificationMessage message; + + /** + * common setup. + * + * @throws Exception + * happens + */ + @Before + public void setUp() throws Exception { + logger = new MemoryNotificationInvocationLogger(); + } + + /** + * test logging and queue management. + */ + @Test + public void testStartLogging() { + final Queue queue = logger.getQueue(); + + assertEquals("queue", 0, queue.size()); + + final NotificationInvocationLogger.Entry entry = logger.startLogging(null, message); + + assertNotNull("got an entry", entry); + assertEquals("queue", 1, queue.size()); + + for (int i = 0; i < SOME_SIZE; i++) + logger.startLogging(null, message); + assertEquals("queue", logger.getSize(), queue.size()); + } + + /** + * test success. + */ + @Test + public void testSuccess() { + final NotificationInvocationLogger.Entry entry = logger.startLogging(null, message); + entry.success(); + + final Queue queue = logger.getQueue(); + final Entry entry2 = queue.remove(); + assertEquals("success", Status.Succeeded, entry2.getStatus()); + } + + /** + * test failure. + */ + @Test + public void testFailure() { + final NotificationInvocationLogger.Entry entry = logger.startLogging(null, message); + entry.failure(new IllegalStateException("dummy")); + + final Queue queue = logger.getQueue(); + final Entry entry2 = queue.remove(); + assertEquals("failure", Status.Failed, entry2.getStatus()); + + assertTrue("exception", entry2.getException() instanceof IllegalStateException); + } + + /** + * test ongoing. + */ + @Test + public void testOngoing() { + logger.startLogging(null, message); + + final Queue queue = logger.getQueue(); + final Entry entry2 = queue.remove(); + + assertEquals("queued", Status.Queued, entry2.getStatus()); + entry2.ongoing(); + assertEquals("ongoing", Status.Ongoing, entry2.getStatus()); + } + + +} diff --git a/dnet-information-service/src/test/java/eu/dnetlib/enabling/is/sn/NotificationDetectorImplTest.java b/dnet-information-service/src/test/java/eu/dnetlib/enabling/is/sn/NotificationDetectorImplTest.java new file mode 100644 index 0000000..b211329 --- /dev/null +++ b/dnet-information-service/src/test/java/eu/dnetlib/enabling/is/sn/NotificationDetectorImplTest.java @@ -0,0 +1,185 @@ +package eu.dnetlib.enabling.is.sn; + +import static org.junit.Assert.*; // NOPMD +import static org.mockito.Mockito.*; // NOPMD + +import java.util.ArrayList; +import java.util.List; + +import javax.xml.ws.wsaddressing.W3CEndpointReference; +import javax.xml.ws.wsaddressing.W3CEndpointReferenceBuilder; + +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.mockito.ArgumentMatcher; +import org.mockito.Mock; + +import eu.dnetlib.enabling.is.sn.resourcestate.ResourceStateSubscription; +import eu.dnetlib.enabling.is.sn.resourcestate.ResourceStateSubscriptionRegistry; +import eu.dnetlib.enabling.tools.OpaqueResource; +import org.mockito.junit.MockitoJUnitRunner; + +/** + * Test the default notification detector implementation. + * + * @author marko + * + */ +@RunWith(MockitoJUnitRunner.class) +public class NotificationDetectorImplTest { + + /** + * some type. + */ + private static final String SOME_TYPE = "SomeType"; + + /** + * some resource identifier. + */ + private static final String SOME_ID = "123"; + + /** + * Check if a message has the correct content. + * + * @author marko + * + */ + private final class CheckMessage implements ArgumentMatcher { + + /** + * prefix. + */ + private final transient String prefix; + + /** + * constructor. + * + * @param prefix topic prefix + */ + CheckMessage(final String prefix) { + super(); + this.prefix = prefix; + } + + /** + * {@inheritDoc} + * @see org.mockito.ArgumentMatcher#matches(java.lang.Object) + */ + @Override + public boolean matches(final NotificationMessage argument) { + return argument.getSubscriptionId() == subscription.getSubscriptionId() && argument.getResourceId().equals("123") + && argument.getTopic().equals(prefix + ".*.*"); + } + } + + /** + * instance under test. + */ + private transient NotificationDetectorImpl detector; + + /** + * registry mock. + */ + @Mock + private transient ResourceStateSubscriptionRegistry registry; + + /** + * sender mock. + */ + @Mock + private transient NotificationSender sender; + + /** + * resource mock. + */ + @Mock + private transient OpaqueResource resource; + + /** + * resource subscription. + */ + @Mock + private transient ResourceStateSubscription subscription; + + /** + * mock subscriber. + */ + private transient W3CEndpointReference subscriber; + + /** + * common. + */ + @Before + public void setUp() { + detector = new NotificationDetectorImpl(); + + detector.setRegistry(registry); + + detector.setSender(sender); + + final W3CEndpointReferenceBuilder builder = new W3CEndpointReferenceBuilder(); + builder.address("http://test.com/test/test"); + subscriber = builder.build(); + + final List subscriptions = new ArrayList(); + subscriptions.add(subscription); + when(registry.listMatchingSubscriptions(ResourceStateSubscription.PREFIX_CREATE, SOME_TYPE, SOME_ID)).thenReturn(subscriptions); + when(registry.listMatchingSubscriptions(ResourceStateSubscription.PREFIX_DELETE, SOME_TYPE, SOME_ID)).thenReturn(subscriptions); + when(registry.listMatchingSubscriptions(ResourceStateSubscription.PREFIX_UPDATE, SOME_TYPE, SOME_ID)).thenReturn(subscriptions); + + when(resource.getResourceId()).thenReturn(SOME_ID); + when(resource.getResourceType()).thenReturn(SOME_TYPE); + + when(subscription.getSubscriptionId()).thenReturn("sn123"); + when(subscription.getSubscriberAsEpr()).thenReturn(subscriber); + when(subscription.getXpath()).thenReturn(""); + when(subscription.getType()).thenReturn("*"); + when(subscription.getResourceId()).thenReturn("*"); + } + + /** + * test 'create'. + */ + @Test + public void testResourceCreated() { + when(subscription.getPrefix()).thenReturn(ResourceStateSubscription.PREFIX_CREATE); + + detector.resourceCreated(resource); + + verify(sender).send(eq(subscriber), argThat(new CheckMessage(ResourceStateSubscription.PREFIX_CREATE))); + + assertNotNull("dummy", sender); + } + + /** + * test 'delete'. + */ + @Test + public void testResourceDeleted() { + when(subscription.getPrefix()).thenReturn(ResourceStateSubscription.PREFIX_DELETE); + + detector.resourceDeleted(resource); + + verify(sender).send(eq(subscriber), argThat(new CheckMessage(ResourceStateSubscription.PREFIX_DELETE))); + + assertNotNull("dummy", sender); + } + + /** + * test 'update'. + */ + @Test + public void testResourceUpdated() { + when(subscription.getXpath()).thenReturn(null); + when(subscription.getPrefix()).thenReturn(ResourceStateSubscription.PREFIX_UPDATE); + + detector.resourceUpdated(resource, resource); + + verify(sender).send(eq(subscriber), argThat(new CheckMessage(ResourceStateSubscription.PREFIX_UPDATE))); + + assertNotNull("dummy", sender); + + } + +} diff --git a/dnet-information-service/src/test/java/eu/dnetlib/enabling/is/sn/NotificationTriggerImplTest.java b/dnet-information-service/src/test/java/eu/dnetlib/enabling/is/sn/NotificationTriggerImplTest.java new file mode 100644 index 0000000..22b682e --- /dev/null +++ b/dnet-information-service/src/test/java/eu/dnetlib/enabling/is/sn/NotificationTriggerImplTest.java @@ -0,0 +1,159 @@ +package eu.dnetlib.enabling.is.sn; + +import static org.junit.Assert.assertNotNull; +import static org.mockito.Matchers.argThat; +import static org.mockito.Mockito.verify; + +import java.io.IOException; +import java.io.StringReader; + +import javax.xml.parsers.DocumentBuilder; +import javax.xml.parsers.DocumentBuilderFactory; +import javax.xml.parsers.ParserConfigurationException; + +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.mockito.ArgumentMatcher; +import org.mockito.Mock; +import org.mockito.junit.MockitoJUnitRunner; +import org.w3c.dom.Document; +import org.xml.sax.InputSource; +import org.xml.sax.SAXException; + +import eu.dnetlib.enabling.is.sn.resourcestate.ResourceStateNotificationDetector; +import eu.dnetlib.enabling.tools.OpaqueResource; + +/** + * Test NotificationTriggerImpl, a simple forwarder. + * + * @author marko + * + */ +@RunWith(MockitoJUnitRunner.class) +public class NotificationTriggerImplTest { + + /** + * Check that the resource has the expected properties. + * + * @author marko + * + */ + private static final class MatchResource implements ArgumentMatcher { + /** + * {@inheritDoc} + * + * @see org.mockito.ArgumentMatcher#matches(java.lang.Object) + */ + @Override + public boolean matches(final OpaqueResource argument) { + return argument.getResourceId().equals("123") && argument.getResourceType().equals("type") && argument.getResourceKind().equals("kind"); + } + } + + /** + * test old document version. + */ + private static final String OLD_DOC = "
old
"; + + /** + * test old document version. + */ + private static final String NEW_DOC = "
new
"; + + /** + * class under test. + */ + private transient NotificationTriggerImpl trigger; + + /** + * detector mock. + */ + @Mock + private transient ResourceStateNotificationDetector detector; + + /** + * common preparation. + * + */ + @Before + public void setUp() { + trigger = new NotificationTriggerImpl(); + trigger.setName("test trigger"); + trigger.setDetector(detector); + } + + /** + * test created. + * + * @throws IOException + * never + * @throws SAXException + * never + * @throws ParserConfigurationException + * never + */ + + @Test + public void testCreated() throws ParserConfigurationException, SAXException, IOException { + trigger.created("someFile", "someCollection", parse(NEW_DOC)); + verify(detector).resourceCreated(argThat(new MatchResource())); + + assertNotNull("dummy", detector); + } + + /** + * test deleted. + * + * @throws IOException + * never + * @throws SAXException + * never + * @throws ParserConfigurationException + * never + */ + @Test + public void testDeleted() throws ParserConfigurationException, SAXException, IOException { + trigger.deleted("someFile", "someCollection", parse(OLD_DOC)); + verify(detector).resourceDeleted(argThat(new MatchResource())); + + assertNotNull("dummy", detector); + } + + /** + * test updated. + * + * @throws IOException + * never + * @throws SAXException + * never + * @throws ParserConfigurationException + * never + */ + @Test + public void testUpdated() throws ParserConfigurationException, SAXException, IOException { + trigger.updated("someFile", "someCollection", parse(OLD_DOC), parse(NEW_DOC)); + verify(detector).resourceUpdated(argThat(new MatchResource()), argThat(new MatchResource())); + + assertNotNull("dummy", detector); + } + + /** + * helper method. + * + * @param source + * xml source + * @return DOM object + * @throws ParserConfigurationException + * shouldn't happen + * @throws SAXException + * shouldn't happen + * @throws IOException + * shouldn't happen + */ + private Document parse(final String source) throws ParserConfigurationException, SAXException, IOException { + final DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder(); + return builder.parse(new InputSource(new StringReader(source))); + } + +} diff --git a/dnet-information-service/src/test/java/eu/dnetlib/enabling/is/sn/resourcestate/AbstractResourceStateSubscriptionDAOImplTest.java b/dnet-information-service/src/test/java/eu/dnetlib/enabling/is/sn/resourcestate/AbstractResourceStateSubscriptionDAOImplTest.java new file mode 100644 index 0000000..1ba0e74 --- /dev/null +++ b/dnet-information-service/src/test/java/eu/dnetlib/enabling/is/sn/resourcestate/AbstractResourceStateSubscriptionDAOImplTest.java @@ -0,0 +1,263 @@ +package eu.dnetlib.enabling.is.sn.resourcestate; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; + +import java.util.Collection; + +import org.apache.commons.beanutils.BeanComparator; +import org.junit.Before; +import org.junit.Ignore; +import org.junit.Test; + +/** + * testing MemoryResourceStateSubscriptionDAOImpl. + * + * @author marko + * + */ +public abstract class AbstractResourceStateSubscriptionDAOImplTest { + + /** + * update topic prefix. + */ + private static final String UPDATE = "UPDATE"; + + /** + * create topic prefix. + */ + private static final String CREATE = "CREATE"; + + /** + * test resource type. + */ + private static final String SOME_TYPE = "someType"; + + /** + * test other resource type. + */ + private static final String SOME_OTHER_TYPE = "someOtherType"; + + /** + * test resource id. + */ + private static final String SOME_ID = "123"; + + /** + * class under test. + */ + private ResourceStateSubscriptionDAO dao; + + /** + * test subscription. + */ + private transient ResourceStateSubscription sub; + + /** + * test subscription. + */ + private transient ResourceStateSubscription sub2; + + /** + * test subscription. + */ + private transient ResourceStateSubscription sub3; + + /** + * test subscription. + */ + private transient ResourceStateSubscription sub4; + + /** + * test subscription. + */ + private transient ResourceStateSubscription sub5; + + /** + * common setup. + */ + @Before + public void setUp() { + prepareDao(); + + sub = new ResourceStateSubscription(); + sub.setSubscriptionId("sn123"); + sub.setPrefix(CREATE); + sub.setType(SOME_TYPE); + sub.setXpath("somePath"); + + sub2 = new ResourceStateSubscription(); + sub2.setSubscriptionId("sn666"); + sub2.setPrefix(UPDATE); + sub2.setType(SOME_TYPE); + sub2.setXpath("somePath"); + + sub3 = new ResourceStateSubscription(); + sub3.setSubscriptionId("sn000"); + sub3.setPrefix(CREATE); + sub3.setType(SOME_TYPE); + sub3.setXpath("somePath"); + + sub4 = new ResourceStateSubscription(); + sub4.setSubscriptionId("sn987"); + sub4.setPrefix(CREATE); + sub4.setType("*"); + sub4.setResourceId(SOME_ID); + + sub5 = new ResourceStateSubscription(); + sub5.setSubscriptionId("sn888"); + sub5.setPrefix(UPDATE); + sub5.setType(SOME_TYPE); + sub5.setResourceId(SOME_ID); + } + + /** + * subsclasses should implement this in order to plug their implementation of the dao. + */ + protected abstract void prepareDao(); + + /** + * compare two subscriptions. + * + * @param left + * lhs + * @param right + * rhs + * @return true if the objects are equal + */ + protected boolean compare(final ResourceStateSubscription left, final ResourceStateSubscription right) { + return new BeanComparator("subscriptionId").compare(left, right) == 0 && new BeanComparator("prefix").compare(left, right) == 0 + && new BeanComparator("type").compare(left, right) == 0 && new BeanComparator("resourceId").compare(left, right) == 0; + } + + /** + * test list subscriptions for prefix and type. + */ + @Test + public void testListSubscriptionsStringString() { + dao.addSubscription(sub); + dao.addSubscription(sub2); + dao.addSubscription(sub3); + dao.addSubscription(sub4); + + for (ResourceStateSubscription s : dao.listSubscriptions(UPDATE, SOME_TYPE, SOME_ID)) + assertTrue("check subscription", compare(s, sub2)); + + assertEquals("check size", 2, dao.listSubscriptions(CREATE, SOME_TYPE, "*").size()); + + for (ResourceStateSubscription s : dao.listSubscriptions(CREATE, "*", SOME_ID)) + assertTrue("check subscription star", compare(s, sub4)); + + assertEquals("check size star", 1, dao.listSubscriptions(CREATE, "*", SOME_ID).size()); + } + + /** + * enable this test when the manual merging of subscriptions is removed from the ResourceStateSubscriptionRegistry. + * The ResourceState subscription DAO alone should be able to quickly resolve wildcards. + */ + @Test + @Ignore + public void testListSubscriptionsStar() { + dao.addSubscription(sub); + dao.addSubscription(sub2); + dao.addSubscription(sub3); + dao.addSubscription(sub4); + + for (ResourceStateSubscription s : dao.listSubscriptions(CREATE, SOME_OTHER_TYPE, SOME_ID)) { + assertTrue("check subscription fixed star", compare(s, sub4)); + } + + assertEquals("check size fixed tar", 1, dao.listSubscriptions(CREATE, SOME_OTHER_TYPE, SOME_ID).size()); + + } + + /** + * test get a specific subscription by id. + */ + @Test + public void testGetSubscription() { + + dao.addSubscription(sub); + + assertNotNull("check that it's registered", dao.getSubscription(sub.getSubscriptionId())); + } + + /** + * test list all subscriptions. + */ + @Test + public void testListSubscriptions() { + dao.addSubscription(sub); + for (ResourceStateSubscription s : dao.listSubscriptions()) + assertTrue("check subscription", compare(s, sub)); + + assertEquals("check size", 1, dao.listSubscriptions().size()); + } + + /** + * test specific subscription. + */ + @Test + public void testSpecificSubscription() { + dao.addSubscription(sub5); + + final Collection res = dao.listSubscriptions(UPDATE, SOME_TYPE, SOME_ID); + assertEquals("only one", 1, res.size()); + + assertNotNull("", res.iterator().next()); + } + + /** + * test list subscriptions for a given prefix. + */ + @Test + public void testListSubscriptionsString() { + dao.addSubscription(sub); + dao.addSubscription(sub2); + + for (ResourceStateSubscription s : dao.listSubscriptions(UPDATE)) + assertTrue("check subscription", compare(s, sub2)); + } + + public ResourceStateSubscriptionDAO getDao() { + return dao; + } + + public void setDao(final ResourceStateSubscriptionDAO dao) { + this.dao = dao; + } + + public ResourceStateSubscription getSub() { + return sub; + } + + public void setSub(final ResourceStateSubscription sub) { + this.sub = sub; + } + + public ResourceStateSubscription getSub2() { + return sub2; + } + + public void setSub2(final ResourceStateSubscription sub2) { + this.sub2 = sub2; + } + + public ResourceStateSubscription getSub3() { + return sub3; + } + + public void setSub3(final ResourceStateSubscription sub3) { + this.sub3 = sub3; + } + + public ResourceStateSubscription getSub4() { + return sub4; + } + + public void setSub4(final ResourceStateSubscription sub4) { + this.sub4 = sub4; + } + +} diff --git a/dnet-information-service/src/test/java/eu/dnetlib/enabling/is/sn/resourcestate/AbstractResourceStateSubscriptionRegistryTest.java b/dnet-information-service/src/test/java/eu/dnetlib/enabling/is/sn/resourcestate/AbstractResourceStateSubscriptionRegistryTest.java new file mode 100644 index 0000000..3fb2933 --- /dev/null +++ b/dnet-information-service/src/test/java/eu/dnetlib/enabling/is/sn/resourcestate/AbstractResourceStateSubscriptionRegistryTest.java @@ -0,0 +1,165 @@ +package eu.dnetlib.enabling.is.sn.resourcestate; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; + +import java.util.Collection; + +import eu.dnetlib.test.utils.EPRTestUtil; +import org.junit.Before; +import org.junit.Test; + +import eu.dnetlib.enabling.is.sn.SubscriptionRequest; +import eu.dnetlib.enabling.is.sn.rmi.SubscriptionRequestRejectedException; + +/** + * Common tests for resource state subscription registry tests. + * + * @author marko + * + */ +public abstract class AbstractResourceStateSubscriptionRegistryTest { + + /** + * star. + */ + private static final String STAR = "*"; + + /** + * create topic prefix. + */ + private static final String CREATE = "CREATE"; + + /** + * test resource type. + */ + private static final String SOME_TYPE = "someType"; + + /** + * test other resource type. + */ + private static final String SOME_OTHER_TYPE = "someOtherType"; + + /** + * test resource id. + */ + private static final String SOME_ID = "sub123"; + + /** + * instance under test. + */ + private ResourceStateSubscriptionRegistry registry; + + /** + * test subscritpion request. + */ + private transient SubscriptionRequest sub; + + /** + * setup registry. subclasses should set the dao. + */ + @Before + public void setUpRegistry() { + registry = new ResourceStateSubscriptionRegistry(); + + final SubscriptionRequestFilter filter = new SubscriptionRequestFilter(); + filter.setActive(true); + registry.setSubscriptionRequestFilter(filter); + + setUpDao(); + + sub = new SubscriptionRequest(SOME_ID, EPRTestUtil.getTestEpr(), "CREATE/*/*/someXpath", 0); + } + + /** + * test subscription registration. + * + * @throws SubscriptionRequestRejectedException + */ + @Test + public void testRegisterSubscription() throws SubscriptionRequestRejectedException { + registry.registerSubscription(sub); + + final Collection res = registry.listMatchingSubscriptions(CREATE, STAR, STAR); + for (final ResourceStateSubscription r : res) { + assertEquals("check add subscription", SOME_ID, r.getSubscriptionId()); + } + + assertEquals("check that is really added", 1, res.size()); + } + + /** + * test match. + * + * @throws SubscriptionRequestRejectedException + */ + @Test + public void testMatch() throws SubscriptionRequestRejectedException { + registry.registerSubscription(sub); + + ResourceStateSubscription re1 = null; // NOPMD + ResourceStateSubscription re2 = null; // NOPMD + + final Collection res = registry.listMatchingSubscriptions(CREATE, SOME_TYPE, STAR); + for (final ResourceStateSubscription r : res) { + re1 = r; // NOPMD + assertEquals("check match subscription", SOME_ID, r.getSubscriptionId()); + } + + assertEquals("check that only one matched", 1, res.size()); + + final Collection res2 = registry.listMatchingSubscriptions(CREATE, SOME_OTHER_TYPE, STAR); + for (final ResourceStateSubscription r : res2) { + re2 = r; // NOPMD + assertEquals("check match subscription", SOME_ID, r.getSubscriptionId()); + } + + assertEquals("check that only one matched", 1, res2.size()); + assertEquals("check that the same subscription is returned", re1, re2); + } + + /** + * multiple subscriptions should be registered only once. + * + * @throws SubscriptionRequestRejectedException + */ + @Test + public void testMultiple() throws SubscriptionRequestRejectedException { + final String subId = registry.registerSubscription(sub); + final String subId2 = registry.registerSubscription(sub); + + assertEquals("avoid duplicates", subId, subId2); + } + + /** + * test unsubscribe. + * + * @throws SubscriptionRequestRejectedException + */ + @Test + public void testUnsubscribe() throws SubscriptionRequestRejectedException { + final String subId = registry.registerSubscription(sub); + final boolean res = registry.unsubscribe(subId); + + assertTrue("unsubscribed", res); + + final boolean res2 = registry.unsubscribe(subId); + + assertFalse("not unsubscribed", res2); + } + + /** + * subclasses should implement this with a specific instance of the dao. + */ + protected abstract void setUpDao(); + + public ResourceStateSubscriptionRegistry getRegistry() { + return registry; + } + + public void setRegistry(final ResourceStateSubscriptionRegistry registry) { + this.registry = registry; + } + +} diff --git a/dnet-information-service/src/test/java/eu/dnetlib/enabling/is/sn/resourcestate/MemoryResourceStateSubscriptionDAOImplTest.java b/dnet-information-service/src/test/java/eu/dnetlib/enabling/is/sn/resourcestate/MemoryResourceStateSubscriptionDAOImplTest.java new file mode 100644 index 0000000..aac0925 --- /dev/null +++ b/dnet-information-service/src/test/java/eu/dnetlib/enabling/is/sn/resourcestate/MemoryResourceStateSubscriptionDAOImplTest.java @@ -0,0 +1,51 @@ +package eu.dnetlib.enabling.is.sn.resourcestate; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNull; + +import org.junit.Test; + +/** + * Concrete resourcestate subscription dao test for memory backed subscription store. + * + * @author marko + * + */ +public class MemoryResourceStateSubscriptionDAOImplTest extends AbstractResourceStateSubscriptionDAOImplTest { + + /** + * instance under test (of the specific type). + */ + private transient MemoryResourceStateSubscriptionDAOImpl memdao; + + /** + * {@inheritDoc} + * @see eu.dnetlib.enabling.is.sn.resourcestate.AbstractResourceStateSubscriptionDAOImplTest#prepareDao() + */ + @Override + protected void prepareDao() { + memdao = new MemoryResourceStateSubscriptionDAOImpl(); + setDao(memdao); + } + + /** + * test add subscription. + */ + @Test + public void testAddSubscription() { + assertNull("not registered", getDao().getSubscription(getSub().getSubscriptionId())); + + getDao().addSubscription(getSub()); + assertEquals("check that sub is registered", getSub(), memdao.getById().get(getSub().getSubscriptionId())); + + getDao().addSubscription(getSub2()); + assertEquals("check that sub2 is registered", getSub2(), memdao.getById().get(getSub2().getSubscriptionId())); + + getDao().addSubscription(getSub3()); + assertEquals("check that sub4 is registered", getSub3(), memdao.getById().get(getSub3().getSubscriptionId())); + + getDao().addSubscription(getSub4()); + assertEquals("check that sub4is registered", getSub4(), memdao.getById().get(getSub4().getSubscriptionId())); + } + +} diff --git a/dnet-information-service/src/test/java/eu/dnetlib/enabling/is/sn/resourcestate/MemoryResourceStateSubscriptionRegistryTest.java b/dnet-information-service/src/test/java/eu/dnetlib/enabling/is/sn/resourcestate/MemoryResourceStateSubscriptionRegistryTest.java new file mode 100644 index 0000000..1900532 --- /dev/null +++ b/dnet-information-service/src/test/java/eu/dnetlib/enabling/is/sn/resourcestate/MemoryResourceStateSubscriptionRegistryTest.java @@ -0,0 +1,22 @@ +package eu.dnetlib.enabling.is.sn.resourcestate; + + +/** + * Perform ResourceStateSubscriptionRegistryTest tests on a memory backed resource state subscription dao instance. + * + * @author marko + * + */ +public class MemoryResourceStateSubscriptionRegistryTest extends AbstractResourceStateSubscriptionRegistryTest { // NOPMD + + + /** + * {@inheritDoc} + * @see eu.dnetlib.enabling.is.sn.resourcestate.AbstractResourceStateSubscriptionRegistryTest#setUpDao() + */ + @Override + protected void setUpDao() { + getRegistry().setSubscriptionDao(new MemoryResourceStateSubscriptionDAOImpl()); + } + +} diff --git a/dnet-information-service/src/test/java/eu/dnetlib/enabling/is/sn/resourcestate/ResourceStateSubscriptionRegistryTest.java b/dnet-information-service/src/test/java/eu/dnetlib/enabling/is/sn/resourcestate/ResourceStateSubscriptionRegistryTest.java new file mode 100644 index 0000000..3352174 --- /dev/null +++ b/dnet-information-service/src/test/java/eu/dnetlib/enabling/is/sn/resourcestate/ResourceStateSubscriptionRegistryTest.java @@ -0,0 +1,179 @@ +package eu.dnetlib.enabling.is.sn.resourcestate; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; // NOPMD +import static org.mockito.Matchers.argThat; +import static org.mockito.Mockito.verify; // NOPMD + +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.mockito.ArgumentMatcher; +import org.mockito.Mock; +import org.mockito.junit.MockitoJUnitRunner; + +import eu.dnetlib.enabling.is.sn.SubscriptionRequest; +import eu.dnetlib.enabling.is.sn.rmi.SubscriptionRequestRejectedException; + +/** + * test ResourceStateSubscriptionRegistryTest. + * + * @author marko + * + */ +@RunWith(MockitoJUnitRunner.class) +public class ResourceStateSubscriptionRegistryTest { + + /** + * matches. + * + * @author marko + * + */ + public static class MatchSubscription implements ArgumentMatcher { + + /** + * prefix. + */ + private final transient String prefix; + + /** + * type. + */ + private final transient String type; + + /** + * resource id. + */ + private final transient String resId; + + /** + * create a new match subscription checker for a given prefix and a given type. + * + * @param prefix + * prefix + * @param type + * type + * @param resId + * resource id + */ + MatchSubscription(final String prefix, final String type, final String resId) { + super(); + this.prefix = prefix; + this.type = type; + this.resId = resId; + } + + /** + * {@inheritDoc} + * + * @see org.mockito.ArgumentMatcher#matches(java.lang.Object) + */ + @Override + public boolean matches(final ResourceStateSubscription sub) { + return sub.getPrefix().equals(this.prefix) && sub.getType().equals(this.type) && sub.getResourceId().equals(this.resId); + } + + } + + /** + * object under test. + */ + private transient ResourceStateSubscriptionRegistry registry; + + /** + * DAO mock. + */ + @Mock + private transient ResourceStateSubscriptionDAO subscriptionDao; + + /** + * subscription request. + */ + private transient SubscriptionRequest sub; + + /** + * common setup. + */ + @Before + public void setUp() { + registry = new ResourceStateSubscriptionRegistry(); + registry.setSubscriptionDao(subscriptionDao); + + final SubscriptionRequestFilter filter = new SubscriptionRequestFilter(); + filter.setActive(true); + registry.setSubscriptionRequestFilter(filter); + + sub = new SubscriptionRequest(); + } + + /** + * test registration. + * + * @throws SubscriptionRequestRejectedException + */ + @Test + public void testRegisterSubscription() throws SubscriptionRequestRejectedException { + sub.setTopicExpression("CREATE/MyResourceType/123/some/path"); + registry.registerSubscription(sub); + verify(subscriptionDao).addSubscription(argThat(new MatchSubscription("CREATE", "MyResourceType", "123"))); + + assertNotNull("dummy", subscriptionDao); + } + + /** + * test registration. + * + * @throws SubscriptionRequestRejectedException + */ + @Test(expected = SubscriptionRequestRejectedException.class) + public void testRegisterSubscriptionReject1() throws SubscriptionRequestRejectedException { + + sub.setTopicExpression("UPDATE/OtherResourceType"); + registry.registerSubscription(sub); + verify(subscriptionDao).addSubscription(argThat(new MatchSubscription("UPDATE", "OtherResourceType", "*"))); + + assertNotNull("dummy", subscriptionDao); + } + + /** + * test registration. + * + * @throws SubscriptionRequestRejectedException + */ + @Test(expected = SubscriptionRequestRejectedException.class) + public void testRegisterSubscriptionReject2() throws SubscriptionRequestRejectedException { + + sub.setTopicExpression("DELETE/*"); + registry.registerSubscription(sub); + verify(subscriptionDao).addSubscription(argThat(new MatchSubscription("DELETE", "*", "*"))); + + assertNotNull("dummy", subscriptionDao); + } + + /** + * test registration. + * + * @throws SubscriptionRequestRejectedException + */ + @Test(expected = SubscriptionRequestRejectedException.class) + public void testRegisterSubscriptionReject3() throws SubscriptionRequestRejectedException { + + sub.setTopicExpression("CREATE"); + registry.registerSubscription(sub); + verify(subscriptionDao).addSubscription(argThat(new MatchSubscription("CREATE", "*", "*"))); + + assertNotNull("dummy", subscriptionDao); + } + + /** + * test match id. + */ + @Test + public void testMatchId() { + assertEquals("check pure id", "1234123", registry.matchId("1234123").getPrefix()); + assertEquals("check with suffix", "1234123", registry.matchId("1234123/blabla/blabla").getPrefix()); + assertEquals("check suffix", "/blabla/blabla", registry.matchId("1234123/blabla/blabla").getRest()); + } + +} diff --git a/dnet-information-service/src/test/java/eu/dnetlib/enabling/is/sn/resourcestate/hib/HibernateResourceStateSubscriptionDAOImplTest.java b/dnet-information-service/src/test/java/eu/dnetlib/enabling/is/sn/resourcestate/hib/HibernateResourceStateSubscriptionDAOImplTest.java new file mode 100644 index 0000000..d998623 --- /dev/null +++ b/dnet-information-service/src/test/java/eu/dnetlib/enabling/is/sn/resourcestate/hib/HibernateResourceStateSubscriptionDAOImplTest.java @@ -0,0 +1,106 @@ +package eu.dnetlib.enabling.is.sn.resourcestate.hib; + +import java.util.Collection; +import javax.annotation.Resource; + +import eu.dnetlib.enabling.is.sn.resourcestate.AbstractResourceStateSubscriptionDAOImplTest; +import eu.dnetlib.enabling.is.sn.resourcestate.ResourceStateSubscription; +import eu.dnetlib.test.utils.EPRTestUtil; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.junit.After; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.dao.DataIntegrityViolationException; +import org.springframework.test.annotation.DirtiesContext; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; + +import static org.junit.Assert.*; + +/** + * test HibernateResourceStateSubscriptionDAOImplTest. + * + * @author marko + * + */ +@RunWith(SpringJUnit4ClassRunner.class) +@ContextConfiguration +public class HibernateResourceStateSubscriptionDAOImplTest extends AbstractResourceStateSubscriptionDAOImplTest { + /** + * logger. + */ + private static final Log log = LogFactory.getLog(HibernateResourceStateSubscriptionDAOImplTest.class); // NOPMD by marko on 11/24/08 5:02 PM + + /** + * instance under test. + */ + @Resource + private transient HibernateResourceStateSubscriptionDAOImpl hibdao; + + /** + * cleanup db. + */ + @After + public void tearDown() { + final Collection subs = hibdao.listSubscriptions(); + if (subs != null) { + subs.forEach(r -> hibdao.removeSubscription(r.getSubscriptionId())); + } + } + + /** + * test addition. + */ + @Test + public void testAddSubscription() { + assertNotNull("check dao", getDao()); + + getDao().addSubscription(getSub()); + + log.info("sub id: " + getSub().getSubscriptionId()); + } + + /** + * test encoding of endpoint references. + */ + @Test + @DirtiesContext + public void testEndpoint() { + getSub().setSubscriber(EPRTestUtil.getTestEpr()); + + getDao().addSubscription(getSub()); + + final ResourceStateSubscription fresh = getDao().getSubscription(getSub().getSubscriptionId()); + + assertNotNull("check", fresh); + assertTrue("equals", compare(getSub(), fresh)); + + assertNotNull("epr", getSub().getSubscriber()); + assertNotNull("fetched epr", fresh.getSubscriber()); + + assertEquals("eprs", getSub().getSubscriber().toString(), fresh.getSubscriber().toString()); + } + + /** + * multiple subscriptions should not be allowed. + */ + @Test(expected = DataIntegrityViolationException.class) + @DirtiesContext + public void testMultiple() { // NOPMD + getDao().addSubscription(getSub()); + getDao().addSubscription(getSub()); + } + + + /** + * {@inheritDoc} + * + * @see eu.dnetlib.enabling.is.sn.resourcestate.AbstractResourceStateSubscriptionDAOImplTest#prepareDao() + */ + @Override + protected void prepareDao() { + setDao(hibdao); + } + +} diff --git a/dnet-information-service/src/test/java/eu/dnetlib/enabling/is/sn/resourcestate/hib/HibernateResourceStateSubscriptionRegistryTest.java b/dnet-information-service/src/test/java/eu/dnetlib/enabling/is/sn/resourcestate/hib/HibernateResourceStateSubscriptionRegistryTest.java new file mode 100644 index 0000000..e44b296 --- /dev/null +++ b/dnet-information-service/src/test/java/eu/dnetlib/enabling/is/sn/resourcestate/hib/HibernateResourceStateSubscriptionRegistryTest.java @@ -0,0 +1,53 @@ +package eu.dnetlib.enabling.is.sn.resourcestate.hib; + +import java.util.Collection; + +import javax.annotation.Resource; + +import org.junit.After; +import org.junit.runner.RunWith; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; + +import eu.dnetlib.enabling.is.sn.resourcestate.AbstractResourceStateSubscriptionRegistryTest; +import eu.dnetlib.enabling.is.sn.resourcestate.ResourceStateSubscription; +import eu.dnetlib.enabling.is.sn.resourcestate.ResourceStateSubscriptionDAO; + +/** + * Perform ResourceStateSubscriptionRegistryTest tests on a hibernate backed resource state subscription dao instance. + * + * @author marko + * + */ +@RunWith(SpringJUnit4ClassRunner.class) +@ContextConfiguration(locations = { "HibernateResourceStateSubscriptionDAOImplTest-context.xml" }) +public class HibernateResourceStateSubscriptionRegistryTest extends AbstractResourceStateSubscriptionRegistryTest { // NOPMD + + /** + * hibernate subscription dao. + */ + @Resource + private transient ResourceStateSubscriptionDAO dao; + + /** + * cleanup db. hsql doesn't recreate the database on spring context reload. + */ + @After + public void tearDown() { + final Collection subs = dao.listSubscriptions(); + if (subs != null) + for (ResourceStateSubscription r : subs) + dao.removeSubscription(r.getSubscriptionId()); + } + + /** + * {@inheritDoc} + * + * @see eu.dnetlib.enabling.is.sn.resourcestate.AbstractResourceStateSubscriptionRegistryTest#setUpDao() + */ + @Override + protected void setUpDao() { + getRegistry().setSubscriptionDao(dao); + } + +} diff --git a/dnet-information-service/src/test/java/eu/dnetlib/enabling/is/store/ISStoreServiceImplTest.java b/dnet-information-service/src/test/java/eu/dnetlib/enabling/is/store/ISStoreServiceImplTest.java new file mode 100644 index 0000000..1908d87 --- /dev/null +++ b/dnet-information-service/src/test/java/eu/dnetlib/enabling/is/store/ISStoreServiceImplTest.java @@ -0,0 +1,70 @@ +package eu.dnetlib.enabling.is.store; // NOPMD + +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; +import static org.mockito.Matchers.anyString; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.when; + +import java.util.Iterator; +import java.util.List; + +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.mockito.Mock; +import org.mockito.junit.MockitoJUnitRunner; +import org.xmldb.api.base.XMLDBException; + +import eu.dnetlib.enabling.is.store.rmi.ISStoreException; +import eu.dnetlib.xml.database.XMLDatabase; + +/** + * test the ISStore service. + * + * @author marko + * + */ +@RunWith(MockitoJUnitRunner.class) +public class ISStoreServiceImplTest { + + /** + * instance under test. + */ + private transient ISStoreServiceImpl storeService; + + /** + * xml database mock. + */ + @Mock + private transient XMLDatabase xmlDatabase; + + /** + * setup class under test. + */ + @Before + public void setUp() { + storeService = new ISStoreServiceImpl(); + storeService.setXmlDatabase(xmlDatabase); + } + + /** + * test that quick search profile returns null instead of an empty list. + * + * @throws XMLDBException shouldn't happen + * @throws ISStoreException shouldn't happen + */ + @Test + public void testQuickSearchXML() throws XMLDBException, ISStoreException { + final Iterator rset = mock(Iterator.class); + when(rset.hasNext()).thenReturn(true, false); + when(xmlDatabase.xquery(anyString())).thenReturn(rset); + + final List res = storeService.quickSearchXML("someQuery"); + + assertNotNull("empty result not null", res); + assertFalse("empty result is empty", res.isEmpty()); + } + +} diff --git a/dnet-information-service/src/test/java/eu/dnetlib/enabling/is/store/ISStoreServiceTest.java b/dnet-information-service/src/test/java/eu/dnetlib/enabling/is/store/ISStoreServiceTest.java new file mode 100644 index 0000000..f31a5e2 --- /dev/null +++ b/dnet-information-service/src/test/java/eu/dnetlib/enabling/is/store/ISStoreServiceTest.java @@ -0,0 +1,266 @@ +package eu.dnetlib.enabling.is.store; // NOPMD + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import eu.dnetlib.enabling.is.store.rmi.ISStoreException; +import eu.dnetlib.enabling.is.store.rmi.ISStoreService; +import eu.dnetlib.xml.database.XMLDatabase; +import org.junit.After; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.mockito.Mock; +import org.mockito.junit.MockitoJUnitRunner; +import org.xmldb.api.base.XMLDBException; + +import static org.junit.Assert.*; +import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.when; + +/** + * test the ISStore service. + * + * @author marko + * + */ +@RunWith(MockitoJUnitRunner.class) +public class ISStoreServiceTest { // NOPMD by marko on 11/24/08 4:54 PM + + /** + * root collection name for mocked xmldb. + */ + private static final String ROOT_COLLECTION = "/db"; + /** + * test resultset id. + */ + private static final String SOME_RS_ID = "someRsId"; + /** + * some test query. + */ + private static final String SOME_QUERY = "someQuery"; + /** + * a test collection name. + */ + private static final String TEST_COLLECTION = "testCollection"; + /** + * a test string value. + */ + private static final String ONE = "one"; + /** + * another test resultset value. + */ + private static final String TWO = "two"; + /** + * name of the a test file. + */ + private static final String TEST_FILE = "testFile"; + + /** + * the ISStoreService under test. + */ + private transient ISStoreService store = null; + /** + * the ISStoreService under test. Used only in setUp/tearDown(). + */ + private transient ISStoreServiceImpl ismo = null; + /** + * the XMLDatabase injected into the ISStore. + */ + @Mock + private transient XMLDatabase xdb; + + /** + * setup the ISStore instance, injecting all the dependencies. + * + * @throws Exception + * shouldn't throw + */ + @Before + public void setUp() throws Exception { + ismo = new ISStoreServiceImpl(); + + ismo.setXmlDatabase(xdb); + ismo.start(); + + store = ismo; + } + + /** + * respect the service lifecycle. + */ + @After + public void tearDown() { + ismo.stop(); + } + + /** + * create collection. + * + * @throws ISStoreException + * shouldn't happen + * @throws XMLDBException + * shouldn't happen + */ + @Test + public void testCreateFileColl() throws ISStoreException, XMLDBException { + assertTrue("create collection", store.createFileColl(TEST_COLLECTION)); + verify(xdb).createCollection(TEST_COLLECTION); + } + + /** + * delete collection. + * + * @throws XMLDBException + * shouldn't happen + * @throws ISStoreException + * shouldn't happen + */ + @Test + public void testDeleteFileColl() throws XMLDBException, ISStoreException { + assertTrue("delete collection", store.deleteFileColl(TEST_COLLECTION)); + verify(xdb).removeCollection(TEST_COLLECTION); + } + + /** + * delete an xml file. + * + * @throws ISStoreException + * shouldn't happen + * @throws XMLDBException + * shouldn't happen + */ + @Test + public void testDeleteXML() throws ISStoreException, XMLDBException { + when(xdb.remove(TEST_FILE, TEST_COLLECTION)).thenReturn(true); + + assertTrue("delete xml", store.deleteXML(TEST_FILE, TEST_COLLECTION)); + verify(xdb).remove(TEST_FILE, TEST_COLLECTION); + } + + /** + * execute an XUpdate. + */ + // @Test + // public void testExecuteXUpdate() { + // fail(NYI); + // } + /** + * get collection names. + * + * @throws ISStoreException + * shouldn't happen + * @throws XMLDBException + * shouldn't happen + */ + @Test + public void testGetFileColls() throws ISStoreException, XMLDBException { + final String[] expectedNames = new String[] { "col1", "col2" }; + + when(xdb.getRootCollection()).thenReturn(ROOT_COLLECTION); + when(xdb.listChildCollections(ROOT_COLLECTION)).thenReturn(Arrays.asList(expectedNames)); + + final List names = store.getFileColls(); + verify(xdb).getRootCollection(); + assertArrayEquals(expectedNames, names.toArray()); + } + + /** + * list file names. + * + * @throws ISStoreException + * shouldn't happen + * @throws XMLDBException + * shouldn't happen + */ + @Test + public void testGetFileNames() throws ISStoreException, XMLDBException { + final String[] expectedNames = new String[] { "fil1", "file2", "file3" }; + + when(xdb.list(ROOT_COLLECTION)).thenReturn(Arrays.asList(expectedNames)); + + final List names = store.getFileNames(ROOT_COLLECTION); + assertArrayEquals(expectedNames, names.toArray()); + } + + /** + * read an xml file. + * + * @throws ISStoreException + * shouldn't happen + * @throws XMLDBException + * shouldn't happen + */ + @Test + public void testGetXML() throws ISStoreException, XMLDBException { + when(xdb.read(TEST_FILE, TEST_COLLECTION)).thenReturn("testContent"); + final String res = store.getXML(TEST_FILE, TEST_COLLECTION); + assertEquals("get xml", "testContent", res); + } + + /** + * read an xml file using a xquery. + * + * @throws XMLDBException + * shouldn't happen + * @throws ISStoreException + * shouldn't happen + */ + @Test + public void testGetXMLbyQuery() throws XMLDBException, ISStoreException { + prepareXMLDBResultSet(); + + final String res = store.getXMLbyQuery(SOME_QUERY); + assertEquals("get xml by query", ONE, res); + } + + /** + * helper method. Prepares a common result mock. + * + * @throws XMLDBException + * the declaration of this exception is just a syntactic necessity + */ + private void prepareXMLDBResultSet() throws XMLDBException { + List myList = Arrays.asList(ONE,TWO); + when(xdb.xquery(SOME_QUERY)).thenReturn(myList.iterator()); + } + + /** + * insert a new xml file. + * + * @throws ISStoreException + * shouldn't happen + * @throws XMLDBException + * shouldn't happen + */ + @Test + public void testInsertXML() throws ISStoreException, XMLDBException { + assertTrue("insert xml", store.insertXML("example", ROOT_COLLECTION, "")); + verify(xdb).create("example", ROOT_COLLECTION, ""); + } + + /** + * test quick search xml. + * + * @throws ISStoreException + * happens + * @throws XMLDBException + * happens + */ + @Test + public void testQuickSearchXML() throws ISStoreException, XMLDBException { + final List ans = new ArrayList(); + ans.add(ONE); + ans.add(TWO); + + prepareXMLDBResultSet(); + + final ArrayList res = (ArrayList) store.quickSearchXML(SOME_QUERY); + assertNotNull("query returned", res); + assertEquals("correct size", 2, res.size()); + assertEquals("first value", ONE, res.get(0)); + assertEquals("second value", TWO, res.get(1)); + } + +} diff --git a/dnet-information-service/src/test/java/eu/dnetlib/enabling/tools/CompatResourceIdentifierResolverImplTest.java b/dnet-information-service/src/test/java/eu/dnetlib/enabling/tools/CompatResourceIdentifierResolverImplTest.java new file mode 100644 index 0000000..5bbc6c7 --- /dev/null +++ b/dnet-information-service/src/test/java/eu/dnetlib/enabling/tools/CompatResourceIdentifierResolverImplTest.java @@ -0,0 +1,51 @@ +package eu.dnetlib.enabling.tools; + +import static org.junit.Assert.*; // NOPMD + +import org.junit.Before; +import org.junit.Test; + +/** + * test the CompatResourceIdentifierResolverImpl. + * + * @author marko + * + */ +public class CompatResourceIdentifierResolverImplTest { + + /** + * test resource identifier. + * + */ + private static final String TEST_RES_ID = "first_c2Vjb25k"; + + /** + * instance under test. + */ + private transient CompatResourceIdentifierResolverImpl resIdResolver; + + /** + * prepare the instance under test. + */ + @Before + public void setUp() { + resIdResolver = new CompatResourceIdentifierResolverImpl(); + } + + /** + * test get collection name. + */ + @Test + public void testGetCollectionName() { + assertEquals("check collection name", "second", resIdResolver.getCollectionName(TEST_RES_ID)); + } + + /** + * test get file name. + */ + @Test + public void testGetFileName() { + assertEquals("check file name", "first", resIdResolver.getFileName(TEST_RES_ID)); + } + +} diff --git a/dnet-information-service/src/test/java/eu/dnetlib/enabling/tools/DOMOpaqueResourceTest.java b/dnet-information-service/src/test/java/eu/dnetlib/enabling/tools/DOMOpaqueResourceTest.java new file mode 100644 index 0000000..80be331 --- /dev/null +++ b/dnet-information-service/src/test/java/eu/dnetlib/enabling/tools/DOMOpaqueResourceTest.java @@ -0,0 +1,122 @@ +package eu.dnetlib.enabling.tools; + +import static org.junit.Assert.*; // NOPMD +import static org.mockito.Mockito.*; // NOPMD + +import java.io.IOException; +import java.io.StringReader; +import java.io.StringWriter; + +import javax.xml.parsers.DocumentBuilderFactory; +import javax.xml.parsers.ParserConfigurationException; +import javax.xml.xpath.XPathExpressionException; + +import org.apache.commons.io.IOUtils; +import org.junit.Before; +import org.junit.Test; +import org.w3c.dom.Document; +import org.xml.sax.InputSource; +import org.xml.sax.SAXException; + +import javax.xml.transform.Result; +import javax.xml.transform.Source; +import javax.xml.transform.Transformer; +import javax.xml.transform.TransformerException; + +/** + * Test DOM opaque resource. + * + * @author marko + * + */ +public class DOMOpaqueResourceTest { + + /** + * instance under test. + */ + private transient DOMOpaqueResource resource; + + /** + * xml source, read from test-profile.xml. + */ + private transient String xmlSource; + + /** + * common preparation. + * + * @throws ParserConfigurationException + * shouldn't happen + * @throws IOException + * shouldn't happen + * @throws SAXException + * shouldn't happen + * @throws XPathExpressionException + * shouldn't happen + */ + @Before + public void setUp() throws SAXException, IOException, ParserConfigurationException, XPathExpressionException { + final StringWriter writer = new StringWriter(); + IOUtils.copy(getClass().getResourceAsStream("test-profile.xml"), writer); + xmlSource = writer.getBuffer().toString(); + final Document document = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(new InputSource(new StringReader(xmlSource))); + resource = new DOMOpaqueResource(document); + } + + /** + * test dom. + */ + @Test + public void testAsDom() { + assertEquals("check that dom is not recreated", resource.getDom(), resource.asDom()); + } + + /** + * serialization check. + * + * TODO: use xmlunit + */ + @Test + public void testAsString() { + assertEquals("check xml serialization", xmlSource, resource.asString()); + } + + /** + * test with exception in transformer. + * @throws TransformerException expected + */ + @Test + public void testAsStringException() throws TransformerException { + final Transformer transformer = mock(Transformer.class); + doThrow(new TransformerException("dummy")).when(transformer).transform((Source) anyObject(), (Result) anyObject()); + + resource.setTransformer(transformer); + assertNull("checks that upon exception we get a null string", resource.asString()); + } + + /** + * check resource id extraction. + */ + @Test + public void testGetResourceId() { + assertEquals("check resource id", + "111-6b4ea417-d940-4dda-a194-3096f685789b_UmVwb3NpdG9yeVNlcnZpY2VSZXNvdXJjZXMvUmVwb3NpdG9yeVNlcnZpY2VSZXNvdXJjZVR5cGU=", resource + .getResourceId()); + } + + /** + * check resource type extraction. + */ + @Test + public void testGetResourceType() { + assertEquals("check resource type", "RepositoryServiceResourceType", resource.getResourceType()); + } + + /** + * check resource kind extraction. + */ + @Test + public void testGetResourceKind() { + assertEquals("check resource kind", "RepositoryServiceResources", resource.getResourceKind()); + } + +} diff --git a/dnet-information-service/src/test/java/eu/dnetlib/enabling/tools/JaxwsServiceResolverImplTest.java b/dnet-information-service/src/test/java/eu/dnetlib/enabling/tools/JaxwsServiceResolverImplTest.java new file mode 100644 index 0000000..778434b --- /dev/null +++ b/dnet-information-service/src/test/java/eu/dnetlib/enabling/tools/JaxwsServiceResolverImplTest.java @@ -0,0 +1,122 @@ +package eu.dnetlib.enabling.tools; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; +import static org.mockito.Mockito.mock; // NOPMD +import static org.mockito.Mockito.when; + +import javax.xml.transform.stream.StreamResult; +import javax.xml.ws.Endpoint; +import javax.xml.ws.wsaddressing.W3CEndpointReference; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.apache.cxf.BusFactory; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; + +import eu.dnetlib.enabling.resultset.rmi.ResultSetException; +import eu.dnetlib.enabling.resultset.rmi.ResultSetService; +import eu.dnetlib.soap.cxf.CxfEndpointReferenceBuilder; +import eu.dnetlib.soap.cxf.JaxwsEndpointReferenceBuilder; + +/** + * jaxws service resolution. + * + * @author marko + * + */ + +@RunWith(SpringJUnit4ClassRunner.class) +@ContextConfiguration(locations = "local-cxf.xml") +public class JaxwsServiceResolverImplTest { + + /** + * logger. + */ + private static final Log log = LogFactory.getLog(JaxwsServiceResolverImplTest.class); // NOPMD by marko on + // 11/24/08 5:02 PM + + /** + * instance under test. + */ + private transient JaxwsServiceResolverImpl resolver; + + /** + * epr builder. + */ + private transient JaxwsEndpointReferenceBuilder eprBuilder; + + /** + * resultset mock. + */ + private transient ResultSetService resultSetService; + + /** + * cleanup cxf. This test requires the local transport (declared in local-cxf.xml), but other tests may have already instantiated the + * cxf bus singleton. + */ + @BeforeClass + public static void resetCxf() { + BusFactory.getDefaultBus().shutdown(true); + } + + /** + * common. + */ + @Before + public void setUp() { + resolver = new JaxwsServiceResolverImpl(); + eprBuilder = new JaxwsEndpointReferenceBuilder(); + eprBuilder.setBuilder(new CxfEndpointReferenceBuilder()); + + resultSetService = mock(ResultSetService.class); + } + + /** + * get service. + * + * @throws ResultSetException + * shoudn't happen + */ + @Test + public void testGetService() throws ResultSetException { + final String rsId = "1235"; + + when(resultSetService.identify()).thenReturn("foo"); + when(resultSetService.getNumberOfElements(rsId)).thenReturn(2); + + final Endpoint endpoint = Endpoint.publish("local://test", resultSetService); + + assertNotNull("check endpoint", endpoint); + + final W3CEndpointReference epr = eprBuilder.getEndpointReference(endpoint, rsId); + + epr.writeTo(new StreamResult(System.out)); + + final ResultSetService rset = resolver.getService(ResultSetService.class, epr); + + assertNotNull("check resultset", rset); + + log.info(rset.getClass()); + log.info(rset); + + // NOTE: call to identify and getNumberOfElements fail because it seems that the methods are not + // in the wsdl. This error may be related with the use of mockito and + // method inheritance of services because there is no such error with + // non-mocked result set service methods. + // rset.identify(); + + // assertEquals("check resultset communication", "foo", + // rset.identify()); + + assertEquals("check resolver resource id", rsId, resolver.getResourceIdentifier(epr)); + + // assertEquals("check resultset communication with param", 2, + // rset.getNumberOfElements(resolver.getResourceIdentifier(epr))); + } +} diff --git a/dnet-information-service/src/test/java/eu/dnetlib/enabling/tools/blackboard/BlackboardMessageImplTest.java b/dnet-information-service/src/test/java/eu/dnetlib/enabling/tools/blackboard/BlackboardMessageImplTest.java new file mode 100644 index 0000000..b11b6e4 --- /dev/null +++ b/dnet-information-service/src/test/java/eu/dnetlib/enabling/tools/blackboard/BlackboardMessageImplTest.java @@ -0,0 +1,62 @@ +package eu.dnetlib.enabling.tools.blackboard; + + +import static org.junit.Assert.assertEquals; + +import javax.xml.bind.JAXBException; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.junit.Test; + +import eu.dnetlib.miscutils.jaxb.JaxbFactory; + +/** + * Jaxb Blackboard message implementation test. + * + * @author marko + * + */ +public class BlackboardMessageImplTest { + + /** + * logger. + */ + private static final Log log = LogFactory.getLog(BlackboardMessageImplTest.class); // NOPMD by marko on 11/24/08 5:02 PM + + /** + * test message (de)serialization. + * + * @throws JAXBException could happen + */ + @Test + public void testMessage() throws JAXBException { + final JaxbFactory factory = new JaxbFactory(BlackboardMessageImpl.class); + + final BlackboardMessage message = factory.newInstance(); + message.setAction("FEED"); + message.setActionStatus(ActionStatus.ONGOING); + message.setId("12"); + message.setDate("5123"); + + final BlackboardParameter param1 = new BlackboardParameterImpl(); + param1.setName("someName"); + param1.setValue("someValue"); + message.getParameters().add(param1); + + final BlackboardParameter param2 = new BlackboardParameterImpl(); + param2.setName("otherName"); + param2.setValue("otherValue"); + message.getParameters().add(param2); + + final String serialized = factory.serialize(message); + log.info(serialized); + + final BlackboardMessage res = factory.parse(serialized); + log.info(res.getParameters()); + + assertEquals("list serialization", 2, res.getParameters().size()); + assertEquals("enum serialization", ActionStatus.ONGOING, res.getActionStatus()); + } + +} diff --git a/dnet-information-service/src/test/java/eu/dnetlib/enabling/tools/registration/InterfaceServiceNameGeneratorTest.java b/dnet-information-service/src/test/java/eu/dnetlib/enabling/tools/registration/InterfaceServiceNameGeneratorTest.java new file mode 100644 index 0000000..a92bee5 --- /dev/null +++ b/dnet-information-service/src/test/java/eu/dnetlib/enabling/tools/registration/InterfaceServiceNameGeneratorTest.java @@ -0,0 +1,84 @@ +package eu.dnetlib.enabling.tools.registration; + +import static org.junit.Assert.assertEquals; + +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.mockito.Mock; +import org.mockito.junit.MockitoJUnitRunner; + +import eu.dnetlib.enabling.is.registry.ISRegistryServiceImpl; +import eu.dnetlib.enabling.is.registry.rmi.ISRegistryService; + +/** + * test heuristic service name generator. + * @author marko + * + */ +@RunWith(MockitoJUnitRunner.class) +public class InterfaceServiceNameGeneratorTest { + + /** + * instance under test. + */ + private transient ServiceNameResolver generator = new InterfaceServiceNameResolver(); + + /** + * simulates the extension of the service interface. + * + * @author marko + * + */ + interface SomeDummyInterface extends ISRegistryService { + } + + /** + * simulates the implementation of the service interface. + * @author marko + * + */ + abstract class AbstractDummyService implements SomeDummyInterface { + } + + /** + * simulates the subclassing of the service implementation class. + * + * @author marko + * + */ + abstract class AbstractDummyServiceImpl extends AbstractDummyService { + } + + /** + * service mock. + */ + @Mock + private transient AbstractDummyServiceImpl service; + + /** + * setup. + */ + @Before + public void setUp() { + generator = new InterfaceServiceNameResolver(); + } + + /** + * test getName(). + */ + @Test + public void testGetName() { + assertEquals("check service name", "ISRegistryService", generator.getName(service)); + } + + /** + * test getName() on real classes. + */ + @Test + public void testGetNameReal() { + assertEquals("check service name", "ISRegistryService", generator.getName(new ISRegistryServiceImpl())); + } + + +} diff --git a/dnet-information-service/src/test/java/eu/dnetlib/enabling/tools/registration/InterfaceServiceNameResolverCompatibilityTest.java b/dnet-information-service/src/test/java/eu/dnetlib/enabling/tools/registration/InterfaceServiceNameResolverCompatibilityTest.java new file mode 100644 index 0000000..6f24327 --- /dev/null +++ b/dnet-information-service/src/test/java/eu/dnetlib/enabling/tools/registration/InterfaceServiceNameResolverCompatibilityTest.java @@ -0,0 +1,56 @@ +package eu.dnetlib.enabling.tools.registration; + +import static org.junit.Assert.assertEquals; + +import java.util.HashMap; +import java.util.Map; + +import org.junit.Before; +import org.junit.Test; + +import eu.dnetlib.enabling.is.store.ISStoreServiceImpl; + +/** + * compatibility interface service name tester. + * @author marko + * + */ +public class InterfaceServiceNameResolverCompatibilityTest { + + /** + * instance under test. + */ + private transient InterfaceServiceNameResolverCompatibility resolver; + + /** + * setup. + */ + @Before + public void setUp() { + resolver = new InterfaceServiceNameResolverCompatibility(); + + } + + /** + * test mapping without override. + */ + @Test + public void testGetName() { + assertEquals("check without override", "ISStoreService", resolver.getName(new ISStoreServiceImpl())); + } + + /** + * test mapping override. + */ + @Test + public void testGetNameWithOverride() { + final Map mapping = new HashMap(); + mapping.put("ISStoreService", "IS_StoreService"); + resolver.setMapping(mapping); + + assertEquals("check is store service name", "IS_StoreService", resolver.getName(new ISStoreServiceImpl())); + } + + + +} diff --git a/dnet-information-service/src/test/java/eu/dnetlib/enabling/tools/registration/ServiceRegistrationManagerImplTest.java b/dnet-information-service/src/test/java/eu/dnetlib/enabling/tools/registration/ServiceRegistrationManagerImplTest.java new file mode 100644 index 0000000..86d4490 --- /dev/null +++ b/dnet-information-service/src/test/java/eu/dnetlib/enabling/tools/registration/ServiceRegistrationManagerImplTest.java @@ -0,0 +1,93 @@ +package eu.dnetlib.enabling.tools.registration; + +import static org.junit.Assert.assertEquals; +import static org.mockito.Matchers.anyObject; +import static org.mockito.Matchers.anyString; +import static org.mockito.Mockito.when; + +import javax.xml.ws.Endpoint; + +import org.junit.Before; +import org.junit.Ignore; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.mockito.Mock; +import org.mockito.junit.MockitoJUnitRunner; + +import eu.dnetlib.enabling.is.lookup.ISLookUpServiceImpl; +import eu.dnetlib.enabling.is.lookup.rmi.ISLookUpException; +import eu.dnetlib.enabling.is.lookup.rmi.ISLookUpService; +import eu.dnetlib.enabling.locators.UniqueServiceLocator; + +/** + * test ServiceRegistrationManagerImpl. + * + * @author marko + * + */ +@RunWith(MockitoJUnitRunner.class) +public class ServiceRegistrationManagerImplTest { + + /** + * fake profile. + */ + private static final String PROFILE = "
"; + + /** + * instance under test. + */ + private transient ServiceRegistrationManagerImpl manager; + + /** + * registrator mock. + */ + @Mock + private transient ServiceRegistrator registrator; + + /** + * is lookup mock. + */ + @Mock + private transient ISLookUpService lookUpService; + @Mock + private UniqueServiceLocator serviceLocator; + + /** + * prepare. + * + * @throws ISLookUpException + * cannot happen + */ + @Before + public void setUp() throws ISLookUpException { + manager = new ServiceRegistrationManagerImpl(); + manager.setServiceLocator(serviceLocator); + manager.setRegistrator(registrator); + manager.setService(new ISLookUpServiceImpl()); + + when(serviceLocator.getService(ISLookUpService.class)).thenReturn(lookUpService); + when(serviceLocator.getService(ISLookUpService.class, true)).thenReturn(lookUpService); + when(lookUpService.getResourceProfile("123")).thenReturn(PROFILE); + when(lookUpService.getResourceProfileByQuery(anyString())).thenReturn(PROFILE); + } + + /** + * test state machine. + */ + @Test + @Ignore + public void testTick() { + when(registrator.registerService(anyObject(), (Endpoint) anyObject())).thenReturn("123"); + + assertEquals("check unregistered state", ServiceRegistrationManagerImpl.State.UNREGISTERED, manager.getState()); + manager.tick(); + assertEquals("check pending state", ServiceRegistrationManagerImpl.State.PENDING, manager.getState()); + assertEquals("ensure that the mock is correct", "PendingServiceResources", manager.getServiceProfile().getResourceKind()); + manager.tick(); + assertEquals("should remain pending", ServiceRegistrationManagerImpl.State.PENDING, manager.getState()); + + manager.tick(); + assertEquals("should remain pending forever", ServiceRegistrationManagerImpl.State.PENDING, manager.getState()); + } + +} diff --git a/dnet-information-service/src/test/java/eu/dnetlib/enabling/tools/registration/ServiceRegistratorTest.java b/dnet-information-service/src/test/java/eu/dnetlib/enabling/tools/registration/ServiceRegistratorTest.java new file mode 100644 index 0000000..1d2875e --- /dev/null +++ b/dnet-information-service/src/test/java/eu/dnetlib/enabling/tools/registration/ServiceRegistratorTest.java @@ -0,0 +1,148 @@ +package eu.dnetlib.enabling.tools.registration; + +import static org.junit.Assert.assertEquals; +import static org.mockito.Mockito.when; +import static org.mockito.Matchers.anyString; +import static org.mockito.Matchers.eq; + +import javax.xml.namespace.QName; + +import eu.dnetlib.enabling.is.lookup.rmi.ISLookUpDocumentNotFoundException; +import eu.dnetlib.enabling.is.lookup.rmi.ISLookUpException; +import eu.dnetlib.enabling.is.lookup.rmi.ISLookUpService; +import org.apache.cxf.endpoint.Endpoint; +import org.apache.cxf.endpoint.ServerImpl; +import org.apache.cxf.jaxws.EndpointImpl; +import org.apache.cxf.service.Service; +import org.apache.cxf.service.model.EndpointInfo; + +import org.junit.Before; +import org.junit.Test; +import org.junit.Ignore; +import org.junit.runner.RunWith; +import org.mockito.Mock; +import org.mockito.junit.MockitoJUnitRunner; + +import eu.dnetlib.enabling.is.registry.rmi.ISRegistryException; +import eu.dnetlib.enabling.is.registry.rmi.ISRegistryService; +import eu.dnetlib.enabling.locators.UniqueServiceLocator; +import eu.dnetlib.enabling.tools.HNMLocator; +import eu.dnetlib.soap.cxf.CxfEndpointReferenceBuilder; +import eu.dnetlib.soap.cxf.JaxwsEndpointReferenceBuilder; + +/** + * ServiceRegistrator test. + * + * @author marko + * + */ +@RunWith(MockitoJUnitRunner.class) +public class ServiceRegistratorTest { + /** + * instance under test. + */ + private transient ServiceRegistrator registrator; + + /** + * service mock. + */ + @Mock + private transient Service service; + + /** + * endpoint info mock. + */ + @Mock + private transient EndpointInfo endpointInfo; + + /** + * endpoint mock. + */ + @Mock + private transient Endpoint endpoint; + + /** + * registry service mock. + */ + @Mock + private transient ISRegistryService registryService; + + /** + * isLookup service mock. + */ + @Mock + private transient ISLookUpService isLookUpService; + + /** + * jaxws endpoint mock. + */ + @Mock + private transient EndpointImpl jaxwsEndpoint; + + /** + * cxf server mock. + */ + @Mock + private transient ServerImpl server; + + /** + * hnm locator mock. + */ + @Mock + private transient HNMLocator hnmLocator; + @Mock + private UniqueServiceLocator serviceLocator; + + /** + * setup common stuff. + * + */ + @Before + public void disabled() throws ISLookUpException { + final String service = "TestService"; + when(this.service.getName()).thenReturn(new QName("http://my.test", service)); + + when(endpoint.getEndpointInfo()).thenReturn(endpointInfo); + when(endpoint.getService()).thenReturn(this.service); + when(endpointInfo.getAddress()).thenReturn("http://localhost/something"); + when(endpointInfo.getName()).thenReturn(new QName("http://my.test", "TestServiceEndpoint")); + + when(jaxwsEndpoint.getServer()).thenReturn(server); + when(server.getEndpoint()).thenReturn(endpoint); + + when(hnmLocator.getHNMForUrl("http://localhost/something")).thenReturn("555444"); + + // serviceLocator.getService(ISLookUpService.class).getResourceTypeSchema(serviceName); + + when(isLookUpService.getResourceTypeSchema(service)).thenThrow(ISLookUpDocumentNotFoundException.class); + + when(serviceLocator.getService(ISLookUpService.class)).thenReturn(isLookUpService); + when(serviceLocator.getService(ISRegistryService.class, true)).thenReturn(registryService); + + + registrator = new ServiceRegistrator(); + registrator.setServiceLocator(serviceLocator); + + final CxfEndpointReferenceBuilder cxfEprBuilder = new CxfEndpointReferenceBuilder(); + + final JaxwsEndpointReferenceBuilder eprBuilder = new JaxwsEndpointReferenceBuilder(); + eprBuilder.setBuilder(cxfEprBuilder); + + registrator.setEprBuilder(eprBuilder); + registrator.setHnmLocator(hnmLocator); + } + + /** + * test register service. + * @throws ISRegistryException shouldn't happen + */ + @Test + //@Ignore + public void testRegisterService() throws ISRegistryException { + when(registryService.insertProfileForValidation(eq("TestServiceResourceType"), anyString())).thenReturn("123"); + + final String rsId = registrator.registerService("TestService", jaxwsEndpoint); + assertEquals("registered", "123", rsId); + } + +} diff --git a/dnet-information-service/src/test/java/eu/dnetlib/enabling/tools/registration/ValidatingServiceRegistrationManagerImplTest.java b/dnet-information-service/src/test/java/eu/dnetlib/enabling/tools/registration/ValidatingServiceRegistrationManagerImplTest.java new file mode 100644 index 0000000..6c4f88a --- /dev/null +++ b/dnet-information-service/src/test/java/eu/dnetlib/enabling/tools/registration/ValidatingServiceRegistrationManagerImplTest.java @@ -0,0 +1,121 @@ +package eu.dnetlib.enabling.tools.registration; + +import static org.junit.Assert.assertEquals; +import static org.mockito.Matchers.anyObject; +import static org.mockito.Matchers.anyString; +import static org.mockito.Mockito.*; // NOPMD + +import javax.xml.ws.Endpoint; + +import org.junit.Before; +import org.junit.Ignore; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.mockito.Mock; +import org.mockito.junit.MockitoJUnitRunner; + +import eu.dnetlib.enabling.is.lookup.ISLookUpServiceImpl; +import eu.dnetlib.enabling.is.lookup.rmi.ISLookUpException; +import eu.dnetlib.enabling.is.lookup.rmi.ISLookUpService; +import eu.dnetlib.enabling.locators.UniqueServiceLocator; + +/** + * test ValidatingServiceRegistrationManagerImpl. + * + * @author marko + * + */ +@RunWith(MockitoJUnitRunner.class) +public class ValidatingServiceRegistrationManagerImplTest { + + /** + * profile id. + */ + private static final String PROF_ID = "123"; + + /** + * validated profile id. + */ + private static final String VPROF_ID = "V123"; + + /** + * fake profile. + */ + private static final String PROFILE = "
"; + + /** + * fake profile. + */ + private static final String VPROFILE = "
"; + + /** + * instance under test. + */ + private transient ServiceRegistrationManagerImpl manager; + + /** + * registrator mock. + */ + @Mock + private transient ServiceRegistrator registrator; + + /** + * is lookup mock. + */ + @Mock + private transient ISLookUpService lookUpService; + + @Mock + private UniqueServiceLocator serviceLocator; + + /** + * prepare. + * + * @throws ISLookUpException + * cannot happen + */ + @Before + public void setUp() throws ISLookUpException { + manager = new ValidatingServiceRegistrationManagerImpl(); + + manager.setServiceLocator(serviceLocator); + manager.setRegistrator(registrator); + manager.setService(new ISLookUpServiceImpl()); + + when(lookUpService.getResourceProfile(PROF_ID)).thenReturn(PROFILE); + when(lookUpService.getResourceProfile(VPROF_ID)).thenReturn(VPROFILE); + when(lookUpService.getResourceProfileByQuery(anyString())).thenReturn(PROFILE); + when(registrator.validateProfile(eq(PROF_ID), any(Endpoint.class))).thenReturn(VPROF_ID); + when(serviceLocator.getService(ISLookUpService.class)).thenReturn(lookUpService); + when(serviceLocator.getService(ISLookUpService.class, true)).thenReturn(lookUpService); + } + + /** + * test state machine. + * + * @throws ISLookUpException + * cannot happen + */ + @Test + @Ignore + public void testTick() throws ISLookUpException { + when(registrator.registerService(anyObject(), (Endpoint) anyObject())).thenReturn(PROF_ID); + + assertEquals("check unregistered state", ServiceRegistrationManagerImpl.State.UNKNOWN, manager.getState()); + manager.tick(); + assertEquals("check pending state", ServiceRegistrationManagerImpl.State.PENDING, manager.getState()); + assertEquals("ensure that the mock is correct", "PendingServiceResources", manager.getServiceProfile().getResourceKind()); + manager.tick(); + + assertEquals("should register directly", ServiceRegistrationManagerImpl.State.REGISTERED, manager.getState()); + + verify(registrator).validateProfile(eq(PROF_ID), (Endpoint) anyObject()); + + assertEquals("check validation id", VPROF_ID, manager.getProfileId()); + assertEquals("check validation profile", VPROF_ID, manager.getServiceProfile().getResourceId()); + + manager.tick(); + assertEquals("should remain registered", ServiceRegistrationManagerImpl.State.REGISTERED, manager.getState()); + } + +} diff --git a/dnet-information-service/src/test/java/eu/dnetlib/test/SpringContextSharer.java b/dnet-information-service/src/test/java/eu/dnetlib/test/SpringContextSharer.java new file mode 100644 index 0000000..41748cb --- /dev/null +++ b/dnet-information-service/src/test/java/eu/dnetlib/test/SpringContextSharer.java @@ -0,0 +1,42 @@ +package eu.dnetlib.test; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.springframework.context.ApplicationContext; +import org.springframework.context.ApplicationContextAware; + +/** + * integration tests may need to access the container application context, for example in order + * directly interact with components or access shared resources like the CXF bus. + * + * This bean should be instantiated in the container context. + * + * @author marko + * + */ +public class SpringContextSharer implements ApplicationContextAware { + /** + * logger. + */ + private static final Log log = LogFactory.getLog(SpringContextSharer.class); // NOPMD by marko on 11/24/08 5:02 PM + + /** + * global application context. + */ + private static ApplicationContext globalContext; + + /** + * {@inheritDoc} + * @see org.springframework.context.ApplicationContextAware#setApplicationContext(org.springframework.context.ApplicationContext) + */ + @Override + public void setApplicationContext(final ApplicationContext context) { + log.debug("registering global application context"); + globalContext = context; + } + + public static ApplicationContext getGlobalContext() { + return globalContext; + } + +} diff --git a/dnet-core-components/src/test/java/eu/dnetlib/test/utils/EPRTestUtil.java b/dnet-information-service/src/test/java/eu/dnetlib/test/utils/EPRTestUtil.java similarity index 100% rename from dnet-core-components/src/test/java/eu/dnetlib/test/utils/EPRTestUtil.java rename to dnet-information-service/src/test/java/eu/dnetlib/test/utils/EPRTestUtil.java diff --git a/dnet-information-service/src/test/java/eu/dnetlib/test/utils/MockBeanFactory.java b/dnet-information-service/src/test/java/eu/dnetlib/test/utils/MockBeanFactory.java new file mode 100644 index 0000000..77e8f8c --- /dev/null +++ b/dnet-information-service/src/test/java/eu/dnetlib/test/utils/MockBeanFactory.java @@ -0,0 +1,55 @@ +package eu.dnetlib.test.utils; + + +import org.springframework.beans.factory.FactoryBean; + +import static org.mockito.Mockito.mock; + +/** + * Return a mockito mock for a given class. + * This class should be updated according to new Spring4 factory Bean + * + * @author marko + * + */ +@Deprecated +public class MockBeanFactory implements FactoryBean { + + /** + * class to mock. + */ + private Class clazz; + + /** + * {@inheritDoc} + * @see FactoryBean#getObject() + */ + public Object getObject() throws Exception { + return mock(clazz); + } + + /** + * {@inheritDoc} + * @see FactoryBean#getObjectType() + */ + public Class getObjectType() { + return clazz; + } + + /** + * {@inheritDoc} + * @see FactoryBean#isSingleton() + */ + public boolean isSingleton() { + return true; + } + + public Class getClazz() { + return clazz; + } + + public void setClazz(final Class clazz) { + this.clazz = clazz; + } + +} diff --git a/dnet-information-service/src/test/java/eu/dnetlib/xml/database/exist/DOMConverterTestTrigger.java b/dnet-information-service/src/test/java/eu/dnetlib/xml/database/exist/DOMConverterTestTrigger.java new file mode 100644 index 0000000..2b87d4a --- /dev/null +++ b/dnet-information-service/src/test/java/eu/dnetlib/xml/database/exist/DOMConverterTestTrigger.java @@ -0,0 +1,83 @@ +package eu.dnetlib.xml.database.exist; + +import org.exist.collections.triggers.SAXTrigger; +import org.exist.collections.triggers.TriggerException; +import org.exist.dom.persistent.DocumentImpl; +import org.exist.storage.DBBroker; +import org.exist.storage.txn.Txn; +import org.exist.xmldb.XmldbURI; + +/** + * helper class for the ExistDOMConverterTest. + * + * An instance of this class is instantiated by eXist and all new registered xml documents + * should trigger the invocation of the triggerCreate method + * + * @author marko + * + */ +public class DOMConverterTestTrigger extends SAXTrigger { + + + + + @Override + public void beforeCreateDocument(final DBBroker dbBroker, final Txn txn, final XmldbURI xmldbURI) throws TriggerException { + ExistDOMConverterTest.setTriggered(true); + } + + @Override + public void afterCreateDocument(final DBBroker dbBroker, final Txn txn, final DocumentImpl document) throws TriggerException { + ExistDOMConverterTest.setTriggered(true); + } + + @Override + public void beforeUpdateDocument(final DBBroker dbBroker, final Txn txn, final DocumentImpl document) throws TriggerException { + ExistDOMConverterTest.setTriggered(true); + } + + @Override + public void afterUpdateDocument(final DBBroker dbBroker, final Txn txn, final DocumentImpl document) throws TriggerException { + ExistDOMConverterTest.setTriggered(true); + } + + @Override + public void beforeUpdateDocumentMetadata(final DBBroker dbBroker, final Txn txn, final DocumentImpl document) throws TriggerException { + ExistDOMConverterTest.setTriggered(true); + } + + @Override + public void afterUpdateDocumentMetadata(final DBBroker dbBroker, final Txn txn, final DocumentImpl document) throws TriggerException { + ExistDOMConverterTest.setTriggered(true); + } + + @Override + public void beforeCopyDocument(final DBBroker dbBroker, final Txn txn, final DocumentImpl document, final XmldbURI xmldbURI) throws TriggerException { + ExistDOMConverterTest.setTriggered(true); + } + + @Override + public void afterCopyDocument(final DBBroker dbBroker, final Txn txn, final DocumentImpl document, final XmldbURI xmldbURI) throws TriggerException { + ExistDOMConverterTest.setTriggered(true); + } + + @Override + public void beforeMoveDocument(final DBBroker dbBroker, final Txn txn, final DocumentImpl document, final XmldbURI xmldbURI) throws TriggerException { + ExistDOMConverterTest.setTriggered(true); + } + + @Override + public void afterMoveDocument(final DBBroker dbBroker, final Txn txn, final DocumentImpl document, final XmldbURI xmldbURI) throws TriggerException { + ExistDOMConverterTest.setTriggered(true); + } + + @Override + public void beforeDeleteDocument(final DBBroker dbBroker, final Txn txn, final DocumentImpl document) throws TriggerException { + ExistDOMConverterTest.setTriggered(true); + } + + @Override + public void afterDeleteDocument(final DBBroker dbBroker, final Txn txn, final XmldbURI xmldbURI) throws TriggerException { + ExistDOMConverterTest.setTriggered(true); + } +} diff --git a/dnet-information-service/src/test/java/eu/dnetlib/xml/database/exist/ExistDOMConverterTest.java b/dnet-information-service/src/test/java/eu/dnetlib/xml/database/exist/ExistDOMConverterTest.java new file mode 100644 index 0000000..2cebebc --- /dev/null +++ b/dnet-information-service/src/test/java/eu/dnetlib/xml/database/exist/ExistDOMConverterTest.java @@ -0,0 +1,141 @@ +package eu.dnetlib.xml.database.exist; + +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; + +import java.io.IOException; +import java.io.StringWriter; +import java.util.Arrays; + +import javax.xml.parsers.DocumentBuilder; +import javax.xml.parsers.DocumentBuilderFactory; +import javax.xml.parsers.ParserConfigurationException; + +import org.apache.commons.io.IOUtils; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.junit.Before; +import org.junit.Test; +import org.w3c.dom.Document; +import org.xml.sax.SAXException; +import org.xmldb.api.base.XMLDBException; + +/** + * test exist dom converter. + * + * @author marko + * + */ +public class ExistDOMConverterTest { + + /** + * logger. + */ + static final Log log = LogFactory.getLog(ExistDOMConverterTest.class); // NOPMD by marko on 11/24/08 5:02 PM + + /** + * test collection. + */ + private static final String DB_TEST = "/db/collection"; + + /** + * check that the document is not truncated. + */ + private static final int MIN_LENGTH = 80; + + /** + * instance under test. + */ + private transient ExistDOMConverter converter; + + /** + * eXist database instance. + */ + private transient ExistDatabase edb; + + /** + * true when the eXist trigger is called. + */ + private static boolean triggered; + + /** + * setup common stuff. + */ + @Before + public void setUp() { + converter = new ExistDOMConverter(); + + edb = new TemporaryExistDatabase(); + edb.start(); + + triggered = false; + } + + /** + * check that the ExistDOMConverter works well with plain DOMs. + * + * @throws ParserConfigurationException shouldn't happen + * @throws SAXException shouldn't happen + * @throws IOException shouldn't happen + */ + @Test + public void testAsString() throws ParserConfigurationException, SAXException, IOException { + final DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder(); + final Document doc = builder.parse(getClass().getResourceAsStream("userProfileResourceSchema.xsd")); + + assertNotNull("dom", doc); + + assertTrue("length", converter.asString(doc).length() > MIN_LENGTH); + } + + /** + * test without comments in preable. + * + * @throws XMLDBException shouldn't happen + * @throws IOException shouldn't happen + */ + @Test + public void testFromExist() throws XMLDBException, IOException { + edb.setExistTrigger(DOMConverterTestTrigger.class, DB_TEST, Arrays.asList("store", "update", "delete"), null); + + final StringWriter schema = new StringWriter(); + IOUtils.copy(getClass().getResourceAsStream("userProfileResourceSchemaClean.xsd"), schema); + edb.create("test", DB_TEST, schema.toString()); + + final String res = edb.read("test", DB_TEST); + assertNotNull("check read", res); + + assertTrue("check that trigger is executed", triggered); + + } + + /** + * test comments in preable. + * + * @throws XMLDBException shouldn't happen + * @throws IOException shouldn't happen + */ + @Test + public void testFromExistCommented() throws XMLDBException, IOException { + edb.setExistTrigger(DOMConverterTestTrigger.class, DB_TEST, Arrays.asList( "store", "update", "delete"), null); + + final StringWriter schema = new StringWriter(); + IOUtils.copy(getClass().getResourceAsStream("userProfileResourceSchema.xsd"), schema); + edb.create("testCommented", DB_TEST, schema.toString()); + + final String res = edb.read("testCommented", DB_TEST); + assertNotNull("check read", res); + + assertTrue("check that trigger is executed", triggered); + //assertFalse("check that trigger is executed", triggered); + } + + public static boolean isTriggered() { + return triggered; + } + + public static void setTriggered(final boolean triggered) { + ExistDOMConverterTest.triggered = triggered; + } + +} diff --git a/dnet-information-service/src/test/java/eu/dnetlib/xml/database/exist/ExistDatabaseTest.java b/dnet-information-service/src/test/java/eu/dnetlib/xml/database/exist/ExistDatabaseTest.java new file mode 100644 index 0000000..dc47a86 --- /dev/null +++ b/dnet-information-service/src/test/java/eu/dnetlib/xml/database/exist/ExistDatabaseTest.java @@ -0,0 +1,715 @@ +package eu.dnetlib.xml.database.exist; + +import java.io.IOException; +import java.util.*; + +import eu.dnetlib.xml.database.XMLDatabase; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.junit.After; +import org.junit.Before; +import org.junit.Ignore; +import org.junit.Test; +import org.xmldb.api.base.XMLDBException; + +import static org.junit.Assert.*; + +/** + * Test the exist wrapper. + * + * @author marko + * + */ +public class ExistDatabaseTest { // NOPMD by marko on 11/24/08 5:01 PM + /** + * number of values in stress test profile. + */ + private static final int STRESS_VALUES = 100; + + /** + * number of times the values are repeated in the stress test. + */ + private static final int STRESS_PROF_LEN = 100; + + /** + * number of profile writes in stress test. + */ + private static final int STRESS_TIMES = 2000000; + + /** + * number of collections for stress test. + */ + private static final int STRESS_COLLS = 40; + + /** + * number of profiles in stress test. + */ + private static final int STRESS_PROFILES = 1000; + + /** + * parallel tuning. + */ + private static final int VALUE_SCATTER = 7; + + /** + * parallel tuning. + */ + private static final int QUERY_SCATTER = 5; + + /** + * test trigger name. + */ + private static final String TEST_TRIGGER = "testTrigger"; + + /** + * number of collections for parallel test. + */ + private static final int PAR_COLLS = 20; + + /** + * iterations per thread. + */ + private static final int PAR_ITERATIONS = 100; + + /** + * parallel job executions. + */ + private static final int PAR_TIMES = 100; + + /** + * logger. + */ + public static final Log log = LogFactory.getLog(ExistDatabaseTest.class); // NOPMD by marko on 11/24/08 5:01 PM + + /** + * test xml string. + */ + private static final String HELLO_XML = ""; + + /** + * test xml content. + */ + private static final String HELLO_XML_CONTENT = "content"; + + /** + * test file name. + */ + private static final String EXAMPLE = "example"; + + /** + * trigger test file name. + */ + private static final String TRIGGER_TEST_FILE = "shouldTrigger"; + + /** + * root collection prefix. + */ + private static final String DB_ROOT = "/db"; + + /** + * test collection name. + */ + private static final String DB_TEST = "/db/testCollection"; + + /** + * test other collection name. + */ + private static final String DB_OTHER = "/db/otherCollection"; + + /** + * test sub collection. + */ + private static final String DB_SUB = DB_TEST + "/sub"; + + /** + * xml database under test. + */ + private transient XMLDatabase database; + + /** + * eXist database under test, viewed only in setUp and tearDown. + */ + private transient ExistDatabase edb; + + /** + * prepares the database. + * + * @throws Exception + * exist error + */ + @Before + public void setUp() throws Exception { + edb = new TemporaryExistDatabase(); + edb.start(); + database = edb; + } + + /** + * shuts down the database. + * + * @throws IOException + * happens + */ + @After + public void tearDown() throws IOException { + if (edb != null) + edb.stop(); + } + + /** + * test create. + * + * @throws XMLDBException + * happens + */ + @Test + public void create() throws XMLDBException { + database.create(EXAMPLE, DB_ROOT, HELLO_XML); + assertEquals("database resource created", true, true); + } + + /** + * correct behavior is to throw exception on empty file name, because otherwise the file is invisible but the data + * is inserted in the xml db. + * + * @throws XMLDBException + * expected + */ + @Test(expected = XMLDBException.class) + public void createEmptyName() throws XMLDBException { + database.create("", DB_ROOT, ""); + + // code to repeat the bug, shouldn't be executed because of the expected exception + final Iterator res = database.xquery("collection('')/shouldnt_exist"); + + assertTrue("shouldn't exist, but it exists", res.hasNext()); + log.info(database.list(DB_ROOT)); + assertEquals("file should be listed, with empty file name", 1, database.list(DB_ROOT).size()); + assertEquals("file should be listed, with empty file name", "", database.list(DB_ROOT).get(0)); + + assertEquals("the file can be retrieved", "", database.read("", DB_ROOT)); + } + + /** + * test read. + * + * @throws XMLDBException + * shouldn't happen + */ + @Test + public void read() throws XMLDBException { + create(); + final String res = database.read(EXAMPLE, DB_ROOT); + assertEquals("simple reading", HELLO_XML, res); + } + + /** + * test read of non existing file. + * + * @throws XMLDBException + * shouldn't throw exception + */ + @Test + public void readError() throws XMLDBException { + final String res = database.read("nonExisting", DB_ROOT); + assertEquals("expecting null on unexisting", null, res); + } + + /** + * test remove. + * + * @throws XMLDBException + * shouldn't throw exception + */ + @Test + public void remove() throws XMLDBException { + database.create(EXAMPLE, DB_ROOT, HELLO_XML); + String res = database.read(EXAMPLE, DB_ROOT); + assertEquals("reading", HELLO_XML, res); + + database.remove(EXAMPLE, DB_ROOT); + res = database.read(EXAMPLE, DB_ROOT); + assertEquals("now it doesn't exist", null, res); + } + + /** + * delete unexisting file. + * + * @throws XMLDBException + * could happen + */ + @Test + public void doubleDelete() throws XMLDBException { + database.create(EXAMPLE, DB_ROOT, HELLO_XML); + String res = database.read(EXAMPLE, DB_ROOT); + assertEquals("reading", HELLO_XML, res); + + database.remove(EXAMPLE, DB_ROOT); + res = database.read(EXAMPLE, DB_ROOT); + assertEquals("now it doesn't exist", null, res); + + assertFalse("already exists", database.remove(EXAMPLE, DB_ROOT)); + } + + /** + * update an xml file. + * + * @throws XMLDBException + * shouldn't happen + */ + @Test + public void update() throws XMLDBException { + database.create(EXAMPLE, DB_ROOT, HELLO_XML); + String res = database.read(EXAMPLE, DB_ROOT); + assertEquals("reading", HELLO_XML, res); + + database.update(EXAMPLE, DB_ROOT, ""); + res = database.read(EXAMPLE, DB_ROOT); + assertEquals("now it doesn't exist", "", res); + } + + /** + * update an unexisting file. + * + * @throws XMLDBException + * expected + */ + @Test(expected = XMLDBException.class) + public void updateError() throws XMLDBException { + database.create(EXAMPLE, DB_ROOT, HELLO_XML); + database.remove(EXAMPLE, DB_ROOT); + final String res = database.read(EXAMPLE, DB_ROOT); + assertEquals("check non existing", null, res); + + database.update(EXAMPLE, DB_ROOT, ""); // throws + } + + /** + * test xquery. + * + * @throws XMLDBException + * shouldn't happen + */ + @Test() + public void query() throws XMLDBException { + database.create(EXAMPLE, DB_ROOT, ""); + final Iterator res = database.xquery("collection('/db')//queryTest/one"); + assertTrue("finds only one result", res.hasNext()); + + final Iterator res2 = database.xquery("collection('/db')//queryTest/two"); + assertTrue("finds only one result",res2.hasNext()); + assertEquals("check the correct result", "", res2.next()); + } + + /** + * create a collection. + * + * @throws XMLDBException + * shouldn't happen + */ + @Test() + public void createCollection() throws XMLDBException { + database.createCollection(DB_TEST); + database.create(EXAMPLE, DB_TEST, ""); + + final String res = database.read(EXAMPLE, DB_TEST); + assertEquals("check another collection", "", res); + } + + /** + * check the existence of a collection. + * + * @throws XMLDBException + * shouldn't happen + */ + @Test() + public void checkCollection() throws XMLDBException { + createCollection(); + + assertTrue("check root", database.collectionExists(DB_ROOT)); + assertTrue("check test collection", database.collectionExists(DB_TEST)); + assertFalse("check non existing", database.collectionExists("/db/testNonExistingCollection")); + } + + /** + * shows that a spurious collection create is legal. + * + * @throws XMLDBException + * shouldn't throw + */ + @Test() + public void createCollectionDuplicate() throws XMLDBException { + database.createCollection(DB_TEST); + database.createCollection(DB_TEST); + } + + /** + * remove a collection. + * + * @throws XMLDBException + * shouldn't throw + */ + @Test() + public void removeCollection() throws XMLDBException { + database.createCollection(DB_TEST); + assertTrue("check before remove", database.collectionExists(DB_TEST)); + database.removeCollection(DB_TEST); + assertFalse("check after remove", database.collectionExists(DB_TEST)); + } + + /** + * check useless contract with spring. + */ + @Test + public void testIsRunning() { + assertFalse("contract with spring", edb.isRunning()); + } + + /** + * Test a scenario where exist fails to create a database. + * + * @throws IOException + * happens + * @throws XMLDBException + * happens + */ + @Test(expected = IllegalStateException.class) + public void checkWrongConfigFile() throws IOException, XMLDBException { + edb.stop(); + edb = new ExistDatabase(); + try { + edb.setConfigFile("/tmp/unexistingfile"); + edb.start(); + database = edb; + + create(); + } finally { + edb = null; // NOPMD - just for junit + } + } + + /** + * get child collections. + * + * @throws XMLDBException + * shouldn't happen + */ + @Test + public void testListChildCollections() throws XMLDBException { + database.createCollection(DB_TEST); + assertTrue("check that collection exists", database.collectionExists(DB_TEST)); + + final String[] expectedNames = new String[] { "child1", "child2", "child3" }; + for (String name : expectedNames) + database.createCollection(DB_TEST + "/" + name); + + final List res = database.listChildCollections(DB_TEST); + // the db doesn't return then in the same order + Collections.sort(res); + assertArrayEquals("check list", expectedNames, res.toArray()); + } + + /** + * check list resources. + * + * @throws XMLDBException + * shouldn't happen + */ + @Test + public void testList() throws XMLDBException { + database.createCollection(DB_TEST); + assertTrue("collection should exist", database.collectionExists(DB_TEST)); + + final String[] expectedNames = new String[] { "name1", "name2", "name3" }; + for (String name : expectedNames) + database.create(name, DB_TEST, HELLO_XML); + + final List res = database.list(DB_TEST); + // the db doesn't return then in the same order + Collections.sort(res); + assertArrayEquals("check list", expectedNames, res.toArray()); + } + + /** + * test low-level set trigger. + * + * @throws XMLDBException + * shouldn't happen + */ + @Test + public void testSetExistTrigger() throws XMLDBException { + final Map params = new HashMap(); + params.put("listenerBean", "pippo"); + + database.createCollection(DB_TEST); + edb.setExistTrigger(TestExistTrigger.class, DB_TEST, Arrays.asList(new String[] { "store", "update", "delete" }), params); + + // assertNotNull("check that the conf is stored", database.read(ExistDatabase.COLLECTION_XCONF, DB_ROOT + "/system/config" + DB_TEST)); + + database.create(TRIGGER_TEST_FILE, DB_TEST, HELLO_XML_CONTENT); + assertEquals("check the the write happened", HELLO_XML_CONTENT, database.read(TRIGGER_TEST_FILE, DB_TEST)); + + database.update(TRIGGER_TEST_FILE, DB_TEST, "new content"); + + database.xquery("for $x in collection('')/hello where $x/text() = 'new content' return update value $x/text() with 'xupdate'"); + assertEquals("check the the xupdate happened", "xupdate", database.read(TRIGGER_TEST_FILE, DB_TEST)); + } + + /** + * Test high level addTrigger. + * + * @throws XMLDBException + * shouldn't happen + */ + @Test + public void testRegisterTrigger() throws XMLDBException { + final TestTrigger trigger = new TestTrigger(); + trigger.setName(TEST_TRIGGER); + + database.createCollection(DB_TEST); + database.registerTrigger(trigger, DB_TEST); + + assertFalse("check that the tester state is correct", trigger.isCreated()); + + database.create(TRIGGER_TEST_FILE, DB_TEST, HELLO_XML_CONTENT); + assertEquals("check the the write happened", HELLO_XML_CONTENT, database.read(TRIGGER_TEST_FILE, DB_TEST)); + assertFalse("check that the trigger is not invoked for the update event", trigger.isUpdated()); + assertFalse("check that the trigger is not invoked for the deletion event", trigger.isDeleted()); + assertTrue("check that the trigger is invoked create", trigger.isCreated()); + assertEquals("check file name for create", TRIGGER_TEST_FILE, trigger.getLastFile()); + assertEquals("check collection name for create", DB_TEST, trigger.getLastCollection()); + + trigger.reset(); + assertFalse("check that the tester state is correct", trigger.isUpdated()); + database.update(TRIGGER_TEST_FILE, DB_TEST, "new content"); + assertFalse("check that the trigger is not invoked for the creation event", trigger.isCreated()); + assertFalse("check that the trigger is not invoked for the deletion event", trigger.isDeleted()); + assertTrue("check that the trigger is invoked for update", trigger.isUpdated()); + assertEquals("check file name for update", TRIGGER_TEST_FILE, trigger.getLastFile()); + assertEquals("check collection name for update", DB_TEST, trigger.getLastCollection()); + + trigger.reset(); + database.xquery("for $x in collection('')/hello where $x/text() = 'new content' return update value $x/text() with 'xupdate'"); + assertTrue("check that the trigger is invoked for xupdate", trigger.isUpdated()); + assertEquals("check file name for xupdate", TRIGGER_TEST_FILE, trigger.getLastFile()); + assertEquals("check collection name for xupdate", DB_TEST, trigger.getLastCollection()); + + trigger.reset(); + assertFalse("check that the tester state is correct", trigger.isDeleted()); + database.remove(TRIGGER_TEST_FILE, DB_TEST); + assertFalse("check that the trigger is not invoked for the creation event", trigger.isCreated()); + assertFalse("check that the trigger is not invoked for the update event", trigger.isUpdated()); + assertNull("check that the file is removed", database.read(TRIGGER_TEST_FILE, DB_TEST)); + assertTrue("check that the trigger is invoked for delete", trigger.isDeleted()); + assertEquals("check file name for delete", TRIGGER_TEST_FILE, trigger.getLastFile()); + assertEquals("check collection name for delete", DB_TEST, trigger.getLastCollection()); + } + + /** + * a trigger configuration file should not be listed as a xml file resource. + * + * @throws XMLDBException + * shouldn't happen + */ + @Test + public void testListWithTriggerConf() throws XMLDBException { + database.createCollection(DB_TEST); + assertTrue("collection should exist", database.collectionExists(DB_TEST)); + + final TestTrigger trigger = new TestTrigger(); + trigger.setName(TEST_TRIGGER); + + database.registerTrigger(trigger, DB_TEST); + + final String[] expectedNames = new String[] { "name1", "name2", "name3" }; + for (String name : expectedNames) + database.create(name, DB_TEST, HELLO_XML); + + assertTrue("check that trigger was invoked", trigger.isCreated()); + + final List res = database.list(DB_TEST); + // the db doesn't return then in the same order + Collections.sort(res); + assertArrayEquals("check list", expectedNames, res.toArray()); + } + + /** + * test trigger with several collections. + * + * @throws XMLDBException + * shoudn't happen + */ + @Test + public void testTriggerDifferentCollections() throws XMLDBException { + final TestTrigger trigger = new TestTrigger(); + trigger.setName(TEST_TRIGGER); + + database.createCollection(DB_TEST); + database.createCollection(DB_OTHER); + database.createCollection(DB_SUB); + + database.registerTrigger(trigger, DB_TEST); + database.create(TRIGGER_TEST_FILE, DB_TEST, HELLO_XML); + assertTrue("trigger was registered for this collection", trigger.isCreated()); + + trigger.reset(); + database.create(TRIGGER_TEST_FILE, DB_OTHER, HELLO_XML); + assertFalse("trigger was not registered for this collection", trigger.isCreated()); + + trigger.reset(); + database.registerTrigger(trigger, DB_OTHER); + database.remove(TRIGGER_TEST_FILE, DB_OTHER); + assertTrue("trigger is now registered for this collection", trigger.isDeleted()); + + trigger.reset(); + database.create(TRIGGER_TEST_FILE, DB_SUB, HELLO_XML); + assertTrue("trigger is automatically registered for the sub collection", trigger.isCreated()); + + } + + /** + * fails because eXist wants that all collection paths begin with /db. + * + * @throws XMLDBException + * expected + */ + @Test(expected = XMLDBException.class) + public void testGetCollection() throws XMLDBException { + edb.getCollection("/something"); + assertNotNull("dummy", edb); + } + + /** + * simple parallel job. + * + * @author marko + * + */ + class SimpleParallelJob extends Thread { // NOPMD + /** + * some argument. + */ + private final transient int name; + /** + * record eventual exceptions. + */ + private transient Throwable throwable = null; + + /** + * pass some argument to the job. + * + * @param name + * some argument + */ + SimpleParallelJob(final int name) { + super(); + this.name = name; + } + + /** + * {@inheritDoc} + * + * @see java.lang.Runnable#run() + */ + @Override + public void run() { + try { + parallelJob(name); + } catch (XMLDBException e) { + log.fatal("parallel job failing", e); + throwable = e; + } catch (Throwable e) { // NOPMD + log.fatal("other exception", e); + throwable = e; + } + } + + public Throwable getThrowable() { + return throwable; + } + } + + /** + * stress test the eXist db. + * + * @throws Throwable + * could + */ + @Test + public void testParallel() throws Throwable { + final TestTrigger trigger = new TestTrigger(); + trigger.setName(TEST_TRIGGER); + + database.registerTrigger(trigger, DB_ROOT); + + final List threads = new ArrayList(); // NOPMD + for (int i = 0; i < PAR_TIMES; i++) + threads.add(new SimpleParallelJob(i)); // NOPMD + for (Thread thread : threads) { // NOPMD + thread.start(); + } + for (Thread thread : threads) { // NOPMD + thread.join(); + } + + for (SimpleParallelJob thread : threads) { // NOPMD + if (thread.getThrowable() != null) + throw thread.getThrowable(); + } + + assertNotNull("dummy", threads); + } + + /** + * Stress test for eXist WAL logs. + * + * @throws XMLDBException + * could happen + */ + @Test + @Ignore + public void testManueleStress() throws XMLDBException { + final StringBuffer childTemplate = new StringBuffer(200); // NOPMD + + for (int i = 0; i < STRESS_VALUES; i++) { + childTemplate.append("" + i + "-VALITER"); + } + + final StringBuffer hugeTemplate = new StringBuffer(200); + hugeTemplate.append(""); + for (int i = 0; i < STRESS_PROF_LEN; i++) { + final String child = childTemplate.toString().replace("VAL", Integer.toString(i)); + hugeTemplate.append(child); + } + hugeTemplate.append(""); + + for (int i = 0; i < STRESS_TIMES; i++) { + final String huge = hugeTemplate.toString().replace("ITER", Integer.toString(i)); + database.create("stressTest-" + (i % STRESS_PROFILES), DB_ROOT + "/" + (i % STRESS_COLLS), huge); + } + + assertNotNull("dummy", hugeTemplate); + } + + /** + * one parallel job execution. + * + * @param arg + * some argument + * @throws XMLDBException + * could happen. + */ + protected void parallelJob(final int arg) throws XMLDBException { + final String name = Integer.toString(arg); + final String coll = DB_ROOT + "/" + Integer.toString(arg % PAR_COLLS); + database.create(name, coll, ""); + + for (int i = 0; i < PAR_ITERATIONS; i++) { + database.update(name, coll, ""); + final Iterator res = database.xquery("collection('')//*[@value='" + i % QUERY_SCATTER + "']"); + while (res.hasNext()) + res.next(); + } + } + +} diff --git a/dnet-information-service/src/test/java/eu/dnetlib/xml/database/exist/PersistentExistDatabaseTest.java b/dnet-information-service/src/test/java/eu/dnetlib/xml/database/exist/PersistentExistDatabaseTest.java new file mode 100644 index 0000000..a73c57a --- /dev/null +++ b/dnet-information-service/src/test/java/eu/dnetlib/xml/database/exist/PersistentExistDatabaseTest.java @@ -0,0 +1,46 @@ +package eu.dnetlib.xml.database.exist; + +import static org.junit.Assert.*; + +import java.io.File; +import java.io.FileWriter; +import java.io.IOException; + +import org.apache.commons.io.IOUtils; +import org.junit.Before; +import org.junit.Test; + +public class PersistentExistDatabaseTest { + + private PersistentExistDatabase db; + + @Before + public void setUp() throws Exception { + db = new PersistentExistDatabase(); + } + + @Test + public void testFile() throws IOException { + File file = File.createTempFile("test", "conf"); + FileWriter writer = new FileWriter(file); + try { + IOUtils.write("test enable-java-binding=\"no\" test", writer); + } finally { + writer.close(); + } + + db.enableJava(file, true); + } + + @Test + public void testPatch() { + assertEquals("test123", db.patchConfigFileEnableJava("test123", true)); + assertEquals("enable-java-binding=\"yes\"", db.patchConfigFileEnableJava("enable-java-binding=\"yes\"", true)); + assertEquals("enable-java-binding=\"no\"", db.patchConfigFileEnableJava("enable-java-binding=\"yes\"", false)); + assertEquals("enable-java-binding=\"yes\"", db.patchConfigFileEnableJava("enable-java-binding=\"no\"", true)); + assertEquals("enable-java-binding=\"no\"", db.patchConfigFileEnableJava("enable-java-binding=\"no\"", false)); + + assertEquals("yyy enable-java-binding=\"yes\" xxx", db.patchConfigFileEnableJava("yyy enable-java-binding=\"no\" xxx", true)); + } + +} diff --git a/dnet-information-service/src/test/java/eu/dnetlib/xml/database/exist/TestExistTrigger.java b/dnet-information-service/src/test/java/eu/dnetlib/xml/database/exist/TestExistTrigger.java new file mode 100644 index 0000000..9bee21a --- /dev/null +++ b/dnet-information-service/src/test/java/eu/dnetlib/xml/database/exist/TestExistTrigger.java @@ -0,0 +1,126 @@ +package eu.dnetlib.xml.database.exist; + +import javax.xml.xpath.XPathExpression; +import javax.xml.xpath.XPathExpressionException; +import javax.xml.xpath.XPathFactory; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.exist.collections.triggers.SAXTrigger; +import org.exist.collections.triggers.TriggerException; +import org.exist.dom.persistent.DocumentImpl; +import org.exist.storage.DBBroker; +import org.exist.storage.txn.Txn; +import org.exist.xmldb.XmldbURI; + +/** + * simple test trigger. + * + * @author marko + * + */ +public class TestExistTrigger extends SAXTrigger { + /** + * logger. + */ + private static final Log log = LogFactory.getLog(TestExistTrigger.class); // NOPMD by marko on 11/24/08 5:02 PM + /** + * expression. + */ + private transient XPathExpression expr; + + /** + * useless. + */ + public TestExistTrigger() { + super(); + + try { + expr = XPathFactory.newInstance().newXPath().compile("//hello"); + } catch (XPathExpressionException e) { + log.fatal("cannot parse xpath", e); + } + } + + + + @Override + public void beforeCreateDocument(final DBBroker dbBroker, final Txn txn, final XmldbURI xmldbURI) throws TriggerException { + + } + + @Override + public void afterCreateDocument(final DBBroker dbBroker, final Txn txn, final DocumentImpl document) throws TriggerException { + try { + log.debug("created new document: " + expr.evaluate(document)); + } catch (XPathExpressionException e) { + log.fatal("xpatthing", e); + } + } + + @Override + public void beforeUpdateDocument(final DBBroker dbBroker, final Txn txn, final DocumentImpl document) throws TriggerException { + try { + log.info("old value: " + expr.evaluate(document)); + + } catch (XPathExpressionException e) { + log.fatal("xpatthing", e); + } + } + + @Override + public void afterUpdateDocument(final DBBroker dbBroker, final Txn txn, final DocumentImpl document) throws TriggerException { + + try { + log.info("new value: " + expr.evaluate(document)); + } catch (XPathExpressionException e) { + log.fatal("xpatthing", e); + } + + } + + @Override + public void beforeUpdateDocumentMetadata(final DBBroker dbBroker, final Txn txn, final DocumentImpl document) throws TriggerException { + + } + + @Override + public void afterUpdateDocumentMetadata(final DBBroker dbBroker, final Txn txn, final DocumentImpl document) throws TriggerException { + + } + + @Override + public void beforeCopyDocument(final DBBroker dbBroker, final Txn txn, final DocumentImpl document, final XmldbURI xmldbURI) throws TriggerException { + + } + + @Override + public void afterCopyDocument(final DBBroker dbBroker, final Txn txn, final DocumentImpl document, final XmldbURI xmldbURI) throws TriggerException { + + } + + @Override + public void beforeMoveDocument(final DBBroker dbBroker, final Txn txn, final DocumentImpl document, final XmldbURI xmldbURI) throws TriggerException { + + } + + @Override + public void afterMoveDocument(final DBBroker dbBroker, final Txn txn, final DocumentImpl document, final XmldbURI xmldbURI) throws TriggerException { + + } + + @Override + public void beforeDeleteDocument(final DBBroker dbBroker, final Txn txn, final DocumentImpl document) throws TriggerException { + try { + log.debug("deleted document: " + expr.evaluate(document)); + } catch (XPathExpressionException e) { + log.fatal("xpatthing", e); + } + + } + + @Override + public void afterDeleteDocument(final DBBroker dbBroker, final Txn txn, final XmldbURI xmldbURI) throws TriggerException { + + } +} diff --git a/dnet-information-service/src/test/java/eu/dnetlib/xml/database/exist/TestTrigger.java b/dnet-information-service/src/test/java/eu/dnetlib/xml/database/exist/TestTrigger.java new file mode 100644 index 0000000..9da1b64 --- /dev/null +++ b/dnet-information-service/src/test/java/eu/dnetlib/xml/database/exist/TestTrigger.java @@ -0,0 +1,124 @@ +package eu.dnetlib.xml.database.exist; + +import org.w3c.dom.Document; + +import eu.dnetlib.xml.database.LoggingTrigger; + +/** + * test high level xml db trigger tester. + * + * @author marko + * + */ +public class TestTrigger extends LoggingTrigger { + + /** + * true when the trigger is first called on 'create' event. + */ + private boolean created = false; // NOPMD + /** + * true when the trigger is first called on 'update' event. + */ + private boolean updated = false; // NOPMD + /** + * true when the trigger is first called on 'delete' event. + */ + private boolean deleted = false; // NOPMD + + /** + * last triggered file name. + */ + private String lastFile; + /** + * last triggered collection name. + */ + private String lastCollection; + + /** + * {@inheritDoc} + * @see eu.dnetlib.xml.database.Trigger#created(java.lang.String, java.lang.String, org.w3c.dom.Document) + */ + @Override + public void created(final String file, final String collection, final Document newDoc) { + super.created(file, collection, newDoc); + + setLastFile(file); + setLastCollection(collection); + created = true; + } + + /** + * {@inheritDoc} + * @see eu.dnetlib.xml.database.Trigger#deleted(java.lang.String, java.lang.String, org.w3c.dom.Document) + */ + @Override + public void deleted(final String file, final String collection, final Document oldDoc) { + super.deleted(file, collection, oldDoc); + + setLastFile(file); + setLastCollection(collection); + deleted = true; + } + + /** + * {@inheritDoc} + * @see eu.dnetlib.xml.database.Trigger#updated(java.lang.String, java.lang.String, org.w3c.dom.Document, org.w3c.dom.Document) + */ + @Override + public void updated(final String file, final String collection, final Document oldDoc, final Document newDoc) { + super.updated(file, collection, oldDoc, newDoc); + + setLastFile(file); + setLastCollection(collection); + updated = true; + } + + /** + * reset crude sentinels. + */ + public void reset() { + setCreated(false); + setUpdated(false); + setDeleted(false); + } + + public boolean isCreated() { + return created; + } + + public void setCreated(final boolean created) { + this.created = created; + } + + public boolean isUpdated() { + return updated; + } + + public void setUpdated(final boolean updated) { + this.updated = updated; + } + + public boolean isDeleted() { + return deleted; + } + + public void setDeleted(final boolean deleted) { + this.deleted = deleted; + } + + String getLastFile() { + return lastFile; + } + + void setLastFile(final String lastFile) { + this.lastFile = lastFile; + } + + String getLastCollection() { + return lastCollection; + } + + void setLastCollection(final String lastCollection) { + this.lastCollection = lastCollection; + } +} diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/enabling/is/lookup/collProfile.xml b/dnet-information-service/src/test/resources/eu/dnetlib/enabling/is/lookup/collProfile.xml new file mode 100644 index 0000000..c37eb99 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/enabling/is/lookup/collProfile.xml @@ -0,0 +1,36 @@ + +
+ + + + + +
+ + + file.gif + Test Collection + + + History + 0 + 1 + 0 + + AAAAAAAAAAAAA + BBBBBBBBBBBBB + CCCCCCCCCCCCC + + + queryA + file.gif + + + + + query0000 AND queryA + + + + +
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/enabling/is/registry/RepositoryServiceResourceType.xsd b/dnet-information-service/src/test/resources/eu/dnetlib/enabling/is/registry/RepositoryServiceResourceType.xsd new file mode 100644 index 0000000..d571329 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/enabling/is/registry/RepositoryServiceResourceType.xsd @@ -0,0 +1,2 @@ + + diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/enabling/is/registry/schema/any-schema.xsd b/dnet-information-service/src/test/resources/eu/dnetlib/enabling/is/registry/schema/any-schema.xsd new file mode 100644 index 0000000..e27688b --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/enabling/is/registry/schema/any-schema.xsd @@ -0,0 +1,166 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/enabling/is/registry/schema/invalid-profile.xml b/dnet-information-service/src/test/resources/eu/dnetlib/enabling/is/registry/schema/invalid-profile.xml new file mode 100644 index 0000000..fcee064 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/enabling/is/registry/schema/invalid-profile.xml @@ -0,0 +1,2 @@ + +
00edocHumboldt University of Berlin, GERMANY, Document ServerHumboldt Univ. Berlin: edoc Document and Publication Serverhttp://edoc.hu-berlin.de/e_modules/banner4.jpgDE13.3752.51591http://edoc.hu-berlin.de/mailto:oai@rz.hu-berlin.deOAIhttp://edoc.hu-berlin.de/OAI-2.0oai_dcoai_emsoai_ppoai_xmetadissoai_epdcxAllgemeines, WissenschaftInformatikBibliografienBibliotheks- und InformationswissenschaftOrganisationen, MuseumswissenschaftGeografie, ReisenPhilosophiePsychologieReligion, ReligionsphilosophieTheologie, ChristentumAndere ReligionenSozialwissenschaften, SoziologieStatistikPolitikWirtschaftRechtffentliche VerwaltungSoziale Probleme, SozialarbeitErziehung, Schul- und BildungswesenEthnologieSprachwissenschaft, LinguistikDeutschFranzoesisch, romanische Sprachen allgemeinItalienisch, Rumaenisch, RaetoromanischLateinAndere SprachenNaturwissenschaftenMathematikPhysikChemieGeowissenschaftenBiowissenschaften, BiologiePflanzen (Botanik)Tiere (Zoologie)TechnikMedizinLandwirtschaft, VeterinaermedizinHauswirtschaftManagementKuenste, Bildende Kunst allgemeinLandschaftsgestaltung, RaumplanungArchitekturPlastik, Numismatik, Keramik, MetallkunstMalereiGrafische Verfahren, Druckeffentliche Darbietungen, Film, RundfunkTheater, TanzSportLiteratur, Rhetorik, LiteraturwissenschaftDeutsche LiteraturLiteratur in anderen germanischen SprachenFranzoesische LiteraturItalienische, rumaenische, raetoromanische LiteraturLiteratur in anderen SprachenGeschichteGeografie, ReisenBiografie, Genealogie, HeraldikAlte Geschichte, ArchaeologieGeschichte EuropasGeschichte DeutschlandsGeschichte AsiensWissenschaft und Kultur allgemeinSchrift, Buch, Bibliothek, Information und DokumentationPhilosophiePsychologieChristliche ReligionAllg. und Vgl. Religionswiss., Nichtchristliche ReligionenSoziologie, GesellschaftStatistikPolitikWirtschaftRechtErziehung, Bildung, UnterrichtVolkskunde, VoelkerkundeNatur, Naturwissenschaften allgemeinMathematikInformatik, DatenverarbeitungPhysik, AstronomieChemieGeowissenschaftenBiologieMedizinTechnik allgemeinLandwirtschaft, GartenArchitekturBildende KunstTheater, Tanz, FilmSport, SpieleAllg. und Vgl. Sprach- und LiteraturwissenschaftDeutsche Sprach- und LiteraturwissenschaftSprach- und Literaturwiss. der uebrigen germanischen SprachenRomanische Sprach- und LiteraturwissenschaftKlassische Sprach- und LiteraturwissenschaftSlawische und baltische Sprach- und LiteraturwissenschaftSprach- und Literaturwissenschaft sonstiger SprachenArchaeologie, VorgeschichteGeographie, Heimat- und Laenderkunde, ReisenGeschichte und Historische HilfswissenschaftenSozialgeschichteWirtschaftsgeschichteBooks, MonographsConference ProceedingsDiploma ThesesDissertations and Professional DissertationsJournal ArticleLecturesPapersReports55070
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/enabling/is/registry/schema/schema.xsd b/dnet-information-service/src/test/resources/eu/dnetlib/enabling/is/registry/schema/schema.xsd new file mode 100644 index 0000000..6a126c4 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/enabling/is/registry/schema/schema.xsd @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/enabling/is/registry/schema/valid-any-optional.xml b/dnet-information-service/src/test/resources/eu/dnetlib/enabling/is/registry/schema/valid-any-optional.xml new file mode 100644 index 0000000..0dc7aad --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/enabling/is/registry/schema/valid-any-optional.xml @@ -0,0 +1,38 @@ + +
+ + + + + + + + + +
+ + + + 0 + 0 + 0 + + + + 0 + 0 + + + + + + 0 + 0 + + + + + + + +
diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/enabling/is/registry/schema/valid-profile.xml b/dnet-information-service/src/test/resources/eu/dnetlib/enabling/is/registry/schema/valid-profile.xml new file mode 100644 index 0000000..c2ff189 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/enabling/is/registry/schema/valid-profile.xml @@ -0,0 +1,2 @@ + +
00edocHumboldt University of Berlin, GERMANY, Document ServerHumboldt Univ. Berlin: edoc Document and Publication Serverhttp://edoc.hu-berlin.de/e_modules/banner4.jpgDE13.3752.51591http://edoc.hu-berlin.de/mailto:oai@rz.hu-berlin.deOAIhttp://edoc.hu-berlin.de/OAI-2.0oai_dcoai_emsoai_ppoai_xmetadissoai_epdcxAllgemeines, WissenschaftInformatikBibliografienBibliotheks- und InformationswissenschaftOrganisationen, MuseumswissenschaftGeografie, ReisenPhilosophiePsychologieReligion, ReligionsphilosophieTheologie, ChristentumAndere ReligionenSozialwissenschaften, SoziologieStatistikPolitikWirtschaftRechtffentliche VerwaltungSoziale Probleme, SozialarbeitErziehung, Schul- und BildungswesenEthnologieSprachwissenschaft, LinguistikDeutschFranzoesisch, romanische Sprachen allgemeinItalienisch, Rumaenisch, RaetoromanischLateinAndere SprachenNaturwissenschaftenMathematikPhysikChemieGeowissenschaftenBiowissenschaften, BiologiePflanzen (Botanik)Tiere (Zoologie)TechnikMedizinLandwirtschaft, VeterinaermedizinHauswirtschaftManagementKuenste, Bildende Kunst allgemeinLandschaftsgestaltung, RaumplanungArchitekturPlastik, Numismatik, Keramik, MetallkunstMalereiGrafische Verfahren, Druckeffentliche Darbietungen, Film, RundfunkTheater, TanzSportLiteratur, Rhetorik, LiteraturwissenschaftDeutsche LiteraturLiteratur in anderen germanischen SprachenFranzoesische LiteraturItalienische, rumaenische, raetoromanische LiteraturLiteratur in anderen SprachenGeschichteGeografie, ReisenBiografie, Genealogie, HeraldikAlte Geschichte, ArchaeologieGeschichte EuropasGeschichte DeutschlandsGeschichte AsiensWissenschaft und Kultur allgemeinSchrift, Buch, Bibliothek, Information und DokumentationPhilosophiePsychologieChristliche ReligionAllg. und Vgl. Religionswiss., Nichtchristliche ReligionenSoziologie, GesellschaftStatistikPolitikWirtschaftRechtErziehung, Bildung, UnterrichtVolkskunde, VoelkerkundeNatur, Naturwissenschaften allgemeinMathematikInformatik, DatenverarbeitungPhysik, AstronomieChemieGeowissenschaftenBiologieMedizinTechnik allgemeinLandwirtschaft, GartenArchitekturBildende KunstTheater, Tanz, FilmSport, SpieleAllg. und Vgl. Sprach- und LiteraturwissenschaftDeutsche Sprach- und LiteraturwissenschaftSprach- und Literaturwiss. der uebrigen germanischen SprachenRomanische Sprach- und LiteraturwissenschaftKlassische Sprach- und LiteraturwissenschaftSlawische und baltische Sprach- und LiteraturwissenschaftSprach- und Literaturwissenschaft sonstiger SprachenArchaeologie, VorgeschichteGeographie, Heimat- und Laenderkunde, ReisenGeschichte und Historische HilfswissenschaftenSozialgeschichteWirtschaftsgeschichteBooks, MonographsConference ProceedingsDiploma ThesesDissertations and Professional DissertationsJournal ArticleLecturesPapersReports55070
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/enabling/is/registry/securityProfile.xml b/dnet-information-service/src/test/resources/eu/dnetlib/enabling/is/registry/securityProfile.xml new file mode 100644 index 0000000..e9417bb --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/enabling/is/registry/securityProfile.xml @@ -0,0 +1,27 @@ + + +
+ + + + + +
+ + + + + driver.security.identity.role#user + driver.security.identity.role + + + driver.security.identity.role#repositoryManager + driver.security.identity.role + + + test + password + + + +
diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/enabling/is/registry/serviceProfile.xml b/dnet-information-service/src/test/resources/eu/dnetlib/enabling/is/registry/serviceProfile.xml new file mode 100644 index 0000000..6090dbb --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/enabling/is/registry/serviceProfile.xml @@ -0,0 +1,38 @@ + + +
+ + + + + + + + + +
+ + + + 0 + 0 + 0 + + + 0 + 0 + + + + + + 0 + 0 + + + + action-10afbe80-11f6-11de-8e98-00163e7589aa + action-10afbe80-11f6-11de-8e98-00163e7589aa + + +
diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/enabling/is/registry/serviceProfileWithMessage.xml b/dnet-information-service/src/test/resources/eu/dnetlib/enabling/is/registry/serviceProfileWithMessage.xml new file mode 100644 index 0000000..d3f6b94 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/enabling/is/registry/serviceProfileWithMessage.xml @@ -0,0 +1,39 @@ + + +
+ + + + + + + + + +
+ + + + 0 + 0 + 0 + + + 0 + 0 + + + + + + 0 + 0 + + + + action-10afbe80-11f6-11de-8e98-00163e7589aa + action-10afbe80-11f6-11de-8e98-00163e7589aa + CREATEASSIGNED + + +
diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/enabling/is/registry/test-profile.xml b/dnet-information-service/src/test/resources/eu/dnetlib/enabling/is/registry/test-profile.xml new file mode 100644 index 0000000..3c3f8b6 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/enabling/is/registry/test-profile.xml @@ -0,0 +1,154 @@ + +
+ + + + + + +
+ + + 0 + + 0 + Opus + ArchiMeD - Elektronische Publikationen der Universität Mainz + Mainz Univ., ArchiMed + http://archimed.uni-mainz.de/opusubm/grafiken/kopf_schriftzug.gif + DE + + 8.27 + 50.0006 + 1 + + http://archimed.uni-mainz.de/opusubm/archimed-home.html + + mailto:seiler@hbz-nrw.de + + + OAI + http://ubm.opus.hbz-nrw.de/phpoai/oai2.php + + oai_dc + epicur + + + Generalities, Science + Data processing Computer science + Bibliography + Library and information sciences + General encyclopedic works + General serials and their indexes + General organization and museology + News media, journalism, publishing + General collections + Manuscripts and rare books + Philosophy + Paranormal phenomena + Psychology + Religion + Bible + Christian theology + Other and comparative religions + Social sciences + General statistics + Political science + Economics + Law + Public administration + Military science + "Social services; association" + Education + Commerce, communications, transport + Customs, etiquette, folklore + Language, Linguistics + English + Germanic + Other Germanic languages + Romance languages French + Italian, Romanian, Rhaeto-Romantic + Spanish and Portugese languages + Italic Latin + Hellenic languages Classical Greek + Other languages + Natural sciences and mathematics + Mathematics + Astronomy and allied sciences + Physics + Chemistry and allied sciences + Earth sciences + Paleontology Paleozoology + Life sciences + Botanical sciences + Zoological sciences + Technology (Applied sciences) + Medical sciences Medicine + Engineering and allied operations + Agriculture + Home economics and family living + Management and auxiliary services + Chemical engineering + Manufacturing + Buildings + The arts + Civic and landscape art + Architecture + Plastic arts Sculpture + Drawing and decorative arts + Comics, Cartoons + Painting and paintings + Graphic arts Printmaking and prints + Photography and photographs + Music + Recreational and performing arts + Public performances + Stage presentations + Indoor games and amusements + Athletic and outdoor sports and games + Literature and rhetoric + American literature in English + English and Old English literatures + Literatures of Germanic languages + Other Germanic literatures + Literatures of Romance languages + Italian, Romanian, Rhaeto-Romanic literatures + Spanish and Portuguese literatures + Italic literatures Latin + Hellenic literatures Classical Greek + Literatures of other languages + Geography and history + Geography and travel + Geography and travel Germany + Biography, genealogy, insignia + History of ancient world + General history of Europe + General history of Europe Central Europe Germany + General history of Asia Far East + General history of Africa + General history of North America + General history of South America + General history of other areas + Text.Thesis.Doctoral + Text.Thesis.Habilitation + MastersThesis + DiplomaThesis + MagisterThesis + Msc + + + + + + 1371 + + + + + + 0 + + + + +
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/enabling/is/registry/userProfile.xml b/dnet-information-service/src/test/resources/eu/dnetlib/enabling/is/registry/userProfile.xml new file mode 100644 index 0000000..e9c5683 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/enabling/is/registry/userProfile.xml @@ -0,0 +1,34 @@ + + +
+ + + + + +
+ + + + + + + + + + + + + + + BRIEF + + + + + + + value + + +
diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/enabling/is/sn/resourcestate/hib/HibernateResourceStateSubscriptionDAOImplTest-context.xml b/dnet-information-service/src/test/resources/eu/dnetlib/enabling/is/sn/resourcestate/hib/HibernateResourceStateSubscriptionDAOImplTest-context.xml new file mode 100644 index 0000000..e4206e9 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/enabling/is/sn/resourcestate/hib/HibernateResourceStateSubscriptionDAOImplTest-context.xml @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/enabling/is/sn/resourcestate/hib/hsql-context.xml b/dnet-information-service/src/test/resources/eu/dnetlib/enabling/is/sn/resourcestate/hib/hsql-context.xml new file mode 100644 index 0000000..55e926c --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/enabling/is/sn/resourcestate/hib/hsql-context.xml @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + eu.dnetlib.enabling.is.sn.resourcestate.ResourceStateSubscription + + + + + org.hibernate.dialect.HSQLDialect + + true + create + + + + + + + + + diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/enabling/tools/local-cxf.xml b/dnet-information-service/src/test/resources/eu/dnetlib/enabling/tools/local-cxf.xml new file mode 100644 index 0000000..5b8040f --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/enabling/tools/local-cxf.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + http://cxf.apache.org/transports/local + http://schemas.xmlsoap.org/soap/http + http://schemas.xmlsoap.org/wsdl/soap/http + + + + diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/enabling/tools/test-profile.xml b/dnet-information-service/src/test/resources/eu/dnetlib/enabling/tools/test-profile.xml new file mode 100644 index 0000000..c28fa68 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/enabling/tools/test-profile.xml @@ -0,0 +1,154 @@ + +
+ + + + + + +
+ + + 0 + + 0 + Opus + ArchiMeD - Elektronische Publikationen der Universität Mainz + Mainz Univ., ArchiMed + http://archimed.uni-mainz.de/opusubm/grafiken/kopf_schriftzug.gif + DE + + 8.27 + 50.0006 + 1 + + http://archimed.uni-mainz.de/opusubm/archimed-home.html + + mailto:seiler@hbz-nrw.de + + + OAI + http://ubm.opus.hbz-nrw.de/phpoai/oai2.php + + oai_dc + epicur + + + Generalities, Science + Data processing Computer science + Bibliography + Library and information sciences + General encyclopedic works + General serials and their indexes + General organization and museology + News media, journalism, publishing + General collections + Manuscripts and rare books + Philosophy + Paranormal phenomena + Psychology + Religion + Bible + Christian theology + Other and comparative religions + Social sciences + General statistics + Political science + Economics + Law + Public administration + Military science + "Social services; association" + Education + Commerce, communications, transport + Customs, etiquette, folklore + Language, Linguistics + English + Germanic + Other Germanic languages + Romance languages French + Italian, Romanian, Rhaeto-Romantic + Spanish and Portugese languages + Italic Latin + Hellenic languages Classical Greek + Other languages + Natural sciences and mathematics + Mathematics + Astronomy and allied sciences + Physics + Chemistry and allied sciences + Earth sciences + Paleontology Paleozoology + Life sciences + Botanical sciences + Zoological sciences + Technology (Applied sciences) + Medical sciences Medicine + Engineering and allied operations + Agriculture + Home economics and family living + Management and auxiliary services + Chemical engineering + Manufacturing + Buildings + The arts + Civic and landscape art + Architecture + Plastic arts Sculpture + Drawing and decorative arts + Comics, Cartoons + Painting and paintings + Graphic arts Printmaking and prints + Photography and photographs + Music + Recreational and performing arts + Public performances + Stage presentations + Indoor games and amusements + Athletic and outdoor sports and games + Literature and rhetoric + American literature in English + English and Old English literatures + Literatures of Germanic languages + Other Germanic literatures + Literatures of Romance languages + Italian, Romanian, Rhaeto-Romanic literatures + Spanish and Portuguese literatures + Italic literatures Latin + Hellenic literatures Classical Greek + Literatures of other languages + Geography and history + Geography and travel + Geography and travel Germany + Biography, genealogy, insignia + History of ancient world + General history of Europe + General history of Europe Central Europe Germany + General history of Asia Far East + General history of Africa + General history of North America + General history of South America + General history of other areas + Text.Thesis.Doctoral + Text.Thesis.Habilitation + MastersThesis + DiplomaThesis + MagisterThesis + Msc + + + + + + 1371 + + + + + + 0 + + + + +
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/applicationContext-integrationSupport.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/applicationContext-integrationSupport.xml new file mode 100644 index 0000000..e48fc42 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/applicationContext-integrationSupport.xml @@ -0,0 +1,8 @@ + + + + + + \ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo1.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo1.xml new file mode 100644 index 0000000..c2ff189 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo1.xml @@ -0,0 +1,2 @@ + +
00edocHumboldt University of Berlin, GERMANY, Document ServerHumboldt Univ. Berlin: edoc Document and Publication Serverhttp://edoc.hu-berlin.de/e_modules/banner4.jpgDE13.3752.51591http://edoc.hu-berlin.de/mailto:oai@rz.hu-berlin.deOAIhttp://edoc.hu-berlin.de/OAI-2.0oai_dcoai_emsoai_ppoai_xmetadissoai_epdcxAllgemeines, WissenschaftInformatikBibliografienBibliotheks- und InformationswissenschaftOrganisationen, MuseumswissenschaftGeografie, ReisenPhilosophiePsychologieReligion, ReligionsphilosophieTheologie, ChristentumAndere ReligionenSozialwissenschaften, SoziologieStatistikPolitikWirtschaftRechtffentliche VerwaltungSoziale Probleme, SozialarbeitErziehung, Schul- und BildungswesenEthnologieSprachwissenschaft, LinguistikDeutschFranzoesisch, romanische Sprachen allgemeinItalienisch, Rumaenisch, RaetoromanischLateinAndere SprachenNaturwissenschaftenMathematikPhysikChemieGeowissenschaftenBiowissenschaften, BiologiePflanzen (Botanik)Tiere (Zoologie)TechnikMedizinLandwirtschaft, VeterinaermedizinHauswirtschaftManagementKuenste, Bildende Kunst allgemeinLandschaftsgestaltung, RaumplanungArchitekturPlastik, Numismatik, Keramik, MetallkunstMalereiGrafische Verfahren, Druckeffentliche Darbietungen, Film, RundfunkTheater, TanzSportLiteratur, Rhetorik, LiteraturwissenschaftDeutsche LiteraturLiteratur in anderen germanischen SprachenFranzoesische LiteraturItalienische, rumaenische, raetoromanische LiteraturLiteratur in anderen SprachenGeschichteGeografie, ReisenBiografie, Genealogie, HeraldikAlte Geschichte, ArchaeologieGeschichte EuropasGeschichte DeutschlandsGeschichte AsiensWissenschaft und Kultur allgemeinSchrift, Buch, Bibliothek, Information und DokumentationPhilosophiePsychologieChristliche ReligionAllg. und Vgl. Religionswiss., Nichtchristliche ReligionenSoziologie, GesellschaftStatistikPolitikWirtschaftRechtErziehung, Bildung, UnterrichtVolkskunde, VoelkerkundeNatur, Naturwissenschaften allgemeinMathematikInformatik, DatenverarbeitungPhysik, AstronomieChemieGeowissenschaftenBiologieMedizinTechnik allgemeinLandwirtschaft, GartenArchitekturBildende KunstTheater, Tanz, FilmSport, SpieleAllg. und Vgl. Sprach- und LiteraturwissenschaftDeutsche Sprach- und LiteraturwissenschaftSprach- und Literaturwiss. der uebrigen germanischen SprachenRomanische Sprach- und LiteraturwissenschaftKlassische Sprach- und LiteraturwissenschaftSlawische und baltische Sprach- und LiteraturwissenschaftSprach- und Literaturwissenschaft sonstiger SprachenArchaeologie, VorgeschichteGeographie, Heimat- und Laenderkunde, ReisenGeschichte und Historische HilfswissenschaftenSozialgeschichteWirtschaftsgeschichteBooks, MonographsConference ProceedingsDiploma ThesesDissertations and Professional DissertationsJournal ArticleLecturesPapersReports55070
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo10.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo10.xml new file mode 100644 index 0000000..4b6fdd4 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo10.xml @@ -0,0 +1,2 @@ + +
00DSpaceUniv. Tromsoe: Munin Open Research ArchiveUniv. Tromsoe: Munin Open Research Archivehttp://www.ub.uit.no/munin/image/munin_banner-start_left.gifNO18.9569.6601http://www.ub.uit.no/munin/Univ. i Tromsoemunin@ub.uit.noOAIhttp://www.ub.uit.no/munin-oai/requestoai_dc14270
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo100.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo100.xml new file mode 100644 index 0000000..d598cd2 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo100.xml @@ -0,0 +1,2 @@ + +
00EprintsDORASDORAShttp://doras.dcu.ie/images/banner_right.jpgIE-6.22553.3860http://doras.dcu.ie/Dublin City Universitydoras@dcu.ieOAIhttp://doras.dcu.ie/cgi/oai2oai_dc7590
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo101.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo101.xml new file mode 100644 index 0000000..0860841 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo101.xml @@ -0,0 +1,2 @@ + +
00OpusSciDok, der Wissenschafts-Server der Universitaet des SaarlandesSciDok: Der Wissenschafts-Server der Univ. des Saarlandeshttp://scidok.sulb.uni-saarland.de/Icons/sci.gifDE6.998249.231http://scidok.sulb.uni-saarland.de/mailto:scidok@sulb.uni-saarland.deOAIhttp://scidok.sulb.uni-saarland.de/phpoai/oai2.phpoai_dcepicuroai_ppxMetaDissGeneralities, ScienceData processing Computer scienceLibrary and information sciencesNews media, journalism, publishingPsychologySocial sciencesGeneral statisticsPolitical scienceEconomicsLawPublic administrationEducationLanguage, LinguisticsGermanicRomance languages FrenchItalian, Romanian, Rhaeto-RomanticNatural sciences and mathematicsMathematicsPhysicsChemistry and allied sciencesEarth sciencesLife sciencesZoological sciencesTechnology (Applied sciences)Medical sciences MedicineEngineering and allied operationsChemical engineeringManufacturingAthletic and outdoor sports and gamesLiteratures of Germanic languagesItalian, Romanian, Rhaeto-Romanic literaturesGeography and historyGeography and travelHistory of ancient worldArticleBookHonoursThesisInBookInProceedingsManualMastersThesisMiscPreprintResearchPaperTechReportText.Thesis.DoctoralText.Thesis.Habilitation12990
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo102.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo102.xml new file mode 100644 index 0000000..8c9253a --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo102.xml @@ -0,0 +1,2 @@ + +
00FedoraePICePIChttp://epic.awi.de/Publications/Pics/epic.gifDE8.579549253.53368521http://epic.awi.de/epic/MainAlfred Wegener Institute for Polar and Marine Research (AWI),fedora-admin@awi.deOAIhttp://rep.awi.de:8080/oaiprovider/oai_dc4380
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo103.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo103.xml new file mode 100644 index 0000000..4a847a0 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo103.xml @@ -0,0 +1,2 @@ + +
00DSpaceJUWEL (JUelicher Wissenschaftliche Elektronische Literatur)JUWELhttp://juwel.fz-juelich.de:8080/dspace/image/kopf.jpgDE6.404550.90041http://juwel.fz-juelich.de:8080/dspace//Forschungszentrums Jülichw.hinz@fz-juelich.deOAIhttp://juwel.fz-juelich.de:8080/dspace-oai122fzj/requestoai_dc28790
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo104.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo104.xml new file mode 100644 index 0000000..88e5352 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo104.xml @@ -0,0 +1,2 @@ + +
00Wageningen University and Researchcenter PublicationsWageningen University and Researchcenter PublicationsNL5.660951.9641servicedesk.library@wur.nlOAIhttp://library.wur.nl/oaioai_dccollexisweverdare_didlPublicly available objectsKeur der wetenschapDistributed Africana Repositories CommunityWiskundeWiskunde (algemeen)Toegepaste wiskundeWiskundige modellenStatistiekStatistiek (algemeen)Ontwerp van proevenToegepaste statistiekFysicaFysica (algemeen)BiofysicaBiofysica (algemeen)MeteorologieMeteorologie (algemeen)KlimatologieKlimaatveranderingChemie (algemeen)ChemieOrganische chemieFysische chemieKollod en oppervlaktechemieBiochemieEiwitten en enzymenBiologieCelbiologieEvolutie en fylogenieBiosystematiekMoleculaire biologieMoleculaire biologie (algemeen)Moleculaire plantenbiologieGenetische modificatieGeneticaGenetica (algemeen)CytogeneticaMoleculaire geneticaKwantitatieve- en populatiegeneticaBiotechnologieBioveiligheid, risico-evaluatieBioinformaticaBioinformatica (algemeen)GenoominformaticaProteomicsMicrobiologieMicrobiologie (algemeen)VirologieBacteriologieIndustrile microbiologieLandbouwLandbouw (algemeen)LandbouwsystemenLandgebruikssystemenBedrijfssystemenAgro-ecosystemenAlternatieve LandbouwEcologische landbouwGeneeskundeHumane fysiologie en anatomieEpidemiologieCommunicatieCommunicatie (algemeen)CommunicatieprocessenPublicerenBibliothekenBibliotheken (algemeen)SociologieSociologie (algemeen)Rurale samenlevingAgrarische sociologieGezinssociologieRampenstudiesRampenstudies (algemeen)Seksen en hun onderlinge verhoudingenSeksen en hun onderlinge verhoudingen (algemeen)Rurale vrouwenRecreatie, toerismeRecreatie, toerisme (algemeen)OnderwijsOnderwijs (algemeen)DidactiekEconomieEconomie (algemeen)Economische voorwaarden, ontwikkeling en structuurEconomische beleidMilieu-economieOntwikkelingsstudiesOntwikkelingsstudies (algemeen)OntwikkelingseconomiePlattelandsontwikkelingVoedselvoorzieningsbeleidVoedselzekerheidOntwikkelingssociologieAgrarische economieAgrarische economie (algemeen)LandbouwbeleidAgrarische bedrijfsvoeringAgrarische bedrijfseconomieHuishoudkundeHuishoudkunde (algemeen)Management, bedrijfskunde, organisatiekundeManagement studiesBedrijfskundeKwaliteitszorgBeheer van productieketensLogistiekOperationeel onderzoekBedrijfseconomieMarketingMarketing (algemeen)Marketing-onderzoekConsumentenstudiesConsumentenstudies (algemeen)ConsumentengedragEconomie m.b.t. consumentenRechtRecht (algemeen)Openbaar bestuurOpenbaar bestuur (algemeen)FilosofieFilosofie (algemeen)Filosofische stelselsEthiek, bio-ethiekSociale filosofieEconomische, sociale en cultuurgeschiedenisRurale geschiedenisInnovatiestudiesInnovatiestudies (algemeen)TechniekTechniek (algemeen)Werktuigbouwkunde en elektrotechniekMeet- en regeltechniekEnergieWindenergieMilieutechnologieAfvalverwerkingAfvalwaterbehandelingInformatie- en communicatietechnologieInformatie- en communicatietechnologie (algemeen)LandbouwtechniekLandbouwtechniek (algemeen)Landbouwbedrijfsgebouwen en landbouwinstallatiesMechanisatieLevensmiddelen- en bioproceskundeLevensmiddelen- en bioproceskunde (algemeen)Membraantechnologie(Bio)reactorkundeProcescontrolesystemenLevensmiddelentechnologieLevensmiddelentechnologie (algemeen)LevensmiddelenfysicaLevensmiddelenchemieLevensmiddelenmicrobiologieBewaring, verpakking en opslag van levensmiddelenBewaring van levensmiddelenKwaliteit van levensmiddelen, voedselveiligheidProductontwikkeling van levensmiddelenNieuwe voedingsmiddelenHumane voedingHumane voeding (algemeen)Humane voeding en gezondheidToxicologieToxicologie (algemeen)Milieutoxicologie, ecotoxicologieMilieuwetenschappenMilieuwetenschappen (algemeen)Remote sensing en Geografische InformatiesystemenRemote sensingGeografische informatiesystemenRuimtelijke ordeningRuimtelijke ordening (algemeen)LandgebruiksplanningLandschapsarchitectuurLandschapsarchitectuur (algemeen)GeologieGeologie (algemeen)BodemkundeBodemkunde (algemeen)BodemchemieBodemfysicaBodemclassificatieLandevaluatieGrondbewerkingBodemdegradatie en bodembeschermingErosieBodemvruchtbaarheidBodembiologieLandinrichtingLandinrichting (algemeen)WaterbeheerWaterbeheer (algemeen)HydrologieGrondwaterhydrologieAgrohydrologieIrrigatieWaterkwaliteitMilieubeheerMilieubeheer (algemeen)Milieusystemen, milieusysteemanalyseMilieubeleidMilieuverontreinigingBodemverontreinigingNatuurbeheerNatuurbeheer (algemeen)NatuurbeschermingBiodiversiteitEcologieEcologie (algemeen)Aquatische ecologieBosbouwBosbouw (algemeen)BosecologieBosteeltBosbeheerBosbeleidBotanieBotanische techniekenPlantentaxonomiePlantencelbiologiePlantenontwikkelingPlantenfysiologieFotosynthesePlantengroeiPlantenecologieVegetatieonderzoekBiologie van bacterin, schimmels en plantenProkaryotenCyanobacterinSchimmelsGewaswetenschappenGewaswetenschappen (algemeen)TuinbouwPlantaardige productiesystemenLandbouwplantenteeltOnkruidkundeOnkruidkunde (algemeen)Plantenveredeling- en geneticaPlantenveredeling en -genetica (algemeen)Plantenveredeling, selectiemethodenResistentieveredelingPlantenziekten, -plagen en afwijkingenPlantenziekten, -plagen en -afwijkingen (algemeen)Gastheer parasiet relatiesSymptomen van plantenziekten en -plagenLandbouwkundige bacteriologieLandbouwkundige bacteriologie (algemeen)Landbouwkundige virologie (algemeen)PlantenvirussenVirussen van ongewerveldenLandbouwkundige mycologieLandbouwkundige mycologie (algemeen)Landbouwkundige nematologieLandbouwkundige nematologie (algemeen)Plantenparasitaire nematodenLandbouwkundige entomologie en acaralogieLandbouwkundige entomologie en acaralogie (algemeen)Landbouwkundige entomologieEcologische entomologieFysiologische entomologiePlant- en gewasbeschermingPlant- en gewasbescherming (algemeen)Biologische bestrijdingZooelogieZooelogie (algemeen)Dierlijke ontwikkeling en levenscyclusDierfysiologie en -biochemieVoortplanting en vruchtbaarheidFysiologie van de diervoedingStressfysiologie en adaptatieImmunologieDiergedrag en ethologieDierecologieBiologie van diertaxonomische groepenInsectaPiscesDiergeneeskundeDiergeneeskunde (algemeen)DierpathologieInfectieziektenVeterinaire epidemiologieDierhouderijDierhouderij (algemeen)Huisvesting, management en verzorging van dierenGezondheid en welzijn van dierenFokkerij en geneticaFokkerij en genetica (algemeen)Fokmethoden en voortplantingDiervoeding en -voederingDiervoeding en -voedering (algemeen)Dierlijke productiesystemenDierlijke productiesystemen (algemeen)Aquacultuur en visserijAquacultuur en visserij (algemeen)AquacultuurVisserijLandbouwhuisdieren en dieren in gevangenschapLandbouwhuisdieren en dieren in gevangenschap (algemeen)151360
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo105.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo105.xml new file mode 100644 index 0000000..a13714d --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo105.xml @@ -0,0 +1,2 @@ + +
00OPUSOPUS PublikationsserverOPUS publication serverhttp://ub.uni-hohenheim.de/uploads/tf/header.gifDE9.19873348.710241http://ub.uni-hohenheim.de/62810.htmlUniversität Hohenheimopus@uni-hohenheim.deOAIhttp://opus.ub.uni-hohenheim.de/oai2/oai2.phpoai_dc2720
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo106.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo106.xml new file mode 100644 index 0000000..d2d2793 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo106.xml @@ -0,0 +1,2 @@ + +
00Proprietary SoftwareePub WUePub WUhttp://epub.wu-wien.ac.at/images/ePub_logo_klein.jpgAT16.35748.2301http://epub.wu-wien.ac.at/english/VIENNA UNIVERSITY OF ECONOMICS AND BUSINESS ADMINISTRATIONhahsler@ai.wu-wien.ac.atOAIhttp://epub.wu-wien.ac.at/dyn/OAI/oaicgi.ploai_dc8120
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo107.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo107.xml new file mode 100644 index 0000000..bfc20ec --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo107.xml @@ -0,0 +1,2 @@ + +
00OPUSUniv. Konstanz: Konstanzer Online-Publikations-System (KOPS)Univ. Konstanz: Konstanzer Online-Publikations-System (KOPS)http://www.uni-konstanz.de/images/logo.pngDE9.18747.6891http://www.ub.uni-konstanz.de/kops/Univ. Konstanzarno.scharmann@uni-konstanz.deOAIhttp://www.ub.uni-konstanz.de/kops/oai2/oai2.phpoai_dc62200
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo108.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo108.xml new file mode 100644 index 0000000..ffa6a7e --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo108.xml @@ -0,0 +1,2 @@ + +
00EprintsfedOAfedOAhttp://www.fedoa.unina.it/due.gifIT14.34140.8111http://www.fedoa.unina.it/University of Naples Federico IInicastro@unina.itOAIhttp://www.fedoa.unina.it/perl/oai2oai_dc20460
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo109.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo109.xml new file mode 100644 index 0000000..3bf2c1e --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo109.xml @@ -0,0 +1,2 @@ + +
00Hochschulschriftenserver(HSSS) SLUB Dresden, GERMANY, Document ServerElectronic Publication Archive of the Saxon State and University Library Dresdenhttp://www.slub-dresden.de/slub_logo_small.gifDE13.740751.05361http://hsss.slub-dresden.de/ir268155@inf.tu-dresden.deOAIhttp://hsss.slub-dresden.de/oai/OAI-2.0xmetadissplusxmetadissepicuroai_dcDeutsche Nationalbibliografie SachgruppeWissenschaft und Kultur allgemeinSchrift, Buch, Bibliothek, Information und DokumentationPhilosophiePsychologieChristliche ReligionAllg. und Vgl. Religionswiss., Nichtchristliche ReligionenSoziologie, GesellschaftStatistikPolitikWirtschaftRecht29520
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo11.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo11.xml new file mode 100644 index 0000000..59eba04 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo11.xml @@ -0,0 +1,2 @@ + +
00dLibraPoznan Supercomputing and Networking Center (PSNC): Digital Library Framework (dLibra)Poznan Supercomputing and Networking Center (PSNC): Digital Library Framework (dLibra)http://dlibra.psnc.pl/images/stronka-logo-pcss-2.jpgPL16.92552.4061http://dlibra.psnc.pl/Poznan Supercomputing and Networking Center (PSNC)dlibra@man.poznan.plOAIhttp://dlibra.psnc.pl/biblioteka/oai-pmh-repository.xmloai_dc1170
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo110.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo110.xml new file mode 100644 index 0000000..d370363 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo110.xml @@ -0,0 +1,2 @@ + +
00EigenentwicklungElektronische Dissertationen der Ruhr-Univ. BochumElektronische Dissertationen der Ruhr-Univ. Bochumhttp://www.ub.ruhr-uni-bochum.de/zentral_files/rub_schrift.gifDE7.25851.4471http://www.ub.ruhr-uni-bochum.de/DigiBib/DissWeb/E_Diss.htmlUniversitaet Bochummarkus.schmidt-essen@web.deOAIhttp://oai.ub.rub.de/oai/oai2.phpoai_dc24000
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo111.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo111.xml new file mode 100644 index 0000000..e74ee99 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo111.xml @@ -0,0 +1,2 @@ + +
00EprintsPharmacy EprintsPharmacy Eprintshttp://eprints.pharmacy.ac.uk/images/site.gifUK-0.12251.5240http://eprints.pharmacy.ac.uk/School of Pharmacy, Univ. of Londonlibrary@pharmacy.ac.ukOAIhttp://eprints.pharmacy.ac.uk/cgi/oai2oai_dc8920
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo112.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo112.xml new file mode 100644 index 0000000..b5477ff --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo112.xml @@ -0,0 +1,2 @@ + +
00VTOAIUniversitat Oberta de Catalunya: Tesis Doctorals en Xarxa (TDX)Univ. Oberta de Catalunya: Theses and Dissertations Online (TDX)http://www.tesisenxarxa.net/images/tdx/titol_transp.gifES2.13350841.4149381http://www.tdx.cesca.es/Universitat Oberta de Catalunyatdx@cesca.esOAIhttp://www.tdx.cesca.es/TDX_UOC/NDLTD-OAI/oai.ploai_dc30
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo113.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo113.xml new file mode 100644 index 0000000..49c27c9 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo113.xml @@ -0,0 +1,2 @@ + +
00Proprietary SoftwareeDoc Server Max Planck Institute for Plasma PhysicseDoc Server Max Planck Institute for Plasma Physicshttp://www.ipp.mpg.de/ippcms/de/images/logos/ippweblogo.gifDE11.67043448.2629561http://edoc.mpg.de/search.eplMax-Planck-Institut für Plasmaphysikvdm@zim.mpg.deOAIhttp://edoc.mpg.de/ac_ft_oai.ploai_dc10160
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo114.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo114.xml new file mode 100644 index 0000000..accc381 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo114.xml @@ -0,0 +1,2 @@ + +
00EigenentwicklungOAR, het Open Archief van VIOE-publicatiesOAR, het Open Archief van VIOE-publicatieshttp://www.vioe.be/uploads/f47.gifBE4.35750.8601http://oar.vioe.be/Vlaams Instituut voor het Onroerend Erfgoedbart.debunne@rwo.vlaanderen.beOAIhttp://oar.vioe.be/oai2.phpoai_dc1660
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo115.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo115.xml new file mode 100644 index 0000000..0acdcb6 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo115.xml @@ -0,0 +1,3 @@ + +
00PUMANational Research Council Faenza - ISTEC Repository National Research Council Faenza - ISTEC Repositoryhttp://www.istec.cnr.it/img/top01.gifIT11.8833344.283331http://leonardo.isti.cnr.it/metaopac/servlet/Isis?Conf=/export/home/metaopac/mpisa/cnrpConf/cnr_istec-pub-list.sys.file_xInstitute of Science and Technology for +Ceramics Faenza - CNR Torinogiuseppe.romano@isti.cnr.itOAIhttp://leonardo.isti.cnr.it/oai_cnrpubdriveroai_dc300
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo116.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo116.xml new file mode 100644 index 0000000..17bc484 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo116.xml @@ -0,0 +1,2 @@ + +
00MONARCH - Dokumenten- und PublikationsserviceMONARCH - Dokumenten- und PublikationsserviceDE12.921450.8361archiv@hrz.tu-chemnitz.deOAIhttp://archiv.tu-chemnitz.de/cgi-bin/interfaces/oai/oai2.ploai_dcxmetadissObjects having a formal publication type; Objekte mit einem formalen DokumenttypJournal Articles; ZeitschriftenartikelConference Proceedings; Tagungs- und KonferenzbeitraegeDissertations and Professional Dissertations; Dissertationen und HabilitationenLectures; VorlesungenDiploma Theses; DiplomarbeitenBooks, Monographs; Buecher, MonographienReports; Berichte17160
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo117.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo117.xml new file mode 100644 index 0000000..60bd91e --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo117.xml @@ -0,0 +1,2 @@ + +
00Archimer, Archive Institutionnelle de l'IfremerArchiMer, Institutional Archive of Ifremerhttp://www.ifremer.fr/docelec/imgborders/logo.gifFR-4.486248.39031http://www.ifremer.fr/docelec/Institut français de recherche pour l'exploitation de la merarchimer-admin@ifremer.frOAIhttp://www.ifremer.fr/docelec/oai/OAIHandleroai_dc39850
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo118.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo118.xml new file mode 100644 index 0000000..131b249 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo118.xml @@ -0,0 +1,2 @@ + +
00VTOAIUniv. Murcia: Tesis Doctorals en Xarxa (TDX)Univ: Murcia: Theses and Dissertations Online (TDX)http://www.tesisenxarxa.net/images/tdx/titol_transp.gifES-1.12584337.9884251http://www.tdx.cesca.es/Universidad de Murcia:tdr@cesca.esOAIhttp://www.tdr.cesca.es/TDR_UM/NDLTD-OAI/oai.ploai_dc1510
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo119.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo119.xml new file mode 100644 index 0000000..08c0b18 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo119.xml @@ -0,0 +1,2 @@ + +
00EprintsSOAS EprintsSchool of Oriental and African Studies Library: SOAS' Library Eprints Online Research Repositoryhttp://www.soas.ac.uk/libfiles/soaseprintstitle.gifUK-0.1251.520http://eprints.soas.ac.uk/mailto:lib-eprints@soas.ac.ukOAIhttp://eprints.soas.ac.uk/perl/oai2oai_dc54570
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo12.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo12.xml new file mode 100644 index 0000000..a79f499 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo12.xml @@ -0,0 +1,2 @@ + +
00PUMANational Research Council Bologna - ISOF RepositoryNational Research Council Bologna - ISOF Repositoryhttp://www.isof.cnr.it/IMMAGINI/logoisofrifeng.jpgIT11.3044.531http://leonardo.isti.cnr.it/metaopac/servlet/Isis?Conf=/export/home/metaopac/mpisa/cnrpConf/cnr_isof-pub-list.sys.file_xInstitute for Organic Syntheses and Photoreactivity - CNR Bolognagiuseppe.romano@isti.cnr.itOAIhttp://leonardo.isti.cnr.it/oai_cnrpubdriveroai_dc110
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo120.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo120.xml new file mode 100644 index 0000000..3f69848 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo120.xml @@ -0,0 +1,3 @@ + +
00PUMANational Research Council Bologna - ISAC RepositoryNational Research Council Bologna - ISAC Repositoryhttp://www.isac.cnr.it/images/isac.gifIT11.3044.531http://leonardo.isti.cnr.it/metaopac/servlet/Isis?Conf=/export/home/metaopac/mpisa/cnrpConf/cnr_isac-pub-list.sys.file_xInstitute of atmospheric sciences and +climate - CNR Bolognagiuseppe.romano@isti.cnr.itOAIhttp://leonardo.isti.cnr.it/oai_cnrpubdriveroai_dc10
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo121.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo121.xml new file mode 100644 index 0000000..62e7245 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo121.xml @@ -0,0 +1,2 @@ + +
00Online-Publikationsservice der Universitaet TuebingenOnline-Publikationsservice der Universitaet TuebingenDE9.049048.52041OAIhttp://w210.ub.uni-tuebingen.de/dbt/oai/oai2.phpoai_dc29950
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo122.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo122.xml new file mode 100644 index 0000000..9f0df64 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo122.xml @@ -0,0 +1,2 @@ + +
00mediatummediaTUMmediaTUMhttp://portal.mytum.de//header1n.gifDE10.73983848.7146291http://mediatum2.ub.tum.de/Techn. Univ. Münchenmediatum2@ub.tum.deOAIhttp://mediatum2.ub.tum.de/oai/oaioai_dc37300
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo123.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo123.xml new file mode 100644 index 0000000..f0c85f1 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo123.xml @@ -0,0 +1,2 @@ + +
00DSpaceDSpace at CambridgeUniv. of Cambridge: DSpacehttp://www.dspace.cam.ac.uk/image/title-left.jpgUK0.122352.2080http://www.dspace.cam.ac.uk/info@dspace.cam.ac.ukOAIhttp://www.dspace.cam.ac.uk/dspace-oai/requestoai_dc2nd Annual Lecture Series in Sustainable Development 2004Anthropological AncestorsAudio collectionCambridge Working Papers in EconomicsCamRAD Rock-Art imagesChina 2004Clinical Skills OnlineD. H. MellorDigital HimalayaDigital OrientDutchEarly Digital Chemical ObjectsEnglishFile formats and supporting softwareFrenchGermanGreekHistoryKilise TepeKilise Tepe - dark archiveLatinLLCC Dark CollectionMiscellaneousNepal MaterialsNorthern Skies, Southern StarsPreprintsPublicationsPublished papers and preprintsRFC collection (Requests For Comments)Royal Commonwealth SocietySenate house graduation photography, 9 December 2006The Fitzwilliam Museum Corporate PublicationsThe Heinrich Schenker CorrespondenceThesesVideo collectionWWMM1722420
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo124.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo124.xml new file mode 100644 index 0000000..f25ca64 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo124.xml @@ -0,0 +1,2 @@ + +
00VTOAIUniv. Girona: Tesis Doctorals en Xarxa (TDX)Univ. Girona: Theses and Dissertations Online (TDX)http://www.tesisenxarxa.net/images/tdx/titol_transp.gifES2.82741.9851http://www.tdx.cesca.es/Universitat de Gironatdx@cesca.esOAIhttp://www.tdx.cesca.es/TDX_UdG/NDLTD-OAI/oai.ploai_dc3290
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo125.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo125.xml new file mode 100644 index 0000000..9a66e7e --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo125.xml @@ -0,0 +1,2 @@ + +
00SciXELPUB : Digital LibraryELPUB : Digital Libraryhttp://elpub.scix.net/logo.gifSI14.546.051http://elpub.scix.net/cgi-bin/works/HomeELPUBb.martens@tuwien.ac.atOAIhttp://elpub.scix.net/cgi-bin/works/OAIoai_dc5340
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo126.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo126.xml new file mode 100644 index 0000000..817c391 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo126.xml @@ -0,0 +1,2 @@ + +
00EprintsArchivo Digital UPMArchivo Digital UPMhttp://oa.upm.es/images/upm_cabecera.gifES-3.62869740.3887241http://oa.upm.es/Universidad Politécnica de Madridarchivo.digital@upm.esOAIhttp://servmadrono.cs.urjc.es:8010/arcFuturo/servlet/OAIDPupmoai_dc9700
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo127.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo127.xml new file mode 100644 index 0000000..7bd9bcf --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo127.xml @@ -0,0 +1,2 @@ + +
00DSpaceDSpace at University LeidenDSpace at Leiden UniversityNL4.494652.15451https://openaccess.leidenuniv.nl/dspace-help@library.leidenuniv.nlOAIhttp://openaccess.leidenuniv.nl/dspace-oai/requestdare_didloai_dcAfricanists at Leiden UniversityAfrican Studies CentreArchaeologyArtsDAREnetDissertationsDissertations OnlineE-depotElectronisch Depot Nederlandse ArcheologieInstitute of Environmental SciencesISIMISIM Annual ReportsISIM DissertationsISIM PaperISIM ReviewKeur der WetenschapLawMathematics and Natural SciencesMedicine / Leiden University Medical Center (LUMC)Open Access LeidenOther ISIM PublicationsPhilosophyPopularising publicationsProfessional publicationsScholarly publicationsSocial and Behavioural SciencesSpecial Lectures OnlineTheologyInstitutional Repository Leiden UniversityOther types of publications90300
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo128.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo128.xml new file mode 100644 index 0000000..c63c135 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo128.xml @@ -0,0 +1,2 @@ + +
00DSpaceDSpace at Vrije Universiteit AmsterdamDSpace Digital Academic REpository (DARE) of the Vrije Universiteit Amsterdamhttp://dare.ubvu.vu.nl/image/dspace-blue.gifNL4.8833352.36671http://dare.ubvu.vu.nl/index.jspr.feenstra@ubvu.vu.nlOAIhttp://dspace.ubvu.vu.nl/oai/requestdare_qdcdare_dcoai_dc74540
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo129.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo129.xml new file mode 100644 index 0000000..2e45182 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo129.xml @@ -0,0 +1,2 @@ + +
00EprintsUniversity of Newcastle Library E-Print ArchivesUniv of Newcastle Library E-Print Pilothttp://rogue.ncl.ac.uk/images/header_main_pic.jpgUK-1.612354.97730http://rogue.ncl.ac.uk/mark.gavillet@ncl.ac.ukOAIhttp://rogue.ncl.ac.uk/xml/index.phpoai_dc01 Cardiovascular Medicine02 Cancer Studies03 Infection and Immunology04 Other Hospital Based Clinical Subjects05 Other Laboratory Based Clinical Subjects06 Epidermiology and Public Health07 Health Services Research08 Primary Care and Other Community Based Clinical Subjects09 Psychiatry Neuroscience and Clinical Psychology10 Dentistry11 Nursing and Midwifery12 Allied Health Professions and Studies13 Pharmacy14 Biological Sciences15 Pre-clinical and Human Biological Sciences16 Agriculture Veterinary and Food Science17 Earth Systems and Environmental Sciences18 Chemistry19 Physics20 Pure Mathematics21 Applied Mathematics22 Statistics and Operational Research23 Computer Science24 Electrical and Electronic Engineering25 General Engineering and Mineral and Mining Engineering26 Chemical Engineering27 Civil Engineering28 Mechanical Aeronautical and Manufacturing Engineering29 Metallurgy and Materials30 Architecture and the Built Environment31 Town and Country Planning32 Geography and Environmental Studies33 Archaeology34 Economics and Econometrics35 Accounting and Finance36 Business and Management Studies37 Library and Information Management38 Law39 Politics and International Studies40 Social Work Social Policy and Administration41 Sociology42 Anthropology43 Development Studies44 Psychology45 Education46 Sports-Related Studies47 American Studies and Anglophone Area Studies48 Middle Eastern and African Studies49 Asian Studies50 European Studies51 Russian Slavonic and East European Languages52 French53 German Dutch and Scandinavian Languages54 Italian55 Iberian and Latin American Languages56 Celtic Studies57 English Language and Literature58 Linguistics59 Classics Ancient History Byzantine and Modern Greek Studies60 Philosophy61 Theology Divinity and Religious Studies62 History63 Art and Design64 History of Art Architecture and Design65 Drama Dance and Performing Arts66 Communication Cultural and Media Studies67 MusicGeneral Central ServicesNewcastle Law SchoolSchool of Agriculture Food and Rural DevelopmentSchool of Architecture Planning and LandscapeSchool of Arts and CulturesSchool of BiologySchool of Biomedical SciencesSchool of Chemical Engineering and Advanced MaterialsSchool of Civil Engineering and GeosciencesSchool of Clinical and Laboratory SciencesSchool of Clinical Medical SciencesSchool of Computing ScienceSchool of Dental SciencesSchool of Education Communication and Language SciencesSchool of Electrical Electronic and Computer EngineeringSchool of English Literature Language and LinguisticsSchool of Geography Politics and SociologySchool of Historical StudiesSchool of Marine Science and TechnologySchool of Mathematics and StatisticsSchool of Mechanical and Systems EngineeringSchool of Medical Education DevelopmentSchool of Modern LanguagesSchool of Natural SciencesSchool of Neurology Neurobiology and PsychiatrySchool of Population and Health SciencesSchool of Surgical and Reproductive SciencesThe Language CentreUniversity of Newcastle upon Tyne Business SchoolUniversity of Newcastle upon Tyne Medical School53700
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo13.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo13.xml new file mode 100644 index 0000000..64b07df --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo13.xml @@ -0,0 +1,2 @@ + +
00CDSwareAristotle University of ThessalonikiAristotle University of Thessalonikihttp://www.lib.auth.gr/images/site/gr/mentor7.pngGR22.97240.6252http://cds.lib.auth.gr/Aristotle University of Thessalonikitheod@skiathos.physics.auth.grOAIhttp://cds.lib.auth.gr/cgi-bin/cds/oai2doai_dc16340
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo130.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo130.xml new file mode 100644 index 0000000..096aab8 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo130.xml @@ -0,0 +1,2 @@ + +
00EprintsNottingham eThesesNottingham eTheseshttp://www.nottingham.ac.uk/is/images/vis-logo.jpgUK-1.1946652.9345040http://etheses.nottingham.ac.uk/University of Nottinghametheses@nottingham.ac.ukOAIhttp://etheses.nottingham.ac.uk/perl/oai2oai_dc2610
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo131.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo131.xml new file mode 100644 index 0000000..353039b --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo131.xml @@ -0,0 +1,2 @@ + +
00DSpaceDSpace at Open Universiteit NederlandOpen Univ. Nederland: DSpacehttp://dspace.ou.nl/dspace-oai/requestNL5.983350.91http://dspace.ou.nl/info-dspace@ou.nlOAIhttp://dspace.ou.nl/dspace-oai/requestoai_dc1. IDR: Publications and Preprints1. LN4LD IMS-LD packages1. Publications and Preprints1. TENC: Publications and Preprints2. Example IMS-LD packages2. Presentations2. TENC: Presentations3. Internal: LD-packages3. Specifications3. TENC: Specifications4. Software and Documentation4. TENC: Software and Documentation5. Papers, Reports, Thesis, Work Documents5. TENC: Deliverables and Milestones6. Internal: Documents6. TENC: Work Documents7. Internal: archive of originals7. TENC: Internal: Documents8. TENC: Internal: archive of originalsKeur der Wetenschap260
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo132.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo132.xml new file mode 100644 index 0000000..ab015c1 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo132.xml @@ -0,0 +1,2 @@ + +
DSpace00Repositorio Institucional da FCT-UNLFCTUNL Institutional Repositoryhttp://validator.driver.research-infrastructures.eu/validatorWeb/getRepositoryImage.do?&repositoryId=1-64066e8e-c306-4cc6-94f2-a1c492b40b9a_UGVuZGluZ1JlcG9zaXRvcnlSZXNvdXJjZXMvUmVwb3NpdG9yeVNlcnZpY2VSZXNvdXJjZVR5cGU=POR-9.159893538.73390730.0http://dspace.fct.unl.pthttp://www.fct.unl.ptpaulo.matos@fct.unl.ptOAIhttp://dspace.fct.unl.pt/oai/requestoai_dcAll sets3830.0
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo133.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo133.xml new file mode 100644 index 0000000..ea4b701 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo133.xml @@ -0,0 +1,2 @@ + +
00DoksEindwerkensite Katholieke Hogeschool KempenDoks @ KHKhttp://doks2.khk.be/eindwerk/assets/img/logo.gifBE4.88170651.1362781http://doks2.khk.be/eindwerk/do/folder/View?dispatch=infoKatholieke Hogeschool Kempendoks@khk.beOAIhttp://doks2.khk.be/eindwerk/oaidc40490
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo134.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo134.xml new file mode 100644 index 0000000..ab1b612 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo134.xml @@ -0,0 +1,2 @@ + +
00VTOAIUniversitat Politecnica de CatalunyaUniversitat Politecnica de Catalunyahttp://www.tdx.cesca.es/images/tdx/logos_unis/logofull_UPC_transp.gifES2.1841.411http://www.tdx.cesca.es/UPC.htmlUniversitat Politecnica de Catalunyatdx@cesca.esOAIhttp://www.tdx.cesca.es/TDX_UPC/NDLTD-OAI/oai.ploai_dc8110
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo135.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo135.xml new file mode 100644 index 0000000..7c04eee --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo135.xml @@ -0,0 +1,2 @@ + +
00VTOAIPublications of the Universiteit van AmsterdamUniv. van Amsterdam: Scripties Onlinehttp://dare.uva.nl/u/uvascript/graphics/header-top.jpgNL4.89017452.3687651http://dare.uva.nl/cgi/b/bib/bib-idx?c=uvascriptdpcmedewerkers-uba@uva.nlOAIhttp://dare.uva.nl/cgi/arno/oai/uvapubdare_didloai_dcarnoimsmd_v1p2Keur der WetenschapKeur der WetenschapScholar EconomicsScholar EconomicsFull text availableFull text available84120
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo136.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo136.xml new file mode 100644 index 0000000..4c21c93 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo136.xml @@ -0,0 +1,2 @@ + +
00EprintsWaterford Inst. of Technology: WIT Institutional RepositoryWaterford Inst. of Technology: WIT Institutional Repositoryhttp://waterfordnewmusicweek.com/newlib/images/liblogo.gifIE-7.1552.2410http://eprints.wit.ie/Waterford Institute of Technology (WIT)dkane@wit.ieOAIhttp://eprints.wit.ie/cgi/oai2oai_dc3350
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo137.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo137.xml new file mode 100644 index 0000000..ebca93f --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo137.xml @@ -0,0 +1,2 @@ + +
00Pica-VerbundkatalogOAI-Repository SUB GoettingenGOEDOC document server of Goettingen University (SUB Goettingen)http://vts.uni-ulm.de/standards/logo_vts.jpgDE9.9351.531http://webdoc.sub.gwdg.de/kinstler@gbv.deOAIhttp://www.gbv.de/goai/gbvrep.phpoai_dcmabxml-1Online-Dissertationen der SUB Goettingen17550
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo138.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo138.xml new file mode 100644 index 0000000..5b404b8 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo138.xml @@ -0,0 +1,2 @@ + +
00DSpaceKobra - DSpace an der Universität KasselUniv. of Kassel: KOBRA (Kasseler Online Bibliothek Repository and Archiv)http://dare.uva.nl/u/uvadis/graphics/header-print.jpgDE9.50208251.320641http://kobra.bibliothek.uni-kassel.de/dspace-master@bibliothek.uni-kassel.deOAIhttp://kobra.bibliothek.uni-kassel.de/dspace-oaioai_dc20022004200520062007ArbeitspapiereDSpace WorkshopDas Recht, gut regiert zu werdenDie Brueder Murhard und ihre ZeitDiplomarbeitenDiplomarbeitenDiplomarbeitenDissertationenDissertationenDissertationenDissertationenDissertationenDissertationenDissertationenDissertationenDissertationenDissertationenDissertationenDissertationenDissertationenDissertationenDissertationenDissertationenDissertationenDissertationenDissertationenDissertationenDissertationenDissertationenDissertationenDissertationenDissertationenDissertationenDissertationenDissertationenDissertationenDissertationenDissertationenDissertationenDissertationenDissertationenDissertationenDissertationenDissertationenDissertationenDissertationenDissertationenDissertationenDissertationenDissertationenDissertationenDissertationenDissertationenDissertationenDissertationenDissertationenDissertationenDissertationenDissertationenDissertationenDissertationenDissertationenDissertationenDissertationenDissertationenDissertationenDissertationenDissertationenDissertationenDissertationenDissertationenDissertationenDissertationenDissertationenDissertationenDissertationenDissertationenDissertationenDissertationenDissertationenDissertationenDissertationenDissertationenDissertationenDissertationenDissertationenDissertationenDissertationenDissertationenDissertationenDissertationenDissertationenDissertationenDissertationenDissertationenDissertationenDissertationenDissertationenDissertationenDissertationen (aus den beteiligten Instituten)Dissertationen (aus den beteiligten Instituten)Dissertationen (aus den beteiligten Instituten)Dissertationen (aus den beteiligten Instituten)Erziehung-, Schul- und BildungswesenHandschriftenabteilungIn guter Gesellschaft ? - Unkonventionelle LebensformenInstitutsuebergreifende VeroeffentlichungenInstitutsuebergreifende VeroeffentlichungenInstitutsuebergreifende VeroeffentlichungenJahresberichteKasseler Informatikschriften (KIS)Kasseler Online-Schriften zur Didaktik der StochastikKuenstlerbuecherLandwirtschaft, VeterinaermedizinMagisterarbeitenMagisterarbeitenMedizin und GesundheitOneWorld PerspectivesPublikationenPublikationenPublikationenPublikationenPublikationenPublikationenPublikationenPublikationenPublikationenPublikationenPublikationenPublikationenPublikationenPublikationenPublikationenPublikationenPublikationenPublikationenPublikationenPublikationenPublikationenPublikationenPublikationenPublikationenPublikationenPublikationenPublikationenPublikationenPublikationenPublikationenPublikationenPublikationenPublikationenPublikationenPublikationenPublikationenPublikationenPublikationenPublikationenPublikationenPublikationenPublikationenPublikationenPublikationenPublikationenPublikationenPublikationenPublikationenPublikationenPublikationenSozialwissenschaften, SoziologieTestsammlungTreffpunkt EulensaalVeroeffentlichungenVeroeffentlichungenWerkstattberichteWissenensgesellschaft - Eliten oder die Weisheit der Vielentest212640
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo139.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo139.xml new file mode 100644 index 0000000..7535825 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo139.xml @@ -0,0 +1,2 @@ + +
00DSpaceBURJC-DIGITAL Universidad Rey Juan CarlosBURJC-DIGITAL Universidad Rey Juan Carloshttp://eciencia.urjc.es/dspace/image/logo.gifES-3.87274540.3347191http://eciencia.urjc.es/dspace/Universidad Rey Juan Carlosbiblioteca.proyectoeciencia@urjc.esOAIhttp://servmadrono.cs.urjc.es:8010/arcFuturo/servlet/OAIDPurjcoai_dc1870
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo14.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo14.xml new file mode 100644 index 0000000..56b497e --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo14.xml @@ -0,0 +1,2 @@ + +
00OPUSPropylaeum-DOK Publikationsplattform AltertumswissenschaftenPropylaeum-DOK - Digital Repository Classical Studieshttp://archiv.ub.uni-heidelberg.de/propylaeumdok/Icons/propylaeum_dok.gifDE8.70799949.4099221http://archiv.ub.uni-heidelberg.de/propylaeumdok/index.php?&la=enUniversität HeidelbergEffinger@ub.uni-heidelberg.deOAIhttp://archiv.ub.uni-heidelberg.de/propylaeumdok/oai2/oai2.phpoai_dc1560
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo140.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo140.xml new file mode 100644 index 0000000..4cdb1fa --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo140.xml @@ -0,0 +1,2 @@ + +
00DSpacePADISPADIShttp://padis.uniroma1.it/immagini/benvenuti.gifIT12.51241.9041http://padis.uniroma1.it/Universita di Romapadis@linuxhelp.uniroma1.itOAIhttp://padis.uniroma1.it/oai2d.py/oai_dc3550
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo141.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo141.xml new file mode 100644 index 0000000..86e48be --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo141.xml @@ -0,0 +1,2 @@ + +
00EprintsThe DepotThe Depothttp://www.depot.edina.ac.uk/images/newlogo_solidbackground.gifUK-3.17601555.9215850http://www.depot.edina.ac.uk/JISCIan.Stuart@ed.ac.ukOAIhttp://deposit.depot.edina.ac.uk/cgi/oai2oai_dc670
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo142.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo142.xml new file mode 100644 index 0000000..df0e411 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo142.xml @@ -0,0 +1,2 @@ + +
00DSpaceUDCDspaceUDCDspacehttp://dspace.udc.es/image/LogoDSpace.jpgES-8.3943.3711http://dspace.udc.es/Universidade da Coruñadspace-admin@udc.esOAIhttp://dspace.udc.es/dspace-oai/requestoai_dc4580
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo143.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo143.xml new file mode 100644 index 0000000..34dc067 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo143.xml @@ -0,0 +1,2 @@ + +
00DIVAPublikationer fran Karlstads UniversitetPublikationer fran Karlstads Universitethttp://www.intra.kau.se/bilder/kaugrafik/kaulogga.gifSE13.58059.4061http://www.diva-portal.org/kau/Karlstads Univ.diva-support@ub.uu.seOAIhttp://www.diva-portal.org/oai/kau/OAIoai_dc16100
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo144.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo144.xml new file mode 100644 index 0000000..72a719e --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo144.xml @@ -0,0 +1,2 @@ + +
00VTOAIpub.fontys.nlFontys Hogescholen: iPorthttp://www.fontysmediatheek.nl/images/uploads/fontyslogotrans.gifNL5.0833351.56671http://www.fontyspublicaties.nl/wilko.haast@uvt.nlOAIhttp://www.fontyspublicaties.nl/oai/pub.fontys.nl.cgiarnooai_dcdare_didlOnly records that have full text availableOnly records that have full text available15910
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo145.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo145.xml new file mode 100644 index 0000000..6a3dd01 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo145.xml @@ -0,0 +1,2 @@ + +
00OpusPsyDok, Psychologie Open Access Server der Saarlaendischen Universitaets- und LandesbibliothekPsyDok: Volltextserver der Virtuellen Fachbibliothek Psychologie (Host: Saarland Univ.)http://psydok.sulb.uni-saarland.de/Icons/psy.gifDE6.998249.231http://psydok.sulb.uni-saarland.de/mailto:psydok@sulb.uni-saarland.deOAIhttp://psydok.sulb.uni-saarland.de/phpoai/oai2.phpoai_dcepicuroai_ppxMetaDissLibrary and information sciencesPsychologySocial sciencesGeneral statisticsLawEducationMedical sciences MedicineThe artsAthletic and outdoor sports and gamesArticleBookInBookInProceedingsJournalLectureMastersThesisMiscPreprintProceedingsResearchPaperTeaching MaterialTechReportText.Thesis.BachelorText.Thesis.DoctoralText.Thesis.Habilitation16330
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo146.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo146.xml new file mode 100644 index 0000000..28fd304 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo146.xml @@ -0,0 +1,2 @@ + +
00DSpaceEstudo GeralEstudo Geralhttps://estudogeral.sib.uc.pt:8443/dspace/image/uc/bannerTop.jpgPT-8.42609540.2074530http://estudogeral.sib.uc.pt:8443/dspace/University of Coimbrainf@sib.uc.ptOAIhttps://estudogeral.sib.uc.pt:8443/dspace-oai/requestoai_dc29700
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo147.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo147.xml new file mode 100644 index 0000000..847af7d --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo147.xml @@ -0,0 +1,2 @@ + +
00EigenentwicklungSurrey Scholarship OnlineSurrey Scholarship Onlinehttp://epubs.surrey.ac.uk/assets/md5images/f3fd44d7614028b1200fb79c9d4eb18b.gifUK-0.58751.2421http://epubs.surrey.ac.uk/University of Surreysupport@dc.bepress.comOAIhttp://epubs.surrey.ac.uk/cgi/oai2.cgioai_dc8520
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo148.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo148.xml new file mode 100644 index 0000000..1d680a2 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo148.xml @@ -0,0 +1,2 @@ + +
00DSpaceRUDAR - Roskilde University Digital ArchiveRUDAR - Roskilde University Digital Archivehttp://diggy.ruc.dk/image/rudar-logo.pngDK12.08055.6411http://diggy.ruc.dk/Roskilde Univ.http://diggy.ruc.dk/image/rudar-logo.pngOAIhttp://diggy.ruc.dk:8080/dspace-oai/requestoai_dc32630
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo149.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo149.xml new file mode 100644 index 0000000..c4a84ec --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo149.xml @@ -0,0 +1,2 @@ + +
00DSpaceDSpace at UGentGent Univ.: ePrintshttp://admin.driver.research-infrastructures.eu/images/repositoryLogos/logo-boekentoren.pngBE3.728651.05561https://archive.ugent.be/libservice@ugent.beOAIhttp://archive.ugent.be/oai/oai_dcFaculty of Agricultural and Applied Biological Sciences (LA)Faculty of Agricultural and Applied Biological Sciences (LA)Faculty of Agricultural and Applied Biological Sciences (LA)Faculty of Agricultural and Applied Biological Sciences (LA)Faculty of Agricultural and Applied Biological Sciences (LA)Faculty of Agricultural and Applied Biological Sciences (LA)Faculty of Agricultural and Applied Biological Sciences (LA)Faculty of Agricultural and Applied Biological Sciences (LA)Faculty of Agricultural and Applied Biological Sciences (LA)Faculty of Agricultural and Applied Biological Sciences (LA)Faculty of Agricultural and Applied Biological Sciences (LA)Faculty of Agricultural and Applied Biological Sciences (LA)Faculty of Agricultural and Applied Biological Sciences (LA)Faculty of Agricultural and Applied Biological Sciences (LA)Faculty of Agricultural and Applied Biological Sciences (LA)Faculty of Agricultural and Applied Biological Sciences (LA)Faculty of Agricultural and Applied Biological Sciences (LA)Faculty of Agricultural and Applied Biological Sciences (LA)Faculty of Agricultural and Applied Biological Sciences (LA)Faculty of Agricultural and Applied Biological Sciences (LA)Faculty of Agricultural and Applied Biological Sciences (LA)Faculty of Agricultural and Applied Biological Sciences (LA)Faculty of Agricultural and Applied Biological Sciences (LA)Faculty of Agricultural and Applied Biological Sciences (LA)Faculty of Agricultural and Applied Biological Sciences (LA)Faculty of Agricultural and Applied Biological Sciences (LA)Faculty of Agricultural and Applied Biological Sciences (LA)Faculty of Agricultural and Applied Biological Sciences (LA)Faculty of Agricultural and Applied Biological Sciences (LA)Faculty of Agricultural and Applied Biological Sciences (LA)Faculty of Agricultural and Applied Biological Sciences (LA)Faculty of Agricultural and Applied Biological Sciences (LA)Faculty of Agricultural and Applied Biological Sciences (LA)Faculty of Agricultural and Applied Biological Sciences (LA)Faculty of Agricultural and Applied Biological Sciences (LA)Faculty of Agricultural and Applied Biological Sciences (LA)Faculty of Agricultural and Applied Biological Sciences (LA)Faculty of Agricultural and Applied Biological Sciences (LA)Faculty of Agricultural and Applied Biological Sciences (LA)Faculty of Agricultural and Applied Biological Sciences (LA)Faculty of Agricultural and Applied Biological Sciences (LA)Faculty of Agricultural and Applied Biological Sciences (LA)Faculty of Agricultural and Applied Biological Sciences (LA)Faculty of Agricultural and Applied Biological Sciences (LA)Faculty of Agricultural and Applied Biological Sciences (LA)Faculty of Agricultural and Applied Biological Sciences (LA)Faculty of Agricultural and Applied Biological Sciences (LA)Faculty of Agricultural and Applied Biological Sciences (LA)50280
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo15.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo15.xml new file mode 100644 index 0000000..f482687 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo15.xml @@ -0,0 +1,2 @@ + +
00AUP publicationsAUP publicationsNL4.89352.371dpcmedewerkers-uba@uva.nlOAIhttp://dare.uva.nl/cgi/arno/oai/aupdare_didloai_dcarnoimsmd_v1p2Keur der WetenschapKeur der WetenschapScholar EconomicsScholar EconomicsFull text availableFull text available650
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo150.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo150.xml new file mode 100644 index 0000000..40ee0de --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo150.xml @@ -0,0 +1,2 @@ + +
00DSpaceTARATARAhttp://www.tara.tcd.ie/image/tcd_top.gifIE-6.25853.3450http://www.tara.tcd.ie/Dublin University, Trinity Collegenbrennan@tcd.ieOAIhttp://www.tara.tcd.ie/dspace-oai/requestoai_dc72300
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo151.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo151.xml new file mode 100644 index 0000000..8984444 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo151.xml @@ -0,0 +1,2 @@ + +
00PUMANational Research Council Pisa - ISTI RepositoryNational Research Council Pisa - ISTI Repositoryhttp://www.isti.cnr.it/images/istiweb.gifIT10.4243.711http://leonardo.isti.cnr.it/metaopac/servlet/Isis?Conf=/export/home/metaopac/mpisa/cnrConf/cnr-pub-list.sys_1.fileIstituto di Scienza e Tecnologie dell'Informazione - CNR Pisagiuseppe.romano@isti.cnr.itOAIhttp://leonardo.isti.cnr.it/oai_cnrpubdriveroai_dc17790
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo152.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo152.xml new file mode 100644 index 0000000..35cf29a --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo152.xml @@ -0,0 +1,2 @@ + +
00DSpaceDocument Server@UHasseltDocument Server@UHasselthttp://doclib.uhasselt.be/dspace/image/UHasselt.jpgBE5.33850.9291http://doclib.uhasselt.be/dspace/Univ. Hasseltmarc.goovaerts@uhasselt.beOAIhttp://uhdspace.uhasselt.be/dspace-oai/requestoai_dc16050
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo153.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo153.xml new file mode 100644 index 0000000..2f33270 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo153.xml @@ -0,0 +1,2 @@ + +
00DSpaceEdinburgh Research ArchiveUniv. of Edinburgh: Edinburgh Research Archivehttp://www.era.lib.ed.ac.uk/image/is_logo_era.jpgUK-3.255.950http://www.era.lib.ed.ac.uk/University of Edinburghera.admin@ed.ac.ukOAIhttp://www.era.lib.ed.ac.uk/dspace-oai/requestoai_dcAcoustics and Fluid Dynamics (Theses and Dissertations)Atmospheric and Environmental ScienceAtmospheric and Environmental Science (Theses and Dissertations)Biomedical and Clinical Laboratory SciencesBiophysical ChemistryBiophysical Chemistry (Theses and Dissertations)BRE Research PublicationsBRE Theses and DissertationsCentre for Inflammation ResearchCentre for Inflammation ResearchCentre for Intelligent Systems and their ApplicationsCentre for Intelligent Systems and their Applications (Theses and Dissertations)Centre of African StudiesCentre of African Studies (Theses and Dissertations)Chemical BiologyChemical Biology (Theses and Dissertations)Condensed MatterCondensed Matter (Theses and Dissertations)CRFR PublicationsCSTR PhD ThesesCSTR publicationsDepartment of Artificial IntelligenceDigital Communications (Theses and Dissertations)Digital Curation CentreDigital Library DivisionDirectorate of Undergraduate Learning and Teaching (Theses and Dissertations)Divinity PhD thesesDivision of Clinical NeurosciencesDivision of NeuroscienceDivision of PsychiatryEarth ScienceEarth Sciences (Theses and Dissertations)EDINAEnergy SystemsEnergy Systems (Theses and Dissertations)European Languages and CulturesFireGrid ClusterGeographyGeography (Theses and Dissertations)Geometry and TopologyHistorical ThesesHistory and Classics PhD ThesesHistory of Art PhD thesesInformatics (British University in Dubai theses)Infrastructure and Environment (Theses and Dissertations)Inorganic ChemistryInorganic Chemistry (Theses and Dissertations)Institute for Adaptive and Neural ComputationInstitute for Adaptive and Neural Computation (Theses and Dissertations)Institute for Astronomy (Theses and Dissertations)Institute for Communicating and Collaborative SystemsInstitute for Communicating and Collaborative Systems (Theses and Dissertations)Institute for Computing Systems ArchitectureInstitute for Computing Systems Architecture (Theses and Dissertations)Institute for Immunology and Infection Research (3IR)Institute for Immunology and Infection Research (Theses and Dissertations)Institute for Stem Cell Research (ISCR)Institute for Stem Cell Research (Theses and Dissertations)Institute of Cell Biology (ICB)Institute of Cell Biology (Theses and Dissertations)Institute of Evolutionary BiologyInstitute of Evolutionary Biology (Theses and Dissertations)Institute of Geography Online Papers SeriesInstitute of Molecular Plant SciencesInstitute of Perception, Action and BehaviourInstitute of Perception, Action and Behaviour (Theses and Dissertations)Institute of Structural and Molecular BiologyIntegrated Micro and Nano Systems (Theses and Dissertations)Laboratory for Foundations of Computer ScienceLaboratory for Foundations of Computer Science (Theses and Dissertations)Library (General)Linguistics and English Language PhD thesesManagement School and Economics PhD ThesesMaterialsMaterials and Processes (Theses and Dissertations)Materials (Theses and Dissertations)Medical Genetics SectionMolecular and Clinical MedicineMolecular and Optical Science (Theses and Dissertations)MSc by Research in Geographical Information ScienceMSc by Research in Geographical Information Science and SocietyMSc Geographical Information ScienceNursing Studies (Theses and Dissertations)Organic SynthesisOrganic Synthesis (Theses and Dissertations)Particle Physics Experiments (Theses and Dissertations)Philosophy PhD thesesPhilosophy research publicationsPhysical Chemistry/Chemical PhysicsPhysical Chemistry/Chemical Physics (Theses and Dissertations)PoliticsPolitics (Theses and Dissertations)Psychology PhD thesesPsychology research publicationsReport on Cardington TestsRoyal (Dick) School of Veterinary Studies PhD ThesesSchool of Clinical Sciences and Community Health PhD ThesesScottish HistorySocial Anthropology (Theses and dissertations)SociologySociology (Theses and Dissertations)StORe projectStructural ChemistryStructural Chemistry (Theses and Dissertations)TESOL (Theses and Dissertations)The Centre for the Study of Christian OriginsTheoretical and Applied Linguistics (Theses and Dissertations)Theses and DissertationsUndergraduate Psychology Honours Final Year DissertationsVeterinary Biomedical SciencesVeterinary Clinical Studies20280
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo154.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo154.xml new file mode 100644 index 0000000..8f51a1e --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo154.xml @@ -0,0 +1,2 @@ + +
00VTOAIUniversidad de Cantabria: Tesis Doctorals en Xarxa (TDX)Univ. of Cantabria: Theses and Dissertations Online (TDX)http://www.tesisenxarxa.net/images/tdx/titol_transp.gifES-3.79349343.4724021http://www.tdx.cesca.es/Universidad de Cantabriatdx@cesca.esOAIhttp://www.tdr.cesca.es/TDR_UC/NDLTD-OAI/oai.ploai_dc580
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo155.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo155.xml new file mode 100644 index 0000000..adafc20 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo155.xml @@ -0,0 +1,2 @@ + +
00KNAWRoyal Netherlands Acad. Of Arts and Sciences: Netherlands Inst. For Scientfic Inf. Scienceshttp://www.niwi.knaw.nl/algemeen/logo.gifNL4.89774252.3696221http://www.niwi.knaw.nl/english/index.htmlRoyal Netherlands Acad. Of Arts and Sciences: Netherlands Inst. For Scientfic Inf. Sciencesarjan.hogenaar@bureau.knaw.nlOAIhttp://www.repository.knaw.nl/repository/knaw/oaioai_dcdare_didldarekeur14920
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo156.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo156.xml new file mode 100644 index 0000000..94ce902 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo156.xml @@ -0,0 +1,2 @@ + +
00VTOAIUniversitat Jaume I: Tesis Doctorals en Xarxa (TDX)Universitat Jaume I: Theses and Dissertations Online (TDX)http://www.tesisenxarxa.net/images/tdx/titol_transp.gifES-0.06477739.9928151http://www.tdx.cesca.es/Universitat Jaume Itdx@cesca.esOAIhttp://www.tdx.cesca.es/TDX_UJI/NDLTD-OAI/oai.ploai_dc1600
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo157.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo157.xml new file mode 100644 index 0000000..ea8a6e4 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo157.xml @@ -0,0 +1,2 @@ + +
00PUMANational Research Council Pisa - IFC RepositoryNational Research Council Pisa - IFC Repositoryhttp://leonardo.isti.cnr.it/metaopac/sfondi/ifc.jpgIT10.4243.711http://leonardo.isti.cnr.it/metaopac/servlet/Isis?Conf=/export/home/metaopac/mpisa/cnrConf/ifc-pub-list.sys.fileIstituto di Fisiologia Clinica - CNR Pisagiuseppe.romano@isti.cnr.itOAIhttp://leonardo.isti.cnr.it/oai_cnrpubdriveroai_dc1470
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo158.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo158.xml new file mode 100644 index 0000000..acc4c56 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo158.xml @@ -0,0 +1,2 @@ + +
00PUMANational Research Council Pisa - IIT RepositoryNational Research Council Pisa - IIT Repositoryhttp://www.iit.cnr.it/english/images/top_banner.gifIT10.4243.711http://puma.isti.cnr.itInstitute for Informatics and Telematics - CNR Pisagiuseppe.romano@isti.cnr.itOAIhttp://leonardo.isti.cnr.it/oai_cnrpubdriveroai_dc1940
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo159.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo159.xml new file mode 100644 index 0000000..39d8737 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo159.xml @@ -0,0 +1,2 @@ + +
00EigenentwicklungLinköping University Electronic PressLinköping University Electronic Presshttp://www.liu.se/mall06/grafik/logotyp_liggande.gifSE15.5729758.4003921http://www.ep.liu.se/index.en.htmlLinköping Universitydiva-support@ub.uu.seOAIhttp://www.diva-portal.org/oai/liu/OAIoai_dc53540
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo16.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo16.xml new file mode 100644 index 0000000..be18a1b --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo16.xml @@ -0,0 +1,2 @@ + +
00VTOAIUniversity of Twente PublicationsUniv. of Twente: Repository (i-TOR)http://doc.utwente.nl/images/utlogo_en.gifNL6.952.21671http://doc.utwente.nl/en/a.g.jippes@utwente.nlOAIhttp://doc.utwente.nl/cgi/oai2oai_dcdare_didlmetscontext_objectFull-text = RestrictedFull-text = PublicFull-text = NoneGroup = KEURGroup = CSTM71810
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo160.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo160.xml new file mode 100644 index 0000000..472ce81 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo160.xml @@ -0,0 +1,2 @@ + +
00VTOAIDissertations of the Universiteit van AmsterdamUniv. van Amsterdam: Dissertations Onlinehttp://dare.uva.nl/u/uvadis/graphics/header-print.jpgNL4.89017452.3687651http://dare.uva.nl/cgi/b/bib/bib-idx?c=uvadisUniversiteit van Amsterdamdpcmedewerkers-uba@uva.nlOAIhttp://dare.uva.nl/cgi/arno/oai/uvadisdare_didloai_dcarnoimsmd_v1p2Keur der WetenschapKeur der WetenschapScholar EconomicsScholar EconomicsFull text availableFull text available23440
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo161.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo161.xml new file mode 100644 index 0000000..513a190 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo161.xml @@ -0,0 +1,2 @@ + +
00EprintsHAL - Hyper Article on LineCCSD (Centre pour la Communication Scientifique Directe): HAL - Hyper Article on Linehttp://hal.archives-ouvertes.fr/images/hal.gifFR4.88345.7671http://hal.archives-ouvertes.fr/hal@ccsd.cnrs.frOAIhttp://hal.ccsd.cnrs.fr/oai/oai.phpoai_haloai_halBiology and MedicineBiochemistry and Molecular BiologyBiological SciencesBiomecanicsBiomedical IngenieringBiostatisticsCellular BiologyImmunologyMedication SciencesNeurosciencesOrganisms biologyPlant biologyReproduction biologyOthers AreasPhysico-chemical sciences and pharmaceutical technologiePhysiologyPopulation Biology and EcologyChemical SciencesCatalysisMaterials ScienceOthers areasCommunication and Information SciencesBibliometry, scientometryCinema, art, estheticsConflicts, information strategy, intelligenceEconomy, cultural industryEducation, e-learning, trainingElectronic publishingGeopoliticsHistory of information/communicationHypertext, hypermediaInformation retrievalInformation system engineeringInformation/communication lawKnowledge managementLocal authoritiesMass mediaMuseologyOrganisation and communicationOthers AreasPublic SphereScientific communication and informationSociology of information and communicationTheory of information/communicationComputer ScienceHCI, Images Processing, Data Management, Knowledge SystemsModelling and Scientific ComputingNetworks and SystemsOthers AreasSoftware Engineering and Symbolic ComputingEngineering SciencesCivil EngineeringGeotechniqueMaterials and StructuresControlEnergyIndustrial engineeringMaterials, MechanicsMicroelectronicsOthers AreasProcess EngineeringRoboticsSignalHumanities and Social SciencesHuman sciencesBiological AnthropologyHistorySocial anthropologyLanguages, knowledge and creationLiteratureMusicologyPhilosophySciences of the languageOthers AreasPsychologySocial sciencesEconomicsGeography and installationLawManagementPolitical SciencesSociologyMathematicsOther areaPhysicsAcousticsAstroparticle and CosmologyAstrophysicsCondensed matterElectronic SystemsMagnetismQuantum fluidsSupraconductivityThin LayersHydrodynamics and Complex FluidsMaterials under irradiationNanophysicsNon-Linear PhysicsNuclear PhysicsOthers AreasParticle PhysicsPluridisciplinaryPhysics-BiologyPhysics-EconomyPhysics-EnvironmentQuantum Optics, Atomic and Molecular PhysicsCollisional PhysicsLasers and materialsMoleculesStatistical PhysicsDisordered and/or Out of Equilibrium SystemsPhase TransitionsSoft MatterSurfaces and InterfacesTheoretical and Mathematical PhysicsSciences of educationSciences of the UniverseAstrophysicsEarth SciencesGeologyGeochemistryGeochronologyGeodynamic of continental lithosphereGeomaterialsGeomorphologyGeophysicsMineral ressourcesMinerals systemsOrganic geochemistryOrganic matterPaleomagnetismSedimentologySilicated liquidsStratigraphyTectonicHydrologyHydraulicsHydrogeologyModelisationAnalog ModelingNumerical ModellingSuperficial FormationAgricultureAlterationPedologyOcean - AtmosphereAtmosphere ChemistryClimate DynamicsCoastal EnvironmentMedium Scale Atmosphere and OceanOcean Biogeochemical Processes and FluxesOthers AreasTestTechniques of Informatics and Microelectronics for Computer ArchitectureTheses de l'Universite Joseph FourierTheses du Laboratoire Kastler BrosselTheses du Laboratoire Pierre AigrainTheses du Groupe Optique Atomique du LCFIOTheses du Laboratoire d'analyse et d'architecture des systemesTheses du Laboratoire de mathematiques Jean LerayTheses de l'IRMAREcole Doctorale Sciences et Technologies - OrleansTheses de l'Universite d'OrleansTheses de l'Universite Pierre et Marie CurieObservatoire Midi-PyreneesInstitut Neel - ThesesGrenoble Images Parole Signal Automatique1439580
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo162.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo162.xml new file mode 100644 index 0000000..f5fa384 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo162.xml @@ -0,0 +1,2 @@ + +
DSpace00Ιδρυματικό Αποθετήριο του Εθνικού Ιδρύματος Ερευνών (Ήλιος)Institutional Repository of National Hellenic Research Foundation (Helios)http://validator.driver.research-infrastructures.eu/validatorWeb/getRepositoryImage.do?&repositoryId=2-3c6b8a98-5cc5-468e-9cb7-619530c9b1da_UGVuZGluZ1JlcG9zaXRvcnlSZXNvdXJjZXMvUmVwb3NpdG9yeVNlcnZpY2VSZXNvdXJjZVR5cGU=GR23.7453837.9731442.0http://helios-eie.ekt.gr/EIE/National Hellenic Research Foundationstavrakis@ekt.grOAIhttp://pandektis.ekt.gr/oai-driver/requestoai_dcdriver880.0
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo163.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo163.xml new file mode 100644 index 0000000..255c618 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo163.xml @@ -0,0 +1,2 @@ + +
00DSpaceDSpace at Tartu University LibraryDSpace at Tartu University Libraryhttp://dspace.utlib.ee/dspace/image/tul4.gifEE26.71482858.3708841http://dspace.utlib.ee/dspace/Tartu Universitydspace-help@utlib.eeOAIhttp://dspace.utlib.ee/dspace-oai/requestoai_dc76530
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo164.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo164.xml new file mode 100644 index 0000000..3af63d1 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo164.xml @@ -0,0 +1,2 @@ + +
00DSpaceORBi (University of Liège)ORBi (University of Liege)http://orbi.ulg.ac.be/img/nav/digitheque.pngBE5.57531650.6408791http://orbi.ulg.ac.be/University of Liegeorbi@misc.ulg.ac.beOAIhttp://orbi.ulg.ac.be/oai/requestoai_dc16820
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo165.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo165.xml new file mode 100644 index 0000000..04736ff --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo165.xml @@ -0,0 +1,2 @@ + +
00DSpaceUniversiteit voor HumanistiekUniversity for Humanisticshttp://www.uvh.nl/img/logo_UVH.gifNL5.123426152.09432241http://www.uvh.nl/default.aspUniversiteit voor Humanistieksupport-igitur@library.uu.nlOAIhttp://dspace.library.uu.nl:8080/dspace-oai/requestoai_dc230
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo166.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo166.xml new file mode 100644 index 0000000..e48f453 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo166.xml @@ -0,0 +1,2 @@ + +
00EprintsArchivio Eprints Universita di FirenzeArchivio Eprints Universita di Firenzehttp://eprints.unifi.it/images/logo_alto_ep.jpgIT11.25943.7781http://e-prints.unifi.it/Universita di Firenzeeprints@unifi.itOAIhttp://e-prints.unifi.it/perl/oai2oai_dc2000
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo167.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo167.xml new file mode 100644 index 0000000..81130e0 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo167.xml @@ -0,0 +1,2 @@ + +
00OpusBieSOn - Bielefelder Server fuer Online-Publikationen (University of Bielefeld, GERMANY)Bielefeld Univ.: BieSOn - Bielefeld Server for Online Publicationshttp://bieson.ub.uni-bielefeld.de/Icons/bieson_logo.gifDE8.533252.0221http://bieson.ub.uni-bielefeld.de/bieson.ub@uni-bielefeld.deOAIhttp://bieson.ub.uni-bielefeld.de/phpoai/oai2.phpoai_dcepicurGeneralities, knowledge, the bookData processing, computer science, computer systemsBibliographiesLibrary and information sciencesEncyclopedias and books of factsMagazines, journals and serialsAssociations, organizations, and museum scienceNews media, journalism and publishingGeneral collectionsManuscripts and rare booksPhilosophyParapsychology and occultismPsychologyReligion, Philosophy and theory of religionBibleChristianity and Christian theologyComparative religion and other religionsSocial sciences, sociology and anthropologyStatisticsPolitical scienceEconomicsLawPublic administrationMilitary scienceSocial problems and social servicesEducationCommerce, communications, transportationCustoms, etiquette, folkloreLanguage, linguisticsEnglish and Old English languagesGerman languageOther Germanic languagesFrench and related languagesItalian, Romanian and related languagesSpanish and Portuguese languagesLatin and Italic languagesClassical and modern Greek languagesOther languagesScienceMathematicsAstronomy and allied sciencesPhysicsChemistry and allied sciencesEarth sciences and geologyFossils and prehistoric lifeLife sciences, biologyPlants (Botany)Animals (Zoology)Technology (Applied sciences)Medicine and healthEngineeringAgriculture and related technologies (including veterinary medicine)Home and family managementManagement and public relationsChemical engineeringManufacturingBuilding and constructionArtsLandscaping and area planningArchitectureSculpture, numismatics, ceramics, and metalworkDrawing and decorative artsCartoons, caricaturesPaintingGraphic arts, printsPhotography and computer artMusicRecreational and performing artsPublic performancesStage presentationsIndoor games and amusementsAthletic and outdoor sports and gamesLiterature, rhetoric, and criticismAmerican literature in EnglishEnglish and Old English literaturesGerman literatureOther Germanic literaturesFrench and related literaturesItalian, Romanian and related literaturesSpanish and Portuguese literaturesLatin and Italic literaturesClassical and modern Greek literaturesLiteratures of other languagesHistoryGeography and travelGeography of and travel in GermanyBiography, genealogy, and insigniaHistory of ancient world (to ca. 499), archaeologyHistory of EuropeHistory of GermanyHistory of AsiaHistory of AfricaHistory of North AmericaHistory of South AmericaHistory of other areasArticleBookMasters-Thesis.DiplomText.Thesis.DoctoralText.Thesis.HabilitationIn-ProceedingsJournal-IssueMasters-Thesis.MagisterOrganisation-InfoPreprintPreprint-CollectionProceedingsContinuing-PublicationTech-ReportResearch-PaperPaperCourse-MaterialPublic-LectureOther10380
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo168.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo168.xml new file mode 100644 index 0000000..88b18e0 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo168.xml @@ -0,0 +1,2 @@ + +
00VTOAIScientific production, Tilburg UniversityUniv. van Tilburg: Scientific Productionhttp://images.uvt.nl/images/2006/images/uvt_logo.gifNL5.083351.56671http://dbiref.uvt.nl/wilko.haast@uvt.nlOAIhttp://arno.uvt.nl/oai/wo.uvt.nl.cgiarnonetsparnereusoai_dcdare_didlAuthors selected for 'Economists Online'Authors selected for 'Economists Online'Faculty = 'FRW' and full text availableAuthor or one of the authors is selected for 'Keur der Wetenschap'Author or one of the authors is selected for 'Keur der Wetenschap'Only records that have full text availableOnly records that have full text available88740
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo169.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo169.xml new file mode 100644 index 0000000..93eb256 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo169.xml @@ -0,0 +1,2 @@ + +
00VTOAIUniversitat de València: Tesis Doctorals en Xarxa (TDX)Univ. of Valencia: Theses and Dissertations Online (TDX)http://www.tesisenxarxa.net/images/tdx/titol_transp.gifES-0.36451139.4792011http://www.tdx.cesca.es/Universitat de Valènciatdx@cesca.esOAIhttp://www.tdx.cesca.es/TDX_UV/NDLTD-OAI/oai.ploai_dc5660
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo17.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo17.xml new file mode 100644 index 0000000..fc99407 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo17.xml @@ -0,0 +1,2 @@ + +
00VTOAIUniversitat Ramon Llull: Tesis Doctorals en Xarxa (TDX)Univ. Ramon Llull: Theses and Dissertations Online (TDX)http://www.tesisenxarxa.net/images/tdx/titol_transp.gifES2.13127241.4113071http://www.tdx.cesca.es/Universitat Ramon Llulltdx@cesca.esOAIhttp://www.tdx.cesca.es/TDX_URL/NDLTD-OAI/oai.plMARC880
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo170.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo170.xml new file mode 100644 index 0000000..2b59bc3 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo170.xml @@ -0,0 +1,2 @@ + +
00Proprietary softwareOpen Marien Archief (OMA)Open Marine Archivehttp://www.vliz.be/images/r2k1.gifBE2.93151.2321http://www.vliz.be/EN/Marine%20LibraryFlanders Marine Instituteroeland.tjampens@vliz.beOAIhttp://www.vliz.be/oma/imis.phpoai_dc35660
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo171.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo171.xml new file mode 100644 index 0000000..7c4762e --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo171.xml @@ -0,0 +1,2 @@ + +
00DSpaceAperToAperTohttp://aperto.unito.it/image/logo_unito.jpgIT7.68945.0691http://aperto.unito.it/Universita degli studi di Torinoenrico.francese@unito.itOAIhttp://dspace-unito.cilea.it/dspace-oai/requestoai_dc2430
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo172.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo172.xml new file mode 100644 index 0000000..0a40372 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo172.xml @@ -0,0 +1,2 @@ + +
00Fedorae-spacio UNEDe-spacio UNEDhttp://e-spacio.uned.es/fez/images/escudo.gif/ES-3.7344640.446641http://e-spacio.uned.es/fez/UNEDalopezm@pas.uned.esOAIhttp://servmadrono.cs.urjc.es:8010/arcFuturo/servlet/OAIDPunedoai_dc141500
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo173.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo173.xml new file mode 100644 index 0000000..a4e176f --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo173.xml @@ -0,0 +1,2 @@ + +
DSpace00Repositório Aberto da Universidade do PortoUniversity of Porto Open Repositoryhttp://validator.driver.research-infrastructures.eu/validatorWeb/getRepositoryImage.do?&repositoryId=2-53df6e6b-f019-436d-ba0f-82931f2da43c_UGVuZGluZ1JlcG9zaXRvcnlSZXNvdXJjZXMvUmVwb3NpdG9yeVNlcnZpY2VSZXNvdXJjZVR5cGU=POR-8.63797941.1524610.0http://repositorio.up.ptUniversidade do Portorramos@reit.up.ptOAIhttp://repositorio.up.pt/aberto/oai/requestoai_dcAll sets9550.0
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo174.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo174.xml new file mode 100644 index 0000000..0d35186 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo174.xml @@ -0,0 +1,2 @@ + +
00EprintsEPrints ComplutenseEPrints Complutensehttp://www.ucm.es/eprints/images/bucm/eprints_En.jpgES-3.727674640.44598261http://www.ucm.es/eprints/Universidad Complutense Madridbuc-edicion@buc.ucm.esOAIhttp://servmadrono.cs.urjc.es:8010/arcFuturo/servlet/OAIDPucmoai_dc53830
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo175.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo175.xml new file mode 100644 index 0000000..2aa824c --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo175.xml @@ -0,0 +1,2 @@ + +
00OPUSHeidelberger Dokumentenserver (HeiDok)University of Heidelberg, GERMANY, HeiDokhttp://archiv.ub.uni-heidelberg.de/nav1/grafik/layout/uni_hd_siegel.gifDE8.70049.4171http://archiv.ub.uni-heidelberg.de/Univ. HeidelbergMaylein@ub.uni-heidelberg.deOAIhttp://archiv.ub.uni-heidelberg.de/volltextserver/oai2/oai2.phpoai_dcdc:00078390
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo176.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo176.xml new file mode 100644 index 0000000..1c3dc61 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo176.xml @@ -0,0 +1,2 @@ + +
00Whiterose Research OnlineUniv. of Leeds, York and Sheffield: White Rose Consortium ePrints Repositoryhttp://eprints.whiterose.ac.uk/images/wr_acolour.jpgUK-1.546553.79440http://eprints.whiterose.ac.uk/mailto:eprints@whiterose.ac.ukOAIhttp://sherpa.leeds.ac.uk/perl/oai2oai_dcdpStatus = In PressStatus = SubmittedStatus = PublishedStatus = UnpublishedAcademic Unit = The University of Sheffield: Faculty of Medicine (Sheffield): School of Medicine (Sheffield): Clinical Sciences Division South (Sheffield)Academic Unit = The University of Leeds: Faculty of Environment (Leeds): School of Earth and Environment (Leeds): Institute of Geological Sciences (Leeds)Academic Unit = The University of Sheffield: University of Sheffield Research Centres and Institutes: Centre for Terrestrial Carbon Dynamics (Sheffield)Academic Unit = The University of Leeds: Faculty of Performance, Visual Arts and Communications (Leeds): School of Music (Leeds): Leeds University Centre for the Study of the World's Popular MusicsAcademic Unit = The University of Sheffield: Faculty of Arts (Sheffield): School of English (Sheffield): Department of English Literature (Sheffield): National Centre for English Cultural Tradition (Sheffield)Academic Unit = The University of Leeds: Faculty of Medicine, Dentistry, Psychology & Health (Leeds): Institute of Molecular Medicine, Epidemiology and Cancer Research (IMMECR) (Leeds): Section of Musculoskeletal Disease (Leeds)Academic Unit = The University of Sheffield: Faculty of Medicine (Sheffield): School of Medicine (Sheffield)Academic Unit = The University of Leeds: Faculty of Medicine, Dentistry, Psychology & Health (Leeds): Institute of Molecular Medicine, Epidemiology and Cancer Research (IMMECR) (Leeds): Section of Pathology (Leeds): Pathology (Leeds)Academic Unit = The University of Sheffield: Faculty of Medicine (Sheffield): School of Medicine (Sheffield): Clinical Sciences Division North (Sheffield): Department of Surgical Sciences (Sheffield)Academic Unit = The University of Leeds: Faculty of Medicine, Dentistry, Psychology & Health (Leeds): Institute of Health Sciences and Public Health Research (Leeds)Academic Unit = The University of Leeds: University of Leeds Research Centres and Institutes: Institute for Advanced Study in Art (Leeds): Centre for Jewish Studies (Leeds)Academic Unit = The University of Sheffield: University of Sheffield Research Centres and Institutes: Centre of Catchment Science (Sheffield)Academic Unit = The University of Sheffield: University of Sheffield Research Centres and Institutes: Centre for Advanced Research In Identification Science (Sheffield)Academic Unit = The University of Sheffield: University of Sheffield Research Centres and Institutes: The Centre for Research into Freemasonry (Sheffield)Academic Unit = The University of Sheffield: Faculty of Social Sciences (Sheffield): Department of Politics (Sheffield): Political Economy Research Centre (Sheffield)Academic Unit = The University of Leeds: Faculty of Medicine, Dentistry, Psychology & Health (Leeds): Institute of Psychological Sciences (Leeds): Psychological Therapies Research Centre (Leeds)Academic Unit = The University of Sheffield: Faculty of Social Sciences (Sheffield): Department of History (Sheffield)Academic Unit = The University of Sheffield: Faculty of Medicine (Sheffield): School of Dentistry (Sheffield)Academic Unit = The University of Leeds: Faculty of Arts (Leeds): School of Humanities (Leeds)Academic Unit = The University of York: Economics and Related Studies (York)Academic Unit = The University of York: Centre for Women's Studies (York)Academic Unit = The University of Leeds: Faculty of Medicine, Dentistry, Psychology & Health (Leeds)Academic Unit = The University of Leeds: Faculty of Engineering (Leeds): School of Process, Environmental and Materials Engineering (Leeds): Institute for Materials Research (Leeds)Academic Unit = The University of Sheffield: Faculty of Engineering (Sheffield): Department of Chemical and Process Engineering (Sheffield)Academic Unit = The University of Leeds: University of Leeds Research Centres and InstitutesAcademic Unit = The University of Sheffield: Faculty of Social Sciences (Sheffield): Sheffield University Management School: Leisure Management Unit (Sheffield)Academic Unit = The University of York: Archaeology (York)Academic Unit = The University of Sheffield: Faculty of Arts (Sheffield): School of Modern Languages (Sheffield): Department of Germanic Studies (Sheffield)Academic Unit = The University of Sheffield: Faculty of Pure Science (Sheffield): School of Mathematics and Statistics (Sheffield): Probability and Statistics (Sheffield): Applied Probability Trust (Sheffield)Academic Unit = The University of York: History of Art (York)Academic Unit = The University of Sheffield: Faculty of Arts (Sheffield): School of Modern Languages (Sheffield): Department of French (Sheffield)Academic Unit = The University of Sheffield: University of Sheffield Research Centres and InstitutesAcademic Unit = The University of Sheffield: University of Sheffield Research Centres and Institutes: Robert Hill Institute (Sheffield)Academic Unit = The University of Leeds: University of Leeds Research Centres and Institutes: Leeds University Centre for Russian, Eurasian and Central European StudiesAcademic Unit = The University of York: Social Work Research and Development Unit (York)Academic Unit = The University of Sheffield: University of Sheffield Research Centres and Institutes: Institute of Language, Speech and Hearing (Sheffield)Academic Unit = The University of Leeds: Leeds University Business School: International Institute of Banking and Financial Services (Leeds)Academic Unit = The University of Leeds: University of Leeds Research Centres and Institutes: Institute of Molecular Biophysics (Leeds)Academic Unit = The University of Sheffield: Faculty of Medicine (Sheffield): School of Medicine (Sheffield): Clinical Sciences Division North (Sheffield): Clinical Science Centre (Sheffield)Academic Unit = The University of Leeds: Faculty of Medicine, Dentistry, Psychology & Health (Leeds): Institute of Health Sciences and Public Health Research (Leeds): Nuffield Management and Leadership (Leeds)Academic Unit = The University of Leeds: Faculty of Engineering (Leeds)Academic Unit = The University of Sheffield: University of Sheffield Research Centres and Institutes: Centre for Bayesian Statistics and Health Economics (Sheffield)Academic Unit = The University of Sheffield: Faculty of Social Sciences (Sheffield): School of Education (Sheffield): Education- Postgraduate Unit (Sheffield)Academic Unit = The University of Sheffield: Faculty of Medicine (Sheffield): School of Health and Related Research (Sheffield): Trent Institute for Health Services Research (Sheffield)Academic Unit = The University of Sheffield: Faculty of Pure Science (Sheffield): School of Mathematics and Statistics (Sheffield): Probability and Statistics (Sheffield): Statistics Services Unit (Sheffield)Academic Unit = The University of Leeds: Faculty of Performance, Visual Arts and Communications (Leeds): Fine Art, History of Art & Cultural Studies (Leeds)Academic Unit = The University of Leeds: Faculty of Education, Social Sciences and Law (Leeds): School of Education (Leeds): Centre for Studies in Science and Mathematics Education (Leeds)Academic Unit = The University of Sheffield: Faculty of Medicine (Sheffield): School of Health and Related Research (Sheffield): Medical Care Research Unit (Sheffield)Academic Unit = The University of Sheffield: Faculty of Medicine (Sheffield): School of Dentistry (Sheffield): Department of Oral Pathology (Sheffield)Academic Unit = The University of Leeds: Faculty of Environment (Leeds): Institute for Earth, Energy and Environment (Leeds)Academic Unit = The University of Sheffield: Faculty of Pure Science (Sheffield): School of Mathematics and Statistics (Sheffield): Probability and Statistics (Sheffield)Academic Unit = The University of Leeds: Faculty of Engineering (Leeds): School of Civil Engineering (Leeds)Academic Unit = The University of Sheffield: Faculty of Pure Science (Sheffield): School of Biological Sciences (Sheffield): Department of Biomedical Science (Sheffield): Centre for Developmental Genetics (Sheffield)Academic Unit = The University of Leeds: Faculty of Environment (Leeds)Academic Unit = The University of Sheffield: University of Sheffield Research Centres and Institutes: Political Economy Research Centre (Sheffield)Academic Unit = The University of Leeds: Faculty of Arts (Leeds)Academic Unit = The University of Leeds: Faculty of Maths and Physical Sciences (Leeds): School of Mathematics (Leeds)Academic Unit = The University of Sheffield: University of Sheffield Research Centres and Institutes: Centre for the Study of Childhood and Youth (Sheffield)Academic Unit = The University of Leeds: University of Leeds Research Centres and Institutes: Centre for Translation Studies (Leeds)Academic Unit = The University of York: Centre for Eighteenth-Century Studies (York)Academic Unit = The University of Sheffield: University of Sheffield Research Centres and Institutes: Centre for the Study of the Bible in the Modern World (Sheffield)Academic Unit = The University of Leeds: Faculty of Performance, Visual Arts and Communications (Leeds): School of Design (Leeds): Centre for Colour Design and Technology (Leeds)Academic Unit = The University of York: School of Politics, Economics and Philosophy (York)Academic Unit = The University of Leeds: Faculty of Education, Social Sciences and Law (Leeds): School of Sociology and Social Policy (Leeds)Academic Unit = The University of Sheffield: Faculty of Pure Science (Sheffield): Department of Computer Science (Sheffield)Academic Unit = The University of Sheffield: Faculty of Medicine (Sheffield): School of Dentistry (Sheffield): Department of Oral Health and Development (Sheffield)Academic Unit = The University of York: Health Sciences (York)Academic Unit = The University of Leeds: Faculty of Medicine, Dentistry, Psychology & Health (Leeds): Institute of Molecular Medicine, Epidemiology and Cancer Research (IMMECR) (Leeds): Section of Oncology (Leeds): Haematological Malignancy Diagnostic Service (Leeds)Academic Unit = The University of Sheffield: University of Sheffield Research Centres and Institutes: The Krebs Institute for Biomolecular Research (Sheffield)Academic Unit = The University of Leeds: Academic Services (Leeds)Academic Unit = The University of Sheffield: Faculty of Social Sciences (Sheffield): Department of Politics (Sheffield)Academic Unit = The University of Leeds: Faculty of Environment (Leeds): School of Geography (Leeds)Academic Unit = The University of Sheffield: University of Sheffield Research Centres and Institutes: Informatics Collaboratory for the Social Sciences (ICoSS) (Sheffield)Academic Unit = The University of Sheffield: Faculty of Social Sciences (Sheffield): School of Education (Sheffield): Institute for Lifelong Learning (Sheffield)Academic Unit = The University of Sheffield: Faculty of Pure Science (Sheffield)Academic Unit = The University of Leeds: Faculty of Medicine, Dentistry, Psychology & Health (Leeds): Institute of Psychological Sciences (Leeds): Health Psychology (Leeds)Academic Unit = The University of Leeds: Faculty of Medicine, Dentistry, Psychology & Health (Leeds): Institute of Health Sciences and Public Health Research (Leeds): Academic Unit of Primary Care (Leeds)Academic Unit = The University of York: Hull York Medical School (York)Academic Unit = The University of Sheffield: Faculty of Social Sciences (Sheffield): School of Education (Sheffield)Academic Unit = The University of Sheffield: Faculty of Pure Science (Sheffield): School of Biological Sciences (Sheffield): Department of Molecular Biology and Biotechnology (Sheffield)Academic Unit = The University of Leeds: University of Leeds Research Centres and Institutes: Centre for Research in Family, Kinship and Childhood (Leeds)Academic Unit = The University of Leeds: Faculty of Performance, Visual Arts and Communications (Leeds): School of Music (Leeds): Leeds University Centre for English Music (LUCEM)Academic Unit = The University of Leeds: University of Leeds Research Centres and Institutes: Centre for Canadian Studies (Leeds)Academic Unit = The University of Sheffield: Faculty of Pure Science (Sheffield): School of Mathematics and Statistics (Sheffield)Academic Unit = The University of Sheffield: Faculty of Social Sciences (Sheffield): Department of Sociological Studies (Sheffield): Social Science Research Training Office (Sheffield)Academic Unit = The University of Sheffield: Faculty of Social Sciences (Sheffield): Department of Psychology (Sheffield)Academic Unit = The University of Leeds: Faculty of Environment (Leeds): School of Earth and Environment (Leeds)Academic Unit = The University of Sheffield: University of Sheffield Research Centres and Institutes: Institute for Underground Science (Sheffield)Academic Unit = The University of Sheffield: Faculty of Arts (Sheffield): School of English (Sheffield): Department of English Literature (Sheffield)Academic Unit = The University of Leeds: Faculty of Performance, Visual Arts and Communications (Leeds): Performance and Cultural Industries (Leeds): Research Centre for Dance (Leeds)Academic Unit = The University of Leeds: Faculty of Performance, Visual Arts and Communications (Leeds): Performance and Cultural Industries (Leeds)Academic Unit = The University of YorkAcademic Unit = The University of Leeds: Faculty of Environment (Leeds): Earth and Biosphere Institute (Leeds)Academic Unit = The University of Sheffield: University of Sheffield Research Centres and Institutes: Sheffield Institute for Biotechnological Law and EthicsAcademic Unit = The University of Sheffield: Faculty of Medicine (Sheffield): School of Health and Related Research (Sheffield): Health Policy and Management (Sheffield)Academic Unit = The University of Leeds: Faculty of Medicine, Dentistry, Psychology & Health (Leeds): Institute of Psychological Sciences (Leeds)Academic Unit = The University of Leeds: Faculty of Medicine, Dentistry, Psychology & Health (Leeds): Institute of Molecular Medicine, Epidemiology and Cancer Research (IMMECR) (Leeds): Section of Experimental Haematology (Leeds)Academic Unit = The University of York: Mathematics (York)Academic Unit = The University of Sheffield: University of Sheffield Research Centres and Institutes: Institute for Microstructural and Mechanical Process Engineering (Sheffield)Academic Unit = The University of Leeds: Faculty of Medicine, Dentistry, Psychology & Health (Leeds): School of Healthcare (Leeds): Clinical Physiology (Cardiology) (Leeds)Academic Unit = The University of Leeds: Faculty of Medicine, Dentistry, Psychology & Health (Leeds): School of Medicine (Leeds): Academic Unit of Learning and Teaching (Leeds)Academic Unit = The University of Leeds: Leeds University Business School: Institute For Corporate Learning (Leeds)Academic Unit = The University of Sheffield: University of Sheffield Research Centres and Institutes: Centre for Health Information Management Research (Sheffield)Academic Unit = The University of Leeds: Faculty of Medicine, Dentistry, Psychology & Health (Leeds): School of Medicine (Leeds): AU Learning and Teaching (Leeds)Academic Unit = The University of York: Centre for Criminal Justice Economics and Psychology (York)Academic Unit = The University of Leeds: Faculty of Medicine, Dentistry, Psychology & Health (Leeds): Institute of Psychological Sciences (Leeds): Leeds Family Therapy and Research CentreAcademic Unit = The University of Leeds: Faculty of Medicine, Dentistry, Psychology & Health (Leeds): Institute of Molecular Medicine, Epidemiology and Cancer Research (IMMECR) (Leeds): Section of Clinical Trials Research Unit (Leeds)Academic Unit = The University of Leeds: University of Leeds Research Centres and Institutes: Centre for Biodiversity and Conservation (Leeds)Academic Unit = The University of Leeds: Faculty of Medicine, Dentistry, Psychology & Health (Leeds): School of Medicine (Leeds): Paediatrics, Obstetrics and Gynaecology (Leeds)Academic Unit = The University of Sheffield: Faculty of Medicine (Sheffield): School of Medicine (Sheffield): Division of Genomic Medicine (Sheffield): Section of Functional Genomics (Sheffield)Academic Unit = The University of Sheffield: Faculty of Medicine (Sheffield): School of Health and Related Research (Sheffield): Operational Research (Sheffield)Academic Unit = The University of Leeds: Faculty of Medicine, Dentistry, Psychology & Health (Leeds): Institute of Health Sciences and Public Health Research (Leeds): Academic UK Public Health (Leeds)Academic Unit = The University of Sheffield: University of Sheffield Research Centres and Institutes: Humanities Research Institute (Sheffield)Academic Unit = The University of Sheffield: University of Sheffield Research Centres and Institutes: South East European Research Centre (Sheffield)Academic Unit = The University of Leeds: Faculty of Medicine, Dentistry, Psychology & Health (Leeds): Institute of Health Sciences and Public Health Research (Leeds): Yorkshire Centre for Health Informatics (Leeds)Academic Unit = The University of Sheffield: Faculty of Social Sciences (Sheffield): Informatics Collaboratory for the Social Sciences (ICoSS) (Sheffield)Academic Unit = The University of Leeds: Faculty of Environment (Leeds): Institute of Transport Studies (Leeds)Academic Unit = The University of York: York Health Economics Consortium (York)Academic Unit = The University of Leeds: Faculty of Education, Social Sciences and Law (Leeds): School of Politics & International Studies (POLIS) (Leeds): Centre for Development Studies (Leeds)Academic Unit = The University of Leeds: University of Leeds Research Centres and Institutes: Astbury Centre for Structural Molecular Biology (Leeds)Academic Unit = The University of Leeds: Faculty of Education, Social Sciences and Law (Leeds): School of Education (Leeds): Higher Education Policy Unit (Leeds)Academic Unit = The University of Sheffield: University of Sheffield Research Centres and Institutes: Sheffield Centre for Arctic EcologyAcademic Unit = The University of Leeds: University of Leeds Research Centres and Institutes: Institute for Advanced Study in Art (Leeds): Centre for Cultural Studies (Leeds)Academic Unit = The University of Leeds: Faculty of Maths and Physical Sciences (Leeds): School of Physics and Astronomy (Leeds)Academic Unit = The University of Sheffield: Faculty of Social Sciences (Sheffield): Department of Information Studies (Sheffield)Academic Unit = The University of York: York Electronics Centre (York)Academic Unit = The University of Leeds: Faculty of Engineering (Leeds): School of Mechanical Engineering (Leeds)Academic Unit = The University of Sheffield: Faculty of Medicine (Sheffield): School of Health and Related Research (Sheffield): Sheffield Centre for Health and Related ResearchAcademic Unit = The University of Leeds: Faculty of Medicine, Dentistry, Psychology & Health (Leeds): School of Medicine (Leeds): Medical Education Unit (Leeds)Academic Unit = The University of Sheffield: Faculty of Social Sciences (Sheffield): Sheffield University Management School: Division of Accounting and Finance (Sheffield)Academic Unit = The University of Leeds: Faculty of Medicine, Dentistry, Psychology & Health (Leeds): Institute of Health Sciences and Public Health Research (Leeds): Mother and Infant Research Unit (Leeds)Academic Unit = The University of Leeds: Faculty of Arts (Leeds): School of Humanities (Leeds): School of Philosophy (Leeds)Academic Unit = The University of York: Social Policy Research Unit (York)Academic Unit = The University of Leeds: University of Leeds Research Centres and Institutes: Keyworth Institute (Leeds)Academic Unit = The University of Leeds: Faculty of Education, Social Sciences and Law (Leeds): School of Law (Leeds)Academic Unit = The University of Sheffield: University of Sheffield Research Centres and Institutes: Sheffield Centre for Advanced Magnetic Materials and DevicesAcademic Unit = The University of Sheffield: University of Sheffield Research Centres and Institutes: Centre for Luxembourg Studies (Sheffield)Academic Unit = The University of Sheffield: University of Sheffield Research Centres and Institutes: Sheffield Centre for International Drylands ResearchAcademic Unit = The University of Leeds: University of Leeds Research Centres and Institutes: Centre for Combustion and Energy Studies (Leeds)Academic Unit = The University of Leeds: University of Leeds Research Centres and Institutes: Centre for Chinese Business & Development (Leeds)Academic Unit = The University of Sheffield: Faculty of Pure Science (Sheffield): Department of Geography (Sheffield)Academic Unit = The University of Sheffield: Faculty of Medicine (Sheffield): School of Medicine (Sheffield): Clinical Sciences Division North (Sheffield): Sheffield Kidney InstituteAcademic Unit = The University of Leeds: Faculty of Medicine, Dentistry, Psychology & Health (Leeds): Institute of Molecular Medicine, Epidemiology and Cancer Research (IMMECR) (Leeds): Section of Oncology (Leeds): National Cancer Research Network / UKCRM / INVOLVE (Leeds)Academic Unit = The University of Sheffield: Faculty of Engineering (Sheffield): Department of Civil and Structural Engineering (Sheffield)Academic Unit = The University of Sheffield: Faculty of Arts (Sheffield): Department of Biblical Studies (Sheffield)Academic Unit = The University of Leeds: Faculty of Education, Social Sciences and Law (Leeds)Academic Unit = The University of Leeds: Faculty of Medicine, Dentistry, Psychology & Health (Leeds): Institute of Molecular Medicine, Epidemiology and Cancer Research (IMMECR) (Leeds): Academic Unit of Paediatrics, Obstetrics and Gynaecology (Leeds)Academic Unit = The University of Sheffield: University of Sheffield Research Centres and Institutes: Hang Seng Centre for Cognitive Studies (Sheffield)Academic Unit = The University of Sheffield: University of Sheffield Research Centres and Institutes: Centre for Cement and Concrete (Sheffield)Academic Unit = The University of Sheffield: Faculty of Medicine (Sheffield): School of Health and Related Research (Sheffield): Information Resources (SCHARR) (Sheffield)Academic Unit = The University of Leeds: Faculty of Medicine, Dentistry, Psychology & Health (Leeds): Institute of Health Sciences and Public Health Research (Leeds): Nuffield Health and Social Care (Leeds)Academic Unit = The University of Sheffield: University of Sheffield Research Centres and Institutes: Wetlands Research Centre (Sheffield)Academic Unit = The University of Sheffield: University of Sheffield Research Centres and Institutes: Centre for Biomaterials and Tissue Engineering (Sheffield)Academic Unit = The University of Sheffield: University of Sheffield Research Centres and Institutes: Centre for Signal Processing in NeuroImaging and Systems Neuroscience (Sheffield)Academic Unit = The University of Sheffield: University of Sheffield Research Centres and Institutes: ESCUS The European Social and Cultural Studies Centre (Sheffield)Academic Unit = The University of Leeds: Faculty of Engineering (Leeds): School of Process, Environmental and Materials Engineering (Leeds): Continuing Professional Development Unit (Leeds)Academic Unit = The University of Sheffield: Faculty of Medicine (Sheffield): School of Nursing and Midwifery (Sheffield): Department of Community, Ageing, Rehabilitation, Education & Research (Sheffield)Academic Unit = The University of Leeds: Faculty of Environment (Leeds): School of Earth and Environment (Leeds): Sustainability Research Institute (Leeds)Academic Unit = The University of Sheffield: University of Sheffield Research Centres and Institutes: Centre for Stem Cell Biology (Sheffield)Academic Unit = The University of Sheffield: Faculty of Medicine (Sheffield): School of Medicine (Sheffield): Division of Genomic Medicine (Sheffield): Division of Molecular and Genetic Medicine (Sheffield)Academic Unit = The University of Leeds: Faculty of Performance, Visual Arts and Communications (Leeds): School of Design (Leeds): Contemporary Art Practice (Leeds)Academic Unit = The University of Leeds: University of Leeds Research Centres and Institutes: Interdisciplinary Centre for Scientific Research in Music (ICSRiM) (Leeds)Academic Unit = The University of Leeds: Faculty of Education, Social Sciences and Law (Leeds): Leeds Social Sciences InstituteAcademic Unit = The University of Sheffield: Faculty of Arts (Sheffield): School of Modern Languages (Sheffield): Modern Languages Teaching Centre (Sheffield)Academic Unit = The University of Leeds: University of Leeds Research Centres and Institutes: Centre for Mediterranean Studies (Leeds)Academic Unit = The University of Sheffield: Faculty of Engineering (Sheffield): Department of Computer Science (Sheffield)Academic Unit = The University of Leeds: Faculty of Maths and Physical Sciences (Leeds): School of Mathematics (Leeds): Applied Mathematics (Leeds)Academic Unit = The University of Leeds: University of Leeds Research Centres and Institutes: Centre for Photobiology and Photodynamic Therapy (Leeds)Academic Unit = The University of Sheffield: Faculty of Social Sciences (Sheffield): Sheffield University Management School: Division of Strategy, Systems & Management (Sheffield)Academic Unit = The University of York: Politics (York)Academic Unit = The University of Leeds: Faculty of Arts (Leeds): School of Modern Languages and Cultures (Leeds): East Asian Studies (Leeds)Academic Unit = The University of Leeds: University of Leeds Research Centres and Institutes: Leeds Biomaterials Network CentreAcademic Unit = The University of Leeds: University of Leeds Research Centres and Institutes: Centre for Disability Studies (Leeds)Academic Unit = The University of Sheffield: Faculty of Medicine (Sheffield)Academic Unit = The University of Leeds: University of Leeds Research Centres and Institutes: Centre for Medical Imaging Research (Leeds)Academic Unit = The University of Leeds: Faculty of Medicine, Dentistry, Psychology & Health (Leeds): Institute of Molecular Medicine, Epidemiology and Cancer Research (IMMECR) (Leeds): Section of Experimental Therapeutics (Leeds)Academic Unit = The University of Sheffield: Faculty of Engineering (Sheffield): Department of Electronic and Electrical Engineering (Sheffield)Academic Unit = The University of Leeds: Faculty of Education, Social Sciences and Law (Leeds): School of Politics & International Studies (POLIS) (Leeds): Centre for Democratization Studies (Leeds)Academic Unit = The University of Sheffield: Faculty of Social Sciences (Sheffield)Academic Unit = The University of Sheffield: Faculty of Pure Science (Sheffield): Department of Information Studies (Sheffield)Academic Unit = The University of Sheffield: Faculty of Medicine (Sheffield): School of Medicine (Sheffield): Clinical Sciences Division North (Sheffield): Department of Medicine (Sheffield)Academic Unit = The University of Sheffield: University of Sheffield Research Centres and Institutes: Rolls-Royce University Technology Centre in advanced Electrical Machine and Drives (Sheffield)Academic Unit = The University of Leeds: Faculty of Environment (Leeds): School of Earth and Environment (Leeds): Earth Sciences (Leeds)Academic Unit = The University of Sheffield: Faculty of Medicine (Sheffield): School of Medicine (Sheffield): Division of Genomic Medicine (Sheffield): Section of Oncology and Pathology (Sheffield)Academic Unit = The University of Leeds: Faculty of Medicine, Dentistry, Psychology & Health (Leeds): Institute of Molecular Medicine, Epidemiology and Cancer Research (IMMECR) (Leeds): Section of Medicine, Surgery, and Anaesthesia (Leeds)Academic Unit = The University of Leeds: Faculty of Biological Sciences (Leeds)Academic Unit = The University of Leeds: Faculty of Medicine, Dentistry, Psychology & Health (Leeds): Institute of Health Sciences and Public Health Research (Leeds): Academic Unit of Health Economics (Leeds)Academic Unit = The University of York: History (York)Academic Unit = The University of Leeds: Academic Services (Leeds): Library (Leeds)Academic Unit = The University of Sheffield: University of Sheffield Research Centres and Institutes: Rolls-Royce University Technology Centre in Materials Damping Technologies (Sheffield)Academic Unit = The University of Leeds: University of Leeds Research Centres and Institutes: Faraday Packaging Partnership (Leeds)Academic Unit = The University of Sheffield: University of Sheffield Research Centres and Institutes: The Urban and Regional Policy Research Institute (Sheffield)Academic Unit = The University of Leeds: Faculty of Maths and Physical Sciences (Leeds): The Procter Department of Food Science (Leeds)Academic Unit = The University of York: Electronics (York)Academic Unit = The University of Leeds: Faculty of Education, Social Sciences and Law (Leeds): School of Continuing Education (Leeds)Academic Unit = The University of Sheffield: University of Sheffield Research Centres and Institutes: Centre for Geographic Information and Spatial Analysis (Sheffield)Academic Unit = The University of York: Centre for Reviews and Dissemination (York)Academic Unit = The University of Sheffield: Administrative Services (Sheffield)Academic Unit = The University of Leeds: University of Leeds Research Centres and Institutes: Institute for Advanced Study in Art (Leeds)Academic Unit = The University of Sheffield: Faculty of Social Sciences (Sheffield): Department of Geography (Sheffield)Academic Unit = The University of Sheffield: Faculty of Medicine (Sheffield): School of Health and Related Research (Sheffield): Mental Health Section (Sheffield)Academic Unit = The University of Sheffield: Faculty of Medicine (Sheffield): School of Nursing and Midwifery (Sheffield): Department of Midwifery and Childrens Nursing (Sheffield)Academic Unit = The University of Sheffield: Faculty of Arts (Sheffield): School of Modern Languages (Sheffield): Department of Russian and Slavonic Studies (Sheffield)Academic Unit = The University of Leeds: University of Leeds Research Centres and Institutes: Centre for Virtual Working Systems (Leeds)Academic Unit = The University of Leeds: Faculty of Engineering (Leeds): School of Electronic & Electrical Engineering (Leeds): Institute of Microwaves and Photonics (Leeds)Academic Unit = The University of York: Biology (York)Academic Unit = The University of Leeds: Faculty of Maths and Physical Sciences (Leeds): School of Mathematics (Leeds): Pure Mathematics (Leeds)Academic Unit = The University of Leeds: University of Leeds Research Centres and Institutes: Institute for Advanced Study in Art (Leeds): Centre for Studies in Architecture and Material Culture (Leeds)Academic Unit = The University of Leeds: Academic Services (Leeds): Information Systems Services (Leeds)Academic Unit = The University of Leeds: University of Leeds Research Centres and Institutes: Centre for Computational Fluid Dynamics (Leeds)Academic Unit = The University of Sheffield: University of Sheffield Research Centres and Institutes: EPSRC National Centre for III-V Technologies (Sheffield)Academic Unit = The University of Leeds: Faculty of Performance, Visual Arts and Communications (Leeds): Institute of Communication Studies (Leeds): Louis le Prince Centre for Cinema Photography and Television (Leeds)Academic Unit = The University of York: Science and Technology Studies Unit (SATSU) (York)Academic Unit = The University of Sheffield: University of Sheffield Research Centres and Institutes: Centre for Bioinformatics and Computational Biology (Sheffield)Academic Unit = The University of Sheffield: University of Sheffield Research Centres and Institutes: Academy for Steel Construction (Sheffield)Academic Unit = The University of Leeds: Faculty of Engineering (Leeds): School of Process, Environmental and Materials Engineering (Leeds): Energy and Resources Research Institute (Leeds)Academic Unit = The University of Sheffield: Faculty of Architectural Studies (Sheffield)Academic Unit = The University of Leeds: Faculty of Education, Social Sciences and Law (Leeds): School of Law (Leeds): Centre for Criminal Justice Studies (Leeds)Academic Unit = The University of Leeds: Faculty of Arts (Leeds): School of Modern Languages and Cultures (Leeds): Russian & Slavonic Studies (Leeds)Academic Unit = The University of Sheffield: Faculty of Medicine (Sheffield): School of Medicine (Sheffield): Division of Genomic Medicine (Sheffield): Section of Genetics and Informatics (Sheffield)Academic Unit = The University of Leeds: Faculty of Medicine, Dentistry, Psychology & Health (Leeds): School of Healthcare (Leeds): Nursing (Leeds)Academic Unit = The University of Sheffield: University of Sheffield Research Centres and Institutes: Centre for Gender Studies in Europe (Sheffield)Academic Unit = The University of Sheffield: Administrative Services (Sheffield): Library (Sheffield)Academic Unit = The University of Sheffield: University of Sheffield Research Centres and Institutes: Institute for the Study of Political Parties (Sheffield)Academic Unit = The University of Sheffield: University of Sheffield Research Centres and Institutes: Sheffield Centre for Earth Observation ScienceAcademic Unit = The University of Leeds: Leeds University Business School: Centre for International Business University of Leeds (CIBUL)Academic Unit = The University of Leeds: Faculty of Arts (Leeds): School of English (Leeds)Academic Unit = The University of Leeds: Faculty of Medicine, Dentistry, Psychology & Health (Leeds): School of Medicine (Leeds)Academic Unit = The University of Leeds: Faculty of Education, Social Sciences and Law (Leeds): School of Law (Leeds): Centre for the Study of Law and Policy in Europe (Leeds)Academic Unit = The University of Sheffield: Faculty of Medicine (Sheffield): School of Medicine (Sheffield): Clinical Sciences Division South (Sheffield): Medical Sciences (Sheffield)Academic Unit = The University of Sheffield: Faculty of Social Sciences (Sheffield): Centre for Training Policy Research (Sheffield)Academic Unit = The University of Sheffield: Faculty of Medicine (Sheffield): School of Medicine (Sheffield): Clinical Sciences Division North (Sheffield)Academic Unit = The University of Leeds: University of Leeds Research Centres and Institutes: Centre for Antimicrobial Research (Leeds)Academic Unit = The University of York: English and Related Literature (York)Academic Unit = The University of Leeds: University of Leeds Research Centres and Institutes: Centre for Policy Studies in Education (Leeds)Academic Unit = The University of Leeds: Faculty of Education, Social Sciences and Law (Leeds): School of Education (Leeds): Centre for Citizenship and Human Rights Education (Leeds)Academic Unit = The University of Leeds: Faculty of Maths and Physical Sciences (Leeds): School of Mathematics (Leeds): Statistics (Leeds)Academic Unit = The University of York: Centre for Health Economics (York)Academic Unit = The University of Sheffield: Faculty of Pure Science (Sheffield): School of Biological Sciences (Sheffield): Department of Animal and Plant Sciences (Sheffield)Academic Unit = The University of Leeds: Faculty of Medicine, Dentistry, Psychology & Health (Leeds): Institute of Molecular Medicine, Epidemiology and Cancer Research (IMMECR) (Leeds): Section of Oncology (Leeds)Academic Unit = The University of York: Stockholm Environment Institute at York (York)Academic Unit = The University of Leeds: Faculty of Education, Social Sciences and Law (Leeds): School of Education (Leeds)Academic Unit = The University of Sheffield: Faculty of Pure Science (Sheffield): Department of Psychology (Sheffield)Academic Unit = The University of Sheffield: Faculty of Arts (Sheffield)Academic Unit = The University of Leeds: Faculty of Medicine, Dentistry, Psychology & Health (Leeds): School of Healthcare (Leeds): Academic Pharmacy Practice (Leeds)Academic Unit = The University of Leeds: University of Leeds Research Centres and Institutes: Centre for Computer Analysis of Language and Speech (Leeds)Academic Unit = The University of Leeds: University of Leeds Research Centres and Institutes: Centre for Heritage Research (Leeds)Academic Unit = The University of Leeds: Faculty of Medicine, Dentistry, Psychology & Health (Leeds): Leeds Institute of Genetics, Health and Therapeutics (LIGHT)Academic Unit = The University of Sheffield: Faculty of Engineering (Sheffield): Department of Mechanical Engineering (Sheffield)Academic Unit = The University of Sheffield: University of Sheffield Research Centres and Institutes: Bakhtin Centre (Sheffield)Academic Unit = The University of Sheffield: Faculty of Pure Science (Sheffield): School of Mathematics and Statistics (Sheffield): Department of Pure Maths (Sheffield)Academic Unit = The University of Leeds: Faculty of Medicine, Dentistry, Psychology & Health (Leeds): Institute of Molecular Medicine, Epidemiology and Cancer Research (IMMECR) (Leeds): Section of Oncology (Leeds): Oncolocy/Cancer Research UK Clinical CentreAcademic Unit = The University of Sheffield: University of Sheffield Research Centres and Institutes: Sheffield Polymer CentreAcademic Unit = The University of Sheffield: Faculty of Architectural Studies (Sheffield): Department of Town and Regional Planning (Sheffield)Academic Unit = The University of Sheffield: Faculty of Pure Science (Sheffield): School of Mathematics and Statistics (Sheffield): Applied Maths (Sheffield)Academic Unit = The University of Leeds: Faculty of Performance, Visual Arts and Communications (Leeds): School of Music (Leeds)Academic Unit = The University of Leeds: Faculty of Medicine, Dentistry, Psychology & Health (Leeds): School of Healthcare (Leeds): Imaging Science (Leeds)Academic Unit = The University of Sheffield: University of Sheffield Research Centres and Institutes: Centre for Aegean Archaeology (Sheffield)Academic Unit = The University of Sheffield: University of Sheffield Research Centres and Institutes: Sheffield Institute for Studies on AgeingAcademic Unit = The University of Sheffield: Faculty of Medicine (Sheffield): School of Nursing and Midwifery (Sheffield): Department of Acute and Critical Care Nursing (Sheffield)Academic Unit = The University of Leeds: Faculty of Arts (Leeds): School of Modern Languages and Cultures (Leeds): Linguistics & Phonetics (Leeds)Academic Unit = The University of Leeds: Faculty of Medicine, Dentistry, Psychology & Health (Leeds): Institute of Molecular Medicine, Epidemiology and Cancer Research (IMMECR) (Leeds): Section of Genetics (Leeds)Academic Unit = The University of Leeds: University of Leeds Research Centres and Institutes: Centre for Nonlinear Studies (Leeds)Academic Unit = The University of Leeds: Faculty of Engineering (Leeds): School of Electronic & Electrical Engineering (Leeds)Academic Unit = The University of Leeds: Faculty of Medicine, Dentistry, Psychology & Health (Leeds): Institute of Health Sciences and Public Health Research (Leeds): Academic Unit of Psychiatry and Behavioural Sciences (Leeds)Academic Unit = The University of Leeds: Leeds University Business School: Centre for Industrial Policy and Performance (Leeds)Academic Unit = The University of Sheffield: Faculty of Arts (Sheffield): School of Modern Languages (Sheffield)Academic Unit = The University of Leeds: Faculty of Medicine, Dentistry, Psychology & Health (Leeds): Institute of Psychological Sciences (Leeds): Biological Psychology (Leeds)Academic Unit = The University of Sheffield: Faculty of Pure Science (Sheffield): Environmental and Geological Sciences Unit (Sheffield)Academic Unit = The University of Leeds: University of Leeds Research Centres and Institutes: Centre for Ethnicity and Racism Studies (Leeds)Academic Unit = The University of Sheffield: Faculty of Medicine (Sheffield): School of Health and Related Research (Sheffield): Mental Health Section (Sheffield): Forensic Psychiatry (Sheffield)Academic Unit = The University of Leeds: Faculty of Arts (Leeds): School of Modern Languages and Cultures (Leeds)Academic Unit = The University of Leeds: Faculty of Medicine, Dentistry, Psychology & Health (Leeds): School of Medicine (Leeds): Procurement Office (Leeds)Academic Unit = The University of Leeds: Faculty of Education, Social Sciences and Law (Leeds): School of Politics & International Studies (POLIS) (Leeds): Centre for International Studies (Leeds)Academic Unit = The University of Leeds: Faculty of Environment (Leeds): Leeds Centre for Polar ScienceAcademic Unit = The University of Leeds: Faculty of Performance, Visual Arts and Communications (Leeds): Institute of Communication Studies (Leeds)Academic Unit = The University of Sheffield: Faculty of Medicine (Sheffield): School of Medicine (Sheffield): Division of Genomic Medicine (Sheffield): Department of Psychiatry (Sheffield)Academic Unit = The University of York: Centre for Housing Policy (York)Academic Unit = The University of Sheffield: Faculty of Arts (Sheffield): Department of History (Sheffield)Academic Unit = The University of Leeds: Faculty of Medicine, Dentistry, Psychology & Health (Leeds): School of Healthcare (Leeds)Academic Unit = The University of Leeds: Faculty of Performance, Visual Arts and Communications (Leeds)Academic Unit = The University of Leeds: Faculty of Arts (Leeds): School of Modern Languages and Cultures (Leeds): French (Leeds)Academic Unit = The University of Leeds: Faculty of Environment (Leeds): School of Earth and Environment (Leeds): Environment (Leeds)Academic Unit = The University of Leeds: Faculty of Arts (Leeds): School of History (Leeds): Centre for Military History (Leeds)Academic Unit = The University of Leeds: University of Leeds Research Centres and Institutes: Institute for Research on Contemporary China (Leeds)Academic Unit = The University of Leeds: Faculty of Medicine, Dentistry, Psychology & Health (Leeds): Institute of Molecular Medicine, Epidemiology and Cancer Research (IMMECR) (Leeds)Academic Unit = The University of Sheffield: University of Sheffield Research Centres and Institutes: Centre for Glass Research (Sheffield)Academic Unit = The University of Sheffield: University of Sheffield Research Centres and Institutes: Advanced Manufacturing Research Centre (Sheffield)Academic Unit = The University of Leeds: Faculty of Engineering (Leeds): School of Process, Environmental and Materials Engineering (Leeds)Academic Unit = The University of Sheffield: Faculty of Social Sciences (Sheffield): School of East Asian Studies (Sheffield)Academic Unit = The University of Sheffield: Faculty of Arts (Sheffield): Department of Music (Sheffield)Academic Unit = The University of Leeds: Faculty of Engineering (Leeds): School of Process, Environmental and Materials Engineering (Leeds): Leeds University BNFL Research AllianceAcademic Unit = The University of Leeds: Faculty of Biological Sciences (Leeds): Institute of Integrative and Comparative Biology (Leeds)Academic Unit = The University of Leeds: Faculty of Performance, Visual Arts and Communications (Leeds): Institute of Communication Studies (Leeds): Research Centre For Future Communications (Leeds)Academic Unit = The University of Sheffield: Faculty of Social Sciences (Sheffield): Sheffield University Management School: Management Development Unit (Sheffield)Academic Unit = The University of Sheffield: Faculty of Social Sciences (Sheffield): Sheffield University Management SchoolAcademic Unit = The University of LeedsAcademic Unit = The University of Sheffield: Faculty of Medicine (Sheffield): School of Medicine (Sheffield): Clinical Sciences Division South (Sheffield): Reproductive and Developmental Medicine (Sheffield)Academic Unit = The University of Leeds: Faculty of Engineering (Leeds): School of Electronic & Electrical Engineering (Leeds): Institute of Integrated Information Systems (Leeds)Academic Unit = The University of Sheffield: University of Sheffield Research Centres and Institutes: Centre for Nineteenth Century Studies (Sheffield)Academic Unit = The University of Leeds: Faculty of Engineering (Leeds): School of Process, Environmental and Materials Engineering (Leeds): Institute of Particle Science and Engineering (Leeds)Academic Unit = The University of Sheffield: Faculty of Medicine (Sheffield): School of Medicine (Sheffield): Clinical Sciences Division South (Sheffield): Department of Medical Physics and Clinical Engineering (Sheffield)Academic Unit = The University of Leeds: Faculty of Medicine, Dentistry, Psychology & Health (Leeds): School of Healthcare (Leeds): Applied Health Sciences (Leeds)Academic Unit = The University of Leeds: University of Leeds Research Centres and Institutes: Centre for Interdisciplinary Gender Studies (Leeds)Academic Unit = The University of Leeds: University of Leeds Research Centres and Institutes: Leeds University Centre for African Studies (LUCAS)Academic Unit = The University of Sheffield: University of Sheffield Research Centres and Institutes: Rolls-Royce University Technology Centre for Control and Systems Engineering (Sheffield)Academic Unit = The University of Leeds: Faculty of Arts (Leeds): School of Modern Languages and Cultures (Leeds): Spanish & Portuguese (Leeds)Academic Unit = The University of Sheffield: University of Sheffield Research Centres and Institutes: Leisure Industries Research Centre (Sheffield)Academic Unit = The University of Leeds: University of Leeds Research Centres and Institutes: Centre for Business and Professional Ethics (Leeds)Academic Unit = The University of Sheffield: Faculty of Medicine (Sheffield): School of Health and Related Research (Sheffield): Institute of General Practice & Primary Care (Sheffield)Academic Unit = The University of Sheffield: Faculty of Medicine (Sheffield): School of Health and Related Research (Sheffield)Academic Unit = The University of York: Chemistry (York)Academic Unit = The University of Leeds: Faculty of Maths and Physical Sciences (Leeds): Department of Colour and Polymer Chemistry (Leeds)Academic Unit = The University of Leeds: Faculty of Arts (Leeds): School of Modern Languages and Cultures (Leeds): Italian (Leeds)Academic Unit = The University of Leeds: Faculty of Performance, Visual Arts and Communications (Leeds): Institute of Communication Studies (Leeds): Centre for European Political Communications (Leeds)Academic Unit = The University of Sheffield: Faculty of Social Sciences (Sheffield): Sheffield University Management School: Division of HRM and Organisational Behaviour (Sheffield)Academic Unit = The University of Sheffield: Faculty of Engineering (Sheffield)Academic Unit = The University of York: Post-war Reconstruction and Development Unit (York)Academic Unit = The University of Sheffield: Faculty of Law (Sheffield)Academic Unit = The University of Leeds: Faculty of Medicine, Dentistry, Psychology & Health (Leeds): School of Healthcare (Leeds): Midwifery (Leeds)Academic Unit = The University of Leeds: University of Leeds Research Centres and Institutes: Leeds Stem Cell NetworkAcademic Unit = The University of York: Psychology (York)Academic Unit = The University of York: Environment (York)Academic Unit = The University of Leeds: Faculty of Education, Social Sciences and Law (Leeds): School of Politics & International Studies (POLIS) (Leeds)Academic Unit = The University of Sheffield: Faculty of Medicine (Sheffield): School of Medicine (Sheffield): Division of Genomic Medicine (Sheffield): Academic Neurology Unit (Sheffield)Academic Unit = The University of Sheffield: Faculty of Arts (Sheffield): School of English (Sheffield): Department of English Language and Linguistics (Sheffield)Academic Unit = The University of York: Physics (York)Academic Unit = The University of York: Language and Linguistic Science (York)Academic Unit = The University of Sheffield: Faculty of Social Sciences (Sheffield): Department of Economics (Sheffield)Academic Unit = The University of Leeds: Faculty of Biological Sciences (Leeds): Institute of Membrane and Systems Biology (Leeds)Academic Unit = The University of Leeds: Faculty of Medicine, Dentistry, Psychology & Health (Leeds): Leeds Institute of Genetics, Health and Therapeutics (LIGHT): Cardiovascular Research Institute at Leeds (CRISTAL)Academic Unit = The University of Sheffield: Faculty of Pure Science (Sheffield): School of Biological Sciences (Sheffield)Academic Unit = The University of Sheffield: University of Sheffield Research Centres and Institutes: Medical Care Research Unit (Sheffield)Academic Unit = The University of Leeds: Faculty of Education, Social Sciences and Law (Leeds): School of Law (Leeds): Centre for Business Law and Practice (Leeds)Academic Unit = The University of Leeds: Faculty of Environment (Leeds): School of Earth and Environment (Leeds): Institute of Geophysics and Tectonics (Leeds)Academic Unit = The University of Sheffield: Faculty of Medicine (Sheffield): School of Medicine (Sheffield): Academic Unit of Medical Education (Sheffield)Academic Unit = The University of Sheffield: University of Sheffield Research Centres and Institutes: Sheffield Centre for the History of MedicineAcademic Unit = The University of Leeds: Faculty of Medicine, Dentistry, Psychology & Health (Leeds): Institute of Health Sciences and Public Health Research (Leeds): Support Service (Leeds)Academic Unit = The University of Leeds: Faculty of Arts (Leeds): Institute for Medieval Studies (Leeds)Academic Unit = The University of Leeds: Leeds University Business School: Credit Management Research Centre (Leeds)Academic Unit = The University of Leeds: University of Leeds Research Centres and Institutes: Centre for Self-Organising Molecular Systems (Leeds)Academic Unit = The University of Sheffield: Faculty of Pure Science (Sheffield): School of Mathematics and Statistics (Sheffield): Applied Maths (Sheffield): Sheffield Centre for Earth Observation ScienceAcademic Unit = The University of Leeds: University of Leeds Research Centres and Institutes: Institute for Advanced Study in Art (Leeds): AHRB Centre for Cultural Analysis Theory & History (Leeds)Academic Unit = The University of Leeds: Faculty of Education, Social Sciences and Law (Leeds): School of Politics & International Studies (POLIS) (Leeds): Centre for British Government (Leeds)Academic Unit = The University of Leeds: Faculty of Arts (Leeds): School of Humanities (Leeds): Inter-Disciplinary Ethics Applied (IDEA CETL) (Leeds)Academic Unit = The University of Sheffield: Faculty of Arts (Sheffield): Department of Philosophy (Sheffield)Academic Unit = The University of Sheffield: Faculty of Medicine (Sheffield): School of Nursing and Midwifery (Sheffield): Department of Mental Health and Learning Disabilities (Sheffield)Academic Unit = The University of Sheffield: Faculty of Social Sciences (Sheffield): Department of Journalism Studies (Sheffield)Academic Unit = The University of Leeds: Faculty of Arts (Leeds): School of History (Leeds): Centre for Business History (Leeds)Academic Unit = The University of Leeds: University of Leeds Research Centres and Institutes: Centre for Plant Sciences (Leeds)Academic Unit = The University of Sheffield: Faculty of Medicine (Sheffield): School of Dentistry (Sheffield): Department of Adult Dental Care (Sheffield)Academic Unit = The University of Sheffield: Faculty of Pure Science (Sheffield): School of Biological Sciences (Sheffield): Department of Biomedical Science (Sheffield)Academic Unit = The University of Leeds: University of Leeds Research Centres and Institutes: Lifelong Learning Institute (Leeds)Academic Unit = The University of Leeds: Faculty of Engineering (Leeds): School of Computing (Leeds)Academic Unit = The University of Leeds: Faculty of Maths and Physical Sciences (Leeds): School of Chemistry (Leeds)Academic Unit = The University of Sheffield: Faculty of Social Sciences (Sheffield): Department of Sociological Studies (Sheffield)Academic Unit = The University of Sheffield: Faculty of Pure Science (Sheffield): Department of Archaeology (Sheffield)Academic Unit = The University of Sheffield: Faculty of Medicine (Sheffield): School of Health and Related Research (Sheffield): Sheffield Health Economics GroupAcademic Unit = The University of Leeds: Faculty of Medicine, Dentistry, Psychology & Health (Leeds): Institute of Molecular Medicine, Epidemiology and Cancer Research (IMMECR) (Leeds): Section of Molecular Gastroenterology (Leeds)Academic Unit = The University of Leeds: Faculty of Medicine, Dentistry, Psychology & Health (Leeds): Institute of Molecular Medicine, Epidemiology and Cancer Research (IMMECR) (Leeds): Section of Pathology (Leeds)Academic Unit = The University of Sheffield: Faculty of Arts (Sheffield): Department of Archaeology (Sheffield)Academic Unit = The University of York: Centre for Leadership and Management (York)Academic Unit = The University of Sheffield: University of Sheffield Research Centres and Institutes: Institute for Folklore Studies in Britain and Canada (Sheffield)Academic Unit = The University of Leeds: Faculty of Medicine, Dentistry, Psychology & Health (Leeds): School of Medicine (Leeds): Academic Unit of Epidemiology and Health Services Research (Leeds)Academic Unit = The University of Sheffield: University of Sheffield Research Centres and Institutes: Sorby Centre for Electron Microscopy and microanalysis (Sheffield)Academic Unit = The University of Sheffield: Faculty of Medicine (Sheffield): School of Medicine (Sheffield): Division of Genomic Medicine (Sheffield)Academic Unit = The University of Leeds: Faculty of Engineering (Leeds): School of Mechanical Engineering (Leeds): Institute of Medical and Biological Engineering (Leeds)Academic Unit = The University of Sheffield: University of Sheffield Research Centres and Institutes: Institute for Molecular Physiology (Sheffield)Academic Unit = The University of Sheffield: Faculty of Medicine (Sheffield): School of Nursing and Midwifery (Sheffield)Academic Unit = The University of Sheffield: University of Sheffield Research Centres and Institutes: The Ibberson Centre (Sheffield)Academic Unit = The University of York: Sociology (York)Academic Unit = The University of Leeds: Faculty of Performance, Visual Arts and Communications (Leeds): School of Design (Leeds)Academic Unit = The University of Leeds: University of Leeds Research Centres and Institutes: University of Leeds Advanced Driving SimulatorAcademic Unit = The University of Sheffield: Faculty of Arts (Sheffield): School of English (Sheffield)Academic Unit = The University of Sheffield: University of Sheffield Research Centres and Institutes: Immobilisation Science Laboratory (Sheffield)Academic Unit = The University of Sheffield: Faculty of Medicine (Sheffield): School of Health and Related Research (Sheffield): Department of Public Health (Sheffield)Academic Unit = The University of Leeds: Faculty of Arts (Leeds): School of Humanities (Leeds): Classics (Leeds)Academic Unit = The University of SheffieldAcademic Unit = The University of Leeds: Faculty of Medicine, Dentistry, Psychology & Health (Leeds): Leeds Institute of Genetics, Health and Therapeutics (LIGHT): Academic Unit of Medical Physics (Leeds)Academic Unit = The University of Leeds: Faculty of Medicine, Dentistry, Psychology & Health (Leeds): Leeds Institute of Genetics, Health and Therapeutics (LIGHT): Academic Unit of Cardiovascular Medicine (Leeds)Academic Unit = The University of Leeds: Faculty of Environment (Leeds): School of Earth and Environment (Leeds): Environmental Geochemistry Group (Leeds)Academic Unit = The University of Leeds: Faculty of Medicine, Dentistry, Psychology & Health (Leeds): Institute of Molecular Medicine, Epidemiology and Cancer Research (IMMECR) (Leeds): Section of Epidemiology and Biostatistics (Leeds)Academic Unit = The University of Sheffield: Faculty of Medicine (Sheffield): School of Medicine (Sheffield): Clinical Sciences Division North (Sheffield): Sheffield Institute for Studies on AgeingAcademic Unit = The University of Leeds: University of Leeds Research Centres and Institutes: Institute of Medical and Biological Engineering (Leeds)Academic Unit = The University of York: Computer Science (York)Academic Unit = The University of Leeds: Faculty of Arts (Leeds): School of Modern Languages and Cultures (Leeds): French (Leeds): Centre for Francophone Studies (Leeds)Academic Unit = The University of Leeds: University of Leeds Research Centres and Institutes: Centre for Research in Primary Care (Leeds)Academic Unit = The University of Sheffield: University of Sheffield Research Centres and Institutes: Institute of Work Psychology (Sheffield)Academic Unit = The University of Leeds: University of Leeds Research Centres and Institutes: Centre for Decision Research (Leeds)Academic Unit = The University of Sheffield: Faculty of Social Sciences (Sheffield): Department of Human Communication Sciences (Sheffield)Academic Unit = The University of Sheffield: University of Sheffield Research Centres and Institutes: National Centre for English Cultural Tradition (Sheffield)Academic Unit = The University of Sheffield: Faculty of Medicine (Sheffield): School of Health and Related Research (Sheffield): Mental Health Section (Sheffield): Centre for Psychotherapeutic Studies (Sheffield)Academic Unit = The University of Leeds: Faculty of Medicine, Dentistry, Psychology & Health (Leeds): Leeds Institute of Genetics, Health and Therapeutics (LIGHT): Centre for Epidemiology & Biostatistics (Leeds): Reproduction and Early Development Research (RED) Group (Leeds)Academic Unit = The University of Leeds: Faculty of Arts (Leeds): School of Humanities (Leeds): School of Theology & Religious Studies (Leeds)Academic Unit = The University of Leeds: University of Leeds Research Centres and Institutes: Interdisciplinary Research Centre in Polymer Science and Technology (Leeds)Academic Unit = The University of Leeds: Faculty of Medicine, Dentistry, Psychology & Health (Leeds): Institute of Health Sciences and Public Health Research (Leeds): Nuffield International Development (Leeds)Academic Unit = The University of Leeds: Faculty of Arts (Leeds): School of Humanities (Leeds): Philosophical and Religious Studies Subject Centre (Leeds)Academic Unit = The University of York: Music (York)Academic Unit = The University of Leeds: Leeds University Business School: Centre for Industrial Relations and Human Resource Management (Leeds)Academic Unit = The University of Sheffield: University of Sheffield Research Centres and Institutes: Sheffield University Waste Incineration CentreAcademic Unit = The University of Leeds: Faculty of Biological Sciences (Leeds): Institute for Molecular and Cellular Biology (Leeds)Academic Unit = The University of Leeds: Faculty of Medicine, Dentistry, Psychology & Health (Leeds): Leeds Institute of Genetics, Health and Therapeutics (LIGHT): Academic Unit of Molecular Vascular Medicine (Leeds)Academic Unit = The University of Leeds: Faculty of Arts (Leeds): School of Modern Languages and Cultures (Leeds): German (Leeds)Academic Unit = The University of Sheffield: Faculty of Law (Sheffield): Department of Law (Sheffield)Academic Unit = The University of Leeds: Faculty of Medicine, Dentistry, Psychology & Health (Leeds): Institute of Psychological Sciences (Leeds): Cognitive Psychology (Leeds)Academic Unit = The University of Leeds: University of Leeds Research Centres and Institutes: Skin Research Centre (Leeds)Academic Unit = The University of Leeds: Faculty of Arts (Leeds): School of History (Leeds)Academic Unit = The University of Leeds: Faculty of Environment (Leeds): School of Earth and Environment (Leeds): Institute for Atmospheric Science (Leeds)Academic Unit = The University of Sheffield: Faculty of Medicine (Sheffield): School of Dentistry (Sheffield): Department of Dental Services (Sheffield)Academic Unit = The University of Leeds: Leeds University Business SchoolAcademic Unit = The University of Sheffield: Faculty of Engineering (Sheffield): Department of Automatic Control and Systems Engineering (Sheffield)Academic Unit = The University of Leeds: Faculty of Medicine, Dentistry, Psychology & Health (Leeds): School of Healthcare (Leeds): Audiology (Leeds)Academic Unit = The University of York: Philosophy (York)Academic Unit = The University of Leeds: University of Leeds Research Centres and Institutes: Jean Monnet European Centre of Excellence (Leeds)Academic Unit = The University of Sheffield: Faculty of Architectural Studies (Sheffield): School of Architecture (Sheffield)Academic Unit = The University of Sheffield: Faculty of Pure Science (Sheffield): Department of Earth Sciences (Sheffield)Academic Unit = The University of Leeds: Faculty of Arts (Leeds): School of Humanities (Leeds): School of Philosophy (Leeds): Division of the History and Philosophy of Science (Leeds)Academic Unit = The University of Sheffield: University of Sheffield Research Centres and Institutes: Rolls-Royce University Technology Centre for Partnership for Design (Sheffield)Academic Unit = The University of Sheffield: Faculty of Engineering (Sheffield): Department of Engineering Materials (Sheffield)Academic Unit = The University of York: Centre for Medieval Studies (York)Academic Unit = The University of Sheffield: University of Sheffield Research Centres and Institutes: The Centre for Criminological Research (Sheffield)Academic Unit = The University of Sheffield: Faculty of Pure Science (Sheffield): Department of Physics and Astronomy (Sheffield)Academic Unit = The University of Leeds: Faculty of Maths and Physical Sciences (Leeds)Academic Unit = The University of Sheffield: Faculty of Architectural Studies (Sheffield): Department of Landscape (Sheffield)Academic Unit = The University of York: Social Policy and Social Work (York)Academic Unit = The University of Sheffield: Faculty of Medicine (Sheffield): School of Medicine (Sheffield): Clinical Sciences Division South (Sheffield): Department of Surgical and Anaesthetic Science (Sheffield)Academic Unit = The University of Sheffield: Faculty of Pure Science (Sheffield): Department of Chemistry (Sheffield)Academic Unit = The University of Leeds: Faculty of Medicine, Dentistry, Psychology & Health (Leeds): Leeds Institute of Genetics, Health and Therapeutics (LIGHT): Centre for Epidemiology & Biostatistics (Leeds)Academic Unit = The University of York: Management Studies (York)Academic Unit = The University of Leeds: Faculty of Engineering (Leeds): Nanofactory Interdisciplinary Institute (Leeds)Academic Unit = The University of Sheffield: Faculty of Arts (Sheffield): School of Modern Languages (Sheffield): Department of Hispanic Studies (Sheffield)Academic Unit = The University of Sheffield: University of Sheffield Research Centres and Institutes: Centre for Developmental Genetics (Sheffield)Academic Unit = The University of Leeds: Faculty of Arts (Leeds): School of Modern Languages and Cultures (Leeds): Arabic & Middle Eastern Studies (Leeds)Academic Unit = The University of Sheffield: Faculty of Arts (Sheffield): Humanities Research Institute (Sheffield)Academic Unit = The University of York: Educational Studies (York)Academic Unit = The University of Leeds: Faculty of Performance, Visual Arts and Communications (Leeds): School of Design (Leeds): Centre for Technical Textiles (Leeds)34270
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo177.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo177.xml new file mode 100644 index 0000000..c19def5 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo177.xml @@ -0,0 +1,2 @@ + +
00PUMANational Research Council Genova - IBF RepositoryNational Research Council Genova - IBF Repositoryhttp://leonardo.isti.cnr.it/metaopac/sfondi/ibf.gifIT8.90049244.4087151http://leonardo.isti.cnr.it/metaopac/servlet/Isis?Conf=/export/home/metaopac/mpisa/ibfge_geConf/cnr_ibfge-pub-list.sys.file_xIstituto di Biofisica - CNR Genovagiuseppe.romano@isti.cnr.itOAIhttp://leonardo.isti.cnr.it/oai_cnrpubdriveroai_dc30
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo178.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo178.xml new file mode 100644 index 0000000..f7af35b --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo178.xml @@ -0,0 +1,2 @@ + +
00DIVAPublikationer från Högskolan i JönköpingPublications from Jönköping Universityhttp://www.hj.se/img/2007/gfx/hj_head_logo_eng.pngSE14.1629557.77961http://www.hj.se/doc/5900Jönköping Universitydiva-support@ub.uu.seOAIhttp://www.diva-portal.org/oai/hj/OAIoai_dc12280
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo179.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo179.xml new file mode 100644 index 0000000..c2e2b9d --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo179.xml @@ -0,0 +1,2 @@ + +
00Proprietary SoftwareThèses de l'Ecole nationale des chartesThèses de l'Ecole nationale des charteshttp://theses.enc.sorbonne.fr/images/theses_r1_c1.jpgFR2.34248.8481http://theses.enc.sorbonne.fr/Ecole nationale des charteswebenc@enc.sorbonne.frOAIhttp://oai.enc.sorbonne.fr/oai2.phpoai_dc3060
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo18.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo18.xml new file mode 100644 index 0000000..18b75c1 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo18.xml @@ -0,0 +1,2 @@ + +
00DSpaceInternational Institute for the Study of Islam in the Modern WorldInternational Institute for the Study of Islam in the Modern Worldhttp://www.isim.nl/images/logo.gifNL4.48525352.15795731http://www.narcis.info/repositories/repository/isim/Language/en/International Institute for the Study of Islam in the Modern Worlddspace-help@library.leidenuniv.nlOAIhttp://openaccess.leidenuniv.nl/dspace-oai/requestoai_dc830
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo180.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo180.xml new file mode 100644 index 0000000..ed48b1b --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo180.xml @@ -0,0 +1,2 @@ + +
00VTOAITU Delft repositoryDelft Univ. of Technology: Delft Dissertationshttp://www.library.tudelft.nl/consumption/groups/btudwebsite/documents/image/header1_logo_en_0.gifNL4.366351.99451http://www.library.tudelft.nl/dissertations/info@library.tudelft.nlOAIhttp://repository.tudelft.nl/oaidare_didloai_dcqdcDARE harvestingTU Delft selected scientists110830
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo19.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo19.xml new file mode 100644 index 0000000..bccbe4f --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo19.xml @@ -0,0 +1,2 @@ + +
00PUMANational Research Council Genova - IMATI RepositoryNational Research Council Genova - IMATI Repositoryhttp://imati.area.ge.cnr.it/ima/images/home_it.gifIT8.90049244.4087151http://leonardo.isti.cnr.it/metaopac/servlet/Isis?Conf=/export/home/metaopac/mpisa/imatige_geConf/cnr_imatige-pub-list.sys.file_xIstituto di Matematica Applicata e Tecnologie Informatiche - CNR Genovagiuseppe.romano@isti.cnr.itOAIhttp://leonardo.isti.cnr.it/oai_cnrpubdriveroai_dc1230
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo2.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo2.xml new file mode 100644 index 0000000..ee4c9d7 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo2.xml @@ -0,0 +1,2 @@ + +
00OpusPublikationsserver der Universitaet PotsdamPublikationsserver der Universität Potsdamhttp://opus.kobv.de/ubp/Icons/unilogo.gifDE13.01252.401http://opus.kobv.de/ubp/Univ. Potsdamschobert@uni-potsdam.deOAIhttp://opus.kobv.de/ubp/oai2/oai2.phpoai_dc24760
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo20.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo20.xml new file mode 100644 index 0000000..47a517a --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo20.xml @@ -0,0 +1,2 @@ + +
00DSpaceSpir@l - Imperial College Digital RepositorySpir@l - Imperial College Digital Repositoryhttp://spiral.imperial.ac.uk/image/logo.gifUK-0.17251.4880http://spiral.imperial.ac.uk/Imperial Collegespiral@imperial.ac.ukOAIhttp://spiral.imperial.ac.uk/spiral-pub-oai/requestoai_dc12560
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo21.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo21.xml new file mode 100644 index 0000000..251bde6 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo21.xml @@ -0,0 +1,2 @@ + +
00DigitalCommonsARROW@DITARROW@DIThttp://arrow.dit.ie/assets/md5images/d4c03b1a4a29a793a35d4017c4d63ccb.gifIE-6.28038153.351396660http://arrow.dit.ie/Dublin Institute of Technologyyvonne.desmond@dit.ieOAIhttp://arrow.dit.ie/cgi/oai2.cgioai_dc4010
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo22.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo22.xml new file mode 100644 index 0000000..5f1d35a --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo22.xml @@ -0,0 +1,2 @@ + +
00EigenentwicklungTKK Teknillisen korkeakoulun elektroniset vaeitoeskirjatTKK electronic academic dissertationshttp://lib.tkk.fi/Diss/tkklogo15.gifFI25.060.251http://lib.tkk.fi/Diss/Helsinki University of Technologyrita.voigt@tkk.fiOAIhttp://edoc.tkk.fi/oai/oai2.phpoai_dc12320
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo23.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo23.xml new file mode 100644 index 0000000..d91dee3 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo23.xml @@ -0,0 +1,2 @@ + +
00DSpaceUniversity Digital Archive of the University of Groningen, The Netherlands.Univ. of Groningen: DAREhttp://dspace.ou.nl/dspace-oai/requestNL6.566653.21671https://dspace.ub.rug.nlreport.db@ub.rug.nlOAIhttp://ir.ub.rug.nl/oai/oai_dcDissertationsProceedings repositoryElectronic publications Faculty of ArtsSOM electronic reportsElectronic documents of the Faculty of LawCream of Science of GroningenEnergy and Environmental SciencesN.V. Nederlandse GasunieStratingh InstitutePublications ICSDNPP: Documentation center for Dutch Political PartiesFaculty Economics, Management & Organization and Spatial SciencesInaugural lecturesScience ShopsGGDC: Groningen Growth & Development CentreZernike Institute for Advanced MaterialsTheologieCCSO: Centre for Economic ResearchCDS: Centre for Development StudiesCOELO: Centrum voor Onderzoek van de Economie van de Lagere OverhedenURSI: Urban and Regional Studies InstitutePRC: Population Research CentreLibrary RUGGBB: Groningen Biomolecular Sciences and Biotechnology InstituteAstronomy University of GroningenAdamsappelGMW: Behavioural and Social SciencesDe Digitale zadenatlas van Nederland / The Digital Seed Atlas of the NetherlandsDNPP: Partij- en verkiezingsaffichesPictogram62180
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo24.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo24.xml new file mode 100644 index 0000000..3ee4408 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo24.xml @@ -0,0 +1,2 @@ + +
00EprintsGoldsmiths Research OnlineGoldsmiths Research Onlinehttp://eprints.goldsmiths.ac.uk/images/sitelogo.gifUK-0.03451.4750http://eprints.goldsmiths.ac.uk/Goldsmiths, University Londonlib-eprints@gold.ac.ukOAIhttp://eprints.goldsmiths.ac.uk/cgi/oai2oai_dc4750
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo25.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo25.xml new file mode 100644 index 0000000..8666cb6 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo25.xml @@ -0,0 +1,2 @@ + +
00OPUSBiPrintsBiPrintshttp://www.ub.uni-bielefeld.de/graphics/ubneu/BiPrints_gruen.gifDE8.49470615386962952.0376566479472441http://repositories.ub.uni-bielefeld.de/biprints/index.php?la=enBielefeld Universitytobias.tappe@uni-bielefeld.deOAIhttp://repositories.ub.uni-bielefeld.de/escholarship/oai2/oai2.phpoai_dc8590
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo26.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo26.xml new file mode 100644 index 0000000..5d7ef40 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo26.xml @@ -0,0 +1,2 @@ + +
00MyCoreDokumenten- und PublikationsserviceUniversity of Paderborn Publications Onlinehttp://ubdok.uni-paderborn.de/i/pb/logo.gifDE8.77398351.7103111http://ubdok.uni-paderborn.de/Universität Paderbornr.sprotte@ub.uni-paderborn.deOAIhttp://ubdok.uni-paderborn.de/servlets/OAIDataProvideroai_dc4460
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo27.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo27.xml new file mode 100644 index 0000000..a6aafb5 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo27.xml @@ -0,0 +1,2 @@ + +
00OPUSUniversitaet StuttgartPublication Server of the University of Stuttgarthttp://elib.uni-stuttgart.de/img/institutmitlogo.jpgDE9.1833348.76671http://elib.uni-stuttgart.de/opus/reportadm@informatik.uni-stuttgart.deOAIhttp://elib.uni-stuttgart.de/opus/oai2/oai2.phpoai_dcComputer Science: Technical ReportComputer Science: Doctoral Thesis, Postdoctoral QualificationComputer Science: Master Thesis, Diploma ThesisComputer Science: Student ThesisComputer Science: Practical Course, Presentation, Seminar Paper, Lecture ScriptComputer Science: Article in JournalComputer Science: Article in ProceedingsComputer Science: Article in Book or Article in Collection of PapersComputer Science: Book, Proceedings, Collection of PapersComputer Science: Miscellaneous (Media, etc.)35800
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo28.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo28.xml new file mode 100644 index 0000000..b32cf33 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo28.xml @@ -0,0 +1,2 @@ + +
00EigenentwicklungElectronic Research ArchiveElectronic Research Archivehttp://www.bth.se/bth/images/eng/forskningbild.jpgSE15.58656.1601http://www.bth.se/fou/Blekinge Institute of Technologypeter.linde@bth.seOAIhttp://www3.bth.se/servlet/Forskinfooai_dc9550
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo29.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo29.xml new file mode 100644 index 0000000..40c81fe --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo29.xml @@ -0,0 +1,2 @@ + +
00DSpaceDSpaceUnipr - University of ParmaDspaceUnipr - University of Parmahttp://dspace-unipr.cilea.it/image/unipr.jpgIT10.3344.801http://dspace-unipr.cilea.it/University of Parmafabrizia.bevilacqua@unipr.itOAIhttp://dspace-unipr.cilea.it/dspace-oai/requestoai_dc4810
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo3.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo3.xml new file mode 100644 index 0000000..275e5b3 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo3.xml @@ -0,0 +1,3 @@ + +
00Proprietary SoftwareLes Bibliothèques Virtuelles Humanistes (BVH)Les Bibliothèques Virtuelles Humanistes (BVH)http://www.bvh.univ-tours.fr/Img/titre.jpgFR0.68047.3951http://www.bvh.univ-tours.fr/Centre d’Études Supérieures de la Renaissance +Université François-Rabelais, Tourssebastien.busson@univ-tours.frOAIhttp://www.bvh.univ-tours.fr/oai2/repositoryOAI.aspoai_dc2250
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo30.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo30.xml new file mode 100644 index 0000000..17e2f18 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo30.xml @@ -0,0 +1,2 @@ + +
00EigenentwicklungPublikationer från Stockholms universitetPublications from Stockholm Universityhttp://www.diva-portal.org/image/jpg/su_DiVA_sidhuvud.jpgSE18.05820459.3633261http://www.diva-portal.org/su/index.xsql?lang=enStockholm Universitydiva-support@ub.uu.seOAIhttp://www.diva-portal.org/oai/su/OAIoai_dc27060
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo31.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo31.xml new file mode 100644 index 0000000..e828403 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo31.xml @@ -0,0 +1,2 @@ + +
00edocGFZ PublicationsGFZ Publicationshttp://edoc.gfz-potsdam.de/gfz/images/eda.gifDE13.05852.3781http://edoc.gfz-potsdam.de/gfz/GeoForschungsZentrum Potsdam (GFZ),webmaster@gfz-potsdam.deOAIhttp://bib-app.gfz-potsdam.de/oai.phpoai_dc7870
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo32.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo32.xml new file mode 100644 index 0000000..b3f1b79 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo32.xml @@ -0,0 +1,2 @@ + +
CDSware00InfoscienceInfoscience EPFLhttp://www.epfl.ch/tools/label.php?s=22&BG=99cccc&FG=ffffff&label=INFOSCIENCECH6.56596346.5203710.0http://infoscience.epfl.ch/EPFL - Ecole Polytechnique Fédérale de Lausanneinfoscience@epfl.chOAIhttp://infoscience.epfl.ch/oai2d/oai_dcAll sets110470.0
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo33.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo33.xml new file mode 100644 index 0000000..9d7c246 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo33.xml @@ -0,0 +1,2 @@ + +
00Eigenentwicklungmiamimiamihttp://miami.uni-muenster.de/pics/logo_gr.gifDE7.61651.9631http://miami.uni-muenster.de/Universität Münstergressho@uni-muenster.deOAIhttp://miami.uni-muenster.de/servlets/OAIDataProvideroai_dc35980
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo34.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo34.xml new file mode 100644 index 0000000..53b6d98 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo34.xml @@ -0,0 +1,2 @@ + +
00EigenentwicklungElektronisches Volltextarchiv EVAElektronisches Volltextarchiv EVAhttp://www.ubka.uni-karlsruhe.de/grafiken/icons/unibiblogo_420.gifDE8.41449.0111http://www.ubka.uni-karlsruhe.de/eva/Universitaet Karlsruhetuszkowski@ubka.uni-karlsruhe.deOAIhttp://www.ubka.uni-karlsruhe.de/oai/eva/oai2.phpoai_dc37900
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo35.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo35.xml new file mode 100644 index 0000000..b447492 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo35.xml @@ -0,0 +1,2 @@ + +
00EprintsmemSIC : Memoires en Sciences de l'Information et de la CommunicationmemSIC : Memoires en Sciences de l'Information et de la Communication (CNRS)http://memsic.ccsd.cnrs.fr/images/b_memsic.gifFR4.883345.76671http://memsic.ccsd.cnrs.fr/mailto:adminMEM@ccsd.cnrs.frOAIhttp://memsic.ccsd.cnrs.fr/perl/oai2ccsd_inistccsd_teloai_dcBibliometry, scientometryCinema, art, estheticsConflicts, information strategy, intelligenceEconomy, cultural industryEducation, e-learning, trainingElectronic publishingGeopoliticsHistory of information/communicationHypertext, hypermediaInformation retrievalInformation system engineeringInformation/communication lawKnowledge managementLocal authoritiesMass mediaMuseologyOrganisation and communicationOthersPublic SphereScientific communication and informationSociology of information and communicationTheory of information/communication1550
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo36.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo36.xml new file mode 100644 index 0000000..017f55d --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo36.xml @@ -0,0 +1,2 @@ + +
00EigenentwicklungHorizon / Pleins textesHorizon / Pleins texteshttp://www.ird.fr/images/bandeau_r1_c2.gifFR2.3548.851http://www.documentation.ird.fr/Institut de Recherche pour le Developpement (IRD)archambe@paris.ird.frOAIhttp://www.documentation.ird.fr/fdi/oai.phpoai_dc337130
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo37.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo37.xml new file mode 100644 index 0000000..5e81ef9 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo37.xml @@ -0,0 +1,2 @@ + +
00EprintsBirkbeck ePrintsBirkbeck, Univ. of London: Eprints Archivehttp://eprints.bbk.ac.uk/images/bbklogo.gifUK0.00289951.5001970http://eprints.bbk.ac.uk/mailto:lib-eprints@bbk.ac.ukOAIhttp://eprints.bbk.ac.uk/perl/oai2oai_dcStatus = In PressStatus = SubmittedStatus = PublishedStatus = UnpublishedSchool = Birkbeck Schools and Research Centres: Faculty of Arts: School of History, Classics and Archeology: The Robert Boyle ProjectSchool = Birkbeck Schools and Research Centres: Faculty of Arts: School of LawSchool = Birkbeck Schools and Research Centres: Faculty of Science: School of PsychologySchool = Birkbeck Schools and Research Centres: Faculty of Arts: School of English and Humanities: Centre for Nineteenth-Century StudiesSchool = Birkbeck Schools and Research Centres: Faculty of Social Sciences: School of Computer Science and Information SystemsSchool = Birkbeck Schools and Research Centres: Faculty of Social SciencesSchool = Birkbeck Schools and Research CentresSchool = Central Administration Departments: Master's OfficeSchool = Birkbeck Schools and Research Centres: Faculty of Arts: School of PhilosophySchool = Birkbeck Schools and Research Centres: Faculty of Social Sciences: School of Economics, Mathematics and StatisticsSchool = Birkbeck Schools and Research Centres: Faculty of Social Sciences: School of GeographySchool = Birkbeck Schools and Research Centres: Faculty of Arts: School of English and HumanitiesSchool = Birkbeck Schools and Research Centres: Faculty of Continuing EducationSchool = Birkbeck Schools and Research Centres: Faculty of Arts: School of Politics and SociologySchool = Birkbeck Schools and Research Centres: Faculty of Arts: School of History of Art, Film and Visual MediaSchool = Birkbeck Schools and Research Centres: Faculty of Science: School of Crystallography: Institute of Structural Molecular BiologySchool = Birkbeck Schools and Research Centres: Faculty of ScienceSchool = Birkbeck Schools and Research Centres: Faculty of ArtsSchool = Birkbeck Schools and Research Centres: Faculty of Science: School of CrystallographySchool = Central Administration DepartmentsSchool = Birkbeck Schools and Research Centres: Faculty of Arts: School of Languages, Linguistics and CultureSchool = Birkbeck Schools and Research Centres: Faculty of Science: School of Earth SciencesSchool = Central Administration Departments: LibrarySchool = Birkbeck Schools and Research Centres: Faculty of Social Sciences: School of Management and Organizational PsychologySchool = Birkbeck Schools and Research Centres: Faculty of Science: School of Biological and Chemical SciencesSchool = Birkbeck Schools and Research Centres: Faculty of Arts: School of History, Classics and Archeology5250
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo38.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo38.xml new file mode 100644 index 0000000..fe11ae3 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo38.xml @@ -0,0 +1,2 @@ + +
00DigitoolBiblos-e Archivo Universidad Autonoma de MadridBiblos-e Archivo Universidad Autonoma de Madridhttp://digitool-uam.greendata.es/exlibris/dtl/u3_1/dtle/www_r_spa/icon/header_left.gifES-3.6968040.5455541http://digitool-uam.greendata.es/Universidad Autonoma de Madridexlibris@exlibris.co.ilOAIhttp://servmadrono.cs.urjc.es:8010/arcFuturo/servlet/OAIDPuamoai_dc8820
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo39.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo39.xml new file mode 100644 index 0000000..4845eea --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo39.xml @@ -0,0 +1,2 @@ + +
00DSpacee_buah Biblioteca digital de la Universidad de Alcalae_buah Biblioteca digital de la Universidad de Alcalahttp://dspace.uah.es/dspace/image/e_buah1.jpgES-3.36329340.4828071http://dspace.uah.es/dspace/Universidad de Alcalaebuah@uah.esOAIhttp://servmadrono.cs.urjc.es:8010/arcFuturo/servlet/OAIDPuahoai_dc11480
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo4.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo4.xml new file mode 100644 index 0000000..ffb324c --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo4.xml @@ -0,0 +1,2 @@ + +
00DSpaceUniv. do Minho: RepositoriUMUniv. do Minho: RepositóriUMhttp://repositorium.sdum.uminho.pt/image/LogoRI2.gifPT-8.1441.6350http://repositorium.sdum.uminho.pt/Universidade do Minhorepositorium@sdum.uminho.ptOAIhttp://repositorium.sdum.uminho.pt/oai/oaioai_dc74150
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo40.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo40.xml new file mode 100644 index 0000000..6885d4a --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo40.xml @@ -0,0 +1,2 @@ + +
00Proprietary SoftwareFraunhofer-ePrintsFraunhofer-ePrintshttp://publica.fraunhofer.de/starweb/images/fhg_logo.gifDE11.53111848.1310021http://publica.fraunhofer.de/starweb/ep08/en/index.htmFraunhofer-Gesellschafthar@irb.fhg.deOAIhttp://publica.fraunhofer.de/eprints.haroai_dc35470
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo41.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo41.xml new file mode 100644 index 0000000..986eb98 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo41.xml @@ -0,0 +1,2 @@ + +
DBClear00Social Science Open Access RepositorySocial Science Open Access Repositoryhttp://validator.driver.research-infrastructures.eu/validatorWeb/getRepositoryImage.do?&repositoryId=5-f6f51a2c-88a3-4b37-9f1a-7a3899d10817_UGVuZGluZ1JlcG9zaXRvcnlSZXNvdXJjZXMvUmVwb3NpdG9yeVNlcnZpY2VSZXNvdXJjZVR5cGU=DE8.463019649.48560231.0http://www.ssoar.infohttp://www.gesis.orgphilipp.schaer@gesis.orgOAIhttp://www.ssoar.info/ssoar/OAIHandleroai_dcAll sets00.0
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo42.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo42.xml new file mode 100644 index 0000000..70eddbe --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo42.xml @@ -0,0 +1,2 @@ + +
00VTOAIUniversidade da Coruña: Tesis Doctorals en Xarxa (TDX)Univ. da Coruña: Theses and Dissertations Online (TDX)http://www.tesisenxarxa.net/images/tdx/titol_transp.gifES-8.3927143.3716441http://www.tdx.cesca.es/Universidade da Coruña:tdx@cesca.esOAIhttp://www.tdr.cesca.es/TDR_UDC/NDLTD-OAI/oai.ploai_dc230
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo43.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo43.xml new file mode 100644 index 0000000..1b492d8 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo43.xml @@ -0,0 +1,2 @@ + +
00VTOAIUniversidad de Oviedo: Tesis Doctorals en Xarxa (TDX)Univ. of Oviedo: Theses and Dissertations Online (TDX)http://www.tesisenxarxa.net/images/tdx/titol_transp.gifES-5.84618343.3620661http://www.tdx.cesca.es/Universidad de Oviedotdx@cesca.esOAIhttp://www.tdr.cesca.es/TDR_UM/NDLTD-OAI/oai.ploai_dc1480
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo44.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo44.xml new file mode 100644 index 0000000..c78bf59 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo44.xml @@ -0,0 +1,2 @@ + +
00ask23 repository (lkw, hfbk hamburg, germany)Hfbk Hamburg: Labor Kunst und Wissenschaft: archivsystem ask23http://admin.driver.research-infrastructures.eu/images/repositoryLogos/back_papier1_logo.gifDE9.99253.551http://ask23.hfbk-hamburg.detechnik@ask23.deOAIhttp://purl.oclc.org/NET/ugent/lib/srepod/oai.ask23.de/static/ask23-oai.xmloai_dc910
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo45.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo45.xml new file mode 100644 index 0000000..457310f --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo45.xml @@ -0,0 +1,2 @@ + +
00DSpaceDSpace at Radboud Univ. NijmegenRadboud Univ. Nijmegen: Digital Repositoryhttp://dspace.ou.nl/dspace-oai/requestNL5.8551.83331http://dare.ubn.kun.nl:8080/systeembeheer@ubn.ru.nlOAIhttp://dare.ubn.kun.nl:8080/dspace-oai/requestoai_dcBogaers-HaalebosDONOR-bestandsinventarisatie (2e release april 2006)Elektronische publicaties Radboud UniversiteitFNWIKeur der WetenschapKeur extraMetis Medische bibliotheekRU 1995-1997test72790
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo46.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo46.xml new file mode 100644 index 0000000..3269961 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo46.xml @@ -0,0 +1,2 @@ + +
00OPUSUniversity of Mannheim, GERMANY, MADOCMADOC: Mannheim Electronic DOCument Server of Univ. Mannheimhttp://www.bib.uni-mannheim.de/fileadmin/relaunch/img/logoUB.gifDE8.466749.481http://madoc.bib.uni-mannheim.demailto:madoc@bib.uni-mannheim.deOAIhttp://madoc.bib.uni-mannheim.de/madoc/oai2/oai2.phpoai_dcepicurGeneralities, ScienceData processing Computer scienceBibliographyLibrary and information sciencesGeneral encyclopedic worksGeneral serials and their indexesGeneral organization and museologyNews media, journalism, publishingGeneral collectionsManuscripts and rare booksPhilosophyParanormal phenomenaPsychologyReligionBibleChristian theologyOther and comparative religionsSocial sciencesGeneral statisticsPolitical scienceEconomicsLawPublic administrationMilitary science"Social services; association"EducationCommerce, communications, transportCustoms, etiquette, folkloreLanguage, LinguisticsEnglishGermanicOther Germanic languagesRomance languages FrenchItalian, Romanian, Rhaeto-RomanticSpanish and Portugese languagesItalic LatinHellenic languages Classical GreekOther languagesNatural sciences and mathematicsMathematicsAstronomy and allied sciencesPhysicsChemistry and allied sciencesEarth sciencesPaleontology PaleozoologyLife sciencesBotanical sciencesZoological sciencesTechnology (Applied sciences)Medical sciences MedicineEngineering and allied operationsAgricultureHome economics and family livingManagement and auxiliary servicesChemical engineeringManufacturingBuildingsThe artsCivic and landscape artArchitecturePlastic arts SculptureDrawing and decorative artsComics, CartoonsPainting and paintingsGraphic arts Printmaking and printsPhotography and photographsMusicRecreational and performing artsPublic performancesStage presentationsIndoor games and amusementsAthletic and outdoor sports and gamesLiterature and rhetoricAmerican literature in EnglishEnglish and Old English literaturesLiteratures of Germanic languagesOther Germanic literaturesLiteratures of Romance languagesItalian, Romanian, Rhaeto-Romanic literaturesSpanish and Portuguese literaturesItalic literatures LatinHellenic literatures Classical GreekLiteratures of other languagesGeography and historyGeography and travelGeography and travel GermanyBiography, genealogy, insigniaHistory of ancient worldGeneral history of EuropeGeneral history of Europe Central Europe GermanyGeneral history of Asia Far EastGeneral history of AfricaGeneral history of North AmericaGeneral history of South AmericaGeneral history of other areasArticleBookMastersThesisText.Thesis.DoctoralHonoursThesisJournalResearchPaperTechReportPreprintText.Thesis.Habilitation20360
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo47.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo47.xml new file mode 100644 index 0000000..efba133 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo47.xml @@ -0,0 +1,2 @@ + +
00VTOAITheses database, Tilburg UniversityUniv. van Tilburg: iPorthttp://images.uvt.nl/images/2006/images/uvt_logo.gifNL5.0833351.56671http://dbiref.uvt.nl/wilko.haast@uvt.nlOAIhttp://arno.uvt.nl/oai/scr.uvt.nl.cgiarnonetsparnereusoai_dcdare_didlAuthors selected for 'Economists Online'Authors selected for 'Economists Online'Faculty = 'FRW' and full text availableAuthor or one of the authors is selected for 'Keur der Wetenschap'Author or one of the authors is selected for 'Keur der Wetenschap'Only records that have full text availableOnly records that have full text available44660
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo48.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo48.xml new file mode 100644 index 0000000..7d2f843 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo48.xml @@ -0,0 +1,2 @@ + +
00DSpaceBristol Repository of Scholarly Eprints (ROSE)Univ. of Bristol: Bristol Repository of Scholarly Eprints (ROSE)http://deneb.lib.bris.ac.uk/dspace/image/bannerRose.jpgUK-2.591451.45360http://deneb.lib.bris.ac.uk/dspace/rose-help@bristol.ac.ukOAIhttp://rose.bris.ac.uk/dspace-oai/requestoai_dcArtificial Intelligence GroupBristol Centre for Applied Nonlinear MathematicsDr Evan JonesDr Hugh PembertonDr James ThompsonPalaeobiology and Biodiversity Research Group (PBRG)Professor Robert BickersWireless CommunicationsXenopus tadpole neurobiology19810
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo49.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo49.xml new file mode 100644 index 0000000..a06289a --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo49.xml @@ -0,0 +1,3 @@ + +
00PUMANational Research Council Bologna - IBIMET RepositoryNational Research Council Bologna - IBIMET Repositoryhttp://www.ibimet.cnr.it/logo.jpgIT11.3044.531http://leonardo.isti.cnr.it/metaopac/servlet/Isis?Conf=/export/home/metaopac/mpisa/cnrpConf/cnr_ibimetbo-pub-list.sys.file_xInstitute for +macromolecular studies - CNR Bolognagiuseppe.romano@isti.cnr.itOAIhttp://leonardo.isti.cnr.it/oai_cnrpubdriveroai_dc70
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo5.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo5.xml new file mode 100644 index 0000000..4935c8e --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo5.xml @@ -0,0 +1,2 @@ + +
00EprintsPadua@researchPadua@researchhttp://paduaresearch.cab.unipd.it/images/pd.gifIT11.87645.4091http://paduaresearch.cab.unipd.it/Universita degli studi di Padovayuri.carrer@unipd.itOAIhttp://paduaresearch.cab.unipd.it/perl/oai2oai_dc4130
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo50.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo50.xml new file mode 100644 index 0000000..8e635e8 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo50.xml @@ -0,0 +1,2 @@ + +
00ePrintsNational Research Council, Bologna Research Area Library Eprints ServiceNational Research Council, Bologna Research Area Library Eprints Servicehttp://biblio-eprints.bo.cnr.it/images/logoCNR.gifIT11.3444.491http://biblio-eprints.bo.cnr.it/Biblioteca d'Area - CNR Area della Ricerca di Bolognaa.tugnoli@area.bo.cnr.itOAIhttp://biblio-eprints.bo.cnr.it/perl/oai2oai_dc00
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo51.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo51.xml new file mode 100644 index 0000000..f4f77fb --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo51.xml @@ -0,0 +1,2 @@ + +
00VTOAIUniv. MaastrichtUniv. Maastricht: Electronic Documentshttp://edata.ub.unimaas.nl/images/alg_hoeklogo.gifNL5.68666850.84711http://edata.ub.unimaas.nl/www-digiarchum/j.odekerken@ub.unimaas.nlOAIhttp://arno.unimaas.nl/oai/dare.cgidare_didloai_dcnereusarnoKB e-depotKB e-depotEconomists onlineEconomists onlineKeur der wetenschapKeur der wetenschapMaastricht University. Faculty of LawMaastricht University. Faculty of LawMaastricht University. Faculty of Law, full text availableMaastricht University. Faculty of Law, full text availableFull text availableFull text available94050
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo52.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo52.xml new file mode 100644 index 0000000..b8fbbc7 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo52.xml @@ -0,0 +1,2 @@ + +
00Proprietary SoftwareDALEA - Högskolan Dalarnas elektroniska arkivDALEA - Dalarna University Electronic Archivehttp://dalea.du.se/images/hda_blomma.gifSE15.43660.4851http://dalea.du.se/Högskolan Dalarnadalea@du.seOAIhttp://dalea.du.se/oai/oai_dc6630
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo53.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo53.xml new file mode 100644 index 0000000..d407929 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo53.xml @@ -0,0 +1,2 @@ + +
00Proprietary SoftwareETH E-CollectionETH E-Collectionhttp://e-collection.ethbib.ethz.ch/images/home_ecollection2.gifCH8.65447.3841http://e-collection.ethbib.ethz.ch/ETH Zürichheinz.vogt@library.ethz.chOAIhttp://oai.ethz.ch/oai.aspoai_dc89690
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo54.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo54.xml new file mode 100644 index 0000000..0849b23 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo54.xml @@ -0,0 +1,2 @@ + +
00VTOAIUniversitat de Vic: Tesis Doctorals en Xarxa (TDX)Univ. of Vic:: Theses and Dissertations Online (TDX)http://www.tesisenxarxa.net/images/tdx/titol_transp.gifES2.24830141.9333951http://www.tdx.cesca.es/Universitat de Victdx@cesca.esOAIhttp://www.tdx.cesca.es/TDX_UVIC/NDLTD-OAI/oai.ploai_dc20
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo55.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo55.xml new file mode 100644 index 0000000..5202c21 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo55.xml @@ -0,0 +1,2 @@ + +
00EPrintsBritish Library Research ArchiveBritish Library Research Archive (Sherpa)http://sherpa.bl.uk/images/logo100.gifUK-0.116751.50http://sherpa.bl.uk/mailto:support.sherpa@bl.ukOAIhttp://sherpa.bl.uk/perl/oai2oai_dcStatus = In PressStatus = SubmittedStatus = PublishedStatus = UnpublishedSubject = J Political Science: J General legislative and executive papersSubject = S Agriculture: SD ForestrySubject = C Auxiliary Sciences of History: C Auxiliary sciences of history (General)Subject = G Geography. Anthropology. Recreation: GB Physical geographySubject = D History General and Old World: DH Netherlands (The Low Countries)Subject = P Language and Literature: PG Slavic, Baltic, Albanian languages and literatureSubject = E History America: E11 America (General)Subject = U Military ScienceSubject = L Education: LC Special aspects of educationSubject = U Military Science: U Military Science (General)Subject = R Medicine: RZ Other systems of medicineSubject = P Language and Literature: PN Literature (General): PN1990 BroadcastingSubject = Q Science: QR Microbiology: QR180 ImmunologySubject = D History General and Old World: DA Great BritainSubject = R Medicine: RC Internal medicine: RC1200 Sports MedicineSubject = P Language and Literature: PS American literatureSubject = D History General and Old World: D History (General): D204 Modern HistorySubject = Q Science: QR Microbiology: QR355 VirologySubject = N Fine Arts: ND PaintingSubject = P Language and Literature: PC Romance languagesSubject = L Education: LT TextbooksSubject = C Auxiliary Sciences of History: CD Diplomatics. Archives. SealsSubject = G Geography. Anthropology. Recreation: GF Human ecology. AnthropogeographySubject = L Education: LB Theory and practice of education: LB2300 Higher EducationSubject = R Medicine: RA Public aspects of medicine: RA1001 Forensic Medicine. Medical jurisprudence. Legal medicineSubject = D History General and Old World: D History (General): D731 World War IISubject = C Auxiliary Sciences of History: CD Diplomatics. Archives. Seals: CD921 ArchivesSubject = T Technology: TX Home economicsSubject = H Social Sciences: HT Communities. Classes. RacesSubject = H Social Sciences: HB Economic TheorySubject = Q Science: QL ZoologySubject = N Fine ArtsSubject = A General Works: AC Collections. Series. Collected worksSubject = B Philosophy. Psychology. Religion: BL ReligionSubject = G Geography. Anthropology. Recreation: GT Manners and customsSubject = K Law: KZ Law of NationsSubject = C Auxiliary Sciences of History: CS GenealogySubject = B Philosophy. Psychology. Religion: BR ChristianitySubject = D History General and Old World: D History (General): D501 World War ISubject = C Auxiliary Sciences of History: CR HeraldrySubject = T Technology: TH Building constructionSubject = R Medicine: RJ Pediatrics: RJ101 Child Health. Child health servicesSubject = J Political Science: JX International lawSubject = F History United States, Canada, Latin America: F001 United States local historySubject = Q Science: QD ChemistrySubject = J Political ScienceSubject = D History General and Old World: DU Oceania (South Seas)Subject = R Medicine: RA Public aspects of medicineSubject = T Technology: TK Electrical engineering. Electronics Nuclear engineeringSubject = N Fine Arts: NX Arts in generalSubject = H Social Sciences: HF CommerceSubject = G Geography. Anthropology. RecreationSubject = J Political Science: JN Political institutions (Europe)Subject = P Language and Literature: P Philology. LinguisticsSubject = C Auxiliary Sciences of HistorySubject = Z Bibliography. Library Science. Information Resources: Z665 Library Science. Information ScienceSubject = L Education: LA History of educationSubject = T Technology: TT Handicrafts Arts and craftsSubject = H Social Sciences: HV Social pathology. Social and public welfareSubject = D History General and Old World: DA Great Britain: DAW Central EuropeSubject = Q Science: QA Mathematics: QA76 Computer softwareSubject = B Philosophy. Psychology. Religion: BT Doctrinal TheologySubject = H Social Sciences: HQ The family. Marriage. WomanSubject = J Political Science: JA Political science (General)Subject = Z Bibliography. Library Science. Information ResourcesSubject = Q Science: QH Natural historySubject = J Political Science: JQ Political institutions AsiaSubject = R Medicine: R Medicine (General)Subject = P Language and Literature: PT Germanic literatureSubject = D History General and Old World: D History (General): D880 Developing CountriesSubject = B Philosophy. Psychology. Religion: BS The BibleSubject = S Agriculture: SH Aquaculture. Fisheries. AnglingSubject = B Philosophy. Psychology. Religion: BF PsychologySubject = T Technology: TJ Mechanical engineering and machinerySubject = L Education: LB Theory and practice of educationSubject = D History General and Old World: DP SpainSubject = D History General and Old World: DF GreeceSubject = Q Science: QK BotanySubject = P Language and Literature: PZ Childrens literatureSubject = T Technology: TA Engineering (General). Civil engineering (General)Subject = T Technology: TR PhotographySubject = R Medicine: RC Internal medicine: RC0254 Neoplasms. Tumors. Oncology (including Cancer)Subject = L Education: LC Special aspects of education: LC5201 Education extension. Adult education. Continuing educationSubject = N Fine Arts: NA ArchitectureSubject = T Technology: TE Highway engineering. Roads and pavementsSubject = N Fine Arts: NC Drawing Design IllustrationSubject = M Music and Books on Music: M MusicSubject = A General WorksSubject = Z Bibliography. Library Science. Information Resources: Z004 Books. Writing. PaleographySubject = T Technology: TF Railroad engineering and operationSubject = R MedicineSubject = P Language and Literature: PH Finno-Ugrian, Basque languages and literaturesSubject = Z Bibliography. Library Science. Information Resources: ZA Information resourcesSubject = E History AmericaSubject = J Political Science: JZ International relationsSubject = G Geography. Anthropology. Recreation: GR FolkloreSubject = T Technology: TS ManufacturesSubject = D History General and Old World: DE The Mediterranean Region. The Greco-Roman WorldSubject = P Language and Literature: PB Modern European LanguagesSubject = R Medicine: RV Botanic, Thomsonian, and eclectic medicineSubject = Q Science: QA Mathematics: QA75 Electronic computers. Computer scienceSubject = H Social Sciences: HF Commerce: HF5601 AccountingSubject = H Social Sciences: HC Economic History and ConditionsSubject = R Medicine: RA Public aspects of medicine: RA0421 Public health. Hygiene. Preventive MedicineSubject = J Political Science: JK Political institutions (United States)Subject = B Philosophy. Psychology. Religion: BM JudaismSubject = K Law: KF United States Federal LawSubject = B Philosophy. Psychology. Religion: B Philosophy (General)Subject = L Education: LG Individual institutions (Asia. Africa)Subject = P Language and Literature: PM Hyperborean, Indian, and Artificial languagesSubject = C Auxiliary Sciences of History: CT BiographySubject = R Medicine: RE OphthalmologySubject = Q Science: QB AstronomySubject = F History United States, Canada, Latin America: F1001 Canada (General)Subject = D History General and Old World: D History (General)Subject = R Medicine: RL DermatologySubject = B Philosophy. Psychology. ReligionSubject = S Agriculture: S Agriculture (General)Subject = F History United States, Canada, Latin AmericaSubject = D History General and Old World: DT AfricaSubject = D History General and Old World: D History (General): D890 Eastern HemisphereSubject = K Law: K Law (General)Subject = H Social Sciences: HJ Public FinanceSubject = D History General and Old World: DJ Netherlands (Holland)Subject = R Medicine: RB PathologySubject = Q ScienceSubject = L Education: L Education (General)Subject = Q Science: QC PhysicsSubject = A General Works: AS Academies and learned societies (General)Subject = R Medicine: RF OtorhinolaryngologySubject = G Geography. Anthropology. Recreation: G Geography (General)Subject = H Social Sciences: HG FinanceSubject = H Social Sciences: HX Socialism. Communism. AnarchismSubject = N Fine Arts: NB SculptureSubject = T Technology: TC Hydraulic engineering. Ocean engineeringSubject = A General Works: AI Indexes (General)Subject = D History General and Old WorldSubject = C Auxiliary Sciences of History: CJ NumismaticsSubject = M Music and Books on Music: MT Musical instruction and studySubject = R Medicine: RX HomeopathySubject = P Language and Literature: PN Literature (General): PN0080 CriticismSubject = P Language and Literature: PN Literature (General): PN1993 Motion PicturesSubject = P Language and Literature: PN Literature (General): PN0441 Literary HistorySubject = D History General and Old World: DC FranceSubject = K Law: KD England and WalesSubject = D History General and Old World: DK Russia. Soviet Union. Former Soviet RepublicsSubject = Q Science: QE GeologySubject = R Medicine: RC Internal medicineSubject = Q Science: QR MicrobiologySubject = J Political Science: JN Political institutions (Europe): JN101 Great BritainSubject = H Social Sciences: HD Industries. Land use. LaborSubject = B Philosophy. Psychology. Religion: BV Practical Theology: BV1460 Religious EducationSubject = A General Works: AZ History of Scholarship The HumanitiesSubject = Q Science: QM Human anatomySubject = L Education: LB Theory and practice of education: LB1603 Secondary Education. High schoolsSubject = D History General and Old World: DJ Netherlands (Holland): DJK Eastern EuropeSubject = D History General and Old World: D History (General): D839 Post-war History, 1945 onSubject = R Medicine: RK DentistrySubject = P Language and Literature: PN Literature (General)Subject = B Philosophy. Psychology. Religion: BQ BuddhismSubject = P Language and Literature: PN Literature (General): PN2000 Dramatic representation. The TheaterSubject = D History General and Old World: DS AsiaSubject = C Auxiliary Sciences of History: CN Inscriptions. Epigraphy.Subject = B Philosophy. Psychology. Religion: BC LogicSubject = G Geography. Anthropology. Recreation: GV Recreation LeisureSubject = H Social Sciences: HD Industries. Land use. Labor: HD28 Management. Industrial ManagementSubject = K LawSubject = J Political Science: JL Political institutions (America except United States)Subject = V Naval Science: VM Naval architecture. Shipbuilding. Marine engineeringSubject = J Political Science: JF Political institutions (General)Subject = D History General and Old World: DD GermanySubject = M Music and Books on Music: ML Literature of musicSubject = H Social Sciences: HM SociologySubject = C Auxiliary Sciences of History: CB History of civilizationSubject = L Education: LB Theory and practice of education: LB1501 Primary EducationSubject = L Education: LF Individual institutions (Europe)Subject = B Philosophy. Psychology. Religion: BH AestheticsSubject = P Language and Literature: PL Languages and literatures of Eastern Asia, Africa, OceaniaSubject = C Auxiliary Sciences of History: CC ArchaeologySubject = K Law: KD England and Wales: KDC ScotlandSubject = T Technology: T Technology (General): T201 Patents. TrademarksSubject = Q Science: QA MathematicsSubject = N Fine Arts: N Visual arts (General) For photography, see TRSubject = R Medicine: RS Pharmacy and materia medicaSubject = R Medicine: RC Internal medicine: RC0321 Neuroscience. Biological psychiatry. NeuropsychiatrySubject = Q Science: QH Natural history: QH426 GeneticsSubject = Q Science: QH Natural history: QH301 BiologySubject = B Philosophy. Psychology. Religion: BJ EthicsSubject = L Education: LE Individual institutions (America except United States)Subject = Z Bibliography. Library Science. Information Resources: ZA Information resources: ZA4450 DatabasesSubject = P Language and Literature: PQ Romance literaturesSubject = P Language and Literature: PI Oriental languages and literaturesSubject = B Philosophy. Psychology. Religion: BP Islam. Bahaism. Theosophy, etcSubject = T Technology: TN Mining engineering. MetallurgySubject = J Political Science: JV Colonies and colonization. Emigration and immigration. International migrationSubject = L Education: LB Theory and practice of education: LB2361 CurriculumSubject = D History General and Old World: DR Balkan PeninsulaSubject = H Social Sciences: HS Societies secret benevolent etcSubject = B Philosophy. Psychology. Religion: BV Practical TheologySubject = P Language and Literature: PJ SemiticSubject = Q Science: Q Science (General)Subject = D History General and Old World: D History (General): D051 Ancient HistorySubject = J Political Science: JC Political theorySubject = R Medicine: RM Therapeutics. PharmacologySubject = P Language and Literature: PK Indo-IranianSubject = R Medicine: RG Gynecology and obstetricsSubject = P Language and Literature: PF West GermanicSubject = B Philosophy. Psychology. Religion: BD Speculative PhilosophySubject = H Social SciencesSubject = H Social Sciences: HA StatisticsSubject = T Technology: TD Environmental technology. Sanitary engineeringSubject = P Language and LiteratureSubject = D History General and Old World: DL Northern Europe. ScandinaviaSubject = L EducationSubject = Q Science: QP PhysiologySubject = A General Works: AM Museums (General). Collectors and collecting (General)Subject = R Medicine: RJ PediatricsSubject = G Geography. Anthropology. Recreation: GC OceanographySubject = N Fine Arts: NK Decorative arts Applied arts Decoration and ornamentSubject = Z Bibliography. Library Science. Information Resources: Z719 Libraries (General)Subject = V Naval ScienceSubject = P Language and Literature: PB Modern European Languages: PB1501 Gaelic (Scottish Gaelic, Erse)Subject = H Social Sciences: HE Transportation and CommunicationsSubject = T Technology: TG Bridge engineeringSubject = T TechnologySubject = H Social Sciences: H Social Sciences (General)Subject = P Language and Literature: PE EnglishSubject = S Agriculture: SB Plant cultureSubject = D History General and Old World: D History (General): D901 Europe (General)Subject = V Naval Science: V Naval Science (General)Subject = P Language and Literature: PD Germanic languagesSubject = H Social Sciences: HN Social history and conditions. Social problems. Social reformSubject = R Medicine: RT NursingSubject = D History General and Old World: D History (General): D111 Medieval HistorySubject = D History General and Old World: DB AustriaSubject = N Fine Arts: NE Print mediaSubject = S Agriculture: SF Animal cultureSubject = G Geography. Anthropology. Recreation: GE Environmental SciencesSubject = T Technology: TL Motor vehicles. Aeronautics. AstronauticsSubject = C Auxiliary Sciences of History: CE Technical chronology. CalendarSubject = Z Bibliography. Library Science. Information Resources: ZA Information resources: ZA4050 Electronic information resourcesSubject = B Philosophy. Psychology. Religion: BX Christian DenominationsSubject = S AgricultureSubject = F History United States, Canada, Latin America: F1201 Latin America (General)Subject = G Geography. Anthropology. Recreation: GA Mathematical geography. CartographySubject = D History General and Old World: DG ItalySubject = T Technology: TP Chemical technologySubject = S Agriculture: SK Hunting sportsSubject = P Language and Literature: PA Classical philologySubject = R Medicine: RD SurgerySubject = L Education: LD Individual institutions (United States)Subject = J Political Science: JN Political institutions (Europe): JN1187 ScotlandSubject = E History America: E151 United States (General)Subject = G Geography. Anthropology. Recreation: GN AnthropologySubject = M Music and Books on MusicSubject = H Social Sciences: HD Industries. Land use. Labor: HD61 Risk ManagementSubject = P Language and Literature: PR English literatureSubject = J Political Science: JS Local government Municipal governmentSubject = T Technology: T Technology (General)580
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo56.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo56.xml new file mode 100644 index 0000000..97884ca --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo56.xml @@ -0,0 +1,2 @@ + +
00EigenentwicklungDESY Publication DatabaseDESY Publication Databasehttp://pubdb.desy.de/desy-header/head_left.gifDE9.88353.5721http://pubdb.desy.de/DESYlibrary@desy.deOAIhttp://pubdb.desy.de/oai2oai_dc33540
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo57.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo57.xml new file mode 100644 index 0000000..1bb34bc --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo57.xml @@ -0,0 +1,2 @@ + +
00OPUSART-Dok Publikationsplattform KunstgeschichteArt-DOK - Digital Repository Art Historyhttp://archiv.ub.uni-heidelberg.de/artdok/Icons/art-dok_dt.gifDE8.70799949.4099221http://archiv.ub.uni-heidelberg.de/artdok/Universität HeidelbergEffinger@ub.uni-heidelberg.deOAIhttp://archiv.ub.uni-heidelberg.de/artdok/oai2/oai2.phpoai_dc5990
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo58.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo58.xml new file mode 100644 index 0000000..e5b6a79 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo58.xml @@ -0,0 +1,2 @@ + +
00Proprietary SoftwareUNESCO-IHE Institute for Water EducationUNESCO-IHE Institute for Water Educationhttp://www.unesco-ihe.org/design/ihe/images/logo.gifNL4.356218552.00905271http://www.narcis.info/repositories/repository/UNESCO/Language/en/UNESCO-IHE Institute for Water Educatioa.j.bosman@tudelft.nlOAIhttp://repository.tudelft.nl/ihe/oaioai_dc210
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo59.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo59.xml new file mode 100644 index 0000000..7d87f3c --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo59.xml @@ -0,0 +1,2 @@ + +
DSpace00Cranfield CERESCranfield CERESUK0.63126552.070010.0http://dspace.lib.cranfield.ac.uk/Cranfield Universitypaul.needham11@btinternet.comOAIhttp://dspace.lib.cranfield.ac.uk/dspace-oai/requestoai_dcuketd_dcAll sets27670.0
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo6.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo6.xml new file mode 100644 index 0000000..4a03cdb --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo6.xml @@ -0,0 +1,2 @@ + +
00EprintsDurham Research OnlineDurham Research Onlinehttp://www.dur.ac.uk/images/template/logounidurham-new.gifUK-1.566754.76670http://dro.dur.ac.uksebastian.palucha@durham.ac.ukOAIhttp://dro.dur.ac.uk/perl/oai2oai_dcStatus = UnpublishedStatus = PublishedStatus = In PressSubject = D History General and Old World: DA Great Britain: DAW Central EuropeSubject = Q Science: QP PhysiologySubject = R Medicine: RC Internal medicine: RC0254 Neoplasms. Tumors. Oncology (including Cancer)Subject = Q Science: QR MicrobiologySubject = M Music and Books on Music: MT Musical instruction and studySubject = J Political Science: JA Political science (General)Subject = R Medicine: R Medicine (General)Subject = N Fine Arts: N Visual arts (General) For photography, see TRSubject = J Political Science: JC Political theorySubject = C Auxiliary Sciences of History: CB History of civilizationSubject = G Geography. Anthropology. Recreation: G Geography (General)Subject = C Auxiliary Sciences of History: CC ArchaeologySubject = C Auxiliary Sciences of History: CD Diplomatics. Archives. SealsSubject = J Political Science: JF Political institutions (General)Subject = C Auxiliary Sciences of History: CE Technical chronology. CalendarSubject = T Technology: T Technology (General): T201 Patents. TrademarksSubject = D History General and Old World: D History (General): D051 Ancient HistorySubject = A General WorksSubject = J Political Science: JK Political institutions (United States)Subject = C Auxiliary Sciences of History: CJ NumismaticsSubject = B Philosophy. Psychology. ReligionSubject = J Political Science: JL Political institutions (America except United States)Subject = C Auxiliary Sciences of HistorySubject = D History General and Old WorldSubject = Z Bibliography. Library Science. Information Resources: Z719 Libraries (General)Subject = J Political Science: JN Political institutions (Europe)Subject = E History AmericaSubject = F History United States, Canada, Latin AmericaSubject = R Medicine: RC Internal medicine: RC0321 Neuroscience. Biological psychiatry. NeuropsychiatrySubject = G Geography. Anthropology. RecreationSubject = C Auxiliary Sciences of History: CN Inscriptions. Epigraphy.Subject = L Education: LB Theory and practice of education: LB2361 CurriculumSubject = H Social SciencesSubject = B Philosophy. Psychology. Religion: BV Practical Theology: BV1460 Religious EducationSubject = P Language and Literature: PN Literature (General): PN0080 CriticismSubject = J Political ScienceSubject = K LawSubject = L EducationSubject = J Political Science: JQ Political institutions AsiaSubject = R Medicine: RA Public aspects of medicineSubject = M Music and Books on MusicSubject = R Medicine: RB PathologySubject = N Fine Arts: NA ArchitectureSubject = N Fine ArtsSubject = J Political Science: JS Local government Municipal governmentSubject = C Auxiliary Sciences of History: CR HeraldrySubject = V Naval Science: V Naval Science (General)Subject = R Medicine: RC Internal medicineSubject = N Fine Arts: NB SculptureSubject = G Geography. Anthropology. Recreation: GA Mathematical geography. CartographySubject = C Auxiliary Sciences of History: CS GenealogySubject = R Medicine: RD SurgerySubject = N Fine Arts: NC Drawing Design IllustrationSubject = G Geography. Anthropology. Recreation: GB Physical geographySubject = C Auxiliary Sciences of History: CT BiographySubject = R Medicine: RE OphthalmologySubject = N Fine Arts: ND PaintingSubject = K Law: K Law (General)Subject = J Political Science: JV Colonies and colonization. Emigration and immigration. International migrationSubject = G Geography. Anthropology. Recreation: GC OceanographySubject = R Medicine: RF OtorhinolaryngologySubject = N Fine Arts: NE Print mediaSubject = D History General and Old World: D History (General)Subject = R Medicine: RG Gynecology and obstetricsSubject = J Political Science: JX International lawSubject = G Geography. Anthropology. Recreation: GE Environmental SciencesSubject = G Geography. Anthropology. Recreation: GF Human ecology. AnthropogeographySubject = D History General and Old World: D History (General): D731 World War IISubject = J Political Science: JN Political institutions (Europe): JN1187 ScotlandSubject = P Language and LiteratureSubject = Q ScienceSubject = J Political Science: JZ International relationsSubject = R Medicine: RJ PediatricsSubject = R MedicineSubject = S AgricultureSubject = R Medicine: RK DentistrySubject = T TechnologySubject = R Medicine: RL DermatologySubject = U Military ScienceSubject = N Fine Arts: NK Decorative arts Applied arts Decoration and ornamentSubject = V Naval ScienceSubject = R Medicine: RM Therapeutics. PharmacologySubject = R Medicine: RA Public aspects of medicine: RA1001 Forensic Medicine. Medical jurisprudence. Legal medicineSubject = G Geography. Anthropology. Recreation: GN AnthropologySubject = Z Bibliography. Library Science. Information ResourcesSubject = R Medicine: RS Pharmacy and materia medicaSubject = R Medicine: RT NursingSubject = G Geography. Anthropology. Recreation: GR FolkloreSubject = S Agriculture: S Agriculture (General)Subject = R Medicine: RV Botanic, Thomsonian, and eclectic medicineSubject = G Geography. Anthropology. Recreation: GT Manners and customsSubject = D History General and Old World: DA Great BritainSubject = D History General and Old World: DB AustriaSubject = R Medicine: RX HomeopathySubject = K Law: KD England and WalesSubject = H Social Sciences: H Social Sciences (General)Subject = G Geography. Anthropology. Recreation: GV Recreation LeisureSubject = D History General and Old World: DC FranceSubject = N Fine Arts: NX Arts in generalSubject = D History General and Old World: DD GermanySubject = Q Science: QH Natural history: QH301 BiologySubject = K Law: KF United States Federal LawSubject = F History United States, Canada, Latin America: F1201 Latin America (General)Subject = D History General and Old World: DE The Mediterranean Region. The Greco-Roman WorldSubject = D History General and Old World: DF GreeceSubject = D History General and Old World: DG ItalySubject = P Language and Literature: PN Literature (General): PN2000 Dramatic representation. The TheaterSubject = D History General and Old World: DH Netherlands (The Low Countries)Subject = R Medicine: RZ Other systems of medicineSubject = R Medicine: RJ Pediatrics: RJ101 Child Health. Child health servicesSubject = H Social Sciences: HD Industries. Land use. Labor: HD28 Management. Industrial ManagementSubject = D History General and Old World: DJ Netherlands (Holland)Subject = V Naval Science: VM Naval architecture. Shipbuilding. Marine engineeringSubject = D History General and Old World: DK Russia. Soviet Union. Former Soviet RepublicsSubject = D History General and Old World: DL Northern Europe. ScandinaviaSubject = Q Science: QH Natural history: QH426 GeneticsSubject = D History General and Old World: D History (General): D880 Developing CountriesSubject = Z Bibliography. Library Science. Information Resources: ZA Information resourcesSubject = D History General and Old World: DP SpainSubject = L Education: LC Special aspects of education: LC5201 Education extension. Adult education. Continuing educationSubject = S Agriculture: SB Plant cultureSubject = R Medicine: RA Public aspects of medicine: RA0421 Public health. Hygiene. Preventive MedicineSubject = D History General and Old World: DR Balkan PeninsulaSubject = H Social Sciences: HA StatisticsSubject = D History General and Old World: DS AsiaSubject = S Agriculture: SD ForestrySubject = P Language and Literature: P Philology. LinguisticsSubject = H Social Sciences: HB Economic TheorySubject = D History General and Old World: DT AfricaSubject = L Education: L Education (General)Subject = H Social Sciences: HC Economic History and ConditionsSubject = D History General and Old World: DU Oceania (South Seas)Subject = S Agriculture: SF Animal cultureSubject = H Social Sciences: HD Industries. Land use. LaborSubject = A General Works: AC Collections. Series. Collected worksSubject = H Social Sciences: HE Transportation and CommunicationsSubject = S Agriculture: SH Aquaculture. Fisheries. AnglingSubject = H Social Sciences: HF CommerceSubject = H Social Sciences: HG FinanceSubject = A General Works: AI Indexes (General)Subject = D History General and Old World: D History (General): D501 World War ISubject = D History General and Old World: D History (General): D839 Post-war History, 1945 onSubject = K Law: KZ Law of NationsSubject = S Agriculture: SK Hunting sportsSubject = Q Science: QR Microbiology: QR180 ImmunologySubject = H Social Sciences: HJ Public FinanceSubject = A General Works: AM Museums (General). Collectors and collecting (General)Subject = H Social Sciences: HM SociologySubject = H Social Sciences: HN Social history and conditions. Social problems. Social reformSubject = D History General and Old World: D History (General): D901 Europe (General)Subject = D History General and Old World: DJ Netherlands (Holland): DJK Eastern EuropeSubject = Z Bibliography. Library Science. Information Resources: ZA Information resources: ZA4050 Electronic information resourcesSubject = H Social Sciences: HQ The family. Marriage. WomanSubject = P Language and Literature: PA Classical philologySubject = P Language and Literature: PN Literature (General): PN1990 BroadcastingSubject = P Language and Literature: PB Modern European LanguagesSubject = H Social Sciences: HS Societies secret benevolent etcSubject = J Political Science: JN Political institutions (Europe): JN101 Great BritainSubject = L Education: LA History of educationSubject = T Technology: T Technology (General)Subject = P Language and Literature: PC Romance languagesSubject = A General Works: AS Academies and learned societies (General)Subject = H Social Sciences: HT Communities. Classes. RacesSubject = L Education: LB Theory and practice of educationSubject = P Language and Literature: PD Germanic languagesSubject = L Education: LC Special aspects of educationSubject = P Language and Literature: PN Literature (General): PN1993 Motion PicturesSubject = P Language and Literature: PE EnglishSubject = L Education: LD Individual institutions (United States)Subject = H Social Sciences: HV Social pathology. Social and public welfareSubject = P Language and Literature: PF West GermanicSubject = L Education: LE Individual institutions (America except United States)Subject = B Philosophy. Psychology. Religion: B Philosophy (General)Subject = P Language and Literature: PG Slavic, Baltic, Albanian languages and literatureSubject = L Education: LF Individual institutions (Europe)Subject = H Social Sciences: HX Socialism. Communism. AnarchismSubject = P Language and Literature: PH Finno-Ugrian, Basque languages and literaturesSubject = L Education: LG Individual institutions (Asia. Africa)Subject = P Language and Literature: PI Oriental languages and literaturesSubject = P Language and Literature: PJ SemiticSubject = A General Works: AZ History of Scholarship The HumanitiesSubject = P Language and Literature: PK Indo-IranianSubject = P Language and Literature: PL Languages and literatures of Eastern Asia, Africa, OceaniaSubject = Z Bibliography. Library Science. Information Resources: ZA Information resources: ZA4450 DatabasesSubject = P Language and Literature: PN Literature (General): PN0441 Literary HistorySubject = P Language and Literature: PM Hyperborean, Indian, and Artificial languagesSubject = P Language and Literature: PN Literature (General)Subject = L Education: LB Theory and practice of education: LB1501 Primary EducationSubject = H Social Sciences: HF Commerce: HF5601 AccountingSubject = D History General and Old World: D History (General): D204 Modern HistorySubject = P Language and Literature: PB Modern European Languages: PB1501 Gaelic (Scottish Gaelic, Erse)Subject = R Medicine: RC Internal medicine: RC1200 Sports MedicineSubject = P Language and Literature: PQ Romance literaturesSubject = P Language and Literature: PR English literatureSubject = T Technology: TA Engineering (General). Civil engineering (General)Subject = P Language and Literature: PS American literatureSubject = P Language and Literature: PT Germanic literatureSubject = T Technology: TC Hydraulic engineering. Ocean engineeringSubject = L Education: LT TextbooksSubject = T Technology: TD Environmental technology. Sanitary engineeringSubject = Q Science: Q Science (General)Subject = T Technology: TE Highway engineering. Roads and pavementsSubject = M Music and Books on Music: M MusicSubject = E History America: E151 United States (General)Subject = Z Bibliography. Library Science. Information Resources: Z665 Library Science. Information ScienceSubject = T Technology: TF Railroad engineering and operationSubject = B Philosophy. Psychology. Religion: BC LogicSubject = T Technology: TG Bridge engineeringSubject = B Philosophy. Psychology. Religion: BD Speculative PhilosophySubject = T Technology: TH Building constructionSubject = B Philosophy. Psychology. Religion: BF PsychologySubject = B Philosophy. Psychology. Religion: BH AestheticsSubject = D History General and Old World: D History (General): D890 Eastern HemisphereSubject = P Language and Literature: PZ Childrens literatureSubject = F History United States, Canada, Latin America: F1001 Canada (General)Subject = L Education: LB Theory and practice of education: LB2300 Higher EducationSubject = T Technology: TJ Mechanical engineering and machinerySubject = T Technology: TK Electrical engineering. Electronics Nuclear engineeringSubject = D History General and Old World: D History (General): D111 Medieval HistorySubject = Z Bibliography. Library Science. Information Resources: Z004 Books. Writing. PaleographySubject = T Technology: TL Motor vehicles. Aeronautics. AstronauticsSubject = B Philosophy. Psychology. Religion: BJ EthicsSubject = T Technology: TN Mining engineering. MetallurgySubject = B Philosophy. Psychology. Religion: BL ReligionSubject = B Philosophy. Psychology. Religion: BM JudaismSubject = E History America: E11 America (General)Subject = T Technology: TP Chemical technologySubject = F History United States, Canada, Latin America: F001 United States local historySubject = T Technology: TR PhotographySubject = T Technology: TS ManufacturesSubject = B Philosophy. Psychology. Religion: BP Islam. Bahaism. Theosophy, etcSubject = K Law: KD England and Wales: KDC ScotlandSubject = T Technology: TT Handicrafts Arts and craftsSubject = Q Science: QA MathematicsSubject = B Philosophy. Psychology. Religion: BQ BuddhismSubject = Q Science: QB AstronomySubject = B Philosophy. Psychology. Religion: BR ChristianitySubject = U Military Science: U Military Science (General)Subject = Q Science: QC PhysicsSubject = B Philosophy. Psychology. Religion: BS The BibleSubject = Q Science: QD ChemistrySubject = B Philosophy. Psychology. Religion: BT Doctrinal TheologySubject = H Social Sciences: HD Industries. Land use. Labor: HD61 Risk ManagementSubject = T Technology: TX Home economicsSubject = Q Science: QE GeologySubject = J Political Science: J General legislative and executive papersSubject = B Philosophy. Psychology. Religion: BV Practical TheologySubject = C Auxiliary Sciences of History: C Auxiliary sciences of history (General)Subject = Q Science: QH Natural historySubject = B Philosophy. Psychology. Religion: BX Christian DenominationsSubject = Q Science: QR Microbiology: QR355 VirologySubject = Q Science: QK BotanySubject = C Auxiliary Sciences of History: CD Diplomatics. Archives. Seals: CD921 ArchivesSubject = Q Science: QL ZoologySubject = Q Science: QM Human anatomySubject = Q Science: QA Mathematics: QA75 Electronic computers. Computer scienceSubject = M Music and Books on Music: ML Literature of musicSubject = Q Science: QA Mathematics: QA76 Computer softwareSubject = L Education: LB Theory and practice of education: LB1603 Secondary Education. High schools49830
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo60.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo60.xml new file mode 100644 index 0000000..dd4f9d8 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo60.xml @@ -0,0 +1,2 @@ + +
00PUMANational Research Council Genova - ISEM RepositoryNational Research Council Genova - ISEM Repositoryhttp://leonardo.isti.cnr.it/metaopac/sfondi/isem.gifIT8.92682144.4146161http://leonardo.isti.cnr.it/metaopac/servlet/Isis?Conf=/export/home/metaopac/mpisa/isemge_geConf/cnr_isemge-pub-list.sys.file_xIstituto di Storia dell'Europa Mediterraneagiuseppe.romano@isti.cnr.itOAIhttp://leonardo.isti.cnr.it/oai_cnrpubdriveroai_dc60
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo61.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo61.xml new file mode 100644 index 0000000..a176e4b --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo61.xml @@ -0,0 +1,2 @@ + +
00EprintsLSE Research OnlineLSE Research Onlinehttp://www.lse.ac.uk/images/header/library.jpgUK-0.116751.50http://eprints.lse.ac.uk/s.mcleish@lse.ac.ukOAIhttp://eprints.lse.ac.uk/perl/oai2oai_dcData Library Trial 1Kate (BSS)Projects Team Documents CollectionProjects Team Private DocumentsTest167640
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo62.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo62.xml new file mode 100644 index 0000000..2fb1394 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo62.xml @@ -0,0 +1,2 @@ + +
00PUMANational Research Council Bologna - IMM RepositoryNational Research Council Bologna - IMM Repositoryhttp://www.imm.cnr.it/artwork/header_green_3_left.jpgIT11.3044.531http://leonardo.isti.cnr.it/metaopac/servlet/Isis?Conf=/export/home/metaopac/mpisa/cnrpConf/cnr_immbo-pub-list.sys.file_xInstitute for Microelectronics and Microsystems - CNR Bolognagiuseppe.romano@isti.cnr.itOAIhttp://leonardo.isti.cnr.it/oai_cnrpubdriveroai_dc20
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo63.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo63.xml new file mode 100644 index 0000000..88a472c --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo63.xml @@ -0,0 +1,2 @@ + +
00VTOAIUniversitat Rovira i Virgili: Tesis Doctorals en Xarxa (TDX)Univ. Rovira i Virgil: Theses and Dissertations Online (TDX)http://www.tesisenxarxa.net/images/tdx/titol_transp.gifES1.26014541.1197361http://www.tdx.cesca.es/Universitat Rovira i Virgilitdx@cesca.esOAIhttp://www.tdx.cesca.es/TDX_URV/NDLTD-OAI/oai.ploai_dc3780
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo64.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo64.xml new file mode 100644 index 0000000..22678cf --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo64.xml @@ -0,0 +1,2 @@ + +
00PUMANational Research Council Taranto - IAMC RepositoryNational Research Council Taranto - IAMC Repositoryhttp://leonardo.isti.cnr.it/metaopac/sfondi/logoCNR.jpgIT17.23638440.4744791http://leonardo.isti.cnr.it/metaopac/servlet/Isis?Conf=/export/home/metaopac/mpisa/iamcta_taConf/cnr_iamcta-pub-list.sys.file_xIstituto per l'Ambiente Marino Costiero - CNR Tarantogiuseppe.romano@isti.cnr.itOAIhttp://leonardo.isti.cnr.it/oai_cnrpubdriveroai_dc10
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo65.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo65.xml new file mode 100644 index 0000000..d4dddfe --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo65.xml @@ -0,0 +1,2 @@ + +
00FedoraDIPP NRWDIPP NRWhttp://www.dipp.nrw.de/favicon.gifDE6.93650.9351http://www.dipp.nrw.de/Hochschulbibliothekszentrum Kölndipp-tech@hbz-nrw.deOAIhttp://www.dipp.nrw.de/repository/oaioai_dc8470
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo66.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo66.xml new file mode 100644 index 0000000..7cdfdff --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo66.xml @@ -0,0 +1,2 @@ + +
00EprintsRoyal Holloway Research OnlineUniv. of London, Royal Holloway: Research Onlinehttp://www.rhul.ac.uk/information-services/library/images/rheprints.gifUK-0.546951.430http://eprints.rhul.ac.uk/mailto:eprints@rhul.ac.ukOAIhttp://eprints.rhul.ac.uk/perl/oai2oai_dc10150
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo67.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo67.xml new file mode 100644 index 0000000..e7cdee2 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo67.xml @@ -0,0 +1,2 @@ + +
00DSpaceDigital.CSICDigital.CSIChttp://digital.csic.es/image/digital_csic_en.gifES-3.6863140.4378891http://digital.csic.es/Spanish National Research Council (CSIC)digital.csic-soportetecnico@csic.esOAIhttp://servmadrono.cs.urjc.es:8010/arcFuturo/servlet/OAIDPcsicoai_dc63510
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo68.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo68.xml new file mode 100644 index 0000000..b4bb6c2 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo68.xml @@ -0,0 +1,2 @@ + +
00EprintsePrints.FRIePrints.FRIhttp://eprints.fri.uni-lj.si/images/fri.pngSI14.50596546.0514261http://eprints.fri.uni-lj.si/Faculty of Computer and Information Science (FRI), University of Ljubljana, Slovenia.Miha.Peternel@fri.uni-lj.siOAIhttp://eprints.fri.uni-lj.si/perl/oai2oai_dc2170
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo69.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo69.xml new file mode 100644 index 0000000..65fed52 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo69.xml @@ -0,0 +1,2 @@ + +
00DSpaceECNIS Repository (Environmental Cancer Risk, Nutrition and Individual Susceptibility Repository)ECNIS Repository (Environmental Cancer Risk, Nutrition and Individual Susceptibility Repository)http://ecnis.openrepository.com/ecnis/image/header.gifPL19.4371651.8018291http://ecnis.openrepository.comNofer Institute of Occupational Medicinelibrary@imp.lodz.plOAIhttp://ecnis.openrepository.com/ecnis/oai/requestoai_dc1320
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo7.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo7.xml new file mode 100644 index 0000000..41ed19f --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo7.xml @@ -0,0 +1,2 @@ + +
00EigenentwicklungE-LIB DokumentserverE-LIB Document Serverhttp://elib.suub.uni-bremen.de/bilder/ElibLogo.gifDE8.86353.1051http://elib.suub.uni-bremen.de/cocoon/diss/startUniversity Bremenhaake@suub.uni-bremen.deOAIhttp://elib.suub.uni-bremen.de/cgi-bin/oai2oai_dc11100
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo70.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo70.xml new file mode 100644 index 0000000..8d25b37 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo70.xml @@ -0,0 +1,2 @@ + +
00Proprietary SoftwareOulun yliopiston julkaisemia elektronisia julkaisujaUniversity of Oulu - Electronic Publicationshttp://www.kirjasto.oulu.fi/grafiikka/logot/logo_su.gifFI25.46665.0591http://www.kirjasto.oulu.fi/english/julkaisutoiminta/elektroniset/University of OuluVille.Varjonen@oulu.fiOAIhttp://herkules.oulu.fi/OAI/OAI-script.xsqloai_dc11910
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo71.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo71.xml new file mode 100644 index 0000000..966f4d4 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo71.xml @@ -0,0 +1,2 @@ + +
00OAI Repository of the Technische Universiteit Eindhoven (TU/e)Technische Univ. Eindhoven: Repository TU/ehttp://w3.tue.nl/fileadmin/tue/img/tue-logo.gifNL5.48451.43441http://w3.tue.nl/en/denis@sandcat.nlOAIhttp://library.tue.nl/csp/dare/DARE.Repository.clsoai_dcdare_qdcdare_didlPublications TU/ePublications Keur der Wetenschap162650
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo72.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo72.xml new file mode 100644 index 0000000..2f135ee --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo72.xml @@ -0,0 +1,2 @@ + +
00OPUSUniversity of Technics Hamburg, GERMANY, TUBdokTUBdok - Publication Server of the Hamburg University of TechnologyDE9.99253.551http://doku.b.tu-harburg.de/mailto:tubdok@tu-harburg.deOAIhttp://doku.b.tu-harburg.de/oai/oai2.phpoai_dcepicuroai_ppxMetaDissXMetaDissPlusData processing Computer scienceLibrary and information sciencesPsychologySocial sciencesEconomicsEducationCommerce, communications, transportMathematicsPhysicsChemistry and allied sciencesLife sciencesTechnology (Applied sciences)Engineering and allied operationsChemical engineeringCivic and landscape artArticleBookHonoursThesisInBookInProceedingsJournalManualMastersThesisMiscPreprintProceedingsResearchPaperTechReportText.Thesis.DoctoralEverything with an SWB identiiferEverything without an SWB identiifer4590
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo73.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo73.xml new file mode 100644 index 0000000..4d86366 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo73.xml @@ -0,0 +1,2 @@ + +
00EprintsOxford EprintsOxford Univ. Library Services: Oxford Eprintshttp://www.lib.ox.ac.uk/images/crest/reverse-small.gifUK-1.2551.750http://eprints.ouls.ox.ac.uk/mailto:benjamin.osteen@sers.ox.ac.ukOAIhttp://eprints.ouls.ox.ac.uk/perl/oai2oai_dcmetsStatus = In PressStatus = PublishedStatus = UnpublishedSubject = B.SHERPA Oxford Classification: GeneralitiesSubject = A.University of Oxford Departments: MEDICAL SCIENCES: NON-CLINICAL: PathologySubject = A.University of Oxford Departments: MEDICAL SCIENCES: CLINICAL: Clinical Laboratory SciencesSubject = B.SHERPA Oxford Classification: Language: Italic languages, i.e., LatinSubject = A.University of Oxford Departments: HUMANITIES: Chinese StudiesSubject = A.University of Oxford Departments: HUMANITIES: American StudiesSubject = B.SHERPA Oxford Classification: Philosophy & Psychology: PsychologySubject = A.University of Oxford Departments: SOCIAL SCIENCES: European StudiesSubject = A.University of Oxford Departments: HUMANITIESSubject = A.University of Oxford Departments: MEDICAL SCIENCES: CLINICAL: Clinical PharmacologySubject = B.SHERPA Oxford Classification: Generalities: Library & information sciencesSubject = A.University of Oxford Departments: MEDICAL SCIENCES: CLINICAL: Human Genetics (Wellcome Trust Centre for Medical Oncology)Subject = B.SHERPA Oxford Classification: Geography & History: General history of other areasSubject = A.University of Oxford Departments: MATHEMATICAL AND PHYSICAL SCIENCESSubject = B.SHERPA Oxford Classification: Literature & Rhetoric: English and Old English literatureSubject = B.SHERPA Oxford Classification: Natural Sciences & Mathematics: Botanical sciencesSubject = A.University of Oxford Departments: SOCIAL SCIENCES: Educational StudiesSubject = A.University of Oxford Departments: LIFE AND ENVIRONMENTAL SCIENCES: Plant SciencesSubject = A.University of Oxford Departments: LIFE AND ENVIRONMENTAL SCIENCES: GeographySubject = A.University of Oxford Departments: CONTINUING EDUCATION: Continuing EducationSubject = B.SHERPA Oxford Classification: Natural Sciences & Mathematics: Astronomy & allied sciencesSubject = B.SHERPA Oxford Classification: Literature & Rhetoric: Spanish & Portuguese literaturesSubject = A.University of Oxford Departments: LIFE AND ENVIRONMENTAL SCIENCES: ArchaeologySubject = A.University of Oxford Departments: MEDICAL SCIENCES: NON-CLINICAL: PharmacologySubject = B.SHERPA Oxford Classification: Social Sciences: LawSubject = B.SHERPA Oxford Classification: Philosophy & Psychology: MetaphysicsSubject = B.SHERPA Oxford Classification: Literature & Rhetoric: Literatures of Romance languagesSubject = B.SHERPA Oxford Classification: Language: Italian, Romanian, Rhaeto-Romanic languagesSubject = A.University of Oxford Departments: MATHEMATICAL AND PHYSICAL SCIENCES: PHYSICAL SCIENCES: Engineering ScienceSubject = B.SHERPA Oxford Classification: The ArtsSubject = A.University of Oxford Departments: HUMANITIES: History of ArtSubject = A.University of Oxford Departments: HUMANITIES: Modern HistorySubject = A.University of Oxford Departments: ASUC (Academic Services): OULSSubject = A.University of Oxford Departments: HUMANITIES: History of MedicineSubject = B.SHERPA Oxford Classification: Generalities: Bibliographies & cataloguesSubject = B.SHERPA Oxford Classification: Literature & Rhetoric: Literatures of other languagesSubject = B.SHERPA Oxford Classification: Geography & History: General history of Asia & Far EastSubject = B.SHERPA Oxford Classification: Technology (Applied Sciences): Manufacture for specific usesSubject = B.SHERPA Oxford Classification: Natural Sciences & Mathematics: Zoological sciencesSubject = B.SHERPA Oxford Classification: Religion: JudaismSubject = A.University of Oxford Departments: MEDICAL SCIENCES: CLINICAL: Molecular Medicine (Weatherall Institute)Subject = B.SHERPA Oxford Classification: Technology (Applied Sciences): Chemical engineeringSubject = B.SHERPA Oxford Classification: Social Sciences: EconomicsSubject = B.SHERPA Oxford Classification: Geography & History: General history of EuropeSubject = A.University of Oxford Departments: MEDICAL SCIENCES: CLINICAL: AnaestheticsSubject = B.SHERPA Oxford Classification: The Arts: Photography & photographsSubject = B.SHERPA Oxford Classification: The Arts: Plastic artsSubject = A.University of Oxford Departments: SOCIAL SCIENCES: LawSubject = A.University of Oxford Departments: MEDICAL SCIENCES: CLINICALSubject = B.SHERPA Oxford Classification: ReligionSubject = B.SHERPA Oxford Classification: Language: English & Old EnglishSubject = A.University of Oxford Departments: MEDICAL SCIENCES: CLINICAL: PsychiatrySubject = B.SHERPA Oxford Classification: The Arts: Recreational & performing artsSubject = B.SHERPA Oxford Classification: Religion: BuddhismSubject = B.SHERPA Oxford Classification: Philosophy & Psychology: Ethics (Moral philosophy)Subject = A.University of Oxford Departments: SOCIAL SCIENCES: Russian and East European StudiesSubject = B.SHERPA Oxford Classification: Generalities: News media, journalism, publishingSubject = B.SHERPA Oxford Classification: Social Sciences: Public administrationSubject = B.SHERPA Oxford Classification: Literature & RhetoricSubject = B.SHERPA Oxford Classification: Language: Spanish & Portuguese languagesSubject = B.SHERPA Oxford Classification: Geography & History: Biography, genealogy, insigniasSubject = A.University of Oxford Departments: MATHEMATICAL AND PHYSICAL SCIENCES: MATHEMATICAL SCIENCESSubject = B.SHERPA Oxford Classification: Natural Sciences & Mathematics: Earth sciencesSubject = A.University of Oxford Departments: SOCIAL SCIENCES: Social Policy and Social WorkSubject = A.University of Oxford Departments: ASUC (Academic Services)Subject = B.SHERPA Oxford Classification: Language: Other languagesSubject = A.University of Oxford Departments: MEDICAL SCIENCES: CLINICAL: PaediatricsSubject = B.SHERPA Oxford Classification: Language: Romance languages, i.e., FrenchSubject = A.University of Oxford Departments: CONTINUING EDUCATIONSubject = B.SHERPA Oxford Classification: Literature & Rhetoric: Italian, Romanian, Rhaeto-RomanicSubject = B.SHERPA Oxford Classification: Literature & Rhetoric: Hellenic literatures, i.e., Classical GreekSubject = B.SHERPA Oxford Classification: Generalities: General organisations & museologySubject = B.SHERPA Oxford Classification: Social Sciences: General statisticsSubject = B.SHERPA Oxford Classification: Religion: Religions of the Far EastSubject = B.SHERPA Oxford Classification: Religion: IslamSubject = A.University of Oxford Departments: MEDICAL SCIENCES: CLINICAL: Clinical NeurologySubject = B.SHERPA Oxford Classification: Religion: Prehistoric and primitve religionsSubject = B.SHERPA Oxford Classification: Technology (Applied Sciences): Home economics & family livingSubject = A.University of Oxford Departments: SOCIAL SCIENCES: Japanese StudiesSubject = A.University of Oxford Departments: MATHEMATICAL AND PHYSICAL SCIENCES: PHYSICAL SCIENCES: MaterialsSubject = B.SHERPA Oxford Classification: The Arts: ArchitectureSubject = B.SHERPA Oxford Classification: Philosophy & Psychology: Epistemology, causation, humankindSubject = A.University of Oxford Departments: MATHEMATICAL AND PHYSICAL SCIENCES: MATHEMATICAL SCIENCES: StatisticsSubject = A.University of Oxford Departments: LIFE AND ENVIRONMENTAL SCIENCES: Zoology (including the Institute of Biological Anthropology)Subject = A.University of Oxford Departments: HUMANITIES: English Language and LiteratureSubject = B.SHERPA Oxford Classification: Generalities: Manuscripts & rare booksSubject = A.University of Oxford Departments: SOCIAL SCIENCES: Politics and International RelationsSubject = B.SHERPA Oxford Classification: Geography & History: General history of South AmericaSubject = A.University of Oxford Departments: SOCIAL SCIENCESSubject = B.SHERPA Oxford Classification: Natural Sciences & Mathematics: PhysicsSubject = A.University of Oxford Departments: SOCIAL SCIENCES: Internet InstituteSubject = B.SHERPA Oxford Classification: Technology (Applied Sciences): Medical sciencesSubject = A.University of Oxford Departments: SOCIAL SCIENCES: Management Studies (Said Business School)Subject = A.University of Oxford Departments: SOCIAL SCIENCES: Interdisciplinary Area StudiesSubject = B.SHERPA Oxford Classification: Language: LinguisticsSubject = B.SHERPA Oxford Classification: LanguageSubject = B.SHERPA Oxford Classification: Social Sciences: Commerce, communications, transportSubject = B.SHERPA Oxford Classification: Natural Sciences & Mathematics: Paleontology, PaleozoologySubject = A.University of Oxford Departments: MATHEMATICAL AND PHYSICAL SCIENCES: PHYSICAL SCIENCES: PhysicsSubject = B.SHERPA Oxford Classification: Geography & History: History of the ancient worldSubject = B.SHERPA Oxford Classification: Geography & HistorySubject = A.University of Oxford Departments: MEDICAL SCIENCES: CLINICAL: Clinical MedicineSubject = A.University of Oxford Departments: LIFE AND ENVIRONMENTAL SCIENCESSubject = B.SHERPA Oxford Classification: The Arts: Drawing & decorative artsSubject = B.SHERPA Oxford Classification: Religion: Religions of the indian subcontinent. Hinduism, Jainism, SihkismSubject = B.SHERPA Oxford Classification: Philosophy & Psychology: Ancient, medieval, Oriental philosophySubject = B.SHERPA Oxford Classification: Philosophy & PsychologySubject = B.SHERPA Oxford Classification: Geography & History: General history of North AmericaSubject = B.SHERPA Oxford Classification: Social SciencesSubject = B.SHERPA Oxford Classification: Geography & History: General history of AfricaSubject = A.University of Oxford Departments: MATHEMATICAL AND PHYSICAL SCIENCES: PHYSICAL SCIENCESSubject = B.SHERPA Oxford Classification: Philosophy & Psychology: LogicSubject = B.SHERPA Oxford Classification: Natural Sciences & Mathematics: Life SciencesSubject = A.University of Oxford Departments: HUMANITIES: Comparative Philology and General Linguistics and PhoneticsSubject = A.University of Oxford Departments: MEDICAL SCIENCES: CLINICAL: SurgerySubject = A.University of Oxford Departments: ASUC (Academic Services): OUCSSubject = A.University of Oxford Departments: MEDICAL SCIENCES: CLINICAL: Cardiovascular MedicineSubject = B.SHERPA Oxford Classification: Technology (Applied Sciences): Management & auxiliary servicesSubject = B.SHERPA Oxford Classification: Literature & Rhetoric: Italic literatures, i.e., LatinSubject = B.SHERPA Oxford Classification: Language: Germanic languages, i.e., GermanSubject = B.SHERPA Oxford Classification: The Arts: Graphic artsSubject = B.SHERPA Oxford Classification: Natural Sciences & MathematicsSubject = B.SHERPA Oxford Classification: Generalities: General encyclopaedic worksSubject = A.University of Oxford Departments: SOCIAL SCIENCES: African StudiesSubject = A.University of Oxford Departments: HUMANITIES: Classics (including Classical Languages and Literature and Ancient History)Subject = B.SHERPA Oxford Classification: Technology (Applied Sciences): Engineering & allied sciencesSubject = B.SHERPA Oxford Classification: Technology (Applied Sciences)Subject = A.University of Oxford Departments: MEDICAL SCIENCES: CLINICAL: OphthalmologySubject = A.University of Oxford Departments: HUMANITIES: PhilosophySubject = A.University of Oxford Departments: SOCIAL SCIENCES: SociologySubject = A.University of Oxford Departments: MEDICAL SCIENCES: NON-CLINICAL: Human Anatomy and GeneticsSubject = A.University of Oxford Departments: MATHEMATICAL AND PHYSICAL SCIENCES: MATHEMATICAL SCIENCES: MathematicsSubject = B.SHERPA Oxford Classification: Generalities: General serials & their indexesSubject = A.University of Oxford Departments: SOCIAL SCIENCES: Contemporary Chinese StudiesSubject = B.SHERPA Oxford Classification: Technology (Applied Sciences): BuildingsSubject = B.SHERPA Oxford Classification: Religion: Modern spiritual movementsSubject = A.University of Oxford Departments: LIFE AND ENVIRONMENTAL SCIENCES: BiochemistrySubject = B.SHERPA Oxford Classification: The Arts: Civic & landscape artSubject = A.University of Oxford Departments: SOCIAL SCIENCES: Brazilian StudiesSubject = A.University of Oxford Departments: MATHEMATICAL AND PHYSICAL SCIENCES: MATHEMATICAL SCIENCES: Computing LaboratorySubject = A.University of Oxford Departments: SOCIAL SCIENCES: Development Studies (Queen Elizabeth House)Subject = B.SHERPA Oxford Classification: Social Sciences: EducationSubject = A.University of Oxford Departments: MEDICAL SCIENCESSubject = B.SHERPA Oxford Classification: Natural Sciences & Mathematics: Chemistry & allied sciencesSubject = A.University of Oxford Departments: MATHEMATICAL AND PHYSICAL SCIENCES: PHYSICAL SCIENCES: ChemistrySubject = B.SHERPA Oxford Classification: Language: Hellenic languages, i.e., Classical GreekSubject = A.University of Oxford Departments: MEDICAL SCIENCES: CLINICAL: Public Health and Primary CareSubject = B.SHERPA Oxford Classification: Literature & Rhetoric: Literatures of Germanic languagesSubject = A.University of Oxford Departments: SOCIAL SCIENCES: South Asian StudiesSubject = B.SHERPA Oxford ClassificationSubject = B.SHERPA Oxford Classification: Social Sciences: Social services; associationsSubject = A.University of Oxford Departments: LIFE AND ENVIRONMENTAL SCIENCES: AnthropologySubject = A.University of Oxford Departments: HUMANITIES: MusicSubject = B.SHERPA Oxford Classification: Natural Sciences & Mathematics: MathematicsSubject = B.SHERPA Oxford Classification: Social Sciences: Customs, etiquette, folkloreSubject = A.University of Oxford Departments: MEDICAL SCIENCES: CLINICAL: Obstetrics and GynaecologySubject = A.University of Oxford Departments: MEDICAL SCIENCES: NON-CLINICAL: PhysiologySubject = A.University of Oxford Departments: HUMANITIES: TheologySubject = B.SHERPA Oxford Classification: Religion: ChristianitySubject = B.SHERPA Oxford Classification: Philosophy & Psychology: Specific philosophical schoolsSubject = A.University of Oxford Departments: MEDICAL SCIENCES: CLINICAL: Orthopaedic SurgerySubject = B.SHERPA Oxford Classification: Literature & Rhetoric: American literature in EnglishSubject = B.SHERPA Oxford Classification: Social Sciences: Political scienceSubject = B.SHERPA Oxford Classification: Philosophy & Psychology: Paranormal phenomenaSubject = B.SHERPA Oxford Classification: Philosophy & Psychology: Modern Western philosophySubject = B.SHERPA Oxford Classification: Technology (Applied Sciences): AgricultureSubject = B.SHERPA Oxford Classification: The Arts: MusicSubject = A.University of Oxford Departments: MATHEMATICAL AND PHYSICAL SCIENCES: PHYSICAL SCIENCES: Earth SciencesSubject = B.SHERPA Oxford Classification: Religion: Religions of antiquity. Minor cults and religionsSubject = A.University of Oxford Departments: MEDICAL SCIENCES: NON-CLINICAL: Experimental PsychologySubject = A.University of Oxford Departments: HUMANITIES: Medieval and Modern LanguagesSubject = B.SHERPA Oxford Classification: Generalities: General collectionsSubject = A.University of Oxford Departments: SOCIAL SCIENCES: Latin American StudiesSubject = A.University of Oxford Departments: SOCIAL SCIENCES: EconomicsSubject = A.University of Oxford Departments: HUMANITIES: Ruskin School of Drawing and Fine ArtSubject = A.University of Oxford Departments: MATHEMATICAL AND PHYSICAL SCIENCES: PHYSICAL SCIENCES: AstrophysicsSubject = A.University of Oxford Departments: HUMANITIES: Oriental StudiesSubject = A.University of Oxford DepartmentsSubject = B.SHERPA Oxford Classification: Technology (Applied Sciences): ManufacturingSubject = A.University of Oxford Departments: MEDICAL SCIENCES: NON-CLINICALSubject = B.SHERPA Oxford Classification: The Arts: Painting & paintingsSubject = B.SHERPA Oxford Classification: Geography & History: Geography & travel5550
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo74.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo74.xml new file mode 100644 index 0000000..4312d6c --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo74.xml @@ -0,0 +1,2 @@ + +
00EprintsNottingham ePrintsThe Univ. of Nottingham: ePrintshttp://www.nottingham.ac.uk/is/images/vis-logo.jpgUK-1.166752.96670http://eprints.nottingham.ac.uk/mailto:eprints@eprints.nottingham.ac.ukOAIhttp://eprints.nottingham.ac.uk/perl/oai2oai_dcdpStatus = PublishedStatus = In PressStatus = UnpublishedSchool / Department = Faculty of Science: School of Computer Science and Information TechnologySchool / Department = Faculty of Arts: School of Modern Languages: Department of Modern Cultural StudiesSchool / Department = General: GeneralSchool / Department = Faculty of Medicine and Health Sciences: School of Human DevelopmentSchool / Department = Faculty of Arts: School of Modern Languages: Postgraduate School of Critical Theory and Cultural StudiesSchool / Department = Faculty of Arts: School of Humanities: Department of Art HistorySchool / Department = Faculty of Science: School of Biosciences: Food SciencesSchool / Department = Faculty of Arts: School of Humanities: Department of ClassicsSchool / Department = Faculty of Science: School of Biosciences: Nutritional SciencesSchool / Department = Faculty of Medicine and Health Sciences: School of Human Development: Obstetrics Midwifery and GynaecologySchool / Department = Faculty of Medicine and Health Sciences: School of Clinical Laboratory SciencesSchool / Department = Faculty of Arts: School of Modern Languages: Department of Russian and Slavonic StudiesSchool / Department = Faculty of Engineering: School of Civil Engineering: Engineering, Surveying and Space GeodesySchool / Department = Faculty of Science: School of PsychologySchool / Department = Faculty of Law and Social Sciences: School of the Built EnvironmentSchool / Department = Faculty of Law and Social Sciences: Institute for the Study of Genetics, Biorisks and SocietySchool / Department = Faculty of Arts: School of American and Canadian Studies: Institute of Film StudiesSchool / Department = Faculty of Medicine and Health Sciences: School of Community Health Sciences: Trent Institute for Health Services ResearchSchool / Department = Faculty of Medicine and Health Sciences: School of Clinical Laboratory Sciences: GeneticsSchool / Department = Faculty of Science: School of ChemistrySchool / Department = GeneralSchool / Department = Faculty of Arts: School of Humanities: Department of ArchaeologySchool / Department = Faculty of Arts: School of English StudiesSchool / Department = Faculty of Medicine and Health Sciences: School of NursingSchool / Department = Faculty of Arts: School of Modern Languages: Department of FrenchSchool / Department = Faculty of EngineeringSchool / Department = Faculty of Arts: School of Modern Languages: Department of GermanSchool / Department = Faculty of Law and Social Sciences: School of PoliticsSchool / Department = Faculty of Medicine and Health Sciences: School of Community Health Sciences: Child and Adolescent PsychiatrySchool / Department = Faculty of Arts: School of Humanities: Department of PhilosophySchool / Department = Faculty of Science: School of Chemistry: Department of Organic ChemistrySchool / Department = Faculty of Medicine and Health Sciences: School of Clinical Laboratory Sciences: ImmunologySchool / Department = Faculty of Medicine and Health Sciences: School of Clinical Laboratory Sciences: Clinical ChemistrySchool / Department = Faculty of Law and Social Sciences: Nottingham University Business SchoolSchool / Department = Faculty of Education: School of Continuing EducationSchool / Department = Faculty of Medicine and Health Sciences: School of Medical and Surgical Sciences: AnaesthesiaSchool / Department = Faculty of Medicine and Health Sciences: School of Community Health SciencesSchool / Department = Faculty of Medicine and Health Sciences: School of Clinical Laboratory Sciences: Microbiology and Infectious DiseasesSchool / Department = Faculty of Arts: School of Modern Languages: Department of PortugueseSchool / Department = Faculty of Science: School of Life and Environmental SciencesSchool / Department = General: Information ServicesSchool / Department = Faculty of Arts: School of Modern Languages: Department of Hispanic and Latin American StudiesSchool / Department = Faculty of Arts: School of HistorySchool / Department = Faculty of Law and Social Sciences: Institute of Work, Health and OrganizationSchool / Department = Faculty of Arts: School of Modern LanguagesSchool / Department = Faculty of Medicine and Health Sciences: School of Clinical Laboratory Sciences: Infections and ImmunitySchool / Department = Faculty of Science: School of Biosciences: Animal PhysiologySchool / Department = Faculty of Law and Social Sciences: School of EconomicsSchool / Department = Faculty of Science: School of PharmacySchool / Department = Faculty of Medicine and Health Sciences: School of Medical and Surgical Sciences: Academic RadiologySchool / Department = Faculty of Medicine and Health Sciences: School of Clinical Laboratory Sciences: PathologySchool / Department = Faculty of Engineering: School of Mechanical, Materials and Manufacturing EngineeringSchool / Department = Faculty of Medicine and Health Sciences: School of Biomedical SciencesSchool / Department = Faculty of Medicine and Health Sciences: School of Community Health Sciences: Learning DisabilitiesSchool / Department = Faculty of Law and Social Sciences: School of Sociology and Social PolicySchool / Department = Faculty of Medicine and Health Sciences: School of Community Health Sciences: PhysiotherapySchool / Department = Faculty of Medicine and Health Sciences: School of Medical and Surgical Sciences: MedicineSchool / Department = Faculty of EducationSchool / Department = Faculty of Medicine and Health Sciences: Institute of Hearing ResearchSchool / Department = Faculty of Medicine and Health Sciences: School of Community Health Sciences: General PracticeSchool / Department = Faculty of Science: School of Chemistry: Department of Physical ChemistrySchool / Department = Faculty of Engineering: School of Chemical, Environmental and Mining EngineeringSchool / Department = Faculty of Education: School of EducationSchool / Department = Faculty of Science: School of Mathematical Sciences: Theoretical MechanicsSchool / Department = Faculty of Law and Social SciencesSchool / Department = Faculty of Medicine and Health Sciences: School of Clinical Laboratory Sciences: HaematologySchool / Department = Faculty of Engineering: School of Electrical and Electronic EngineeringSchool / Department = Faculty of Science: School of Biosciences: Agriculture and HorticultureSchool / Department = Faculty of Science: School of Chemistry: Department of Inorganic ChemistrySchool / Department = Faculty of Arts: School of American and Canadian StudiesSchool / Department = Faculty of Science: School of Mathematical Sciences: Mathematical PhysicsSchool / Department = Faculty of Science: School of Physics and AstronomySchool / Department = Faculty of Science: School of Mathematical Sciences: StatisticsSchool / Department = Faculty of Medicine and Health Sciences: School of Medical and Surgical Sciences: Stroke MedicineSchool / Department = Faculty of Medicine and Health Sciences: School of Community Health Sciences: Public Health SciencesSchool / Department = Faculty of Arts: School of Humanities: Department of MusicSchool / Department = Faculty of Science: School of Biosciences: Plant ScienceSchool / Department = Faculty of Arts: School of HumanitiesSchool / Department = Faculty of Science: School of Mathematical Sciences: Pure MathematicsSchool / Department = Faculty of ScienceSchool / Department = Faculty of Medicine and Health Sciences: School of Human Development: Child HealthSchool / Department = Faculty of Engineering: School of Civil EngineeringSchool / Department = Faculty of ArtsSchool / Department = Faculty of Science: School of Mathematical SciencesSchool / Department = Faculty of Medicine and Health Sciences: School of Clinical Laboratory Sciences: Clinical OncologySchool / Department = Faculty of Medicine and Health Sciences: School of Medical and Surgical Sciences: Orthopaedic and Accident SurgerySchool / Department = Faculty of Medicine and Health Sciences: School of Community Health Sciences: PsychiatrySchool / Department = Faculty of Law and Social Sciences: School of GeographySchool / Department = Faculty of Medicine and Health Sciences: School of Community Health Sciences: Rehabilitation and AgeingSchool / Department = Faculty of Medicine and Health SciencesSchool / Department = Faculty of Science: School of BiosciencesSchool / Department = Faculty of Medicine and Health Sciences: School of Clinical Laboratory Sciences: Ophthamology and Visual SciencesSchool / Department = Faculty of Law and Social Sciences: School of LawSchool / Department = Faculty of Medicine and Health Sciences: School of Medical and Surgical Sciences: SurgerySchool / Department = Faculty of Medicine and Health Sciences: School of Medical and Surgical SciencesSchool / Department = Faculty of Arts: School of Humanities: Department of Theology5690
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo75.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo75.xml new file mode 100644 index 0000000..1205982 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo75.xml @@ -0,0 +1,2 @@ + +
00VTOAIUniversitat Autònoma de Barcelona: Tesis Doctorals en Xarxa (TDX)Univ. Autònoma de Barcelona: Theses and Dissertations Online (TDX)http://www.tesisenxarxa.net/images/tdx/titol_transp.gifES2.10003141.5043361http://www.tdx.cesca.es/Universitat Autònoma de Barcelonatdx@cesca.esOAIhttp://www.tdx.cesca.es/TDX_UAB/NDLTD-OAI/oai.ploai_dc20650
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo76.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo76.xml new file mode 100644 index 0000000..a1b4018 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo76.xml @@ -0,0 +1,2 @@ + +
00VTOAIUniversitat de Lleida: Tesis Doctorals en Xarxa (TDX)Univ. of Lleida: Theses and Dissertations Online (TDX)http://www.tesisenxarxa.net/images/tdx/titol_transp.gifES0.61967441.6141991http://www.tdx.cesca.es/Universitat de Lleidatdx@cesca.esOAIhttp://www.tdx.cesca.es/TDX_UdL/NDLTD-OAI/oai.ploai_dc1600
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo77.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo77.xml new file mode 100644 index 0000000..517ee6d --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo77.xml @@ -0,0 +1,2 @@ + +
00Proprietary SoftwareNaturalis Digital Academic RepositoryNaturalis Digital Academic Repositoryhttp://www.repository.naturalis.nl/n/naturalis/graphics/header-top.jpgNL4.47380252.1641941http://www.repository.naturalis.nl/cgi/b/bib/bib-idx?c=naturalis;cc=naturalis;lang=enNaturalis National Natural History Museum Foundationdpcmedewerkers-uba@uva.nlOAIhttp://dare.uva.nl/cgi/arno/oai/naturalisoai_dc10360
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo78.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo78.xml new file mode 100644 index 0000000..27e21a8 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo78.xml @@ -0,0 +1,2 @@ + +
00Proprietary SoftwareWebbased Archive of RIVM PublicationsWebbased Archive of RIVM Publicationshttp://rivm.openrepository.com/rivm/image/header.gifNL5.18861352.1181331http://rivm.openrepository.com/rivm/National Institute for Public Health and the Environmentwichor.bramer@rivm.nlOAIhttp://rivm.openrepository.com/rivm-oai/requestoai_dc22010
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo79.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo79.xml new file mode 100644 index 0000000..1186f60 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo79.xml @@ -0,0 +1,2 @@ + +
00DSpace at ErasmusErasmus Univ. Rotterdam: Digital Repositoryhttps://ep.eur.nl/image/eur_logo.pngNL4.478351.9221https://ep.eur.nl/ruigrokvanderwerven@ubib.eur.nlOAIhttp://ep.eur.nl/oai/requesteur_qdcdare_qdcdare_datanereus_qdcdare_checksumdare_metadatadare_dcoai_dcArticles (EMC)Articles (ESE)Articles (Jan Tinbergen)Articles PhilosophyArticles (published) (FHKW History)Books (EMC)Books (ESE)Books (FHKW Arts)Books (FHKW History)Books (Jan Tinbergen)Books PhilosophyCenter for Informatics and LawCentre for Local DemocracyCentre for Public ManagementCommercial and Entrepreneurial LawDatabase of HappinessDatasets (ESE)Department of InformaticsDepartment of Medical Psychology and Psychotherapy: ReportsDissertations DRIFTDissertations (ESE)Dissertations ESMDissertations (FHKW Arts)Dissertations (FHKW History)Dissertations in Management 1984-1999Dissertations PhilosophyDissertations PsychologyDissertations (Public Administration)Dissertations (School of Law)Dissertations SociologyDissertations (UL)DRIFTEconometric InstituteEconometric Institute: Annual ReportsEconomists OnlineErasmus Center Law and SocietyErasmus MC Annual ReportsErasmus Research Institute of Management (ERIM) : Annual ReportsErasmus University Rotterdam: Annual ReportsERIM Article Series (EAS)ERIM Electronic BooksERIM Inaugural Lectures Research in Management SeriesERIM Ph.D. Series Research in ManagementERIM Report Series Research in ManagementERIM Seminars and WorkshopsESMEUR Medical DissertationsEuropean LawFarewell Lectures (EMC)Farewell Lectures (ESE)Farewell Lectures (FHKW)Farewell Lectures (School of Law)Filosofiedag 2005Handbook of Cultural EconomicsInaugural Lectures: Arts (FHKW)Inaugural Lectures (DRIFT)Inaugural Lectures (EMC)Inaugural Lectures (ESE)Inaugural Lectures (FHKW)Inaugural Lectures (Psychology)Inaugural Lectures (Public Administration)Inaugural Lectures (School of Law)Inaugural Lectures (Sociology)Institute of Medical Technology Assessment (iMTA)Keur der Wetenschap (Cream of Science)NIG Annual Work Conference 2004 RotterdamNIG Annual Work Conference 2005 NijmegenOther publications: FHKWPapers (FHKW History)Papers (published): Arts (FHKW)Papers (unpublished): Arts (FHKW)PH D Series Safety and Security in SocietyPrivate LawPsychologyPublications by R.A. de Mooij (Tinbergen Institute)Public GovernanceReports: Arts (FHKW)Reports: BMGReports Safety and Security in SocietyResearch Centre for Economic Policy (OCFEB)Research Group Complex Decision-making and Management of NetworksResearch Papers PhilosophyRotterdam Institute of Law and EconomicsSEORSEOR (ESE)SociologyStaphylococcus Aureus: ResourcesThe European Metropolis 1920-2000The New Educational Benefits of ICT in Higher EducationTinbergen InstituteUniversity Library: Annual Reportsnull67590
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo8.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo8.xml new file mode 100644 index 0000000..5edeb3e --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo8.xml @@ -0,0 +1,2 @@ + +
DSpace00Arias Montano: Repositorio Institucional de la Universidad de HuelvaArias Montano: Huelva University Institutional Repositoryhttp://validator.driver.research-infrastructures.eu/validatorWeb/getRepositoryImage.do?&repositoryId=10-00acf49a-2759-4426-9e58-57988fdd217e_UGVuZGluZ1JlcG9zaXRvcnlSZXNvdXJjZXMvUmVwb3NpdG9yeVNlcnZpY2VSZXNvdXJjZVR5cGU=ES-6.943213237.25903761.0http://rabida.uhu.es/dspace/http://www.uhu.es/soler@uhu.esOAIhttp://rabida.uhu.es/dspace-oai/requestoai_dcAll sets590.0
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo80.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo80.xml new file mode 100644 index 0000000..c50b987 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo80.xml @@ -0,0 +1,2 @@ + +
00DIVAPublikasjoner fra Norges teknisk-naturvitenskapelige universitetPublications from Norwegian University of Science and Technologyhttp://www.ntnu.no//ntnu_images/logoicon.icoNO10.40226563.4194551http://www.diva-portal.org/ntnu/index.xsql?lang=enNorwegian University of Science and Technologydiva-support@ub.uu.seOAIhttp://www.diva-portal.org/oai/ntnu/OAIoai_dc18390
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo81.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo81.xml new file mode 100644 index 0000000..4bd495a --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo81.xml @@ -0,0 +1,2 @@ + +
00VTOAIUniversitat Pompeu Fabra: Tesis Doctorals en Xarxa (TDX)Univ. Pompeu Fabra: Theses and Dissertations Online (TDX)http://www.tesisenxarxa.net/images/tdx/titol_transp.gifES2.17915241.3789951http://www.tdx.cesca.es/Universitat Pompeu Fabratdx@cesca.esOAIhttp://www.tdx.cesca.es/TDX_UPF/NDLTD-OAI/oai.ploai_dc2030
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo82.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo82.xml new file mode 100644 index 0000000..375e167 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo82.xml @@ -0,0 +1,2 @@ + +
00EprintsGlasgow ePrints ServiceUniv. of Glasgow: ePrints Servicehttp://www.lib.gla.ac.uk/g/crest.gifUK-4.242555.8570http://eprints.gla.ac.uk/mailto:eprints@lib.gla.ac.ukOAIhttp://eprints.gla.ac.uk/perl/oai2oai_dcdpStatus = FALSEStatus = TRUESubject = D History General and Old World: DA Great Britain: DAW Central EuropeSubject = Q Science: QP PhysiologySubject = R Medicine: RC Internal medicine: RC0254 Neoplasms. Tumors. Oncology (including Cancer)Subject = Q Science: QR MicrobiologySubject = M Music and Books on Music: MT Musical instruction and studySubject = J Political Science: JA Political science (General)Subject = R Medicine: R Medicine (General)Subject = N Fine Arts: N Visual arts (General) For photography, see TRSubject = J Political Science: JC Political theorySubject = C Auxiliary Sciences of History: CB History of civilizationSubject = G Geography. Anthropology. Recreation: G Geography (General)Subject = C Auxiliary Sciences of History: CC ArchaeologySubject = C Auxiliary Sciences of History: CD Diplomatics. Archives. SealsSubject = J Political Science: JF Political institutions (General)Subject = C Auxiliary Sciences of History: CE Technical chronology. CalendarSubject = T Technology: T Technology (General): T201 Patents. TrademarksSubject = D History General and Old World: D History (General): D051 Ancient HistorySubject = A General WorksSubject = J Political Science: JK Political institutions (United States)Subject = C Auxiliary Sciences of History: CJ NumismaticsSubject = B Philosophy. Psychology. ReligionSubject = J Political Science: JL Political institutions (America except United States)Subject = C Auxiliary Sciences of HistorySubject = D History General and Old WorldSubject = Z Bibliography. Library Science. Information Resources: Z719 Libraries (General)Subject = J Political Science: JN Political institutions (Europe)Subject = E History AmericaSubject = F History United States, Canada, Latin AmericaSubject = R Medicine: RC Internal medicine: RC0321 Neuroscience. Biological psychiatry. NeuropsychiatrySubject = G Geography. Anthropology. RecreationSubject = C Auxiliary Sciences of History: CN Inscriptions. Epigraphy.Subject = L Education: LB Theory and practice of education: LB2361 CurriculumSubject = H Social SciencesSubject = B Philosophy. Psychology. Religion: BV Practical Theology: BV1460 Religious EducationSubject = P Language and Literature: PN Literature (General): PN0080 CriticismSubject = J Political ScienceSubject = K LawSubject = L EducationSubject = J Political Science: JQ Political institutions AsiaSubject = R Medicine: RA Public aspects of medicineSubject = M Music and Books on MusicSubject = R Medicine: RB PathologySubject = N Fine Arts: NA ArchitectureSubject = N Fine ArtsSubject = J Political Science: JS Local government Municipal governmentSubject = C Auxiliary Sciences of History: CR HeraldrySubject = V Naval Science: V Naval Science (General)Subject = R Medicine: RC Internal medicineSubject = N Fine Arts: NB SculptureSubject = G Geography. Anthropology. Recreation: GA Mathematical geography. CartographySubject = C Auxiliary Sciences of History: CS GenealogySubject = R Medicine: RD SurgerySubject = N Fine Arts: NC Drawing Design IllustrationSubject = G Geography. Anthropology. Recreation: GB Physical geographySubject = C Auxiliary Sciences of History: CT BiographySubject = R Medicine: RE OphthalmologySubject = N Fine Arts: ND PaintingSubject = K Law: K Law (General)Subject = J Political Science: JV Colonies and colonization. Emigration and immigration. International migrationSubject = G Geography. Anthropology. Recreation: GC OceanographySubject = R Medicine: RF OtorhinolaryngologySubject = N Fine Arts: NE Print mediaSubject = D History General and Old World: D History (General)Subject = R Medicine: RG Gynecology and obstetricsSubject = J Political Science: JX International lawSubject = G Geography. Anthropology. Recreation: GE Environmental SciencesSubject = G Geography. Anthropology. Recreation: GF Human ecology. AnthropogeographySubject = D History General and Old World: D History (General): D731 World War IISubject = J Political Science: JN Political institutions (Europe): JN1187 ScotlandSubject = P Language and LiteratureSubject = Q ScienceSubject = J Political Science: JZ International relationsSubject = R Medicine: RJ PediatricsSubject = R MedicineSubject = S AgricultureSubject = R Medicine: RK DentistrySubject = T TechnologySubject = R Medicine: RL DermatologySubject = U Military ScienceSubject = N Fine Arts: NK Decorative arts Applied arts Decoration and ornamentSubject = V Naval ScienceSubject = R Medicine: RM Therapeutics. PharmacologySubject = R Medicine: RA Public aspects of medicine: RA1001 Forensic Medicine. Medical jurisprudence. Legal medicineSubject = G Geography. Anthropology. Recreation: GN AnthropologySubject = Z Bibliography. Library Science. Information ResourcesSubject = S Agriculture: SF Animal culture: SF600 Veterinary MedicineSubject = R Medicine: RS Pharmacy and materia medicaSubject = R Medicine: RT NursingSubject = G Geography. Anthropology. Recreation: GR FolkloreSubject = S Agriculture: S Agriculture (General)Subject = R Medicine: RV Botanic, Thomsonian, and eclectic medicineSubject = G Geography. Anthropology. Recreation: GT Manners and customsSubject = D History General and Old World: DA Great BritainSubject = D History General and Old World: DB AustriaSubject = R Medicine: RX HomeopathySubject = K Law: KD England and WalesSubject = H Social Sciences: H Social Sciences (General)Subject = G Geography. Anthropology. Recreation: GV Recreation LeisureSubject = D History General and Old World: DC FranceSubject = N Fine Arts: NX Arts in generalSubject = D History General and Old World: DD GermanySubject = Q Science: QH Natural history: QH301 BiologySubject = K Law: KF United States Federal LawSubject = F History United States, Canada, Latin America: F1201 Latin America (General)Subject = D History General and Old World: DE The Mediterranean Region. The Greco-Roman WorldSubject = D History General and Old World: DF GreeceSubject = D History General and Old World: DG ItalySubject = P Language and Literature: PN Literature (General): PN2000 Dramatic representation. The TheaterSubject = D History General and Old World: DH Netherlands (The Low Countries)Subject = R Medicine: RZ Other systems of medicineSubject = R Medicine: RJ Pediatrics: RJ101 Child Health. Child health servicesSubject = H Social Sciences: HD Industries. Land use. Labor: HD28 Management. Industrial ManagementSubject = D History General and Old World: DJ Netherlands (Holland)Subject = V Naval Science: VM Naval architecture. Shipbuilding. Marine engineeringSubject = D History General and Old World: DK Russia. Soviet Union. Former Soviet RepublicsSubject = D History General and Old World: DL Northern Europe. ScandinaviaSubject = Q Science: QH Natural history: QH426 GeneticsSubject = D History General and Old World: D History (General): D880 Developing CountriesSubject = Z Bibliography. Library Science. Information Resources: ZA Information resourcesSubject = D History General and Old World: DP SpainSubject = L Education: LC Special aspects of education: LC5201 Education extension. Adult education. Continuing educationSubject = S Agriculture: SB Plant cultureSubject = R Medicine: RA Public aspects of medicine: RA0421 Public health. Hygiene. Preventive MedicineSubject = D History General and Old World: DR Balkan PeninsulaSubject = H Social Sciences: HA StatisticsSubject = D History General and Old World: DS AsiaSubject = S Agriculture: SD ForestrySubject = P Language and Literature: P Philology. LinguisticsSubject = H Social Sciences: HB Economic TheorySubject = D History General and Old World: DT AfricaSubject = L Education: L Education (General)Subject = H Social Sciences: HC Economic History and ConditionsSubject = D History General and Old World: DU Oceania (South Seas)Subject = S Agriculture: SF Animal cultureSubject = H Social Sciences: HD Industries. Land use. LaborSubject = A General Works: AC Collections. Series. Collected worksSubject = H Social Sciences: HE Transportation and CommunicationsSubject = S Agriculture: SH Aquaculture. Fisheries. AnglingSubject = H Social Sciences: HF CommerceSubject = H Social Sciences: HG FinanceSubject = A General Works: AI Indexes (General)Subject = D History General and Old World: D History (General): D501 World War ISubject = D History General and Old World: D History (General): D839 Post-war History, 1945 onSubject = K Law: KZ Law of NationsSubject = S Agriculture: SK Hunting sportsSubject = Q Science: QR Microbiology: QR180 ImmunologySubject = H Social Sciences: HJ Public FinanceSubject = H Social Sciences: HM SociologySubject = A General Works: AM Museums (General). Collectors and collecting (General)Subject = H Social Sciences: HN Social history and conditions. Social problems. Social reformSubject = D History General and Old World: D History (General): D901 Europe (General)Subject = D History General and Old World: DJ Netherlands (Holland): DJK Eastern EuropeSubject = Z Bibliography. Library Science. Information Resources: ZA Information resources: ZA4050 Electronic information resourcesSubject = H Social Sciences: HQ The family. Marriage. WomanSubject = P Language and Literature: PA Classical philologySubject = P Language and Literature: PN Literature (General): PN1990 BroadcastingSubject = P Language and Literature: PB Modern European LanguagesSubject = L Education: LA History of educationSubject = J Political Science: JN Political institutions (Europe): JN101 Great BritainSubject = H Social Sciences: HS Societies secret benevolent etcSubject = T Technology: T Technology (General)Subject = P Language and Literature: PC Romance languagesSubject = L Education: LB Theory and practice of educationSubject = H Social Sciences: HT Communities. Classes. RacesSubject = A General Works: AS Academies and learned societies (General)Subject = P Language and Literature: PD Germanic languagesSubject = L Education: LC Special aspects of educationSubject = P Language and Literature: PN Literature (General): PN1993 Motion PicturesSubject = P Language and Literature: PE EnglishSubject = L Education: LD Individual institutions (United States)Subject = H Social Sciences: HV Social pathology. Social and public welfareSubject = P Language and Literature: PF West GermanicSubject = L Education: LE Individual institutions (America except United States)Subject = B Philosophy. Psychology. Religion: B Philosophy (General)Subject = P Language and Literature: PG Slavic, Baltic, Albanian languages and literatureSubject = L Education: LF Individual institutions (Europe)Subject = H Social Sciences: HX Socialism. Communism. AnarchismSubject = P Language and Literature: PH Finno-Ugrian, Basque languages and literaturesSubject = L Education: LG Individual institutions (Asia. Africa)Subject = P Language and Literature: PI Oriental languages and literaturesSubject = P Language and Literature: PJ SemiticSubject = A General Works: AZ History of Scholarship The HumanitiesSubject = P Language and Literature: PK Indo-IranianSubject = P Language and Literature: PL Languages and literatures of Eastern Asia, Africa, OceaniaSubject = Z Bibliography. Library Science. Information Resources: ZA Information resources: ZA4450 DatabasesSubject = P Language and Literature: PN Literature (General): PN0441 Literary HistorySubject = P Language and Literature: PM Hyperborean, Indian, and Artificial languagesSubject = P Language and Literature: PN Literature (General)Subject = L Education: LB Theory and practice of education: LB1501 Primary EducationSubject = H Social Sciences: HF Commerce: HF5601 AccountingSubject = D History General and Old World: D History (General): D204 Modern HistorySubject = P Language and Literature: PB Modern European Languages: PB1501 Gaelic (Scottish Gaelic, Erse)Subject = R Medicine: RC Internal medicine: RC1200 Sports MedicineSubject = P Language and Literature: PQ Romance literaturesSubject = P Language and Literature: PR English literatureSubject = T Technology: TA Engineering (General). Civil engineering (General)Subject = P Language and Literature: PS American literatureSubject = P Language and Literature: PT Germanic literatureSubject = T Technology: TC Hydraulic engineering. Ocean engineeringSubject = L Education: LT TextbooksSubject = T Technology: TD Environmental technology. Sanitary engineeringSubject = Q Science: Q Science (General)Subject = T Technology: TE Highway engineering. Roads and pavementsSubject = M Music and Books on Music: M MusicSubject = E History America: E151 United States (General)Subject = Z Bibliography. Library Science. Information Resources: Z665 Library Science. Information ScienceSubject = T Technology: TF Railroad engineering and operationSubject = B Philosophy. Psychology. Religion: BC LogicSubject = T Technology: TG Bridge engineeringSubject = B Philosophy. Psychology. Religion: BD Speculative PhilosophySubject = T Technology: TH Building constructionSubject = B Philosophy. Psychology. Religion: BF PsychologySubject = B Philosophy. Psychology. Religion: BH AestheticsSubject = D History General and Old World: D History (General): D890 Eastern HemisphereSubject = P Language and Literature: PZ Childrens literatureSubject = L Education: LB Theory and practice of education: LB2300 Higher EducationSubject = F History United States, Canada, Latin America: F1001 Canada (General)Subject = T Technology: TJ Mechanical engineering and machinerySubject = T Technology: TK Electrical engineering. Electronics Nuclear engineeringSubject = D History General and Old World: D History (General): D111 Medieval HistorySubject = Z Bibliography. Library Science. Information Resources: Z004 Books. Writing. PaleographySubject = T Technology: TL Motor vehicles. Aeronautics. AstronauticsSubject = B Philosophy. Psychology. Religion: BJ EthicsSubject = T Technology: TN Mining engineering. MetallurgySubject = B Philosophy. Psychology. Religion: BL ReligionSubject = E History America: E11 America (General)Subject = B Philosophy. Psychology. Religion: BM JudaismSubject = T Technology: TP Chemical technologySubject = F History United States, Canada, Latin America: F001 United States local historySubject = T Technology: TR PhotographySubject = T Technology: TS ManufacturesSubject = K Law: KD England and Wales: KDC ScotlandSubject = B Philosophy. Psychology. Religion: BP Islam. Bahaism. Theosophy, etcSubject = T Technology: TT Handicrafts Arts and craftsSubject = Q Science: QA MathematicsSubject = B Philosophy. Psychology. Religion: BQ BuddhismSubject = Q Science: QB AstronomySubject = B Philosophy. Psychology. Religion: BR ChristianitySubject = U Military Science: U Military Science (General)Subject = Q Science: QC PhysicsSubject = B Philosophy. Psychology. Religion: BS The BibleSubject = Q Science: QD ChemistrySubject = H Social Sciences: HD Industries. Land use. Labor: HD61 Risk ManagementSubject = B Philosophy. Psychology. Religion: BT Doctrinal TheologySubject = T Technology: TX Home economicsSubject = Q Science: QH Natural history: QH345 BiochemistrySubject = Q Science: QE GeologySubject = J Political Science: J General legislative and executive papersSubject = C Auxiliary Sciences of History: C Auxiliary sciences of history (General)Subject = B Philosophy. Psychology. Religion: BV Practical TheologySubject = Q Science: QH Natural historySubject = B Philosophy. Psychology. Religion: BX Christian DenominationsSubject = Q Science: QR Microbiology: QR355 VirologySubject = Q Science: QK BotanySubject = C Auxiliary Sciences of History: CD Diplomatics. Archives. Seals: CD921 ArchivesSubject = Q Science: QL ZoologySubject = Q Science: QM Human anatomySubject = Q Science: QA Mathematics: QA75 Electronic computers. Computer scienceSubject = M Music and Books on Music: ML Literature of musicSubject = Q Science: QA Mathematics: QA76 Computer softwareSubject = L Education: LB Theory and practice of education: LB1603 Secondary Education. High schools40950
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo83.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo83.xml new file mode 100644 index 0000000..7597dd5 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo83.xml @@ -0,0 +1,2 @@ + +
00EigenentwicklungUniversity of Ulm, GERMANY, VTS Publication ServiceUniv. Ulm: Volltextserverhttp://vts.uni-ulm.de/standards/logo_vts.jpgDE1048.41http://vts.uni-ulm.de/index.htmlvts@kiz.uni-ulm.deOAIhttp://vts.uni-ulm.de/oai/oai.aspoai_dcepicurxmetadissplusDDC classified objectsComputer science, information & general worksData processing & computer scienceBibliographyLibrary & information sciencesGeneral encyclopedic worksGeneral serial publicationsPhilosophyPsychologySocial sciencesGeneral statisticsPolitical scienceEconomicsLawPublic administration & military scienceEducationNatural sciences & mathematicsMathematicsPhysicsChemistry & allied sciencesLife sciencesBotanical sciencesTechnology (Applied sciences)Medicine & healthEngineering & allied operationsObjects having a formal document typeAudio filesBinary data, (executable) programsDataImagesMultimedia filesNotesTextVideo filesObjects having a formal publication typeJournal ArticlesConference ProceedingsDissertations and Professional DissertationsLecturesDiploma ThesesBooks, MonographsMusicNewsPapersPlaysPrograms / SoftwareReportsStandardsObjects having a formal stateDraftNot reviewedReviewed13360
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo84.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo84.xml new file mode 100644 index 0000000..c4961a8 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo84.xml @@ -0,0 +1,2 @@ + +
00EprintsDoktori disszertációkPh.D. dissertationshttp://phd.lib.uni-corvinus.hu/images/logo.jpgHU19.052347.49741http://phd.lib.uni-corvinus.huCorvinus University Budapestwebmester-lib@uni-corvinus.huOAIhttp://phd.lib.uni-corvinus.hu/perl/oai2oai_dc2980
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo85.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo85.xml new file mode 100644 index 0000000..c33e564 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo85.xml @@ -0,0 +1,2 @@ + +
00DSpaceDebreceni Egyetem elektronikus Archivumanak (DEA)Debreceni Egyetem elektronikus Archivumanak (DEA)http://ganymedes.lib.unideb.hu:8080/dea/image/fejlec_eleje.pngHU21.6747.581http://dspace.lib.unideb.hu:8080/dspace/University of DebrecenxxxOAIhttp://ganymedes.lib.unideb.hu:8080/oai/requestoai_dc320350
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo86.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo86.xml new file mode 100644 index 0000000..ede88ae --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo86.xml @@ -0,0 +1,2 @@ + +
00DSpaceE-ArchivoE-Archivohttp://e-archivo.uc3m.es/dspace/image/logouc3m.gifES-3.7664040.3335781http://e-archivo.uc3m.es/dspace/Univ. Carlos III de Madride-archivo@listserv.uc3m.esOAIhttp://servmadrono.cs.urjc.es:8010/arcFuturo/servlet/OAIDPuc3moai_dc25380
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo87.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo87.xml new file mode 100644 index 0000000..fb64e48 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo87.xml @@ -0,0 +1,2 @@ + +
00EprintsThe Univ. of Birmingham: The ePrints ArchiveThe Univ. of Birmingham: ePrints Archivehttp://www.eprints.bham.ac.uk/globalssi/images/university-crest-subpage.gifUK-1.916752.46670http://eprints.bham.ac.uk/mailto:eprints-admin@redhat3.bham.ac.ukOAIhttp://eprints.bham.ac.uk/cgi/oai2oai_dcStatus = SubmittedStatus = PublishedStatus = In PressStatus = UnpublishedSubject = D History General and Old World: DA Great Britain: DAW Central EuropeSubject = Q Science: QP PhysiologySubject = R Medicine: RC Internal medicine: RC0254 Neoplasms. Tumors. Oncology (including Cancer)Subject = Q Science: QR MicrobiologySubject = M Music and Books on Music: MT Musical instruction and studySubject = J Political Science: JA Political science (General)Subject = R Medicine: R Medicine (General)Subject = N Fine Arts: N Visual arts (General) For photography, see TRSubject = J Political Science: JC Political theorySubject = C Auxiliary Sciences of History: CB History of civilizationSubject = G Geography. Anthropology. Recreation: G Geography (General)Subject = C Auxiliary Sciences of History: CC ArchaeologySubject = C Auxiliary Sciences of History: CD Diplomatics. Archives. SealsSubject = J Political Science: JF Political institutions (General)Subject = C Auxiliary Sciences of History: CE Technical chronology. CalendarSubject = T Technology: T Technology (General): T201 Patents. TrademarksSubject = D History General and Old World: D History (General): D051 Ancient HistorySubject = A General WorksSubject = J Political Science: JK Political institutions (United States)Subject = C Auxiliary Sciences of History: CJ NumismaticsSubject = B Philosophy. Psychology. ReligionSubject = J Political Science: JL Political institutions (America except United States)Subject = C Auxiliary Sciences of HistorySubject = D History General and Old WorldSubject = Z Bibliography. Library Science. Information Resources: Z719 Libraries (General)Subject = J Political Science: JN Political institutions (Europe)Subject = E History AmericaSubject = F History United States, Canada, Latin AmericaSubject = R Medicine: RC Internal medicine: RC0321 Neuroscience. Biological psychiatry. NeuropsychiatrySubject = G Geography. Anthropology. RecreationSubject = C Auxiliary Sciences of History: CN Inscriptions. Epigraphy.Subject = L Education: LB Theory and practice of education: LB2361 CurriculumSubject = H Social SciencesSubject = B Philosophy. Psychology. Religion: BV Practical Theology: BV1460 Religious EducationSubject = P Language and Literature: PN Literature (General): PN0080 CriticismSubject = J Political ScienceSubject = K LawSubject = L EducationSubject = J Political Science: JQ Political institutions AsiaSubject = R Medicine: RA Public aspects of medicineSubject = M Music and Books on MusicSubject = R Medicine: RB PathologySubject = N Fine Arts: NA ArchitectureSubject = N Fine ArtsSubject = J Political Science: JS Local government Municipal governmentSubject = C Auxiliary Sciences of History: CR HeraldrySubject = V Naval Science: V Naval Science (General)Subject = R Medicine: RC Internal medicineSubject = N Fine Arts: NB SculptureSubject = G Geography. Anthropology. Recreation: GA Mathematical geography. CartographySubject = C Auxiliary Sciences of History: CS GenealogySubject = R Medicine: RD SurgerySubject = N Fine Arts: NC Drawing Design IllustrationSubject = G Geography. Anthropology. Recreation: GB Physical geographySubject = C Auxiliary Sciences of History: CT BiographySubject = R Medicine: RE OphthalmologySubject = N Fine Arts: ND PaintingSubject = K Law: K Law (General)Subject = J Political Science: JV Colonies and colonization. Emigration and immigration. International migrationSubject = G Geography. Anthropology. Recreation: GC OceanographySubject = R Medicine: RF OtorhinolaryngologySubject = N Fine Arts: NE Print mediaSubject = D History General and Old World: D History (General)Subject = R Medicine: RG Gynecology and obstetricsSubject = J Political Science: JX International lawSubject = G Geography. Anthropology. Recreation: GE Environmental SciencesSubject = G Geography. Anthropology. Recreation: GF Human ecology. AnthropogeographySubject = D History General and Old World: D History (General): D731 World War IISubject = J Political Science: JN Political institutions (Europe): JN1187 ScotlandSubject = P Language and LiteratureSubject = Q ScienceSubject = J Political Science: JZ International relationsSubject = R Medicine: RJ PediatricsSubject = R MedicineSubject = S AgricultureSubject = R Medicine: RK DentistrySubject = T TechnologySubject = R Medicine: RL DermatologySubject = U Military ScienceSubject = N Fine Arts: NK Decorative arts Applied arts Decoration and ornamentSubject = V Naval ScienceSubject = R Medicine: RM Therapeutics. PharmacologySubject = R Medicine: RA Public aspects of medicine: RA1001 Forensic Medicine. Medical jurisprudence. Legal medicineSubject = G Geography. Anthropology. Recreation: GN AnthropologySubject = Z Bibliography. Library Science. Information ResourcesSubject = R Medicine: RS Pharmacy and materia medicaSubject = R Medicine: RT NursingSubject = G Geography. Anthropology. Recreation: GR FolkloreSubject = S Agriculture: S Agriculture (General)Subject = R Medicine: RV Botanic, Thomsonian, and eclectic medicineSubject = G Geography. Anthropology. Recreation: GT Manners and customsSubject = D History General and Old World: DA Great BritainSubject = D History General and Old World: DB AustriaSubject = R Medicine: RX HomeopathySubject = K Law: KD England and WalesSubject = H Social Sciences: H Social Sciences (General)Subject = G Geography. Anthropology. Recreation: GV Recreation LeisureSubject = D History General and Old World: DC FranceSubject = N Fine Arts: NX Arts in generalSubject = D History General and Old World: DD GermanySubject = Q Science: QH Natural history: QH301 BiologySubject = K Law: KF United States Federal LawSubject = F History United States, Canada, Latin America: F1201 Latin America (General)Subject = D History General and Old World: DE The Mediterranean Region. The Greco-Roman WorldSubject = D History General and Old World: DF GreeceSubject = D History General and Old World: DG ItalySubject = P Language and Literature: PN Literature (General): PN2000 Dramatic representation. The TheaterSubject = D History General and Old World: DH Netherlands (The Low Countries)Subject = R Medicine: RZ Other systems of medicineSubject = R Medicine: RJ Pediatrics: RJ101 Child Health. Child health servicesSubject = H Social Sciences: HD Industries. Land use. Labor: HD28 Management. Industrial ManagementSubject = D History General and Old World: DJ Netherlands (Holland)Subject = V Naval Science: VM Naval architecture. Shipbuilding. Marine engineeringSubject = D History General and Old World: DK Russia. Soviet Union. Former Soviet RepublicsSubject = D History General and Old World: DL Northern Europe. ScandinaviaSubject = Q Science: QH Natural history: QH426 GeneticsSubject = D History General and Old World: D History (General): D880 Developing CountriesSubject = Z Bibliography. Library Science. Information Resources: ZA Information resourcesSubject = D History General and Old World: DP SpainSubject = L Education: LC Special aspects of education: LC5201 Education extension. Adult education. Continuing educationSubject = S Agriculture: SB Plant cultureSubject = R Medicine: RA Public aspects of medicine: RA0421 Public health. Hygiene. Preventive MedicineSubject = D History General and Old World: DR Balkan PeninsulaSubject = H Social Sciences: HA StatisticsSubject = D History General and Old World: DS AsiaSubject = S Agriculture: SD ForestrySubject = P Language and Literature: P Philology. LinguisticsSubject = H Social Sciences: HB Economic TheorySubject = D History General and Old World: DT AfricaSubject = L Education: L Education (General)Subject = H Social Sciences: HC Economic History and ConditionsSubject = D History General and Old World: DU Oceania (South Seas)Subject = S Agriculture: SF Animal cultureSubject = H Social Sciences: HD Industries. Land use. LaborSubject = A General Works: AC Collections. Series. Collected worksSubject = H Social Sciences: HE Transportation and CommunicationsSubject = S Agriculture: SH Aquaculture. Fisheries. AnglingSubject = H Social Sciences: HF CommerceSubject = H Social Sciences: HG FinanceSubject = A General Works: AI Indexes (General)Subject = D History General and Old World: D History (General): D501 World War ISubject = D History General and Old World: D History (General): D839 Post-war History, 1945 onSubject = K Law: KZ Law of NationsSubject = S Agriculture: SK Hunting sportsSubject = Q Science: QR Microbiology: QR180 ImmunologySubject = H Social Sciences: HJ Public FinanceSubject = H Social Sciences: HM SociologySubject = A General Works: AM Museums (General). Collectors and collecting (General)Subject = H Social Sciences: HN Social history and conditions. Social problems. Social reformSubject = D History General and Old World: D History (General): D901 Europe (General)Subject = D History General and Old World: DJ Netherlands (Holland): DJK Eastern EuropeSubject = Z Bibliography. Library Science. Information Resources: ZA Information resources: ZA4050 Electronic information resourcesSubject = H Social Sciences: HQ The family. Marriage. WomanSubject = P Language and Literature: PA Classical philologySubject = P Language and Literature: PN Literature (General): PN1990 BroadcastingSubject = P Language and Literature: PB Modern European LanguagesSubject = L Education: LA History of educationSubject = J Political Science: JN Political institutions (Europe): JN101 Great BritainSubject = H Social Sciences: HS Societies secret benevolent etcSubject = T Technology: T Technology (General)Subject = P Language and Literature: PC Romance languagesSubject = L Education: LB Theory and practice of educationSubject = H Social Sciences: HT Communities. Classes. RacesSubject = A General Works: AS Academies and learned societies (General)Subject = P Language and Literature: PD Germanic languagesSubject = L Education: LC Special aspects of educationSubject = P Language and Literature: PN Literature (General): PN1993 Motion PicturesSubject = P Language and Literature: PE EnglishSubject = L Education: LD Individual institutions (United States)Subject = H Social Sciences: HV Social pathology. Social and public welfareSubject = P Language and Literature: PF West GermanicSubject = L Education: LE Individual institutions (America except United States)Subject = B Philosophy. Psychology. Religion: B Philosophy (General)Subject = P Language and Literature: PG Slavic, Baltic, Albanian languages and literatureSubject = L Education: LF Individual institutions (Europe)Subject = H Social Sciences: HX Socialism. Communism. AnarchismSubject = P Language and Literature: PH Finno-Ugrian, Basque languages and literaturesSubject = L Education: LG Individual institutions (Asia. Africa)Subject = P Language and Literature: PI Oriental languages and literaturesSubject = P Language and Literature: PJ SemiticSubject = A General Works: AZ History of Scholarship The HumanitiesSubject = P Language and Literature: PK Indo-IranianSubject = P Language and Literature: PL Languages and literatures of Eastern Asia, Africa, OceaniaSubject = Z Bibliography. Library Science. Information Resources: ZA Information resources: ZA4450 DatabasesSubject = P Language and Literature: PN Literature (General): PN0441 Literary HistorySubject = P Language and Literature: PM Hyperborean, Indian, and Artificial languagesSubject = P Language and Literature: PN Literature (General)Subject = L Education: LB Theory and practice of education: LB1501 Primary EducationSubject = H Social Sciences: HF Commerce: HF5601 AccountingSubject = D History General and Old World: D History (General): D204 Modern HistorySubject = P Language and Literature: PB Modern European Languages: PB1501 Gaelic (Scottish Gaelic, Erse)Subject = R Medicine: RC Internal medicine: RC1200 Sports MedicineSubject = P Language and Literature: PQ Romance literaturesSubject = P Language and Literature: PR English literatureSubject = T Technology: TA Engineering (General). Civil engineering (General)Subject = P Language and Literature: PS American literatureSubject = P Language and Literature: PT Germanic literatureSubject = T Technology: TC Hydraulic engineering. Ocean engineeringSubject = L Education: LT TextbooksSubject = T Technology: TD Environmental technology. Sanitary engineeringSubject = Q Science: Q Science (General)Subject = T Technology: TE Highway engineering. Roads and pavementsSubject = M Music and Books on Music: M MusicSubject = E History America: E151 United States (General)Subject = Z Bibliography. Library Science. Information Resources: Z665 Library Science. Information ScienceSubject = T Technology: TF Railroad engineering and operationSubject = B Philosophy. Psychology. Religion: BC LogicSubject = T Technology: TG Bridge engineeringSubject = B Philosophy. Psychology. Religion: BD Speculative PhilosophySubject = T Technology: TH Building constructionSubject = B Philosophy. Psychology. Religion: BF PsychologySubject = B Philosophy. Psychology. Religion: BH AestheticsSubject = D History General and Old World: D History (General): D890 Eastern HemisphereSubject = P Language and Literature: PZ Childrens literatureSubject = L Education: LB Theory and practice of education: LB2300 Higher EducationSubject = F History United States, Canada, Latin America: F1001 Canada (General)Subject = T Technology: TJ Mechanical engineering and machinerySubject = T Technology: TK Electrical engineering. Electronics Nuclear engineeringSubject = D History General and Old World: D History (General): D111 Medieval HistorySubject = Z Bibliography. Library Science. Information Resources: Z004 Books. Writing. PaleographySubject = T Technology: TL Motor vehicles. Aeronautics. AstronauticsSubject = B Philosophy. Psychology. Religion: BJ EthicsSubject = T Technology: TN Mining engineering. MetallurgySubject = B Philosophy. Psychology. Religion: BL ReligionSubject = E History America: E11 America (General)Subject = B Philosophy. Psychology. Religion: BM JudaismSubject = T Technology: TP Chemical technologySubject = F History United States, Canada, Latin America: F001 United States local historySubject = T Technology: TR PhotographySubject = T Technology: TS ManufacturesSubject = K Law: KD England and Wales: KDC ScotlandSubject = B Philosophy. Psychology. Religion: BP Islam. Bahaism. Theosophy, etcSubject = T Technology: TT Handicrafts Arts and craftsSubject = Q Science: QA MathematicsSubject = B Philosophy. Psychology. Religion: BQ BuddhismSubject = Q Science: QB AstronomySubject = B Philosophy. Psychology. Religion: BR ChristianitySubject = U Military Science: U Military Science (General)Subject = Q Science: QC PhysicsSubject = B Philosophy. Psychology. Religion: BS The BibleSubject = Q Science: QD ChemistrySubject = H Social Sciences: HD Industries. Land use. Labor: HD61 Risk ManagementSubject = B Philosophy. Psychology. Religion: BT Doctrinal TheologySubject = T Technology: TX Home economicsSubject = Q Science: QE GeologySubject = J Political Science: J General legislative and executive papersSubject = C Auxiliary Sciences of History: C Auxiliary sciences of history (General)Subject = B Philosophy. Psychology. Religion: BV Practical TheologySubject = Q Science: QH Natural historySubject = B Philosophy. Psychology. Religion: BX Christian DenominationsSubject = Q Science: QR Microbiology: QR355 VirologySubject = Q Science: QK BotanySubject = C Auxiliary Sciences of History: CD Diplomatics. Archives. Seals: CD921 ArchivesSubject = Q Science: QL ZoologySubject = Q Science: QM Human anatomySubject = Q Science: QA Mathematics: QA75 Electronic computers. Computer scienceSubject = M Music and Books on Music: ML Literature of musicSubject = Q Science: QA Mathematics: QA76 Computer softwareSubject = L Education: LB Theory and practice of education: LB1603 Secondary Education. High schools690
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo88.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo88.xml new file mode 100644 index 0000000..58c50d0 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo88.xml @@ -0,0 +1,2 @@ + +
00EprintsNUI Maynooth ePrints and eTheses ArchiveNUI Maynooth ePrints and eTheses Archivehttp://eprints.nuim.ie/images/nuilogo.gifIE-6.50653.3860http://eprints.may.ie/National University of Irelands.redmondmaloco@nuim.ieOAIhttp://eprints.nuim.ie/cgi/oai2oai_dc8790
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo89.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo89.xml new file mode 100644 index 0000000..38ad489 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo89.xml @@ -0,0 +1,2 @@ + +
00VTOAIxerxesxerxeshttp://theses.lub.lu.se/undergrad/images/xerxes.jpg.svSE13.19655.7121http://theses.lub.lu.se/undergrad/Lund Universitydissertations@lub.lu.seOAIhttp://theses.lub.lu.se/oai-service/xerxes/oai_dc77410
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo9.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo9.xml new file mode 100644 index 0000000..e375abb --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo9.xml @@ -0,0 +1,2 @@ + +
00OpusArchiMeD - Elektronische Publikationen der Universität MainzMainz Univ., ArchiMedhttp://archimed.uni-mainz.de/opusubm/grafiken/kopf_schriftzug.gifDE8.2750.00061http://archimed.uni-mainz.de/opusubm/archimed-home.htmlmailto:seiler@hbz-nrw.deOAIhttp://ubm.opus.hbz-nrw.de/phpoai/oai2.phpoai_dcepicurGeneralities, ScienceData processing Computer scienceBibliographyLibrary and information sciencesGeneral encyclopedic worksGeneral serials and their indexesGeneral organization and museologyNews media, journalism, publishingGeneral collectionsManuscripts and rare booksPhilosophyParanormal phenomenaPsychologyReligionBibleChristian theologyOther and comparative religionsSocial sciencesGeneral statisticsPolitical scienceEconomicsLawPublic administrationMilitary science"Social services; association"EducationCommerce, communications, transportCustoms, etiquette, folkloreLanguage, LinguisticsEnglishGermanicOther Germanic languagesRomance languages FrenchItalian, Romanian, Rhaeto-RomanticSpanish and Portugese languagesItalic LatinHellenic languages Classical GreekOther languagesNatural sciences and mathematicsMathematicsAstronomy and allied sciencesPhysicsChemistry and allied sciencesEarth sciencesPaleontology PaleozoologyLife sciencesBotanical sciencesZoological sciencesTechnology (Applied sciences)Medical sciences MedicineEngineering and allied operationsAgricultureHome economics and family livingManagement and auxiliary servicesChemical engineeringManufacturingBuildingsThe artsCivic and landscape artArchitecturePlastic arts SculptureDrawing and decorative artsComics, CartoonsPainting and paintingsGraphic arts Printmaking and printsPhotography and photographsMusicRecreational and performing artsPublic performancesStage presentationsIndoor games and amusementsAthletic and outdoor sports and gamesLiterature and rhetoricAmerican literature in EnglishEnglish and Old English literaturesLiteratures of Germanic languagesOther Germanic literaturesLiteratures of Romance languagesItalian, Romanian, Rhaeto-Romanic literaturesSpanish and Portuguese literaturesItalic literatures LatinHellenic literatures Classical GreekLiteratures of other languagesGeography and historyGeography and travelGeography and travel GermanyBiography, genealogy, insigniaHistory of ancient worldGeneral history of EuropeGeneral history of Europe Central Europe GermanyGeneral history of Asia Far EastGeneral history of AfricaGeneral history of North AmericaGeneral history of South AmericaGeneral history of other areasText.Thesis.DoctoralText.Thesis.HabilitationMastersThesisDiplomaThesisMagisterThesisMsc13710
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo90.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo90.xml new file mode 100644 index 0000000..73f603d --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo90.xml @@ -0,0 +1,2 @@ + +
00PUMANational Research Council Genova - IENI RepositoryNational Research Council Genova - IENI Repositoryhttp://www.ieni.cnr.it/images/header1.pngIT8.90049244.4087151http://metabsrv.isti.cnr.it:8080/test_metaopac/servlet/Isis?Conf=/export/home/metaopac/mpisa/ienige_geConf/cnr_ienige-pub-list.sys.file_x_xIstituto per l'Energetica e le Interfasi - CNR Genovagiuseppe.romano@isti.cnr.itOAIhttp://leonardo.isti.cnr.it/oai_cnrpubdriveroai_dc880
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo91.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo91.xml new file mode 100644 index 0000000..84926b3 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo91.xml @@ -0,0 +1,2 @@ + +
00EigenentwicklungUniv. Duesseldorf: Duesseldorfer Dokumenten- und PublikationsserverHeinrich-Heine-University Duesseldorf, Germany, Online Publicationshttp://docserv.uni-duesseldorf.de/d/images/hhu_02.gifDE6.79751.1901http://docserv.uni-duesseldorf.de/Universitaet Duesseldorfdocserv@ub.uni-duesseldorf.deOAIhttp://docserv.uni-duesseldorf.de/servlets/OAIDataProvideroai_dc23250
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo92.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo92.xml new file mode 100644 index 0000000..484bed3 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo92.xml @@ -0,0 +1,2 @@ + +
00OPUSSavifaDok Publikationsplattform fuer die SozialwissenschaftenSavifaDok Digital Repository South Asian Studieshttp://archiv.ub.uni-heidelberg.de/savifadok/Icons/savifadokpublikation.gifDE8.70799949.4099221http://archiv.ub.uni-heidelberg.de/savifadok/?la=enUniversität Heidelbergmerkel@sai.uni-heidelberg.deOAIhttp://archiv.ub.uni-heidelberg.de/savifadok/oai2/oai2.phpoai_dc1870
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo93.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo93.xml new file mode 100644 index 0000000..58ff533 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo93.xml @@ -0,0 +1,2 @@ + +
00EprintsUCL EprintsUniv. College London: UCL Eprintshttp://www.ucl.ac.uk/Library/Images/ucl0013.gifUK-0.10551.5170http://eprints.ucl.ac.uk/mailto:lib-eprints@ucl.ac.ukOAIhttp://eprints.ucl.ac.uk/perl/oai2oai_dcdpType = ThesisType = BookType = Book sectionType = PatentType = Conference, workshop or other eventType = MonographType = ArticleThesis type = MastersThesis type = Doctoral.PhDThesis type = Masters.MScThesis type = Doctoral.EngDThesis type = Masters.MAThesis type = Masters.MPhilStatus = In pressStatus = SubmittedStatus = PublishedStatus = UnpublishedUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Mathematics and Physical Sciences: Department of MathematicsUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Division of Infection and Immunity: Department of Infection: Centre for Paediatric Infectious Diseases and MicrobiologyUCL Departments and Research Centres = UCL Departments and Research Centres: Interdepartmental and Cross-faculty Research Groups and Centres: Institute of Behavioural NeuroscienceUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Life Sciences: Department of Psychology: Sub-department of Clinical Health Psychology: CORE - Centre for Outcomes Research and EffectivenessUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Engineering Sciences: UCL Management Studies CentreUCL Departments and Research Centres = UCL Departments and Research Centres: Interdepartmental and Cross-faculty Research Groups and Centres: Centre for Economic Learning and Social Evolution (ELSE)UCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Institute of Child Health: Neurosciences and Mental Health: Academic Unit of Audiological MedicineUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Institute of Child Health: Biochemical and Nutritional Sciences: Nutrition UnitUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Eastman Dental Institute: Oral and Maxillofacial SurgeryUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Engineering Sciences: Department of Biochemical EngineeringUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Institute of Child Health: Cardiorespiratory Sciences: Portex Anasthaesia, Intensive Therapy and Respiratory Medicine UnitUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Division of Population Health: Department of Primary Care and Population Sciences: Centre for Sexual Health and HIV ResearchUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Life Sciences: Department of Anatomy and Developmental Biology: Wellcome Trust Centre for the History of Medicine at UCL: Wellcome Trust Centre for the History of Medicine at UCLUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Social and Historical Sciences: Institute of Archaeology: Institute of ArchaeologyUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Division of Medicine: Department of Clinical NeurosciencesUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Engineering Sciences: Department of Computer Science: Vision Imaging and Virtual EnvironmentsUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Built Environment: The OMEGA CentreUCL Departments and Research Centres = UCL Departments and Research Centres: Services, Central Departments and DivisionsUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Social and Historical Sciences: Department of Economics: Discussion Paper SeriesUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Division of Infection and ImmunityUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Life Sciences: Department of Biology: Centre for Ecology and EvolutionUCL Departments and Research Centres = UCL Departments and Research CentresUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Social and Historical SciencesUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Division of Medicine: Department of MedicineUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Institute of Child Health: Genes, Development and DiseaseUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of LawsUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Institute of Child Health: Genes, Development and Disease: Biochemistry and Endocrinology Research Groups: Proteomics and EnzymologyUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Eastman Dental Institute: Eastman Dental InstituteUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Academic Centre for Medical EducationUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Engineering Sciences: Department of Electronic and Electrical EngineeringUCL Departments and Research Centres = UCL Departments and Research Centres: Services, Central Departments and Divisions: UCL Library ServicesUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Department of Obstetrics and Gynaecology: Centre for Preimplantation Genetic DiagnosisUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Division of Surgical and Interventional Sciences: Department of Surgery: Department of SurgeryUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Division of Infection and Immunity: Department of Infection: Centre for VirologyUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Division of Population Health: Department of Primary Care and Population SciencesUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Division of Medicine: Centre for Molecular Cell BiologyUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Arts and Humanities: Department of Greek and LatinUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Division of Infection and Immunity: Department of Infection: Centre for Medical MicrobiologyUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Engineering Sciences: Department of Geomatic EngineeringUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Division of Medicine: Centre for Intensive Care Medicine and Bloomsbury Institute of Intensive CareUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Eastman Dental InstituteUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Institute of Neurology: Department of Headache, Brain Injury and RehabilitationUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Eastman Dental Institute: Paediatric DentistryUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Department of Oncology: CR UK and UCL Cancer Trials CentreUCL Departments and Research Centres = UCL Departments and Research Centres: Interdepartmental and Cross-faculty Research Groups and Centres: Centre for Mathematics and Physical Sciences in the Life Sciences and Experimental Biology (COMPLEX)UCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Institute of Child Health: Cardiorespiratory Sciences: Cardiac UnitUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Engineering Sciences: Department of Computer Science: Intelligent SystemsUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Engineering SciencesUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: UCL Ear Institute: Institute of Laryngology and OtologyUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Institute of Neurology: Department of NeuroinflammationUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Social and Historical Sciences: Department of History of ArtUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Mathematics and Physical Sciences: Department of Physics and Astronomy: Atomic, Molecular, Optical and Positron PhysicsUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Built Environment: The Bartlett School of PlanningUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Social and Historical Sciences: Department of Political Science: Constitution UnitUCL Departments and Research Centres = UCL Departments and Research Centres: Interdepartmental and Cross-faculty Research Groups and Centres: Centre for Nonlinear Dynamics and its Applications (CNDA)UCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Social and Historical Sciences: Department of Economics: Department of EconomicsUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Built EnvironmentUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Division of Infection and Immunity: Department of Immunology and Molecular Pathology: Centre for Paediatric and Adolescent RheumatologyUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Life Sciences: Department of Anatomy and Developmental Biology: Department of Anatomy and Developmental BiologyUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Division of Surgical and Interventional Sciences: Department of Surgery: National Medical Laser CentreUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Engineering Sciences: Department of Civil and Environmental Engineering: Centre for Transport StudiesUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Life Sciences: Department of Psychology: Sub-department of Clinical Health Psychology: Sub-department of Clinical Health PsychologyUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Arts and Humanities: School of Library, Archive and Information StudiesUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Engineering Sciences: Department of Chemical EngineeringUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Social and Historical Sciences: Department of Political Science: School of Public Policy (SPP): School of Public Policy (SPP)UCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Life Sciences: Department of Biology: Department of BiologyUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Institute of Child Health: Genes, Development and Disease: Biochemistry and Endocrinology Research GroupsUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Institute of Child Health: Biochemical and Nutritional SciencesUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Department of Psychiatry and Behavioural SciencesUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Division of Infection and Immunity: Department of Immunology and Molecular Pathology: Department of Immunology and Molecular PathologyUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Social and Historical Sciences: Institute of Archaeology: AHRC Centre for the Evolution of Cultural DiversityUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Division of Infection and Immunity: Department of Immunology and Molecular Pathology: Centre for ImmunodeficiencyUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Mathematics and Physical Sciences: Department of Physics and Astronomy: Elementary Particle PhysicsUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Arts and Humanities: Department of English Language and LiteratureUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Engineering Sciences: Department of Computer Science: NetworksUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Eastman Dental Institute: Biomedical InformaticsUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Division of Surgical and Interventional Sciences: Department of Surgery: ABC Breast Cancer Research GroupUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Mathematics and Physical Sciences: Department of Mathematics: Department of MathematicsUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Mathematics and Physical Sciences: Department of Space and Climate Physics at the Mullard Space Science LaboratoryUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Life Sciences: Department of Psychology: Sub-department of Clinical Health Psychology: Psychoanalysis UnitUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Life Sciences: Department of Anatomy and Developmental Biology: Wellcome Trust Centre for the History of Medicine at UCL: Wellcome Witnesses to Twentieth Century MedicineUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Division of Surgical and Interventional Sciences: Institute of UrologyUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Division of Surgical and Interventional Sciences: Department of Surgery: ColoproctologyUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Laws: Centre for Politics, Law and SocietyUCL Departments and Research Centres = UCL Departments and Research Centres: Interdepartmental and Cross-faculty Research Groups and Centres: Centre for Functional NeuroimagingUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Institute of Child Health: Cancer: Molecular Haematology and Cancer Biology UnitUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Laws: Faculty of LawsUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Life Sciences: Department of PharmacologyUCL Departments and Research Centres = UCL Departments and Research Centres: Services, Central Departments and Divisions: Office of the Vice-Provost (Academic and International)UCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Arts and Humanities: School of Library, Archive and Information Studies: School of Library, Archive and Information StudiesUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Division of Infection and Immunity: Department of Infection: Centre for Infectious Diseases and International HealthUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Division of Infection and Immunity: Department of Immunology and Molecular Pathology: Centre for Rheumatology ResearchUCL Departments and Research Centres = UCL Departments and Research Centres: Interdepartmental and Cross-faculty Research Groups and Centres: UCL Centre for Systems EngineeringUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Engineering Sciences: Department of Computer Science: BioinformaticsUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Arts and Humanities: Department of European Social and Political StudiesUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Institute of Child Health: Genes, Development and Disease: Biochemistry and Endocrinology Research Groups: Molecular EndocrinologyUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Engineering Sciences: Department of Mechanical EngineeringUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Engineering Sciences: Department of Civil and Environmental Engineering: Department of Civil and Environmental EngineeringUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Division of Infection and Immunity: Department of Infection: Department of InfectionUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Institute of Child Health: Neurosciences and Mental Health: Radiology and Physics UnitUCL Departments and Research Centres = UCL Departments and Research Centres: Interdepartmental and Cross-faculty Research Groups and CentresUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Built Environment: Development Planning UnitUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: UCL Ear Institute: Centre for Auditory ResearchUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Built Environment: The Bartlett School of Construction and Project ManagementUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Arts and Humanities: Department of GermanUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Institute of Child Health: Infection and Immunity: Molecular Immunology UnitUCL Departments and Research Centres = UCL Departments and Research Centres: Interdepartmental and Cross-faculty Research Groups and Centres: Institute of Cognitive NeuroscienceUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Division of Medicine: Institute of HepatologyUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Social and Historical Sciences: Institute of Archaeology: Institute for Archaeo-metallurgical StudiesUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Life Sciences: Department of PsychologyUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Institute of Child Health: Population Health SciencesUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Institute of Child Health: Genes, Development and Disease: Molecular Medicine UnitUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Arts and Humanities: Department of English Language and Literature: Survey of English UsageUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Institute of Child Health: Neurosciences and Mental Health: Developmental Biology UnitUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Institute of NeurologyUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Institute of Child Health: Infection and ImmunityUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Division of Population Health: Department of Mental Health SciencesUCL Departments and Research Centres = UCL Departments and Research Centres: Services, Central Departments and Divisions: Education and Information Support DivisionUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Institute of Child Health: Genes, Development and Disease: Medical Molecular BiologyUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Division of Medicine: Centre for Cardiology and Hatter Institute for Cardiovascular StudiesUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: UCL Ear InstituteUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Mathematics and Physical Sciences: Department of Physics and Astronomy: Condensed Matter and Materials PhysicsUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Arts and Humanities: Centre for Intercultural StudiesUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Social and Historical Sciences: Boxgrove ProjectUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Institute of Child Health: Genes, Development and Disease: Clinical and Molecular Genetics UnitUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Division of Infection and Immunity: Department of Infection: Centre for Clinical InfectionUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Life Sciences: Department of PhysiologyUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Social and Historical Sciences: Department of HistoryUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Eastman Dental Institute: Oral Medicine, Pathology and Special Needs DentistryUCL Departments and Research Centres = UCL Departments and Research Centres: Services, Central Departments and Divisions: Education and Information Support Division: Management SystemsUCL Departments and Research Centres = UCL Departments and Research Centres: Interdepartmental and Cross-faculty Research Groups and Centres: London Centre for NanotechnologyUCL Departments and Research Centres = UCL Departments and Research Centres: Interdepartmental and Cross-faculty Research Groups and Centres: Centre for Advanced Spatial Analysis (CASA)UCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Eastman Dental Institute: Biomaterials and Tissue EngineeringUCL Departments and Research Centres = UCL Departments and Research Centres: Interdepartmental and Cross-faculty Research Groups and Centres: UCLIC - UCL Interaction CentreUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Life Sciences: Centre for Human CommunicationUCL Departments and Research Centres = UCL Departments and Research Centres: Interdepartmental and Cross-faculty Research Groups and Centres: Centre for Human Genetics (CHG)UCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Mathematics and Physical Sciences: Department of Earth SciencesUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Institute of Child Health: Neurosciences and Mental Health: Neurosciences UnitUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Eastman Dental Institute: Oral and Maxillofacial ImplantologyUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Institute of Child Health: Infection and Immunity: Infectious Diseases and Microbiology UnitUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Life Sciences: Department of Biochemistry and Molecular BiologyUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Division of Medicine: Centre for NephrologyUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Life Sciences: Department of Anatomy and Developmental Biology: Evolutionary Anatomy UnitUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Arts and Humanities: Department of Hebrew and Jewish StudiesUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Division of Surgical and Interventional Sciences: Department of SurgeryUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Division of Surgical and Interventional Sciences: Department of Surgery: Academic Vascular UnitUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Social and Historical Sciences: Department of Geography: Department of GeographyUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Engineering Sciences: Department of Computer Science: Software Systems EngineeringUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Mathematics and Physical Sciences: Department of Physics and AstronomyUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Life Sciences: Department of Psychology: Department of PsychologyUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Division of Medicine: Institute of Human Genetics and HealthUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Department of Obstetrics and Gynaecology: Department of Obstetrics and GynaecologyUCL Departments and Research Centres = UCL Departments and Research Centres: Services, Central Departments and Divisions: UCL Library Services: UCL Library ServicesUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Life Sciences: Gatsby Computational Neuroscience UnitUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Institute of Child Health: Neurosciences and Mental Health: Developmental Cognitive Neurosciences UnitUCL Departments and Research Centres = UCL Departments and Research Centres: Interdepartmental and Cross-faculty Research Groups and Centres: Institute of Movement NeuroscienceUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Division of Infection and Immunity: Department of Immunology and Molecular PathologyUCL Departments and Research Centres = UCL Departments and Research Centres: School of Slavonic and Eastern European Studies (SSEES)UCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Centre for Health Informatics and Multiprofessional Education (CHIME)UCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Division of Medicine: Centre for Amyloidosis and Acute Phase ProteinsUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Institute of Child Health: Neurosciences and Mental Health: Visual Sciences UnitUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Institute of Child Health: Neurosciences and Mental Health: Neural Development UnitUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Life Sciences: Department of BiologyUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Institute of Child Health: CancerUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Arts and Humanities: Department of PhilosophyUCL Departments and Research Centres = UCL Departments and Research Centres: Interdepartmental and Cross-faculty Research Groups and Centres: CBaS - Centre for Bioscience and SocietyUCL Departments and Research Centres = UCL Departments and Research Centres: Interdepartmental and Cross-faculty Research Groups and Centres: CSERGE - EconomicsUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Division of Surgical and Interventional Sciences: Department of Surgery: Leonard Cheshire Centre of Conflict RecoveryUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Life Sciences: Department of Human Communication Science: Centre for Developmental Language Disorders and Cognitive NeuroscienceUCL Departments and Research Centres = UCL Departments and Research Centres: School of Slavonic and Eastern European Studies (SSEES): Department of HistoryUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Division of Medicine: Centre for GastroenterologyUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Institute of Child Health: Cardiorespiratory Sciences: Centre for Nursing and Allied Health Professionals ResearchUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Mathematics and Physical Sciences: Department of Physics and Astronomy: Image ProcessingUCL Departments and Research Centres = UCL Departments and Research Centres: Interdepartmental and Cross-faculty Research Groups and Centres: Centre for Advanced Instrumentation Systems (CAIS)UCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Institute of Child Health: Institute of Child HealthUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Laws: Bentham Project: Bentham ProjectUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Life Sciences: Department of Psychology: Sub-department of Clinical Health PsychologyUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Engineering Sciences: Department of Medical Physics and BioengineeringUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Institute of Child HealthUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Division of Population Health: MRC Clinical TrialsUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Laws: Constitution UnitUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Institute of Neurology: Wellcome Department of Imaging NeuroscienceUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Life Sciences: Department of Phonetics and LinguisticsUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Division of Medicine: Centre for Diabetes and EndocrinologyUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Institute of Child Health: Genes, Development and Disease: Nephro-urology UnitUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Institute of Child Health: Genes, Development and Disease: Biochemistry and Endocrinology Research Groups: MetabolismUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Institute of Child Health: Cardiorespiratory SciencesUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Engineering Sciences: Department of Civil and Environmental EngineeringUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Institute of Child Health: Neurosciences and Mental Health: Neural Plasticity UnitUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Division of MedicineUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Division of Medicine: Centre for Clinical Pharmacology and TherapeuticsUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Eastman Dental Institute: Continuing Professional DevelopmentUCL Departments and Research Centres = UCL Departments and Research Centres: Services, Central Departments and Divisions: UCL Library Services: SHERPA-LEAP Conference on Open Access to ResearchUCL Departments and Research Centres = UCL Departments and Research Centres: School of Slavonic and Eastern European Studies (SSEES): School of Slavonic and Eastern European Studies (SSEES)UCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Arts and Humanities: Department of DutchUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Life SciencesUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Department of Oncology: Department of OncologyUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Eastman Dental Institute: Prosthetic DentistryUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Arts and Humanities: Department of Scandinavian StudiesUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Institute of OphthalmologyUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Engineering Sciences: Department of Computer ScienceUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Mathematics and Physical Sciences: Department of Statistical ScienceUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Department of PathologyUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Institute of Child Health: Infection and Immunity: Rheumatology UnitUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Social and Historical Sciences: Department of EconomicsUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Institute of Child Health: Neurosciences and Mental Health: Behavioural and Brain Sciences UnitUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Laws: Bentham ProjectUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Institute of Child Health: Population Health Sciences: Centre for International Health and DevelopmentUCL Departments and Research Centres = UCL Departments and Research Centres: Interdepartmental and Cross-faculty Research Groups and Centres: Virtual Reality Centre for the Built EnvironmentUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Arts and Humanities: Slade School of Fine ArtUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Division of Medicine: Institute for Human Health and PerformanceUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Wolfson Institute for Biomedical ResearchUCL Departments and Research Centres = UCL Departments and Research Centres: Services, Central Departments and Divisions: UCL Library Services: London Advocacy Event on Scholarly Communications 2002UCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Social and Historical Sciences: Department of AnthropologyUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Arts and HumanitiesUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Division of Surgical and Interventional Sciences: Department of Surgery: Centre for AnasthaesiaUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Life Sciences: Department of Human Communication ScienceUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Arts and Humanities: Department of FrenchUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Arts and Humanities: School of Library, Archive and Information Studies: Centre for PublishingUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Institute for Women's HealthUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Division of Medicine: Centre for Cardiovascular Biology and MedicineUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Division of Medicine: Centre for NeuroendocrinologyUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Life Sciences: Department of Anatomy and Developmental Biology: Wellcome Trust Centre for the History of Medicine at UCLUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Department of OncologyUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Division of Population Health: Department of Primary Care and Population Sciences: Department of Primary Care and Population SciencesUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Division of Medicine: Centre for Medical ImagingUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Division of Medicine: Centre for Molecular MedicineUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Division of Medicine: International Health and Medical Education CentreUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Social and Historical Sciences: Institute of ArchaeologyUCL Departments and Research Centres = UCL Departments and Research Centres: Services, Central Departments and Divisions: Education and Information Support Division: Education and Professional DevelopmentUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Social and Historical Sciences: Centre for European StudiesUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Life Sciences: Department of Human Communication Science: Department of Human Communication ScienceUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Division of Infection and Immunity: Department of InfectionUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Division of Medicine: Centre for Rheumatology and Bloomsbury Rheumatology UnitUCL Departments and Research Centres = UCL Departments and Research Centres: Services, Central Departments and Divisions: Education and Information Support Division: Information SystemsUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Institute of Child Health: Population Health Sciences: Paediatric Epidemiology and Biostatistics UnitUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Social and Historical Sciences: Department of GeographyUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Division of Medicine: Centre for Respiratory ResearchUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Social and Historical Sciences: Department of Political Science: School of Public Policy (SPP)UCL Departments and Research Centres = UCL Departments and Research Centres: Services, Central Departments and Divisions: UCL Library Services: LIFE ProjectUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Division of Medicine: Centre for Cardiovascular GeneticsUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Institute of Child Health: Neurosciences and Mental HealthUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Institute of Neurology: Department of Clinical and Experimental EpilepsyUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Division of Population HealthUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Division of Medicine: Centre for Cardiology in the YoungUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Institute of Neurology: Sobell Department of Motor Neuroscience and Movement DisordersUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Division of Surgical and Interventional Sciences: Department of Surgery: Surgical OncologyUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Eastman Dental Institute: OrthodonticsUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Division of Surgical and Interventional Sciences: Department of Surgery: Clinical Trials GroupUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Division of Medicine: Bone and Mineral CentreUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Mathematics and Physical Sciences: Department of Physics and Astronomy: Astronomy, Astrophysics and Atmospheric PhysicsUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Life Sciences: Department of Anatomy and Developmental BiologyUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Arts and Humanities: Department of Spanish and Latin American StudiesUCL Departments and Research Centres = UCL Departments and Research Centres: Interdepartmental and Cross-faculty Research Groups and Centres: Space Syntax LaboratoryUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Arts and Humanities: Department of English Language and Literature: Department of English Language and LiteratureUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Built Environment: The Bartlett School of ArchitectureUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Institute of Child Health: Genes, Development and Disease: Biochemistry and Endocrinology Research Groups: NutritionUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Arts and Humanities: Centre for European StudiesUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Institute of Neurology: Department of Neurodegenerative DiseaseUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Built Environment: Centre for Sustainable HeritageUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Division of Surgical and Interventional Sciences: Institute of Orthopaedics and Musculoskeletal SciencesUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Division of Infection and Immunity: Department of Immunology and Molecular Pathology: Wohl Virion CentreUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Arts and Humanities: Department of ItalianUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical SciencesUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Department of Obstetrics and GynaecologyUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Eastman Dental Institute: Conservative DentistryUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Department of HistopathologyUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Mathematics and Physical SciencesUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Eastman Dental Institute: Centre for Microbial DiseasesUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Division of Surgical and Interventional Sciences: Department of Surgery: LICR/UCL Breast Cancer LaboratoryUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Division of Surgical and Interventional Sciences: Department of Surgery: Windeyer InstituteUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Social and Historical Sciences: Department of Geography: Environmental Change Research Centre (ECRC)UCL Departments and Research Centres = UCL Departments and Research Centres: Services, Central Departments and Divisions: Education and Information Support Division: Media ResourcesUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Mathematics and Physical Sciences: Department of Science and Technology StudiesUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Social and Historical Sciences: Department of Political ScienceUCL Departments and Research Centres = UCL Departments and Research Centres: Interdepartmental and Cross-faculty Research Groups and Centres: Institute for the Natural EnvironmentUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Laws: Bentham Project: Journal of Bentham StudiesUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Cancer InstituteUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Social and Historical Sciences: Department of Political Science: School of Public Policy (SPP): Jill Dando Institute of Crime ScienceUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Mathematics and Physical Sciences: Department of Mathematics: Clinical Operations Research Unit (CORU)UCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Mathematics and Physical Sciences: Department of ChemistryUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Division of Medicine: Centre for Clinical Science, Technology and GeriatricsUCL Departments and Research Centres = UCL Departments and Research Centres: Services, Central Departments and Divisions: Scholarly CommunicationsUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Division of Medicine: Centre for HepatologyUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Social and Historical Sciences: Department of Economics: IFS Working PapersUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Institute of Neurology: Department of Molecular NeuroscienceUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Institute of Child Health: Infection and Immunity: Immunobiology UnitUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Institute of Child Health: Biochemical and Nutritional Sciences: Surgery UnitUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Division of Surgical and Interventional SciencesUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Division of Population Health: Department of Epidemiology and Public HealthUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Division of Medicine: Department of Nuclear MedicineUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Institute of Child Health: Population Health Sciences: International Perinatal Care UnitUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Eastman Dental Institute: PeriodontologyUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Biomedical Sciences: Division of Medicine: Centre for Rheumatology and Connective Tissue DiseasesUCL Departments and Research Centres = UCL Departments and Research Centres: Interdepartmental and Cross-faculty Research Groups and Centres: Wolfson Institute for Biomedical ResearchUCL Departments and Research Centres = UCL Departments and Research Centres: Faculty of Built Environment: The Bartlett School of Graduate Studies55820
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo94.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo94.xml new file mode 100644 index 0000000..8cc1f75 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo94.xml @@ -0,0 +1,2 @@ + +
00DSpaceDSpace at Utrecht UniversityUniv. Utrecht: Igitur - Utrecht Publishing and Archiving Serviceshttp://www.igitur.nl/nl/uu_home_midden.jpgNL5.1166752.11http://www.igitur.nl/G.vanderLinde@library.uu.nlOAIhttp://dspace.library.uu.nl:8080/dspace-oai/requestdare_didloai_dc1 Select collectionAardwetenschappenBiologieBiologie ProefschriftenBiomedische Wetenschappen ProefschriftenCERESCollectie Tjalling KoopmansCollectie WiardaCopernicusDARE collectieDARLINDiergeneeskundeDiergeneeskunde AVDiergeneeskunde proefschriftenE-booksFarmaceutische WetenschappenFarmaceutische Wetenschappen ProefschriftenFysische GeografieGedigitaliseerde boekenGedigitaliseerde kaartenGeneeskundeGeneeskunde ProefschriftenGeowetenschappen ProefschriftenGodgeleerdheidGodgeleerdheid ProefschriftenGodgeleerdheid ScriptiesICO-ISORIVLOSIVLOS ProefschriftenIVLOS scriptiesInnovatie- en MilieuwetenschappenKEURLeren docerenLetterenLetteren ProefschriftenLetteren ScriptiesNatuur- en SterrenkundeNatuur- en Sterrenkunde ProefschriftenRechtsgeleerdheidRechtsgeleerdheid ProefschriftenScheikundeScheikunde ProefschriftenSociale Geografie en PlanologieSociale WetenschappenSociale Wetenschappen ProefschriftenStudium Generale PublicatiesUniversiteit voor HumanistiekUniversity CollegeUniversity College ProefschriftenUtrecht School of EconomicsUtrecht School of Economics ProefschriftenUtrechtse School voor Bestuurs- en OrganisatiewetenschapUtrechtse School voor Bestuurs- en Organisatiewetenschap ProefschriftenWijsbegeerteWijsbegeerte ProefschriftenWiskunde en InformaticaWiskunde en Informatica Proefschriften227760
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo95.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo95.xml new file mode 100644 index 0000000..0fa61be --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo95.xml @@ -0,0 +1,2 @@ + +
00CDSwareBibliotheque Numerique RERO DOCdigital library RERO DOChttp://doc.rero.ch/img/bandeau_01_win.pngCH6.1446.211http://doc.rero.ch/?ln=enReseau des Bibliotheques de Suisse Occidentaledoc.support@rero.chOAIhttp://doc.rero.ch/oai2d.py/oai_dc48390
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo96.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo96.xml new file mode 100644 index 0000000..6b40ad9 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo96.xml @@ -0,0 +1,2 @@ + +
00EigenentwicklungPublikationer från Uppsala universitetPublications from Uppsala Universityhttp://epc.ub.uu.se/uu_img/uulogo_white.gifSE17.63448359.861961http://publications.uu.se/?lang=enUppsala Universitydiva-support@ub.uu.seOAIhttp://www.diva-portal.org/oai/uu/OAIoai_dc39790
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo97.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo97.xml new file mode 100644 index 0000000..11bfcf3 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo97.xml @@ -0,0 +1,2 @@ + +
00DSpaceTEORA - Telemark Open Research ArchiveTEORA - Telemark Open Research Archivehttp://teora.hit.no/dspace/image/hit-teora-bok.gifNO9.65131959.1365081http://teora.hit.no/dspace/Telemark University CollegeArild.Skalmeraas@hit.noOAIhttp://teora.hit.no/dspace-oai/requestoai_dc4960
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo98.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo98.xml new file mode 100644 index 0000000..f03b925 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo98.xml @@ -0,0 +1,2 @@ + +
00Proprietary Software Alma Mater Digital LibraryAlma Mater Digital Libraryhttp://diglib.cib.unibo.it/images/logo_unibo.gifIT11.35344.4971http://diglib.cib.unibo.it/Universita di Bolognafmorroia@cib.unibo.itOAIhttp://diglib.cib.unibo.it/oai/oai2.phpoai_dc1210
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo99.xml b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo99.xml new file mode 100644 index 0000000..4e3b82a --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/test/repositories/repo99.xml @@ -0,0 +1,2 @@ + +
00DSpaceresearch_online@UCDresearch_online@UCDhttp://irserver.ucd.ie/dspace/image/research_online_2.gifIE-6.21553.3070http://irserver.ucd.ie/dspace/University College Dublinresearch.online@ucd.ieOAIhttp://irserver.ucd.ie/dspace_oai/requestoai_dc6670
\ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/xml/database/exist/exist-test-conf.xml b/dnet-information-service/src/test/resources/eu/dnetlib/xml/database/exist/exist-test-conf.xml new file mode 100644 index 0000000..e07a98c --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/xml/database/exist/exist-test-conf.xml @@ -0,0 +1,84 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/xml/database/exist/userProfileResourceSchema.xsd b/dnet-information-service/src/test/resources/eu/dnetlib/xml/database/exist/userProfileResourceSchema.xsd new file mode 100644 index 0000000..3cd3581 --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/xml/database/exist/userProfileResourceSchema.xsd @@ -0,0 +1,182 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dnet-information-service/src/test/resources/eu/dnetlib/xml/database/exist/userProfileResourceSchemaClean.xsd b/dnet-information-service/src/test/resources/eu/dnetlib/xml/database/exist/userProfileResourceSchemaClean.xsd new file mode 100644 index 0000000..037b29c --- /dev/null +++ b/dnet-information-service/src/test/resources/eu/dnetlib/xml/database/exist/userProfileResourceSchemaClean.xsd @@ -0,0 +1,180 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/pom.xml b/pom.xml index eca7b60..358a13f 100644 --- a/pom.xml +++ b/pom.xml @@ -11,6 +11,7 @@ dnet-core-components dnet-core-services + dnet-information-service @@ -56,7 +57,10 @@ dnet-deps dnet-dependencies http://maven.research-infrastructures.eu/nexus/content/repositories/dnet-deps - default + + + exist + https://raw.github.com/eXist-db/mvn-repo/master dnet45-releases @@ -97,6 +101,7 @@ ${commons.io.version} + com.mycila xmltool @@ -122,6 +127,14 @@ saxon-dom 9.1.0.8 + + xerces + xercesImpl + 2.11.0 + + + + jgrapht jgrapht @@ -159,6 +172,11 @@ + + org.aspectj + aspectjrt + ${aspectj.version} + runcc runcc @@ -179,14 +197,111 @@ oro 2.0.8 - - org.quartz-scheduler quartz ${quartz.version} + + + org.exist-db + exist-start + ${exist.version} + + + org.exist-db + exist-core + ${exist.version} + + + asm + asm + + + antlr + antlr + + + org.aspectj + aspectjrt + + + org.eclipse.jetty + jetty-security + + + org.eclipse.jetty + jetty-server + + + org.eclipse.jetty + jetty-util + + + javax.servlet + org.eclipse.jetty.orbit + + + net.sf.saxon + Saxon-HE + + + commons-codec + commons-codec + + + org.apache.ant + ant + + + + + + + org.postgresql + postgresql + ${postgres.jdbc.version} + + + org.xerial + sqlite-jdbc + 3.7.2 + + + org.hibernate + hibernate-core + 4.3.2.Final + + + antlr + antlr + + + + + commons-collections + commons-collections + ${commons.collections.version} + + + commons-dbcp + commons-dbcp + 1.4 + + + com.sun.xml.messaging.saaj + saaj-impl + 1.3 + + + commons-beanutils + commons-beanutils + 1.8.0 + + + + org.apache.solr solr-solrj @@ -202,17 +317,20 @@ - org.apache.lucene lucene-queryparser ${apache.solr.version} + + org.mongodb mongo-java-driver ${mongodb.driver.version} + + joda-time joda-time @@ -224,19 +342,6 @@ 1.7 - - junit - junit - 4.9 - test - - - org.mockito - mockito-core - ${mockito.version} - test - - org.springframework @@ -274,6 +379,11 @@ spring-context-support ${spring.version} + + org.springframework + spring-orm + ${spring.version} + @@ -297,6 +407,28 @@ cxf-rt-frontend-jaxws ${cxf.version} + + org.apache.cxf + cxf-rt-ws-policy + ${cxf.version} + + + org.apache.cxf + cxf-rt-frontend-jaxrs + ${cxf.version} + + + + org.apache.cxf + cxf-rt-transports-local + ${cxf.version} + + + org.apache.cxf + cxf-rt-ws-rm + ${cxf.version} + + @@ -315,6 +447,39 @@ provided + + + junit + junit + 4.9 + test + + + org.mockito + mockito-core + ${mockito.version} + test + + + + hsqldb + hsqldb + 1.8.0.7 + test + + + org.aspectj + aspectjweaver + ${aspectj.version} + test + + + org.hibernate + hibernate-annotations + 3.3.1 + test + + @@ -326,12 +491,16 @@ 3.5 2.4 1.9 + 3.2.1 7.5.0 3.4.2 23.3-jre 2.2.2 2.2.2 1.2.17 + 3.0.RC1 + [1.8.9] + 42.2.1 [3.1.0]