You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@oodt.apache.org by ma...@apache.org on 2015/03/01 03:59:19 UTC
svn commit: r1663022 - in /oodt/trunk: ./ curator/ curator/src/main/bin/
curator/src/main/java/org/apache/oodt/cas/curation/
curator/src/main/java/org/apache/oodt/cas/curation/config/
curator/src/main/java/org/apache/oodt/cas/curation/fileTree/ curator...
Author: mattmann
Date: Sun Mar 1 02:59:18 2015
New Revision: 1663022
URL: http://svn.apache.org/r1663022
Log:
- Disable Curator Build in OODT pom.xml
- Begin refactoring towards Wicket
- progress towards OODT-824
Added:
oodt/trunk/curator/src/main/java/org/apache/oodt/cas/curation/CurationApp.java
oodt/trunk/curator/src/main/java/org/apache/oodt/cas/curation/HomePage.css
oodt/trunk/curator/src/main/java/org/apache/oodt/cas/curation/HomePage.html
oodt/trunk/curator/src/main/java/org/apache/oodt/cas/curation/HomePage.java
oodt/trunk/curator/src/main/java/org/apache/oodt/cas/curation/HomePage.js
oodt/trunk/curator/src/main/java/org/apache/oodt/cas/curation/config/
oodt/trunk/curator/src/main/java/org/apache/oodt/cas/curation/config/CuratorConfMetKeys.java
- copied, changed from r1660288, oodt/trunk/curator/src/main/java/org/apache/oodt/cas/curation/servlet/CuratorConfMetKeys.java
oodt/trunk/curator/src/main/java/org/apache/oodt/cas/curation/curation.png
- copied unchanged from r1663014, oodt/trunk/curator/src/main/webapp/media/img/curation.png
oodt/trunk/curator/src/main/java/org/apache/oodt/cas/curation/fileTree/
- copied from r1663014, oodt/trunk/curator/src/main/webapp/media/img/fileTree/
oodt/trunk/curator/src/main/java/org/apache/oodt/cas/curation/green_dot.png
- copied unchanged from r1663014, oodt/trunk/curator/src/main/webapp/media/img/green_dot.png
oodt/trunk/curator/src/main/java/org/apache/oodt/cas/curation/help.gif
- copied unchanged from r1663014, oodt/trunk/curator/src/main/webapp/media/img/help.gif
oodt/trunk/curator/src/main/java/org/apache/oodt/cas/curation/icon-new-dataset.png
- copied unchanged from r1663014, oodt/trunk/curator/src/main/webapp/media/img/icon-new-dataset.png
oodt/trunk/curator/src/main/java/org/apache/oodt/cas/curation/icon-new-dataset_smaller.png
- copied unchanged from r1663014, oodt/trunk/curator/src/main/webapp/media/img/icon-new-dataset_smaller.png
oodt/trunk/curator/src/main/java/org/apache/oodt/cas/curation/icon-new-product.png
- copied unchanged from r1663014, oodt/trunk/curator/src/main/webapp/media/img/icon-new-product.png
oodt/trunk/curator/src/main/java/org/apache/oodt/cas/curation/icon-new-product_smaller.png
- copied unchanged from r1663014, oodt/trunk/curator/src/main/webapp/media/img/icon-new-product_smaller.png
oodt/trunk/curator/src/main/java/org/apache/oodt/cas/curation/important.gif
- copied unchanged from r1663014, oodt/trunk/curator/src/main/webapp/media/img/important.gif
oodt/trunk/curator/src/main/java/org/apache/oodt/cas/curation/info.gif
- copied unchanged from r1663014, oodt/trunk/curator/src/main/webapp/media/img/info.gif
oodt/trunk/curator/src/main/java/org/apache/oodt/cas/curation/ingestion.png
- copied unchanged from r1663014, oodt/trunk/curator/src/main/webapp/media/img/ingestion.png
oodt/trunk/curator/src/main/java/org/apache/oodt/cas/curation/jquery-1.3.2.js
- copied unchanged from r1663014, oodt/trunk/curator/src/main/webapp/js/jquery-1.3.2.js
oodt/trunk/curator/src/main/java/org/apache/oodt/cas/curation/jquery-ui-1.7.2.full.min.js
- copied unchanged from r1663014, oodt/trunk/curator/src/main/webapp/js/jquery-ui/jquery-ui-1.7.2.full.min.js
oodt/trunk/curator/src/main/java/org/apache/oodt/cas/curation/jquery.alerts.css
- copied unchanged from r1663014, oodt/trunk/curator/src/main/webapp/media/skin/jquery.alerts.css
oodt/trunk/curator/src/main/java/org/apache/oodt/cas/curation/jquery.periodicalupdater.js
- copied unchanged from r1663014, oodt/trunk/curator/src/main/webapp/js/jquery.periodicalupdater.js
oodt/trunk/curator/src/main/java/org/apache/oodt/cas/curation/pencil.png
- copied unchanged from r1663014, oodt/trunk/curator/src/main/webapp/media/img/icons/pencil.png
oodt/trunk/curator/src/main/java/org/apache/oodt/cas/curation/red_dot.png
- copied unchanged from r1663014, oodt/trunk/curator/src/main/webapp/media/img/red_dot.png
oodt/trunk/curator/src/main/java/org/apache/oodt/cas/curation/title.gif
- copied unchanged from r1663014, oodt/trunk/curator/src/main/webapp/media/img/title.gif
Removed:
oodt/trunk/curator/src/main/bin/
oodt/trunk/curator/src/main/java/org/apache/oodt/cas/curation/servlet/
oodt/trunk/curator/src/main/webapp/js/
oodt/trunk/curator/src/main/webapp/media/
Modified:
oodt/trunk/curator/pom.xml
oodt/trunk/curator/src/main/java/org/apache/oodt/cas/curation/service/CurationService.java
oodt/trunk/curator/src/main/java/org/apache/oodt/cas/curation/service/CurationServiceConfig.java
oodt/trunk/curator/src/main/java/org/apache/oodt/cas/curation/util/SSOUtils.java
oodt/trunk/curator/src/main/webapp/META-INF/context.xml
oodt/trunk/curator/src/main/webapp/WEB-INF/web.xml
oodt/trunk/pom.xml
Modified: oodt/trunk/curator/pom.xml
URL: http://svn.apache.org/viewvc/oodt/trunk/curator/pom.xml?rev=1663022&r1=1663021&r2=1663022&view=diff
==============================================================================
--- oodt/trunk/curator/pom.xml (original)
+++ oodt/trunk/curator/pom.xml Sun Mar 1 02:59:18 2015
@@ -26,6 +26,9 @@ the License.
<artifactId>cas-curator</artifactId>
<packaging>war</packaging>
<name>CAS Curation Interface</name>
+ <properties>
+ <wicket.version>1.4.17</wicket.version>
+ </properties>
<description>A web application for managing policy for products and files and metadata that have been ingested via the CAS component.</description>
<scm>
<connection>scm:svn:https://svn.apache.org/repos/asf/oodt/tags/0.9-SNAPSHOT/curator</connection>
@@ -33,7 +36,58 @@ the License.
<url>http://svn.apache.org/viewvc/oodt/tags/0.9-SNAPSHOT/curator</url>
</scm>
<build>
- <plugins />
+ <resources>
+ <resource>
+ <filtering>false</filtering>
+ <directory>src/main/resources</directory>
+ </resource>
+ <resource>
+ <filtering>false</filtering>
+ <directory>src/main/java</directory>
+ <includes>
+ <include>**</include>
+ </includes>
+ <excludes>
+ <exclude>**/*.java</exclude>
+ </excludes>
+ </resource>
+ </resources>
+ <testResources>
+ <testResource>
+ <filtering>false</filtering>
+ <directory>src/test/java</directory>
+ <includes>
+ <include>**</include>
+ </includes>
+ <excludes>
+ <exclude>**/*.java</exclude>
+ </excludes>
+ </testResource>
+ </testResources>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.tomcat.maven</groupId>
+ <artifactId>tomcat7-maven-plugin</artifactId>
+ <version>2.2</version>
+ <configuration>
+ <port>8080</port>
+ <systemProperties>
+ <CATALINA_OPTS>-Djava.awt.headless=true -Dfile.encoding=UTF-8
+ -server -Xms1536m -Xmx1536m
+ -XX:NewSize=256m -XX:MaxNewSize=256m -XX:PermSize=256m
+ -XX:MaxPermSize=512m -XX:+DisableExplicitGC
+ -XX:+UseConcMarkSweepGC
+ -XX:+CMSIncrementalMode
+ -XX:+CMSIncrementalPacing
+ -XX:CMSIncrementalDutyCycleMin=0
+ -XX:-TraceClassUnloading
+ </CATALINA_OPTS>
+ </systemProperties>
+ <contextFile>${basedir}/src/main/webapp/META-INF/context.xml</contextFile>
+ <path>/${project.build.finalName}</path>
+ </configuration>
+ </plugin>
+ </plugins>
</build>
<profiles>
<profile>
@@ -72,31 +126,30 @@ the License.
</plugins>
</build>
</profile>
- </profiles>
- <repositories>
- <repository>
- <id>ibiblio</id>
- <name>Ibiblio Repository</name>
- <layout>default</layout>
- <url>http://mirrors.ibiblio.org/pub/mirrors/maven2</url>
- <releases>
- <enabled>true</enabled>
- <updatePolicy>always</updatePolicy>
- <checksumPolicy>warn</checksumPolicy>
- </releases>
- <snapshots>
- <enabled>false</enabled>
- </snapshots>
- </repository>
- <repository>
- <id>maven2-repository.dev.java.net</id>
- <name>Java.net Repository for Maven</name>
- <url>http://download.java.net/maven/2/</url>
- <layout>default</layout>
- </repository>
- </repositories>
-
+ </profiles>
<dependencies>
+ <dependency>
+ <groupId>org.apache.wicket</groupId>
+ <artifactId>wicket</artifactId>
+ <version>${wicket.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.wicket</groupId>
+ <artifactId>wicket-extensions</artifactId>
+ <version>${wicket.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
@@ -126,6 +179,12 @@ the License.
<groupId>org.apache.oodt</groupId>
<artifactId>cas-filemgr</artifactId>
<version>${project.parent.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
<groupId>org.apache.oodt</groupId>
@@ -134,25 +193,26 @@ the License.
</dependency>
<dependency>
<groupId>org.apache.oodt</groupId>
- <artifactId>cas-crawler</artifactId>
+ <artifactId>cas-metadata</artifactId>
<version>${project.parent.version}</version>
<exclusions>
<exclusion>
- <artifactId>tika</artifactId>
- <groupId>org.apache.tika</groupId>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
</exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.apache.oodt</groupId>
- <artifactId>cas-metadata</artifactId>
- <version>${project.parent.version}</version>
+ </exclusions>
<type>jar</type>
</dependency>
<dependency>
<groupId>net.sf.json-lib</groupId>
- <artifactId>json-lib</artifactId>
+ <artifactId>json-lib</artifactId>
<version>2.3</version>
+ <exclusions>
+ <exclusion>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </exclusion>
+ </exclusions>
<classifier>jdk15</classifier>
</dependency>
<dependency>
Added: oodt/trunk/curator/src/main/java/org/apache/oodt/cas/curation/CurationApp.java
URL: http://svn.apache.org/viewvc/oodt/trunk/curator/src/main/java/org/apache/oodt/cas/curation/CurationApp.java?rev=1663022&view=auto
==============================================================================
--- oodt/trunk/curator/src/main/java/org/apache/oodt/cas/curation/CurationApp.java (added)
+++ oodt/trunk/curator/src/main/java/org/apache/oodt/cas/curation/CurationApp.java Sun Mar 1 02:59:18 2015
@@ -0,0 +1,22 @@
+package org.apache.oodt.cas.curation;
+
+import org.apache.wicket.Page;
+import org.apache.wicket.protocol.http.WebApplication;
+
+public class CurationApp extends WebApplication {
+
+ @Override
+ public Class<? extends Page> getHomePage() {
+ try {
+ return (Class<? extends Page>) Class.forName(getHomePageClass());
+ } catch (ClassNotFoundException e) {
+ e.printStackTrace();
+ return HomePage.class;
+ }
+ }
+
+ public String getHomePageClass() {
+ return getServletContext().getInitParameter("curator.homepage");
+ }
+
+}
\ No newline at end of file
Added: oodt/trunk/curator/src/main/java/org/apache/oodt/cas/curation/HomePage.css
URL: http://svn.apache.org/viewvc/oodt/trunk/curator/src/main/java/org/apache/oodt/cas/curation/HomePage.css?rev=1663022&view=auto
==============================================================================
--- oodt/trunk/curator/src/main/java/org/apache/oodt/cas/curation/HomePage.css (added)
+++ oodt/trunk/curator/src/main/java/org/apache/oodt/cas/curation/HomePage.css Sun Mar 1 02:59:18 2015
@@ -0,0 +1,645 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
+
+@CHARSET "UTF-8";
+
+div.editor table tr td {
+
+ position:relative;
+ padding-left:5px;
+ cursor:pointer;
+ _cursor:hand;
+
+}
+
+div.editor table tr td img.pencil {
+
+ position:relative;
+ left:0px;
+ cursor:pointer;
+ _cursor:hand;
+
+}
+
+
+.ptwbMetadataList table {
+ border-top:solid 1px #ccc;
+}
+
+/* file tree */
+
+
+
+UL.fileTree {
+ font-family: Verdana, sans-serif;
+ font-size: 11px;
+ line-height: 18px;
+ padding: 0px;
+ margin: 0px;
+}
+
+LI.helper {
+ font-family: Verdana, sans-serif;
+ font-size:11px;
+ line-height:18px;
+}
+
+UL.fileTree LI, LI.helper {
+ list-style: none;
+ padding: 0px;
+ padding-left: 20px;
+ margin: 0px;
+ white-space: nowrap;
+}
+
+UL.fileTree A, LI.helper A {
+ color: #333;
+ text-decoration: none;
+ display: block;
+ padding: 0px 2px;
+}
+
+UL.fileTree A:hover, LI.helper A {
+ background: #BDF;
+}
+
+/* Core Styles */
+.fileTree LI.directory, LI.helper.directory { background: url(../img/fileTree/directory.png) left top no-repeat; }
+.fileTree LI.expanded, LI.helper.expanded { background: url(../img/fileTree/folder_open.png) left top no-repeat; }
+.fileTree LI.file, LI.helper.file { background: url(../img/fileTree/file.png) left top no-repeat; }
+.fileTree LI.wait, LI.helper.wait { background: url(../img/fileTree/spinner.gif) left top no-repeat; }
+/* File Extensions*/
+.fileTree LI.ext_3gp, LI.helper.ext_3gp { background: url(../img/fileTree/film.png) left top no-repeat; }
+.fileTree LI.ext_afp, LI.helper.ext_afp { background: url(../img/fileTree/code.png) left top no-repeat; }
+.fileTree LI.ext_afpa, LI.helper.ext_afpa { background: url(../img/fileTree/code.png) left top no-repeat; }
+.fileTree LI.ext_asp, LI.helper.ext_asp { background: url(../img/fileTree/code.png) left top no-repeat; }
+.fileTree LI.ext_aspx, LI.helper.ext_aspx { background: url(../img/fileTree/code.png) left top no-repeat; }
+.fileTree LI.ext_avi, LI.helper.ext_avi { background: url(../img/fileTree/film.png) left top no-repeat; }
+.fileTree LI.ext_bat, LI.helper.ext_bat { background: url(../img/fileTree/application.png) left top no-repeat; }
+.fileTree LI.ext_bmp, LI.helper.ext_bmp { background: url(../img/fileTree/picture.png) left top no-repeat; }
+.fileTree LI.ext_c, LI.helper.ext_c { background: url(../img/fileTree/code.png) left top no-repeat; }
+.fileTree LI.ext_cfm, LI.helper.ext_cfm { background: url(../img/fileTree/code.png) left top no-repeat; }
+.fileTree LI.ext_cgi, LI.helper.ext_cgi { background: url(../img/fileTree/code.png) left top no-repeat; }
+.fileTree LI.ext_com, LI.helper.ext_com { background: url(../img/fileTree/application.png) left top no-repeat; }
+.fileTree LI.ext_cpp, LI.helper.ext_cpp { background: url(../img/fileTree/code.png) left top no-repeat; }
+.fileTree LI.ext_css, LI.helper.ext_css { background: url(../img/fileTree/css.png) left top no-repeat; }
+.fileTree LI.ext_doc, LI.helper.ext_doc { background: url(../img/fileTree/doc.png) left top no-repeat; }
+.fileTree LI.ext_exe, LI.helper.ext_exe { background: url(../img/fileTree/application.png) left top no-repeat; }
+.fileTree LI.ext_gif, LI.helper.ext_gif { background: url(../img/fileTree/picture.png) left top no-repeat; }
+.fileTree LI.ext_fla, LI.helper.ext_fla { background: url(../img/fileTree/flash.png) left top no-repeat; }
+.fileTree LI.ext_h, LI.helper.ext_h { background: url(../img/fileTree/code.png) left top no-repeat; }
+.fileTree LI.ext_htm, LI.helper.ext_htm { background: url(../img/fileTree/html.png) left top no-repeat; }
+.fileTree LI.ext_html, LI.helper.ext_html { background: url(../img/fileTree/html.png) left top no-repeat; }
+.fileTree LI.ext_jar, LI.helper.ext_jar { background: url(../img/fileTree/java.png) left top no-repeat; }
+.fileTree LI.ext_jpg, LI.helper.ext_jpg { background: url(../img/fileTree/picture.png) left top no-repeat; }
+.fileTree LI.ext_jpeg, LI.helper.ext_jpeg { background: url(../img/fileTree/picture.png) left top no-repeat; }
+.fileTree LI.ext_js, LI.helper.ext_js { background: url(../img/fileTree/script.png) left top no-repeat; }
+.fileTree LI.ext_lasso, LI.helper.ext_lasso { background: url(../img/fileTree/code.png) left top no-repeat; }
+.fileTree LI.ext_log, LI.helper.ext_log { background: url(../img/fileTree/txt.png) left top no-repeat; }
+.fileTree LI.ext_m4p, LI.helper.ext_m4p { background: url(../img/fileTree/music.png) left top no-repeat; }
+.fileTree LI.ext_mov, LI.helper.ext_mov { background: url(../img/fileTree/film.png) left top no-repeat; }
+.fileTree LI.ext_mp3, LI.helper.ext_mp3 { background: url(../img/fileTree/music.png) left top no-repeat; }
+.fileTree LI.ext_mp4, LI.helper.ext_mp4 { background: url(../img/fileTree/film.png) left top no-repeat; }
+.fileTree LI.ext_mpg, LI.helper.ext_mpg { background: url(../img/fileTree/film.png) left top no-repeat; }
+.fileTree LI.ext_mpeg, LI.helper.ext_mpeg { background: url(../img/fileTree/film.png) left top no-repeat; }
+.fileTree LI.ext_ogg, LI.helper.ext_ogg { background: url(../img/fileTree/music.png) left top no-repeat; }
+.fileTree LI.ext_pcx, LI.helper.ext_pcx { background: url(../img/fileTree/picture.png) left top no-repeat; }
+.fileTree LI.ext_pdf, LI.helper.ext_pdf { background: url(../img/fileTree/pdf.png) left top no-repeat; }
+.fileTree LI.ext_php, LI.helper.ext_php { background: url(../img/fileTree/php.png) left top no-repeat; }
+.fileTree LI.ext_png, LI.helper.ext_png { background: url(../img/fileTree/picture.png) left top no-repeat; }
+.fileTree LI.ext_ppt, LI.helper.ext_ppt { background: url(../img/fileTree/ppt.png) left top no-repeat; }
+.fileTree LI.ext_psd, LI.helper.ext_psd { background: url(../img/fileTree/psd.png) left top no-repeat; }
+.fileTree LI.ext_pl, LI.helper.ext_pl { background: url(../img/fileTree/script.png) left top no-repeat; }
+.fileTree LI.ext_py, LI.helper.ext_py { background: url(../img/fileTree/script.png) left top no-repeat; }
+.fileTree LI.ext_rb, LI.helper.ext_rb { background: url(../img/fileTree/ruby.png) left top no-repeat; }
+.fileTree LI.ext_rbx, LI.helper.ext_rbx { background: url(../img/fileTree/ruby.png) left top no-repeat; }
+.fileTree LI.ext_rhtml, LI.helper.ext_rhtml { background: url(../img/fileTree/ruby.png) left top no-repeat; }
+.fileTree LI.ext_rpm, LI.helper.ext_rpm { background: url(../img/fileTree/linux.png) left top no-repeat; }
+.fileTree LI.ext_ruby, LI.helper.ext_ruby { background: url(../img/fileTree/ruby.png) left top no-repeat; }
+.fileTree LI.ext_sql, LI.helper.ext_sql { background: url(../img/fileTree/db.png) left top no-repeat; }
+.fileTree LI.ext_swf, LI.helper.ext_swf { background: url(../img/fileTree/flash.png) left top no-repeat; }
+.fileTree LI.ext_tif, LI.helper.ext_tif { background: url(../img/fileTree/picture.png) left top no-repeat; }
+.fileTree LI.ext_tiff, LI.helper.ext_tiff { background: url(../img/fileTree/picture.png) left top no-repeat; }
+.fileTree LI.ext_txt, LI.helper.ext_txt { background: url(../img/fileTree/txt.png) left top no-repeat; }
+.fileTree LI.ext_vb, LI.helper.ext_vb { background: url(../img/fileTree/code.png) left top no-repeat; }
+.fileTree LI.ext_wav, LI.helper.ext_wav { background: url(../img/fileTree/music.png) left top no-repeat; }
+.fileTree LI.ext_wmv, LI.helper.ext_wmv { background: url(../img/fileTree/film.png) left top no-repeat; }
+.fileTree LI.ext_xls, LI.helper.ext_xls { background: url(../img/fileTree/xls.png) left top no-repeat; }
+.fileTree LI.ext_xml, LI.helper.ext_xml { background: url(../img/fileTree/code.png) left top no-repeat; }
+.fileTree LI.ext_zip, LI.helper.ext_zip { background: url(../img/fileTree/zip.png) left top no-repeat; }
+
+/* MAIN.CSS */
+/**
+ * CAS Header Styles
+ *
+ * These describe the basic layout of the header code in /views/common/cas-curator-header.jsp
+ */
+
+/* DIV.CAS-HEADER */
+div#cas-header {
+ position:relative;
+ height:56px;
+ padding:5px;
+ text-align:right;
+ border-bottom:solid 1px #000;
+ overflow:none;
+ background:url(../../img/blackfade-syncd.jpg) scroll 0px 0px repeat-x;
+ background-color:#000;
+}
+
+/* DIV.CAS-LOGO-LEFT */
+div#cas-logo-left {
+ position:absolute;
+ top:0px;
+ left:0px;
+ height:67px;
+ width:500px;
+}
+/* DIV.CAS-LOGO-RIGHT */
+div#cas-logo-right {
+ position:absolute;
+ top:0px;
+ right:0px;
+ height:67px;
+ width:290px;
+}
+
+/* H2.APP-TITLE */
+h2.app-title {
+ position:absolute;
+ top:67px;
+ right:0px;
+ margin:0px;
+ width:100%;
+ padding:5px;
+ padding-left:0px;
+ font-weight:normal;
+ font-size:15px;
+ letter-spacing:0.03em;
+}
+/* DIV.USERDETAILS */
+div.userdetails {
+ position:absolute;
+ top:102px;
+ right:5px;
+ font-size:75%;
+ z-index:10
+}
+div.userdetails a {
+
+}
+
+/* DIV#BREADCRUMBS */
+div#breadcrumbs {
+ position:relative;
+ margin-top:30px;
+ padding:4px;
+ padding-right:5px;
+ padding-left:5px;
+ padding-bottom:5px;
+ font-size:85%;
+}
+div#breadcrumbs ul {
+ list-style:none;
+ margin:0px;
+ padding:0px;
+}
+div#breadcrumbs ul li {
+ display:inline;
+}
+
+div#breadcrumbs ul li a {
+ font-weight:normal;
+ text-decoration:underline;
+}
+
+/**
+ * CAS Footer Styles
+ *
+ * These describe the basic layout of the footer code in /views/common/cas-curator-footer.jsp
+ */
+
+div#footer {
+ font-size:90%;
+ text-align:center;
+ margin-top:35px;
+ border-top:solid 1px #ddd;
+ padding-top:15px;
+ padding-bottom:8px;
+}
+
+div#footer img {
+ border:none;
+ padding-left:2px;
+ margin-left:5px;
+}
+
+
+
+
+
+
+
+/**
+ * CAS Interface Styles
+ *
+ * These describe the layout of the main curator interface located at /main.jsp
+ */
+
+
+
+/* DIV.ERROR
+ * A red 'error' box suitable for displaying error messages.
+ */
+div.error {
+ background-color:#fcc;
+ padding:5px;
+ margin-right:15px;
+ border:solid 1px #f44;
+}
+
+/* DIV.SUCCESS
+ * A green 'success' box suitable for displaying success messages.
+ */
+div.success {
+ padding:5px;
+ border:solid 1px green;
+ background-color:#cfc;
+ margin-right:10px;
+}
+
+/* HEADERS (H1,H2,H3,......) */
+h2.title {
+ padding:5px;
+ margin:0px;
+ border-top:solid 2px #900;
+ border-bottom:solid 1px #300;
+ font-weight:normal;
+ font-size:15px;
+}
+
+h4 {
+ border-bottom:dotted 1px #888;
+}
+
+
+/**
+ * PAGE STRUCTURE
+ *
+ */
+
+/* LOGIN FORM */
+form#login-form {
+ border:solid 0px #f66;
+ background-color:#fff;
+ margin:5px;
+ padding:3px;
+ text-align:center;
+}
+form#login-form h3 {
+ color:#333;
+ margin-top:0px;
+ border-bottom:dotted 0px #444;
+
+}
+form#login-form input[type=text], form#login-form input[type=password] {
+ border:solid 1px #888;
+ padding:3px;
+ width:150px;
+}
+form#login-form table {
+ color:#333;
+ margin:5px;
+ margin-top:0px;
+ border:solid 1px #ccc;
+ width:242px;
+}
+form#login-form input[type=submit] {
+ padding:3px;
+}
+
+
+
+/* MAIN INTERFACE STRUCTURES */
+div.container {
+ position:relative;
+ border:solid 1px grey;
+ padding:5px;
+}
+
+div#browseStagingContainer, div#browseCatalogContainer {
+ position:relative;
+ width:47%;
+ border:solid 2px #ccc;
+ padding:2px;
+}
+div#browseStagingContainer {
+ position:relative;
+ float:left;
+}
+
+div#browseCatalogContainer {
+ position:relative;
+ float:right;
+}
+
+div#browseStaging {
+ position:relative;
+ float:left;
+ width:33%;
+ border:solid 1px #ccc;
+ overflow:scroll;
+}
+div#browseCatalog {
+ position:relative;
+ float:left;
+ width:33%;
+ border:solid 1px #ccc;
+ overflow:scroll;
+}
+div#stagingMetContainer {
+ position:relative;
+ float:right;
+ width:60%;
+ height:350px;
+ font-size:12px;
+}
+div#stagingMetExtractorSelection {
+ position:relative;
+ margin-bottom:3px;
+ display:none;
+}
+
+div#stagedMetadataWorkbenchContent {
+ position:relative;
+ height:323px;
+ background-color:#fff;
+ overflow:scroll;
+ border:solid 1px #ccc;
+}
+div#catalogMetadataWorkbenchContent {
+ position:relative;
+ float:right;
+ width:60%;
+ height:350px;
+ background-color:#fff;
+ overflow:scroll;
+ border:solid 1px #ccc;
+}
+
+.browser {
+ background:#FFFFFF none repeat scroll 0 0;
+ border-color:#BBBBBB #FFFFFF #FFFFFF #BBBBBB;
+ border-style:solid;
+ border-width:1px;
+ height:350px;
+ padding:5px;
+ width:200px;
+}
+.container.browsers, .container.tasks {
+ background-color:#EEEEEE;
+ border:solid 1px #ccc;
+ padding-top:18px;
+ margin:5px 0px;
+}
+.container h5 {
+ position:relative;
+ margin:-20px -4px 5px;
+ padding:0px;
+ font-family:arial,sans-serif;
+ text-transform:uppercase;
+ color:#999;
+}
+
+.pathbar {
+ border:solid 1px #ccc;
+ background-color:#f4f4f4;
+ color:#222;
+ padding:3px;
+ margin-bottom:2px;
+ font-family:courier,sans-serif;
+ font-size:11px;
+}
+
+
+/* METADATA EDITOR */
+div.editor {
+ position:relative;
+ padding:0px;
+}
+
+div.editor.info {
+ padding:5px;
+}
+
+div.editor table {
+ font-size:11px;
+ width:100%;
+}
+
+div.editor table tr {
+
+}
+
+div.editor table tr th {
+ border-right:solid 1px #ccc;
+ border-bottom:solid 1px #ccc;
+ padding:5px;
+ text-align:left;
+ background-color:#f6f6f6;
+ color:#555;
+}
+
+div.editor table tr td {
+ border-right:solid 1px #ccc;
+ border-bottom:solid 1px #ccc;
+ padding:5px;
+}
+
+/*
+ * INGESTION TASK LIST
+ */
+
+
+.container.tasks {
+ padding:5px;
+ padding-top:20px;
+}
+.container.tasks h5 {
+ margin:-18px 0px 2px;
+}
+div#ingestionTaskList {
+
+}
+div#ingestionTaskListContent {
+ background-color:#fff;
+ min-height:100px;
+ border:solid 1px #ccc;
+}
+
+div#ingestionTaskListContent table {
+ font-size:11px;
+ width:100%;
+}
+
+div#ingestionTaskListContent table tr{
+
+}
+div#ingestionTaskListContent table tr th{
+ padding:4px;
+ border-right:solid 1px #ccc;
+ border-bottom:solid 1px #ccc;
+ background-color:#f6f6f6;
+}
+div#ingestionTaskListContent table tr td{
+ padding:4px;
+ border-right:solid 1px #ccc;
+ border-bottom:solid 1px #ccc;
+}
+
+
+/* PRODUCTTYPE WORKBENCH */
+
+div#productTypeWorkbenchLabel {
+ font-size:12px;
+ font-family:arial,sans-serif;
+ text-transform:uppercase;
+ color:#555;
+ font-weight:normal;
+ padding:1px 1px 1px 4px;
+}
+
+div#ptwbAddProducts {
+ padding:5px;
+}
+
+div#productTypeWorkbenchContents .instructions {
+ font-size:90%;
+ color:#444;
+}
+
+div#ptwbMetadataList table {
+ border:solid 1px #ccc;
+}
+
+div#droppedFileList {
+
+ overflow:scroll;
+ min-height:50px;
+
+}
+
+div.ptwbSectionBox {
+ border:solid 1px #ccc;
+ padding:2px;
+ margin:5px 0px 2px 0px;
+}
+
+div.ptwbSectionBox h5 {
+ margin:0 0 4px;
+ padding:0px;
+}
+
+div#droppedFileTarget {
+ height:30px;
+ border-color:#bdb;
+ background-color:#dfd;
+}
+
+div#itMetExtractorSelector {
+
+}
+
+div#itCreateIngestionTaskButton {
+ margin-top:5px;
+}
+
+/* INFORMATIONAL MESSAGES */
+/* all absolutely positioned infos are at z-index 1000-1100)
+ */
+div.info {
+ font-size:13px;
+ background-color:#acf;
+ font-family:arial,sans-serif;
+ color:#345;
+ display:none;
+}
+div.info input[type=button] {
+ padding:2px;
+ margin:5px 0px;
+}
+div#infoNoMetadataExtractorDefined {
+ position:absolute;
+ border:solid 1px #ccc;
+ top:28px;
+ right:-2px;
+ z-index:1000;
+ width:60%;
+ line-height:18px;
+}
+div.infoContent {
+ padding:5px;
+}
+
+/* LINKS */
+
+a {
+ color:#222;
+ text-decoration:none;
+}
+a:hover {
+ text-decoration:underline;
+}
+a.actionlink {
+ color:#48a;
+ padding-left:5px;
+}
+div#breadcrumbs a {
+ color:#fff;
+}
+
+
+
+/**
+ * .CLR
+ * This is a utility which serves to reset things after a
+ * series of floated elements
+ */
+.clr {
+ clear:both;
+}
+
+
+/* UI.TABS */
+.ui-tabs { padding: 0em; zoom: 1; font-size:11px; }
+.ui-tabs .ui-tabs-nav { list-style: none; position: relative; padding: 0px; }
+.ui-tabs .ui-tabs-nav li { position: relative; float: left; border-bottom-width: 0; margin: 0 .2em; padding: 0; }
+.ui-tabs .ui-tabs-nav li a { float: left; text-decoration: none; padding: .5em 1em; }
+.ui-tabs .ui-tabs-nav li.ui-tabs-selected { padding-bottom: 1px; border-bottom-width: 3px; border-bottom-color:#fff; margin-bottom:-2px; overflow:none; }
+.ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; }
+.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */
+.ui-tabs .ui-tabs-panel { padding: 1em 0em; display: block; background: none; }
+.ui-tabs .ui-tabs-hide { display: none !important; }
+
+
+
+.ui-tabs .ui-tabs-nav li { border: solid 1px #ccc; background-color: #bbb; }
+.ui-tabs .ui-tabs-nav li.ui-tabs-selected { background-color: #fff; color: #555; }
+.ui-tabs .ui-tabs-nav li a { color: #fff; }
+.ui-tabs .ui-tabs-nav li.ui-tabs-selected a { color: #555; }
+.ui-tabs .ui-tabs-nav { }
+.ui-tabs .ui-tabs-panel { padding: 1em 0em; margin: 0em; border-top: solid 1px #ccc;}
\ No newline at end of file
Added: oodt/trunk/curator/src/main/java/org/apache/oodt/cas/curation/HomePage.html
URL: http://svn.apache.org/viewvc/oodt/trunk/curator/src/main/java/org/apache/oodt/cas/curation/HomePage.html?rev=1663022&view=auto
==============================================================================
--- oodt/trunk/curator/src/main/java/org/apache/oodt/cas/curation/HomePage.html (added)
+++ oodt/trunk/curator/src/main/java/org/apache/oodt/cas/curation/HomePage.html Sun Mar 1 02:59:18 2015
@@ -0,0 +1,149 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<html
+ xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd">
+<head>
+<title>Apache OODT Curation Interface</title>
+<wicket:link>
+ <link type="text/css" rel="stylesheet" href="HomePage.css"/>
+</wicket:link>
+</head>
+<body>
+
+<div class="page">
+ <div class="container browsers">
+ <div id="browseStagingContainer">
+ <h5>Staging Area</h5>
+ <div id="browseStagingPath" class="pathbar">initializing...</div>
+ <div id="browseStaging" class="browser">
+ <div id="browseStagingNav">
+ <ul class="fileTree">
+ <li class="directory nav"><a id="stagingNavUpRoot" href="#" rel=".">.</a></li>
+ <li class="directory nav"><a id="stagingNavUpOne" href="#" rel="..">..</a></li>
+ </ul>
+ </div>
+ <div id="browseStagingContents"></div>
+ </div>
+ <div id="stagedMetadataWorkbench" class="editor">
+ <div id="infoNoMetadataExtractorDefined" class="info overlay">
+ <div class="infoContent">
+ No Metadata Detected...<br/>
+ </div>
+ </div>
+ <div id="stagingMetContainer">
+ <div id="stagingMetExtractorSelection">
+ <select id="stagingMetExtractorConfigList">
+ <option value="-1">Initializing...</option>
+ </select>
+ <input id="stagingMetExtractorRefreshButton" type="button" value="Refresh"/>
+
+
+ </div>
+ <div id="stagedMetadataWorkbenchContent"></div>
+ </div>
+ </div>
+ </div>
+ <div id="browseCatalogContainer">
+ <h5>File Manager Catalog</h5>
+ <div id="browseCatalogPath" class="pathbar">initializing...</div>
+ <div id="browseCatalog" class="browser">
+ <div id="browseCatalogNav">
+ <ul class="fileTree">
+ <li class="directory nav"><a id="catalogNavUpRoot" href="#" rel=".">.</a></li>
+ <li class="directory nav"><a id="catalogNavUpOne" href="#" rel="..">..</a></li>
+ </ul>
+ </div>
+ <div id="browseCatalogContents"></div>
+ </div>
+ <div id="catalogMetadataWorkbench" class="editor">
+ <div id="catalogMetadataWorkbenchContent"></div>
+ </div>
+ </div>
+ <br class="clr"/>
+ </div>
+ <div class="container tasks">
+ <div id="ingestionTaskList">
+ <h5>File Manager Ingestion Task List</h5>
+ <div id="ingestionTaskListContent">
+ <table cellspacing="0" cellpadding="0" id="ingestionTaskListItems">
+ <thead>
+ <tr>
+ <th style="width:50px;">TaskId</th>
+ <th>Created</th>
+ <th>Files</th>
+ <th>Policy</th>
+ <th>ProductType</th>
+ <th>MetExtractor</th>
+ <th>MetExt Config</th>
+ <th>Status</th>
+ <th style="border-right-width:0px;">Action</th>
+ </tr>
+ </thead>
+ <tbody>
+
+ </tbody>
+
+ </table>
+ </div>
+ </div>
+ </div>
+</div>
+
+<!-- product type workbench -->
+<div id="productTypeWorkbenchContents" style="display:none">
+ <ul>
+ <li><a href='#ptwbAddProducts'>Add Products</a></li>
+ <li><a href='#ptwbMetadata'>View Metadata</a></li>
+ </ul><br class="clr"/>
+ <div id="ptwbAddProducts">
+ <span class="instructions">
+ Add files from the staging area by dragging them into the target box below. Once you have
+ Finished, click 'Save as Ingestion Task' to finalize.
+ </span>
+ <div id="droppedFileTarget" class="ptwbSectionBox">
+ <h5>File Drop Target...</h5>
+
+ </div>
+ <div id="droppedFileList" class="ptwbSectionBox">
+ <h5>Files to be ingested...</h5>
+ <ul></ul>
+ </div>
+ <div id="itMetExtractorSelector" class="ptwbSectionBox">
+ <h5>Metadata Extraction Configuration...</h5>
+ <span class="instructions">Choose a metadata extractor configuration from
+ the list below:
+ </span>
+ <select name="itMetExtractorConfigId" id="itMetExtractorConfigId">
+ <option value="">Initializing...</option>
+ </select><br/><br/>
+ </div>
+ <div id="itCreateIngestionTaskButton">
+ <span class="instructions">Click here to create an ingestion task for these files</span>
+ <input type="button" value="Save as Ingestion Task" onclick="createIngestionTask();"/>
+ </div>
+
+ </div>
+ <div id="ptwbMetadata">
+ <span class="instructions">
+ The following metadata has been defined for this product type.
+ </span>
+ <div class="ptwbMetadataList"></div>
+ </div>
+</div>
+
+</body>
+</html>
Added: oodt/trunk/curator/src/main/java/org/apache/oodt/cas/curation/HomePage.java
URL: http://svn.apache.org/viewvc/oodt/trunk/curator/src/main/java/org/apache/oodt/cas/curation/HomePage.java?rev=1663022&view=auto
==============================================================================
--- oodt/trunk/curator/src/main/java/org/apache/oodt/cas/curation/HomePage.java (added)
+++ oodt/trunk/curator/src/main/java/org/apache/oodt/cas/curation/HomePage.java Sun Mar 1 02:59:18 2015
@@ -0,0 +1,7 @@
+package org.apache.oodt.cas.curation;
+
+import org.apache.wicket.markup.html.WebPage;
+
+public class HomePage extends WebPage {
+
+}
Added: oodt/trunk/curator/src/main/java/org/apache/oodt/cas/curation/HomePage.js
URL: http://svn.apache.org/viewvc/oodt/trunk/curator/src/main/java/org/apache/oodt/cas/curation/HomePage.js?rev=1663022&view=auto
==============================================================================
--- oodt/trunk/curator/src/main/java/org/apache/oodt/cas/curation/HomePage.js (added)
+++ oodt/trunk/curator/src/main/java/org/apache/oodt/cas/curation/HomePage.js Sun Mar 1 02:59:18 2015
@@ -0,0 +1,639 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
+
+// File Tree
+
+var _staging = '/'; // current root path in staging area browser
+var _catalog = '/'; // current root path in catalog browser
+var _paths = { "staging" : '/',
+ "catalog" : '/',
+ "currentStagedFile" : '',
+ "currentCatalogedFile" : '',
+ "currentProductType" : ''}
+
+if(jQuery) (function($){
+
+ $.extend($.fn, {
+ fileTree: function(o, h, i) {
+ // Defaults
+ if( !o ) var o = {};
+ if( o.root == undefined ) o.root = '/';
+ if( o.folderEvent == undefined ) o.folderEvent = 'dblclick';
+ if( o.expandSpeed == undefined ) o.expandSpeed= 500;
+ if( o.collapseSpeed == undefined ) o.collapseSpeed= 500;
+ if( o.expandEasing == undefined ) o.expandEasing = null;
+ if( o.collapseEasing == undefined ) o.collapseEasing = null;
+ if( o.multiFolder == undefined ) o.multiFolder = true;
+ if( o.loadMessage == undefined ) o.loadMessage = 'Loading...';
+
+ // Understand which of the two browsers to apply nav actions to
+ if (o.which == undefined) { alert('please specify \'which\' (options are: "staging"|"catalog") '); o.which = "staging";}
+
+ // Ensure a script has been provided
+ if (o.script == undefined) { alert('please specify a target script \'script\' in fileTree options'); }
+
+ // Get a handle to the outer UL
+ o.outerContainer = '#' + $(this).attr('id');
+ if (o.outerContainer == undefined) { alert('container must have unique id') };
+
+ $(this).each( function() {
+
+ function showTree(c, t) {
+ $(c).addClass('wait');
+ $(".fileTree.start").remove();
+ $.get(o.script, { path: t }, function(data) {
+ $(c).find('.start').html('');
+ $(c).removeClass('wait').html(data);
+ if (o.which == "staging")
+ _paths.staging = escape(t);
+ else
+ _paths.catalog = escape(t);
+ bindTree(c);
+ updateNav(o.which);
+ clearMetadataWorkbenchContent(o.which);
+ initDraggables();
+ });
+ }
+
+ function bindTree(t) {
+ $(o.outerContainer).find('UL LI A').bind('click', function() {
+ if ($(this).parent().hasClass('productType')) {
+ i($(this).attr('rel'));
+ } else if ($(this).parent().hasClass('file')) {
+ h($(this).attr('rel'));
+ }
+ }).bind('dblclick', function() {
+ if ($(this).parent().hasClass('directory') ) {
+ $(this).parent().find('UL').remove(); // cleanup
+ showTree( $(o.outerContainer), escape($(this).attr('rel')) );
+ }
+ });
+
+ // Prevent A from triggering the # on non-click events
+ if( o.folderEvent.toLowerCase != 'click' ) $(t).find('LI A').bind('click', function() { return false; });
+ }
+
+ // Loading message
+ $(this).html('<ul class="fileTree start"><li class="wait">' + o.loadMessage + '<li></ul>');
+
+ // Get the initial file list
+ showTree( $(this), escape((o.which == "staging" ) ? _paths.staging : _paths.catalog) );
+ });
+ }
+ });
+})(jQuery);
+
+// Metadata editors
+function makeStagedMetadataEditable() {
+ makeMetadataEditable(
+ $("#stagedMetadataWorkbenchContent > table > tbody > tr > td"),
+ updateStagedMetadata);
+}
+
+function makeProductMetadataEditable() {
+ makeMetadataEditable(
+ $("#catalogMetadataWorkbenchContent > table > tbody > tr > td"),
+ updateProductMetadata);
+}
+
+function makeProductTypeMetadataEditable() {
+ makeMetadataEditable(
+ $("#liveProductTypeWorkbenchContents div.ptwbMetadataList > table > tbody > tr > td"),
+ updateProductTypeMetadata);
+}
+
+function updateStagedMetadata() {
+ // Data is the collection of <tr/> elements that contain metadata key/value pairs
+ var data = getMetadataFromSource($('#stagedMetadataWorkbenchContent > table > tbody > tr'));
+ var qstr = getQueryStringFromMetadata(_paths.currentStagedFile, data);
+
+ $.post('./services/metadata/staging',
+ qstr,
+ function(data, textStatus) {
+ // alert(data);
+ }
+ );
+}
+
+function updateProductMetadata() {
+ // Data is the collection of <tr/> elements that contain metadata key/value pairs
+ var data = getMetadataFromSource($('#catalogMetadataWorkbenchContent > table > tbody > tr'));
+ var qstr = getQueryStringFromMetadata(_paths.currentCatalogedFile, data);
+
+ $.post('./services/metadata/catalog',
+ qstr,
+ function(data, textStatus) {
+ // alert(data);
+ }
+ );
+}
+
+function updateProductTypeMetadata() {
+ // Data is the collection of <tr/> elements that contain metadata key/value pairs
+ var data = getMetadataFromSource($('#liveProductTypeWorkbenchContents div.ptwbMetadataList > table > tbody > tr'));
+ var qstr = getQueryStringFromMetadata(_paths.currentProductType, data);
+
+ $.post('./services/metadata/productType',
+ qstr,
+ function(data, textStatus) {
+ // alert(data);
+ }
+ );
+}
+
+
+
+/**
+ * Utility functions to encapsulate common functionality
+ *
+ */
+
+// source: the collection of <td/> objects containing metadata values
+// callback: the function to be called to persist the edits
+function makeMetadataEditable(source, callback) {
+ // Set up the i/f to display the icon only when the user is hovering over
+ // the field
+ source.click(function() {
+ var $met = $(this);
+ var metValue = $met; // the <td> itself
+ var metKey = $(this).prev().text();
+ jPromptMulti(
+ metKey,
+ metValue,
+ 'Update Metadata',
+ function(r) {
+
+ if (r) {
+ // turn r into a comma-separated string of values
+ htmlResult = '<span>' + r.join('</span>, <span>') + '</span>';
+ // alert( 'You entered ' + htmlResult )
+ $met.html(htmlResult);
+ callback();
+ }
+ });
+ });
+}
+
+function getMetadataFromSource( source ) {
+
+ // Keys are 1 per row in <th/> elements
+ // Values are 1 per row in <td/> elements
+
+ var $table = source;
+ var data = Array();
+ $table.each( function () {
+ // Create a key/value mapping of the staged metadata
+ var $valueElmt = $(this).children('td');
+ // All values are wrapped in <span/> elements and there can be
+ // an unlimited number of them, so build an array.
+ var $values = $valueElmt.children('span');
+ var valueData = Array();
+ for (var i = 0; i < $values.length; i ++ ) {
+ valueData.push($values[i].textContent);
+ }
+ // Assign the value data to the correct element
+ data.push( { 'key' : $(this).children('th').text(), 'value' : valueData } );
+ });
+
+ return data;
+}
+
+function getQueryStringFromMetadata(id,data) {
+ // Build the query string that will be sent to the server
+ var qstr = '';
+ qstr += 'id=' + id;
+ for ( var i = 0; i < data.length; i++ ) {
+ for ( var j = 0; j < data[i].value.length; j++ ) {
+ qstr += '&metadata.' + data[i].key + '=' + data[i].value[j];
+ }
+ }
+
+ return qstr;
+}
+
+
+/********************************************************************
+ * INGESTION TASK SETUP
+ */
+
+
+// Keep track of dropped files. This is used to determine the files
+// that will be included in an ingestion task
+var droppedFiles = Array();
+
+// The currently selected policy. This is the policy that will
+// be used in the ingestion task.
+var itPolicy;
+
+// The currently selected product type. This is the product typte that
+// will be used in the ingestion task
+var itProductType;
+
+
+// The currently selected Metadata Extractor Configuration Id
+// This is the configuration that will be sent with the ingestion task
+var itMetExtractorConfigId = 'default';
+
+
+
+function updateIngestionTaskMetExtractorConfigIds() {
+ $.get('./services/metadata/extractor/config',
+ {},
+ function(data,textState) {
+ $('#itMetExtractorConfigId').html(data);
+ itMetExtractorConfigId = $('#itMetExtractorConfigId').val();
+ });
+}
+
+function updateSelectedMetExtractorConfigId() {
+ itMetExtractorConfigId = $('#itMetExtractorConfigId').val();
+}
+
+function createIngestionTask() {
+ // The files to include are in droppedFiles
+ var files = droppedFiles;
+ // The met extractor config id is in itMetExtractorConfigId
+ var metExtCfgId = itMetExtractorConfigId;
+ // The policy and product type are in itPolicy and itProductType
+ var policy = itPolicy;
+ var productType = itProductType;
+ // Other variables we'll need
+ var numFiles = droppedFiles.length;
+
+ // Send the information to the create ingestion task servlet
+ $.get('./services/ingest/create',
+ {
+ 'files' : files.join(','),
+ 'numfiles' : numFiles,
+ 'metExtCfgId': metExtCfgId,
+ 'policy' : policy,
+ 'ptype' : productType
+ },
+ function (data,textState) {
+ refreshIngestTaskList();
+ });
+
+
+}
+
+function refreshIngestTaskList(){
+ $.get('./services/ingest/list',
+ { 'format': 'html'
+ },
+ function (data,textState) {
+ showIngestionTaskList(data);
+ });
+}
+
+function showIngestionTaskList(data){
+ $('#ingestionTaskListItems > tbody').html(data);
+}
+
+function registerIngestionTaskListener(){
+ $.PeriodicalUpdater('./services/ingest/list', {
+ method: 'get',
+ data: { 'format:': 'html'},
+ minTimeout: 1000,
+ maxTimeout: 60000,
+ multiplier: 2
+ }, function (data) {
+ showIngestionTaskList(data);
+ });
+
+}
+
+function createIngestionTaskRow(data) {
+ $('#ingestionTaskListItems > tbody').replace(data);
+}
+
+function removeIngestionTask(id) {
+ $.get('./services/ingest/remove',
+ { 'taskId' : id },
+ refreshIngestTaskList()
+ );
+}
+
+function startIngestionTask(id) {
+ $.get('./services/ingest/start',
+ { 'taskId' : id },
+ function(data,textState) {
+ $('#'+id+'_Status').html(data); // 'started' or 'error'
+ refreshIngestTaskList();
+ });
+}
+
+/********************************************************************
+ * DRAG AND DROP INITIALIZATION AND CONFIGURATION
+ *
+ */
+function initDraggables() {
+ $('.draggy').draggable({
+ revert:true,
+ zIndex:'5000',
+ appendTo:'body'
+ ,
+ helper: function() {
+ return $('<li>')
+ .addClass('helper')
+ .addClass('file').addClass('ext_tiff')
+ .html($(this).children().clone());
+ }
+ });
+}
+function initDragAndDropTarget() {
+ $('#droppedFileTarget').droppable( {
+ drop: function(event, ui) {
+ droppedFiles.push(ui.draggable.children('a')[0].rel);
+ updateDroppedFilesList();
+ }
+ });
+}
+function updateDroppedFilesList() {
+ var i = droppedFiles.length -1;
+ $('#droppedFileList > ul').append(
+ '<li rel="'+droppedFiles[i]+'">'+droppedFiles[i]+'</li>'
+ );
+}
+function clearDroppedFilesList() {
+ droppedFiles = Array(); // clear the js array
+ $('#droppedFileList ul').html(''); // clear the interface display
+}
+
+
+/********************************************************************
+ * MAIN INITIALIZATION FUNCTION (ON DOM READY)
+ */
+$(document).ready( function() {
+
+ // Initialize the staging area browser
+ initStagingAreaBrowser();
+
+ // Initialize the staging area navigation buttons
+ $('#stagingNavUpOne')
+ .dblclick(stagingNavigateUpOne)
+ .click( function(event) {event.preventDefault();});
+ $('#stagingNavUpRoot')
+ .dblclick(stagingNavigateUpRoot)
+ .click( function(event) {event.preventDefault();});
+
+
+ // Initialize the File Manager browser
+ initFileManagerBrowser();
+
+ // Initialize the catalog navigation buttons
+ $('#catalogNavUpOne')
+ .dblclick(catalogNavigateUpOne)
+ .click( function(event) {event.preventDefault();});
+ $('#catalogNavUpRoot')
+ .dblclick(catalogNavigateUpRoot)
+ .click( function(event) {event.preventDefault();});
+
+
+ // Make overlaid info messages semi-transparent
+ $('.info.overlay').fadeTo(0,0.8);
+
+ // Connect staging met extractor refresh button
+ $('#stagingMetExtractorRefreshButton').click(refreshStagedMetadata);
+
+});
+
+function updateNav(which) {
+ if (which == 'staging')
+ $('#browseStagingPath').html('Path: ' + _paths.staging);
+ if ('/' == _paths.staging) {
+ // We are at the root, don't show . and ..
+ $('#browseStagingNav').hide();
+ } else {
+ $('#browseStagingNav').show();
+ }
+ if (which == 'catalog') {
+ // Catalog navigation is a little more complex
+ $('#browseCatalogPath').html('Path: ' + _paths.catalog);
+ if ('/' == _paths.catalog) {
+ // We are listing policies, don't show . and ..
+ $('#browseCatalogNav').hide();
+ } else {
+ $('#browseCatalogNav').show();
+ }
+
+ }
+}
+
+function clearMetadataWorkbenchContent(which) {
+ if (which == 'staging') {
+ $('#infoNoMetadataExtractorDefined').hide();
+ $('#stagedMetadataWorkbenchContent').html('');
+ hideStagingMetExtractorSelection();
+ _paths.currentStagedFile = '';
+ } else if (which == 'catalog') {
+ $('#catalogMetadataWorkbenchContent').html('');
+ _paths.currentCatalogedFile = '';
+ _paths.currentProductType = '';
+ }
+}
+
+
+
+/********************************************************************
+ * STAGING AREA BROWSER FUNCTIONS
+ */
+
+var stagingMetExtractorConfigId = '';
+
+
+function initStagingAreaBrowser() {
+ $('#browseStagingContents').fileTree(
+ { root: '/',
+ which: 'staging',
+ script: './services/directory/staging'
+ }, function(file) {
+ getMetadataForStagedFile(file, false);
+ });
+ updateNav('staging');
+}
+
+function stagingNavigateUpOne() {
+ var pieces = _paths.staging.split('/');
+ var newpath = '';
+ for (var i=0; i < (pieces.length-2); i++) {
+ newpath += (pieces[i] + '/');
+ }
+ if ('' == newpath) {
+ newpath = '/';
+ }
+ _paths.staging = newpath;
+ initStagingAreaBrowser();
+ clearMetadataWorkbenchContent('staging');
+ return false;
+}
+
+function stagingNavigateUpRoot() {
+ // Re-Initialize the staging area browser
+ _paths.staging = '/';
+ initStagingAreaBrowser();
+ clearMetadataWorkbenchContent('staging');
+ return false;
+}
+
+function getMetadataForStagedFile(file, overwrite) {
+ $.get('./services/metadata/staging',
+ { 'id' : file,
+ 'configId' : stagingMetExtractorConfigId,
+ 'overwrite' : overwrite
+ },
+ function(data,textStatus) {
+ displayStagedFileMetadata(file,data);
+ }, "html");
+}
+
+function displayStagedFileMetadata(file,data) {
+ showStagingMetExtractorSelection();
+ _paths.currentStagedFile = file;
+ if (! data.match('tr')) {
+ if (stagingMetExtractorConfigId == '') {
+ $('#infoNoMetadataExtractorDefined').show();
+ }
+ } else {
+ $('#stagedMetadataWorkbenchContent').html(data);
+ makeStagedMetadataEditable();
+ }
+}
+
+function updateStagingMetExtractorConfigIds() {
+ $.get('./services/metadata/extractor/config',
+ {'current' : stagingMetExtractorConfigId },
+ function(data,textState) {
+ $('#stagingMetExtractorConfigList').html(data);
+ stagingMetExtractorConfigId = $('#stagingMetExtractorConfigList').val();
+ });
+}
+
+function showStagingMetExtractorSelection() {
+ $('#stagedMetadataWorkbenchContent').css('height','323px');
+ $('#stagingMetExtractorSelection').fadeIn('fast');
+ updateStagingMetExtractorConfigIds();
+}
+
+function hideStagingMetExtractorSelection() {
+ $('#stagingMetExtractorSelection').fadeOut('fast');
+ $('#stagedMetadataWorkbenchContent').css('height','350px');
+}
+
+function refreshStagedMetadata() {
+ stagingMetExtractorConfigId = $('#stagingMetExtractorConfigList').val();
+ getMetadataForStagedFile(_paths.currentStagedFile, true);
+}
+/********************************************************************
+ * FILE MANAGER BROWSER FUNCTIONS
+ */
+
+//
+// paths in this area are "virtual", that is, they reflect the logical
+// organization of the file manager catalog rather than the physical
+// organization of the products in the repository. As such, the virtual
+// path to a product is obtained by specifying both the 'policy' and
+// 'productType':
+//
+// dem00001.tiff exists at "virtual" path: /Lmmp/DEM where
+// LMMP is the policy
+// and DEM is a product type defined within that policy
+//
+
+
+function initFileManagerBrowser() {
+ $('#browseCatalogContents').fileTree(
+ { root: '/',
+ which: 'catalog',
+ script: './services/policy/browse'
+ }, function(file) {
+ getMetadataForCatalogedFile(file);
+ }, function(productType) {
+ getProductTypeWorkbench(productType);
+ });
+ updateNav('catalog');
+
+}
+
+function catalogNavigateUpOne() {
+
+ var pieces = _paths.catalog.split('/');
+ var newpath = '';
+ for (var i=0; i < (pieces.length-2); i++) {
+ newpath += (pieces[i] + '/');
+ }
+ if ('' == newpath) {
+ newpath = '/';
+ }
+ _paths.catalog = newpath;
+ initFileManagerBrowser();
+ clearMetadataWorkbenchContent('catalog');
+ return false;
+}
+
+function catalogNavigateUpRoot() {
+ // Re-Initialize the catalog browser
+ _paths.catalog = '/';
+ initFileManagerBrowser();
+ clearMetadataWorkbenchContent('catalog');
+ return false;
+}
+
+function getMetadataForCatalogedFile(file) {
+ $.get('./services/metadata/catalog',
+ { 'id' : file },
+ function(data,textStatus) {
+ displayCatalogedFileMetadata(file,data);
+ }, "html");
+}
+
+function displayCatalogedFileMetadata(file,data) {
+ $('#catalogMetadataWorkbenchContent').html(data);
+ _paths.currentCatalogedFile = file;
+ makeProductMetadataEditable();
+}
+
+function getProductTypeWorkbench(productType) {
+ var pieces = productType.split('/');
+ var policy = pieces[1];
+ var ptype = pieces[2];
+ $.get('./services/metadata/productType',
+ { 'policy' : policy, 'productType' : ptype, 'id' : productType },
+ function(data,textStatus) {
+ displayProductTypeWorkbench(productType,data);
+ },"html");
+ itPolicy = policy;
+ itProductType = ptype;
+}
+
+function displayProductTypeWorkbench(productType,data) {
+ $('#catalogMetadataWorkbenchContent').html(''); // clear the old contents
+ $('.ptwbMetadataList').html(data); // add metadata from service
+
+ $('#productTypeWorkbenchContents') // display pt workbench
+ .clone()
+ .attr('id','liveProductTypeWorkbenchContents')
+ .appendTo('#catalogMetadataWorkbenchContent')
+ .show()
+ .tabs();
+ clearDroppedFilesList(); // clear dropped files list
+ initDragAndDropTarget(); // set up the d&d target box
+ _paths.currentProductType = productType; // set the path for the ptype
+ makeProductTypeMetadataEditable(); // allow ptype met editing
+ updateIngestionTaskMetExtractorConfigIds();
+}
+
+
Copied: oodt/trunk/curator/src/main/java/org/apache/oodt/cas/curation/config/CuratorConfMetKeys.java (from r1660288, oodt/trunk/curator/src/main/java/org/apache/oodt/cas/curation/servlet/CuratorConfMetKeys.java)
URL: http://svn.apache.org/viewvc/oodt/trunk/curator/src/main/java/org/apache/oodt/cas/curation/config/CuratorConfMetKeys.java?p2=oodt/trunk/curator/src/main/java/org/apache/oodt/cas/curation/config/CuratorConfMetKeys.java&p1=oodt/trunk/curator/src/main/java/org/apache/oodt/cas/curation/servlet/CuratorConfMetKeys.java&r1=1660288&r2=1663022&rev=1663022&view=diff
==============================================================================
--- oodt/trunk/curator/src/main/java/org/apache/oodt/cas/curation/servlet/CuratorConfMetKeys.java (original)
+++ oodt/trunk/curator/src/main/java/org/apache/oodt/cas/curation/config/CuratorConfMetKeys.java Sun Mar 1 02:59:18 2015
@@ -16,7 +16,7 @@
*/
-package org.apache.oodt.cas.curation.servlet;
+package org.apache.oodt.cas.curation.config;
/**
*
Modified: oodt/trunk/curator/src/main/java/org/apache/oodt/cas/curation/service/CurationService.java
URL: http://svn.apache.org/viewvc/oodt/trunk/curator/src/main/java/org/apache/oodt/cas/curation/service/CurationService.java?rev=1663022&r1=1663021&r2=1663022&view=diff
==============================================================================
--- oodt/trunk/curator/src/main/java/org/apache/oodt/cas/curation/service/CurationService.java (original)
+++ oodt/trunk/curator/src/main/java/org/apache/oodt/cas/curation/service/CurationService.java Sun Mar 1 02:59:18 2015
@@ -19,7 +19,7 @@
package org.apache.oodt.cas.curation.service;
//OODT imports
-import org.apache.oodt.cas.curation.servlet.CuratorConfMetKeys;
+import org.apache.oodt.cas.curation.config.CuratorConfMetKeys;
import org.apache.oodt.cas.curation.util.SSOUtils;
import org.apache.oodt.security.sso.SingleSignOn;
Modified: oodt/trunk/curator/src/main/java/org/apache/oodt/cas/curation/service/CurationServiceConfig.java
URL: http://svn.apache.org/viewvc/oodt/trunk/curator/src/main/java/org/apache/oodt/cas/curation/service/CurationServiceConfig.java?rev=1663022&r1=1663021&r2=1663022&view=diff
==============================================================================
--- oodt/trunk/curator/src/main/java/org/apache/oodt/cas/curation/service/CurationServiceConfig.java (original)
+++ oodt/trunk/curator/src/main/java/org/apache/oodt/cas/curation/service/CurationServiceConfig.java Sun Mar 1 02:59:18 2015
@@ -19,7 +19,7 @@
package org.apache.oodt.cas.curation.service;
//OODT imports
-import org.apache.oodt.cas.curation.servlet.CuratorConfMetKeys;
+import org.apache.oodt.cas.curation.config.CuratorConfMetKeys;
import org.apache.oodt.cas.filemgr.datatransfer.DataTransferFactory;
import org.apache.oodt.cas.filemgr.system.XmlRpcFileManagerClient;
import org.apache.oodt.cas.metadata.util.PathUtils;
Modified: oodt/trunk/curator/src/main/java/org/apache/oodt/cas/curation/util/SSOUtils.java
URL: http://svn.apache.org/viewvc/oodt/trunk/curator/src/main/java/org/apache/oodt/cas/curation/util/SSOUtils.java?rev=1663022&r1=1663021&r2=1663022&view=diff
==============================================================================
--- oodt/trunk/curator/src/main/java/org/apache/oodt/cas/curation/util/SSOUtils.java (original)
+++ oodt/trunk/curator/src/main/java/org/apache/oodt/cas/curation/util/SSOUtils.java Sun Mar 1 02:59:18 2015
@@ -25,7 +25,7 @@ import javax.servlet.http.HttpServletRes
//OODT imports
import org.apache.oodt.cas.curation.service.CurationServiceConfig;
-import org.apache.oodt.cas.curation.servlet.CuratorConfMetKeys;
+import org.apache.oodt.cas.curation.config.CuratorConfMetKeys;
import org.apache.oodt.security.sso.AbstractWebBasedSingleSignOn;
import org.apache.oodt.security.sso.SingleSignOnFactory;
Modified: oodt/trunk/curator/src/main/webapp/META-INF/context.xml
URL: http://svn.apache.org/viewvc/oodt/trunk/curator/src/main/webapp/META-INF/context.xml?rev=1663022&r1=1663021&r2=1663022&view=diff
==============================================================================
--- oodt/trunk/curator/src/main/webapp/META-INF/context.xml (original)
+++ oodt/trunk/curator/src/main/webapp/META-INF/context.xml Sun Mar 1 02:59:18 2015
@@ -15,36 +15,39 @@ WARRANTIES OR CONDITIONS OF ANY KIND, ei
License for the specific language governing permissions and limitations under
the License.
-->
-<Context path="/cas-curator" docBase="/path/to/cas-curation-0.1.war">
+<Context path="/cas-curator">
<Parameter name="org.apache.oodt.cas.curator.projectName"
value="OODT"/>
<Parameter name="org.apache.oodt.cas.curator.metExtractorConf.uploadPath"
- value="[CAS_CURATOR_HOME]/aux/met_def/cas_curator" />
+ value="[OODT_HOME]/extractors/cas_curator" />
<Parameter name="org.apache.oodt.cas.curator.dataDefinition.uploadPath"
- value="[CAS_CURATOR_HOME]/policy" />
+ value="[FILEMGR_HOME]/policy" />
<Parameter name="org.apache.oodt.cas.curator.stagingAreaPath"
- value="/data/ingest"/>
+ value="[OODT_HOME]/data/ingest"/>
<Parameter name="org.apache.oodt.cas.curator.metAreaPath"
- value="/data/met"/>
+ value="[OODT_HOME]]/data/met"/>
<Parameter name="org.apache.oodt.cas.curator.fmProps"
- value="[CAS_CURATOR_HOME]/filemgr/etc/filemgr.properties"/>
+ value="[FILEMGR_HOME]/etc/filemgr.properties"/>
<Parameter name="org.apache.oodt.cas.curator.metExtension"
value=".met"/>
<Parameter name="org.apache.oodt.cas.fm.url"
- value="http://localhost:9000"/>
+ value="[FILEMGR_URL]"/>
<Parameter name="org.apache.oodt.security.sso.implClass"
value="org.apache.oodt.security.sso.DummyImpl"/>
<Parameter name="org.apache.oodt.cas.curator.catalogFactoryClass"
value="org.apache.oodt.cas.filemgr.catalog.LuceneCatalogFactory" />
+
+
+ <Parameter name="curator.homepage" value="org.apache.oodt.cas.curation.HomePage"/>
</Context>
Modified: oodt/trunk/curator/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/oodt/trunk/curator/src/main/webapp/WEB-INF/web.xml?rev=1663022&r1=1663021&r2=1663022&view=diff
==============================================================================
--- oodt/trunk/curator/src/main/webapp/WEB-INF/web.xml (original)
+++ oodt/trunk/curator/src/main/webapp/WEB-INF/web.xml Sun Mar 1 02:59:18 2015
@@ -16,7 +16,7 @@ License for the specific language govern
the License.
-->
<web-app id="WebApp_ID" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
- <display-name>curate</display-name>
+ <display-name>curator</display-name>
<servlet>
<servlet-name>CXFServlet</servlet-name>
<servlet-class>
@@ -34,14 +34,25 @@ the License.
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
+
+ <filter>
+ <filter-name>wicket.browser</filter-name>
+ <filter-class>org.apache.wicket.protocol.http.WicketFilter</filter-class>
+ <init-param>
+ <param-name>applicationClassName</param-name>
+ <param-value>org.apache.oodt.cas.curation.CurationApp</param-value>
+ </init-param>
+ <init-param>
+ <param-name>curator.homepage</param-name>
+ <param-value>org.apache.oodt.cas.curation.HomePage</param-value>
+ </init-param>
+ </filter>
- <servlet>
- <display-name>Curation Service</display-name>
- <servlet-name>Curation Service</servlet-name>
- <servlet-class>org.apache.oodt.cas.curation.service.CurationService</servlet-class>
- <load-on-startup>1</load-on-startup>
- </servlet>
-
+ <filter-mapping>
+ <filter-name>wicket.browser</filter-name>
+ <url-pattern>/*</url-pattern>
+ </filter-mapping>
+
<servlet-mapping>
<servlet-name>CXFServlet</servlet-name>
Modified: oodt/trunk/pom.xml
URL: http://svn.apache.org/viewvc/oodt/trunk/pom.xml?rev=1663022&r1=1663021&r2=1663022&view=diff
==============================================================================
--- oodt/trunk/pom.xml (original)
+++ oodt/trunk/pom.xml Sun Mar 1 02:59:18 2015
@@ -56,7 +56,7 @@ the License.
<module>workflow</module>
<module>crawler</module>
<module>resource</module>
- <module>curator</module>
+ <!-- <module>curator</module> -->
<module>pge</module>
<module>mvn/plugins/cas-install</module>
<module>mvn/archetypes</module>