1 | CLARIN COMPONENT REGISTRY |
---|
2 | ========================= |
---|
3 | |
---|
4 | What is it? |
---|
5 | ----------- |
---|
6 | The Component Registry stores CMDI metadata components and profiles and |
---|
7 | offers a service to list and retrieve them. The BrowserGui is a web |
---|
8 | application displaying available components in the component registry in the |
---|
9 | correct context: application domain, creator, creation date, version, etc. |
---|
10 | The registry offers a hierarchical structure for browsing the components. |
---|
11 | |
---|
12 | The componentRegistry is set up as a Flex Gui frontend communicating with a |
---|
13 | Java based backend (REST service). |
---|
14 | |
---|
15 | The ComponentRegistry is a central software component to the Clarin MetaData |
---|
16 | Infrastructure (CMDI). For more information on CMDI, see |
---|
17 | <http://www.clarin.eu/cmdi>. |
---|
18 | |
---|
19 | Documentation |
---|
20 | ------------- |
---|
21 | - A set of TRAC pages for developers has been setup on the Clarin.eu TRAC at |
---|
22 | <http://trac.clarin.eu/wiki/ComponentRegistryAndEditor>. You will need a |
---|
23 | login to access these pages. To request one, contact <clarin@clarin.eu>. |
---|
24 | |
---|
25 | - The REST interface is documented at <http://www.clarin.eu/node/3248>. |
---|
26 | |
---|
27 | - Documentation for users is available at <http://www.clarin.eu/node/3223>. |
---|
28 | |
---|
29 | - Information on internally managing the application can be found at |
---|
30 | <https://trac.clarin.eu/wiki/ComponentRegistryAndEditor#Management>. |
---|
31 | |
---|
32 | Project structure |
---|
33 | ----- |
---|
34 | This project contains two modules: |
---|
35 | |
---|
36 | - 'ComponentRegistry', a Java project that implements the Component Registry |
---|
37 | REST service, administration pages and a web container for a client UI. |
---|
38 | - 'ComponentBrowserGui', a Flex project that implements a client for the |
---|
39 | Component Registry REST service. |
---|
40 | |
---|
41 | How to set up for development/building from source |
---|
42 | -------------------------------------------------- |
---|
43 | * Creating initial setup files: |
---|
44 | |
---|
45 | - in ComponentBrowserGui: `mvn buildnumber:create flexmojos:flexbuilder` |
---|
46 | - This generates project files for Flash Builder. Open in FB using |
---|
47 | File > Import Flex Project and use the 'Project Folder' option. |
---|
48 | - in ComponentRegistry: `mvn eclipse:eclipse` |
---|
49 | - Generates eclipse configuration |
---|
50 | - For NetBeans, simply open the POM as a project |
---|
51 | |
---|
52 | When using FlashBuilder to develop the ComponentBrowserGui, create a porject by |
---|
53 | "Import a Flex project from an FXP, ZIP, or project folder". |
---|
54 | |
---|
55 | When using FlashBuilder to develop, make sure to configure the correct Flex SDK. It should |
---|
56 | be version 3.6, which you can download for free at <http://www.adobe.com/cfusion/entitlement/index.cfm?e=flex3sdk>. |
---|
57 | In addition, you should configure the project to build for Flash player 10.0.0 (instead of default minimum version |
---|
58 | provided by SDK). |
---|
59 | |
---|
60 | * Creating war artifact for local deployment: |
---|
61 | |
---|
62 | - in ComponentBrowserGui: mvn install |
---|
63 | - in ComponentRegistry: mvn package |
---|
64 | |
---|
65 | The ComponentRegistry war will include the flex swf file needed to start the application. |
---|
66 | So deploying the resulting war will be enough to start the application. |
---|
67 | |
---|
68 | * Building for specific deployment environment |
---|
69 | By default the application is set to work when deployed on localhost. If you want to change that |
---|
70 | change the serverRootUrl property in the pom.xml of ComponentRegistry. There are already build |
---|
71 | profiles for lux16.mpi.nl and catalog.clarin.eu that set these correctly. You can trigger |
---|
72 | these by providing the -Plux16 or -Pclarin options to mvn respectively. |
---|
73 | |
---|
74 | The rest service relies on a Component Registry database, for which a create script can be found in |
---|
75 | the src/sql directory. For configuration instructions, see the comments in context.xml. |
---|
76 | |
---|
77 | * NOTE on generating java classes from general-component-schema.xsd. |
---|
78 | The ComponentRegistry needs the general-component-schema.xsd, which should be found at: |
---|
79 | 1) ComponentRegistry/src/main/binding/ -> that directory has a svn:externals property pointing to the schema. |
---|
80 | Do a 'svn propget svn:externals' to see the property. Results in: 'http://svn.clarin.eu/metadata/trunk/toolkit/general-component-schema.xsd general-component-schema.xsd' |
---|
81 | |
---|
82 | * Missing some artifacts for Maven?: |
---|
83 | The ComponentBrowserGui project needs some swf files which are not in any maven repository I could find. |
---|
84 | So install them manually: go to ComponentBrowserGui/libs/ and run the commands in maveninstalllib.txt |
---|
85 | |
---|
86 | * Developing and Debugging "ComponentRegistry" back-end. |
---|
87 | |
---|
88 | Select the 'development' Maven profile (Netbeans has a dropdown menu for this) to get |
---|
89 | logging output on the console. |
---|
90 | |
---|
91 | If, when trying to run the backend, you're getting errors from Spring stating that |
---|
92 | "Name [ComponentRegistry] is not bound in this Context. Unable to find [ComponentRegistry]" |
---|
93 | it means that you do not have a JNDI resource for the database connection set up correctly. |
---|
94 | See the installation instructions for more information. |
---|
95 | |
---|
96 | * Developing and Debugging "ComponentBrowserGui". |
---|
97 | |
---|
98 | Always make sure that ComponentRegistry-war grabbed the newest version of the Flex GUI. |
---|
99 | For this you do "mvn install" in ComponentBrowserGui, and |
---|
100 | then compile the backend in ComponentRegistry. Second of all, you should know that you can run and |
---|
101 | debug the Gui from FlashBuilder. For this you need to edit "Run/Debug" in the project properties. |
---|
102 | For instance, if a bug to fix appears when fuilfilling the request |
---|
103 | http://localhost:8080/ComponentRegistry/?item=clarin.eu:cr1:c_1288172614011&browserview=comments |
---|
104 | you need to make this uri an "URI to launch". To do this, you duplicate one of the existing |
---|
105 | scenarios in Run/debug menu, and then EDIT the duplicated version by changing its "name" |
---|
106 | and "URI or path to launch" in the corresponding way. |
---|
107 | |
---|
108 | Make sure to download and install the DEBUG version of the Adobe Flash Player plugin from |
---|
109 | <https://www.adobe.com/support/flashplayer/downloads.html> |
---|
110 | If you are using Chrome, make sure to also disable the built-in Flash player. See: |
---|
111 | <https://support.google.com/chrome/answer/108086> |
---|
112 | |
---|
113 | |
---|
114 | Installation |
---|
115 | ------------ |
---|
116 | Please see the file called INSTALL |
---|
117 | |
---|
118 | Upgrading |
---|
119 | --------- |
---|
120 | Please see the file called UPDATE |
---|