diff --git a/notes b/notes
new file mode 100644
index 0000000..d16ad5f
--- /dev/null
+++ b/notes
@@ -0,0 +1,17 @@
+03/04/2017:
+Problème avec le clic sur les liens vers les fichiers xsams pour declencher l'association des requêtes dans le querystore.
+Le javascript rafraichissant la page ne fonctionnait pas sous firefox. Les liens ont été remplacés par des boutons.
+
+
+13/02/2017:
+SEAM retourne des erreurs d'exécution lorsqu'il est lancé avec java8 :
+Could not instantiate Seam component: registration
+
+Le fichier ~/.mavenrc a été édité pour que JAVA_HOME pointe sur java7
+JAVA_HOME est défini dans deploy.sh pour que jboss utilise java7
+
+Autre solution : export JAVA_HOME=~/Applications/jdk1.8.0_152/
+
+
+Utilise JSF en version 1.x
+
diff --git a/pom.xml b/pom.xml
index 6b5b39a..daced0d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -26,7 +26,7 @@
2.2.11
2.2.10
3.3.0.ga
- 12.07r2-SNAPSHOT
+ 12.07r3-SNAPSHOT
12.07
12.07r2-SNAPSHOT
UTF-8
@@ -36,7 +36,7 @@
vamdc repository
VAMDC repository
- http://dev.vamdc.org/nexus/content/groups/public/
+ http://nexus.vamdc.org/nexus/content/groups/public/
default
@@ -50,17 +50,25 @@
1.6
-
+
maven-resources-plugin
2.5
-
+
+
+ org.apache.maven.plugins
+ maven-surefire-plugin
+ 2.12.4
+
+ true
+
+
diff --git a/portal.ear/pom.xml b/portal.ear/pom.xml
index 96135e9..8b43012 100644
--- a/portal.ear/pom.xml
+++ b/portal.ear/pom.xml
@@ -33,10 +33,11 @@
org.jboss.el
jboss-el
-
+
com.sun.xml.ws
jaxws-rt
@@ -48,6 +49,21 @@
el-api
provided
+
+
+ org.drools
+ drools-core
+ 5.4.0.Final
+
+
+
+
+ org.drools
+ drools-compiler
+ 5.4.0.Final
+
+
+
@@ -114,4 +130,4 @@
-
\ No newline at end of file
+
diff --git a/portal.ejb/pom.xml b/portal.ejb/pom.xml
index 8c22966..c721e58 100644
--- a/portal.ejb/pom.xml
+++ b/portal.ejb/pom.xml
@@ -55,11 +55,7 @@
javax.ejb
ejb-api
provided
-
-
-
-
-
+
javax.measure
jsr-275
@@ -110,7 +106,23 @@
servlet-api
provided
-
+
+ org.slf4j
+ slf4j-log4j12
+ 1.4.2
+
+
+ org.apache.httpcomponents
+ httpclient
+ 4.5.3
+
+
+
+ org.json
+ json
+ 20220320
+
+
@@ -163,4 +175,4 @@
-
\ No newline at end of file
+
diff --git a/portal.ejb/src/main/java/org/vamdc/portal/Settings.java b/portal.ejb/src/main/java/org/vamdc/portal/Settings.java
index 259dc47..2fa6dfb 100644
--- a/portal.ejb/src/main/java/org/vamdc/portal/Settings.java
+++ b/portal.ejb/src/main/java/org/vamdc/portal/Settings.java
@@ -11,14 +11,21 @@
*/
public enum Settings {
+ //superseded by values in server/default/deploy/properties-service.xml of jboss server
HTTP_CONNECT_TIMEOUT("HTTPConnTimeout", "2000"),
HTTP_DATA_TIMEOUT("HTTPDataTimeout","30000"),
REGISTRY_URL("registryURL","http://registry.vamdc.eu/registry-12.07/services/RegistryQueryv1_0"),
REGISTRY_UPDATE_INTERVAL("registryUpdateInterval","300000"),
+ QUERYSTORE_ASSOCIATION_URL("querystoreAssociationUrl","https://querystore.vamdc.eu/PortalAssociationService?"),
AVAILABILITY_MONITOR_INTERVAL("availabilityMonitorInterval","300000"),
REGISTRY_RETRY_INTERVAL("registryRetryInterval","10000"),
HTTP_HEAD_TIMEOUT("HTTPHeadTimeout","60000"),
PDL_SERVER_URL("pdlServerURL", "http://vm-euhoutestc62.obspm.fr/vamdc/OnlineCode?"),
+ PORTAL_USER_AGENT("userAgent", "VAMDC Portal Dev"),
+ PORTAL_VERSION("version", "2017_06"),
+ QUERYSTORE_MAX_RETRY("querystoreMaxRetry", "10"),
+ QUERYSTORE_RETRY_TIMER("querystoreRetryTimer", "3000"),
+ DEFAULT_USER_MAIL("defaultUserMail", "unregistered@portal.vamdc.eu");
;
diff --git a/portal.ejb/src/main/java/org/vamdc/portal/async/FutureTask.java b/portal.ejb/src/main/java/org/vamdc/portal/async/FutureTask.java
new file mode 100644
index 0000000..0f7758b
--- /dev/null
+++ b/portal.ejb/src/main/java/org/vamdc/portal/async/FutureTask.java
@@ -0,0 +1,10 @@
+package org.vamdc.portal.async;
+
+public interface FutureTask {
+ public void process();
+ public boolean isDone();
+ public boolean isProcessing();
+ public boolean isOk();
+ public boolean isErrorHappened();
+ public String getError();
+}
diff --git a/portal.ejb/src/main/java/org/vamdc/portal/entity/EntityFacade.java b/portal.ejb/src/main/java/org/vamdc/portal/entity/EntityFacade.java
index b56f191..07c28b9 100644
--- a/portal.ejb/src/main/java/org/vamdc/portal/entity/EntityFacade.java
+++ b/portal.ejb/src/main/java/org/vamdc/portal/entity/EntityFacade.java
@@ -7,6 +7,7 @@
import javax.persistence.EntityManager;
+import org.vamdc.portal.entity.constant.Species;
import org.vamdc.portal.entity.species.VamdcSpecies;
import org.vamdc.portal.session.queryBuilder.forms.MoleculesForm.MoleculeInfo;
@@ -17,52 +18,56 @@
*
*/
public class EntityFacade {
+
+ private EntityFacade(){}
- public static Collection suggestStoichiometricFormula(
+ public static Collection suggestMoleculeStoichiometricFormula(
EntityManager entityManager, String value) {
if (!checkValue(value) || entityManager==null)
return Collections.emptyList();
- return EntityQuery.suggestStoichForm(entityManager, value.trim());
+ return EntityQuery.suggestMoleculeStoichForm(entityManager, value.trim());
}
- public static Collection suggestOrdinaryFormula(
+ public static Collection suggestMoleculeOrdinaryFormula(
EntityManager entityManager, String value) {
if (!checkValue(value) || entityManager==null)
return Collections.emptyList();
- return EntityQuery.suggestStructForm(entityManager, value);
+ return EntityQuery.suggestMoleculeStructForm(entityManager, value);
}
-
-
- public static Collection suggestChemicalName(
+
+ public static Collection suggestMoleculeName(
EntityManager entityManager, String value) {
if (!checkValue(value) || entityManager==null)
return Collections.emptyList();
- return EntityQuery.suggestSpeciesName(entityManager, value.trim());
+ return EntityQuery.suggestMoleculeName(entityManager, value.trim());
}
public static List loadMoleculesFromName(EntityManager em,String value){
String query = "SELECT distinct vs FROM VamdcSpecies vs " +
"INNER JOIN vs.vamdcSpeciesNameses vsn " +
- "WHERE vsn.name = :Value";
+ "WHERE vsn.name = :Value " +
+ "AND vs.speciesType = " + Species.MOLECULE.getId();
return loadElements(em,query,value);
}
public static List loadMoleculesFromStoichForm(EntityManager em,String value){
String query = "SELECT distinct vs FROM VamdcSpecies vs " +
- "WHERE vs.stoichiometricFormula = :Value";
+ "WHERE vs.stoichiometricFormula = :Value " +
+ "AND vs.speciesType = "+ Species.MOLECULE.getId();
return loadElements(em,query,value);
}
public static List loadMoleculesFromOrdForm(EntityManager em, String value) {
String query = "SELECT distinct vs FROM VamdcSpecies vs " +
"INNER JOIN vs.vamdcSpeciesStructFormulaes vsf " +
- "WHERE vsf.formula = :Value";
+ "WHERE vsf.formula = :Value " +
+ "AND vs.speciesType = " + Species.MOLECULE.getId();
return loadElements(em,query,value);
}
diff --git a/portal.ejb/src/main/java/org/vamdc/portal/entity/EntityQuery.java b/portal.ejb/src/main/java/org/vamdc/portal/entity/EntityQuery.java
index 982f890..be1e5e0 100644
--- a/portal.ejb/src/main/java/org/vamdc/portal/entity/EntityQuery.java
+++ b/portal.ejb/src/main/java/org/vamdc/portal/entity/EntityQuery.java
@@ -3,6 +3,9 @@
import java.util.Collection;
import javax.persistence.EntityManager;
+import javax.persistence.Query;
+
+import org.vamdc.portal.entity.constant.Species;
/**
* Collection of static methods to get some species objects
@@ -10,6 +13,8 @@
*
*/
class EntityQuery{
+
+ private EntityQuery(){}
@SuppressWarnings("unchecked")
static Collection suggestSpeciesName(EntityManager em,
@@ -21,7 +26,32 @@ static Collection suggestSpeciesName(EntityManager em,
.getResultList();
}
+
+ static Collection suggestAtomName(EntityManager em,
+ String name) {
+ return suggestRestrictedSpeciesName(em, name, Species.ATOM.getId());
+
+ }
+
+ static Collection suggestMoleculeName(EntityManager em,
+ String name) {
+ return suggestRestrictedSpeciesName(em, name, Species.MOLECULE.getId());
+ }
+
+ @SuppressWarnings("unchecked")
+ private static Collection suggestRestrictedSpeciesName(EntityManager em,
+ String name, Integer speciesType) {
+ Query q = em.createQuery("SELECT DISTINCT vsn.name from VamdcSpeciesNames vsn JOIN vsn.vamdcSpecies vsp " +
+ "WHERE vsn.name LIKE :speciesName and vsn.vamdcMarkupTypes.id=1 and vsp.speciesType=:speciesType "
+ + " order by length(vsn.name), vsn.searchPriority")
+ .setParameter("speciesName", "%"+name+"%")
+ .setParameter("speciesType", speciesType)
+ .setMaxResults(20);
+ return q.getResultList();
+
+ }
+
@SuppressWarnings("unchecked")
static Collection suggestStoichForm(EntityManager em, String formula){
return em.createQuery("SELECT distinct vs.stoichiometricFormula from VamdcSpecies vs " +
@@ -31,14 +61,33 @@ static Collection suggestStoichForm(EntityManager em, String formula){
.getResultList();
}
+
+ static Collection suggestMoleculeStoichForm(EntityManager em, String formula){
+ return suggestRestrictedStoichForm(em, formula, Species.MOLECULE.getId());
+ }
+
@SuppressWarnings("unchecked")
- static Collection suggestStructForm(EntityManager em, String formula){
- return em.createQuery("SELECT distinct vssf.formula from VamdcSpeciesStructFormulae vssf " +
- "WHERE vssf.formula LIKE :formula and vssf.vamdcMarkupTypes.id=1 order by length(vssf.formula), vssf.searchPriority")
+ private static Collection suggestRestrictedStoichForm(EntityManager em, String formula, Integer speciesType){
+ return em.createQuery("SELECT distinct vs.stoichiometricFormula from VamdcSpecies vs " +
+ "WHERE vs.stoichiometricFormula LIKE :formula AND vs.speciesType=:speciesType order by length(vs.stoichiometricFormula)")
.setParameter("formula", "%"+formula+"%")
+ .setParameter("speciesType", speciesType)
.setMaxResults(20)
.getResultList();
}
+ static Collection suggestMoleculeStructForm(EntityManager em, String formula){
+ return suggestRestrictedStructForm(em, formula, Species.MOLECULE.getId());
+ }
+
+ @SuppressWarnings("unchecked")
+ private static Collection suggestRestrictedStructForm(EntityManager em, String formula, Integer speciesType){
+ return em.createQuery("SELECT distinct vssf.formula from VamdcSpeciesStructFormulae vssf JOIN vssf.vamdcSpecies vs " +
+ "WHERE vssf.formula LIKE :formula and vssf.vamdcMarkupTypes.id=1 and vs.speciesType=:speciesType order by length(vssf.formula), vssf.searchPriority")
+ .setParameter("formula", "%"+formula+"%")
+ .setParameter("speciesType", speciesType)
+ .setMaxResults(20)
+ .getResultList();
+ }
}
diff --git a/portal.ejb/src/main/java/org/vamdc/portal/entity/VamdcSpeciesFacade.java b/portal.ejb/src/main/java/org/vamdc/portal/entity/VamdcSpeciesFacade.java
index 07885b9..43b3b43 100644
--- a/portal.ejb/src/main/java/org/vamdc/portal/entity/VamdcSpeciesFacade.java
+++ b/portal.ejb/src/main/java/org/vamdc/portal/entity/VamdcSpeciesFacade.java
@@ -1,5 +1,6 @@
package org.vamdc.portal.entity;
+import org.vamdc.portal.entity.constant.Markup;
import org.vamdc.portal.entity.species.VamdcSpecies;
import org.vamdc.portal.entity.species.VamdcSpeciesNames;
import org.vamdc.portal.entity.species.VamdcSpeciesStructFormulae;
@@ -16,7 +17,7 @@ public VamdcSpeciesFacade(VamdcSpecies element){
@Override
public String getName() {
for (VamdcSpeciesNames vsn:element.getVamdcSpeciesNameses()){
- if (vsn.getVamdcMarkupTypes().getId()==1)
+ if (vsn.getVamdcMarkupTypes().getId() == Markup.TEXT.getId())
return vsn.getName();
}
return "";
@@ -28,7 +29,7 @@ public String getName() {
@Override
public String getOrdinaryFormula() {
for (VamdcSpeciesStructFormulae vsff:element.getVamdcSpeciesStructFormulaes()){
- if (vsff.getVamdcMarkupTypes().getId()==1)
+ if (vsff.getVamdcMarkupTypes().getId() == Markup.TEXT.getId())
return vsff.getFormula();
}
return "";
@@ -46,7 +47,7 @@ public String getDescription() {
String result = "";
for(VamdcSpeciesStructFormulae vsff: element.getVamdcSpeciesStructFormulaes()){
result=vsff.getFormula();
- if (vsff.getVamdcMarkupTypes().getId()==2)
+ if (vsff.getVamdcMarkupTypes().getId() == Markup.HTML.getId())
break;
}
return appendName(result);
diff --git a/portal.ejb/src/main/java/org/vamdc/portal/entity/constant/Markup.java b/portal.ejb/src/main/java/org/vamdc/portal/entity/constant/Markup.java
new file mode 100644
index 0000000..3f1ec67
--- /dev/null
+++ b/portal.ejb/src/main/java/org/vamdc/portal/entity/constant/Markup.java
@@ -0,0 +1,19 @@
+package org.vamdc.portal.entity.constant;
+
+public enum Markup {
+ TEXT(1),
+ HTML(2),
+ RST(3),
+ LATEX(4);
+
+ private Integer id;
+
+ Markup(Integer id){
+ this.id = id;
+ }
+
+ public Integer getId(){
+ return this.id;
+ }
+
+}
diff --git a/portal.ejb/src/main/java/org/vamdc/portal/entity/constant/Species.java b/portal.ejb/src/main/java/org/vamdc/portal/entity/constant/Species.java
new file mode 100644
index 0000000..4517679
--- /dev/null
+++ b/portal.ejb/src/main/java/org/vamdc/portal/entity/constant/Species.java
@@ -0,0 +1,16 @@
+package org.vamdc.portal.entity.constant;
+
+public enum Species {
+ ATOM(1),
+ MOLECULE(2);
+
+ private Integer id;
+
+ Species(Integer id){
+ this.id = id;
+ }
+
+ public Integer getId(){
+ return this.id;
+ }
+}
diff --git a/portal.ejb/src/main/java/org/vamdc/portal/entity/query/HttpHeadResponse.java b/portal.ejb/src/main/java/org/vamdc/portal/entity/query/HttpHeadResponse.java
index af67d20..f439ab8 100644
--- a/portal.ejb/src/main/java/org/vamdc/portal/entity/query/HttpHeadResponse.java
+++ b/portal.ejb/src/main/java/org/vamdc/portal/entity/query/HttpHeadResponse.java
@@ -30,11 +30,11 @@ public enum Response{
Response(String description){
this.description = description;
}
-
+
public String getDescription(){
return this.description;
}
-
+
}
private String ivoaID;
@@ -42,6 +42,7 @@ public String getDescription(){
private Response status;
private Date lastmodified;
private Query query;
+ private String requestToken;
private Integer recordID;
@@ -58,10 +59,10 @@ public HttpHeadResponse(){
}
public HttpHeadResponse(String ivoaID, HttpURLConnection connection) {
+ retrieveHeaders(connection);
this.ivoaID = ivoaID;
this.fullQueryURL = connection.getURL().toString();
- this.status = retrieveStatus(connection);
- retrieveHeaders(connection);
+ this.status = retrieveStatus(connection);
if (truncated>0 && truncated<100)
this.status=Response.TRUNCATED;
}
@@ -76,6 +77,7 @@ private void retrieveHeaders(HttpURLConnection connection) {
processes = collisions+radiative+nonRadiative;
truncated = getTruncatedValue(connection,"VAMDC-TRUNCATED");
lastmodified = extractLastModified(connection);
+ requestToken = connection.getHeaderField("VAMDC-REQUEST-TOKEN");
}
private Date extractLastModified(HttpURLConnection connection) {
@@ -92,7 +94,7 @@ private int getValue( HttpURLConnection connection,String headerName){
return 0;
}
}
-
+
private int getTruncatedValue( HttpURLConnection connection,String headerName ){
try{
String val = connection.getHeaderField(headerName);
@@ -129,11 +131,32 @@ private Response retrieveStatus(HttpURLConnection connection){
@Id @GeneratedValue
public Integer getRecordID() { return recordID; }
public void setRecordID(Integer recordID) { this.recordID = recordID; }
-
+
public String getIvoaID() { return ivoaID; }
public void setIvoaID(String ivoaID) { this.ivoaID = ivoaID; }
-
- public Response getStatus() { return status; }
+
+ /**
+ * if a node answers a HEAD request, there is no content and the
+ * response code can be 204
+ * In that case, if data have been found ( processes + species + states > 0 )
+ * we return a OK status instead of EMPTY
+ * @return
+ */
+ public Response getStatus() {
+ try {
+ int total = processes + species + states;
+ if(total > 0) {
+ return Response.OK;
+ }else {
+ return status;
+ }
+ }catch(Exception e) {
+ e.printStackTrace();
+ return status;
+ }
+ }
+
+
public void setStatus(Response status) { this.status = status; }
@Transient
public String getStatusDescription() {return status.getDescription();}
@@ -152,17 +175,19 @@ public boolean isLastModSet(){
public int getRadiative() { return radiative; }
public int getNonRadiative() { return nonRadiative; }
public int getCollisions() { return collisions; }
+ public String getRequestToken(){ return requestToken; }
+
@Transient
public int getTruncated() { return truncated; }
-
+
public void setSpecies(int species) { this.species = species; }
public void setStates(int states) { this.states = states; }
public void setProcesses(int processes) { this.processes = processes; }
public void setRadiative(int radiative) { this.radiative = radiative; }
public void setNonRadiative(int nonRadiative) { this.nonRadiative = nonRadiative; }
public void setCollisions(int collisions) { this.collisions = collisions; }
+ public void setRequestToken(String token){ this.requestToken = token; }
-
@Lob
public String getFullQueryURL() { return fullQueryURL; }
public void setFullQueryURL(String fullQueryURL) { this.fullQueryURL = fullQueryURL; }
@@ -175,6 +200,6 @@ public boolean isLastModSet(){
@Transient
public boolean isOk(){
- return this.status==Response.OK || this.status == Response.TRUNCATED;
+ return this.getStatus()==Response.OK || this.getStatus() == Response.TRUNCATED;
}
}
diff --git a/portal.ejb/src/main/java/org/vamdc/portal/entity/species/VamdcConformers.java b/portal.ejb/src/main/java/org/vamdc/portal/entity/species/VamdcConformers.java
deleted file mode 100644
index 9a65036..0000000
--- a/portal.ejb/src/main/java/org/vamdc/portal/entity/species/VamdcConformers.java
+++ /dev/null
@@ -1,69 +0,0 @@
-package org.vamdc.portal.entity.species;
-
-// Generated 18.09.2012 16:57:53 by Hibernate Tools 3.4.0.CR1
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.FetchType;
-import javax.persistence.GeneratedValue;
-import static javax.persistence.GenerationType.IDENTITY;
-import javax.persistence.Id;
-import javax.persistence.JoinColumn;
-import javax.persistence.ManyToOne;
-import javax.persistence.Table;
-import org.hibernate.validator.Length;
-import org.hibernate.validator.NotNull;
-
-/**
- * VamdcConformers generated by hbm2java
- */
-@Entity
-@Table(name = "vamdc_conformers", catalog = "vamdc_species")
-public class VamdcConformers implements java.io.Serializable {
-
- private Integer id;
- private VamdcSpecies vamdcSpecies;
- private String conformerName;
-
- public VamdcConformers() {
- }
-
- public VamdcConformers(VamdcSpecies vamdcSpecies, String conformerName) {
- this.vamdcSpecies = vamdcSpecies;
- this.conformerName = conformerName;
- }
-
- @Id
- @GeneratedValue(strategy = IDENTITY)
- @Column(name = "id", unique = true, nullable = false)
- public Integer getId() {
- return this.id;
- }
-
- public void setId(Integer id) {
- this.id = id;
- }
-
- @ManyToOne(fetch = FetchType.LAZY)
- @JoinColumn(name = "species_id", nullable = false)
- @NotNull
- public VamdcSpecies getVamdcSpecies() {
- return this.vamdcSpecies;
- }
-
- public void setVamdcSpecies(VamdcSpecies vamdcSpecies) {
- this.vamdcSpecies = vamdcSpecies;
- }
-
- @Column(name = "conformer_name", nullable = false, length = 150)
- @NotNull
- @Length(max = 150)
- public String getConformerName() {
- return this.conformerName;
- }
-
- public void setConformerName(String conformerName) {
- this.conformerName = conformerName;
- }
-
-}
diff --git a/portal.ejb/src/main/java/org/vamdc/portal/entity/species/VamdcInchikeyExceptions.java b/portal.ejb/src/main/java/org/vamdc/portal/entity/species/VamdcInchikeyExceptions.java
index 1db481b..d049c03 100644
--- a/portal.ejb/src/main/java/org/vamdc/portal/entity/species/VamdcInchikeyExceptions.java
+++ b/portal.ejb/src/main/java/org/vamdc/portal/entity/species/VamdcInchikeyExceptions.java
@@ -6,18 +6,21 @@
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
+
import static javax.persistence.GenerationType.IDENTITY;
+
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
+
import org.hibernate.validator.NotNull;
/**
* VamdcInchikeyExceptions generated by hbm2java
*/
@Entity
-@Table(name = "vamdc_inchikey_exceptions", catalog = "vamdc_species")
+@Table(name = "vamdc_inchikey_exceptions", catalog = "vamdc_species_dev")
public class VamdcInchikeyExceptions implements java.io.Serializable {
private Integer id;
diff --git a/portal.ejb/src/main/java/org/vamdc/portal/entity/species/VamdcMarkupTypes.java b/portal.ejb/src/main/java/org/vamdc/portal/entity/species/VamdcMarkupTypes.java
index 736d7bb..a4c3a23 100644
--- a/portal.ejb/src/main/java/org/vamdc/portal/entity/species/VamdcMarkupTypes.java
+++ b/portal.ejb/src/main/java/org/vamdc/portal/entity/species/VamdcMarkupTypes.java
@@ -17,7 +17,7 @@
* VamdcMarkupTypes generated by hbm2java
*/
@Entity
-@Table(name = "vamdc_markup_types", catalog = "vamdc_species")
+@Table(name = "vamdc_markup_types", catalog = "vamdc_species_dev")
public class VamdcMarkupTypes implements java.io.Serializable {
private int id;
diff --git a/portal.ejb/src/main/java/org/vamdc/portal/entity/species/VamdcMemberDatabaseIdentifiers.java b/portal.ejb/src/main/java/org/vamdc/portal/entity/species/VamdcMemberDatabaseIdentifiers.java
index 628b62e..e645ccc 100644
--- a/portal.ejb/src/main/java/org/vamdc/portal/entity/species/VamdcMemberDatabaseIdentifiers.java
+++ b/portal.ejb/src/main/java/org/vamdc/portal/entity/species/VamdcMemberDatabaseIdentifiers.java
@@ -19,7 +19,7 @@
* VamdcMemberDatabaseIdentifiers generated by hbm2java
*/
@Entity
-@Table(name = "vamdc_member_database_identifiers", catalog = "vamdc_species", uniqueConstraints = @UniqueConstraint(columnNames = {
+@Table(name = "vamdc_node_species", catalog = "vamdc_species_dev", uniqueConstraints = @UniqueConstraint(columnNames = {
"species_id", "database_species_id", "member_database_id" }))
public class VamdcMemberDatabaseIdentifiers implements java.io.Serializable {
diff --git a/portal.ejb/src/main/java/org/vamdc/portal/entity/species/VamdcMemberDatabases.java b/portal.ejb/src/main/java/org/vamdc/portal/entity/species/VamdcMemberDatabases.java
index 9a4a605..0526ce3 100644
--- a/portal.ejb/src/main/java/org/vamdc/portal/entity/species/VamdcMemberDatabases.java
+++ b/portal.ejb/src/main/java/org/vamdc/portal/entity/species/VamdcMemberDatabases.java
@@ -19,7 +19,7 @@
* VamdcMemberDatabases generated by hbm2java
*/
@Entity
-@Table(name = "vamdc_member_databases", catalog = "vamdc_species")
+@Table(name = "vamdc_nodes", catalog = "vamdc_species_dev")
public class VamdcMemberDatabases implements java.io.Serializable {
private Integer id;
diff --git a/portal.ejb/src/main/java/org/vamdc/portal/entity/species/VamdcSpecies.java b/portal.ejb/src/main/java/org/vamdc/portal/entity/species/VamdcSpecies.java
index 128d214..d5c9910 100644
--- a/portal.ejb/src/main/java/org/vamdc/portal/entity/species/VamdcSpecies.java
+++ b/portal.ejb/src/main/java/org/vamdc/portal/entity/species/VamdcSpecies.java
@@ -21,14 +21,13 @@
* VamdcSpecies generated by hbm2java
*/
@Entity
-@Table(name = "vamdc_species", catalog = "vamdc_species", uniqueConstraints = @UniqueConstraint(columnNames = {
- "inchikey", "inchikey_duplicate_counter" }))
+@Table(name = "vamdc_species", catalog = "vamdc_species_dev", uniqueConstraints = @UniqueConstraint(columnNames = {
+ "inchikey" }))
public class VamdcSpecies implements java.io.Serializable {
private String id;
private String inchi;
private String inchikey;
- private int inchikeyDuplicateCounter;
private String stoichiometricFormula;
private int massNumber;
private int charge;
@@ -45,10 +44,10 @@ public class VamdcSpecies implements java.io.Serializable {
0);
private Set vamdcSpeciesStructFormulaes = new HashSet(
0);
- private Set vamdcSpeciesResourceses = new HashSet(
- 0);
- private Set vamdcConformerses = new HashSet(
- 0);
+ /*private Set vamdcSpeciesResourceses = new HashSet(
+ 0);*/
+ /*private Set vamdcConformerses = new HashSet(
+ 0);*/
private Set vamdcSpeciesNameses = new HashSet(
0);
@@ -62,7 +61,7 @@ public VamdcSpecies(String id, String inchi, String inchikey,
this.id = id;
this.inchi = inchi;
this.inchikey = inchikey;
- this.inchikeyDuplicateCounter = inchikeyDuplicateCounter;
+ //this.inchikeyDuplicateCounter = inchikeyDuplicateCounter;
this.stoichiometricFormula = stoichiometricFormula;
this.massNumber = massNumber;
this.charge = charge;
@@ -89,28 +88,28 @@ public VamdcSpecies(
Set vamdcMemberDatabaseIdentifierses,
Set vamdcInchikeyExceptionses,
Set vamdcSpeciesStructFormulaes,
- Set vamdcSpeciesResourceses,
- Set vamdcConformerses,
+ //Set vamdcSpeciesResourceses,
+ /*Set vamdcConformerses,*/
Set vamdcSpeciesNameses) {
this.id = id;
this.inchi = inchi;
this.inchikey = inchikey;
- this.inchikeyDuplicateCounter = inchikeyDuplicateCounter;
+ /*this.inchikeyDuplicateCounter = inchikeyDuplicateCounter;*/
this.stoichiometricFormula = stoichiometricFormula;
this.massNumber = massNumber;
this.charge = charge;
this.speciesType = speciesType;
this.cml = cml;
this.mol = mol;
- this.image = image;
+ //this.image = image;
this.smiles = smiles;
this.created = created;
this.memberDatabasesId = memberDatabasesId;
this.vamdcMemberDatabaseIdentifierses = vamdcMemberDatabaseIdentifierses;
this.vamdcInchikeyExceptionses = vamdcInchikeyExceptionses;
this.vamdcSpeciesStructFormulaes = vamdcSpeciesStructFormulaes;
- this.vamdcSpeciesResourceses = vamdcSpeciesResourceses;
- this.vamdcConformerses = vamdcConformerses;
+ //this.vamdcSpeciesResourceses = vamdcSpeciesResourceses;
+ /*this.vamdcConformerses = vamdcConformerses;*/
this.vamdcSpeciesNameses = vamdcSpeciesNameses;
}
@@ -147,14 +146,14 @@ public void setInchikey(String inchikey) {
this.inchikey = inchikey;
}
- @Column(name = "inchikey_duplicate_counter", nullable = false)
+ /*@Column(name = "inchikey_duplicate_counter", nullable = false)
public int getInchikeyDuplicateCounter() {
return this.inchikeyDuplicateCounter;
}
public void setInchikeyDuplicateCounter(int inchikeyDuplicateCounter) {
this.inchikeyDuplicateCounter = inchikeyDuplicateCounter;
- }
+ }*/
@Column(name = "stoichiometric_formula", nullable = false, length = 150)
@NotNull
@@ -185,7 +184,7 @@ public void setCharge(int charge) {
this.charge = charge;
}
- @Column(name = "species_type", nullable = false)
+ @Column(name = "species_type_id", nullable = false)
public int getSpeciesType() {
return this.speciesType;
}
@@ -212,7 +211,7 @@ public void setMol(String mol) {
this.mol = mol;
}
- @Column(name = "image")
+ @Column(name = "imageURL")
public String getImage() {
return this.image;
}
@@ -280,7 +279,7 @@ public void setVamdcSpeciesStructFormulaes(
this.vamdcSpeciesStructFormulaes = vamdcSpeciesStructFormulaes;
}
- @OneToMany(fetch = FetchType.LAZY, mappedBy = "vamdcSpecies")
+ /*@OneToMany(fetch = FetchType.LAZY, mappedBy = "vamdcSpecies")
public Set getVamdcSpeciesResourceses() {
return this.vamdcSpeciesResourceses;
}
@@ -288,16 +287,16 @@ public Set getVamdcSpeciesResourceses() {
public void setVamdcSpeciesResourceses(
Set vamdcSpeciesResourceses) {
this.vamdcSpeciesResourceses = vamdcSpeciesResourceses;
- }
+ }*/
- @OneToMany(fetch = FetchType.LAZY, mappedBy = "vamdcSpecies")
+ /*@OneToMany(fetch = FetchType.LAZY, mappedBy = "vamdcSpecies")
public Set getVamdcConformerses() {
return this.vamdcConformerses;
}
public void setVamdcConformerses(Set vamdcConformerses) {
this.vamdcConformerses = vamdcConformerses;
- }
+ }*/
@OneToMany(fetch = FetchType.LAZY, mappedBy = "vamdcSpecies")
public Set getVamdcSpeciesNameses() {
diff --git a/portal.ejb/src/main/java/org/vamdc/portal/entity/species/VamdcSpeciesNames.java b/portal.ejb/src/main/java/org/vamdc/portal/entity/species/VamdcSpeciesNames.java
index f3f88fa..d555c38 100644
--- a/portal.ejb/src/main/java/org/vamdc/portal/entity/species/VamdcSpeciesNames.java
+++ b/portal.ejb/src/main/java/org/vamdc/portal/entity/species/VamdcSpeciesNames.java
@@ -22,10 +22,14 @@
* VamdcSpeciesNames generated by hbm2java
*/
@Entity
-@Table(name = "vamdc_species_names", catalog = "vamdc_species", uniqueConstraints = @UniqueConstraint(columnNames = {
+@Table(name = "vamdc_species_names", catalog = "vamdc_species_dev", uniqueConstraints = @UniqueConstraint(columnNames = {
"species_id", "name", "markup_type_id" }))
public class VamdcSpeciesNames implements java.io.Serializable {
+ /**
+ *
+ */
+ private static final long serialVersionUID = 3162094765495447143L;
private Integer id;
private VamdcSpecies vamdcSpecies;
private VamdcMarkupTypes vamdcMarkupTypes;
diff --git a/portal.ejb/src/main/java/org/vamdc/portal/entity/species/VamdcSpeciesResources.java b/portal.ejb/src/main/java/org/vamdc/portal/entity/species/VamdcSpeciesResources.java
deleted file mode 100644
index f47e57e..0000000
--- a/portal.ejb/src/main/java/org/vamdc/portal/entity/species/VamdcSpeciesResources.java
+++ /dev/null
@@ -1,111 +0,0 @@
-package org.vamdc.portal.entity.species;
-
-// Generated 18.09.2012 16:57:53 by Hibernate Tools 3.4.0.CR1
-
-import java.util.Date;
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.FetchType;
-import javax.persistence.GeneratedValue;
-import static javax.persistence.GenerationType.IDENTITY;
-import javax.persistence.Id;
-import javax.persistence.JoinColumn;
-import javax.persistence.ManyToOne;
-import javax.persistence.Table;
-import javax.persistence.Temporal;
-import javax.persistence.TemporalType;
-import javax.persistence.UniqueConstraint;
-import org.hibernate.validator.Length;
-import org.hibernate.validator.NotNull;
-
-/**
- * VamdcSpeciesResources generated by hbm2java
- */
-@Entity
-@Table(name = "vamdc_species_resources", catalog = "vamdc_species", uniqueConstraints = @UniqueConstraint(columnNames = {
- "species_id", "url" }))
-public class VamdcSpeciesResources implements java.io.Serializable {
-
- private Integer id;
- private VamdcSpecies vamdcSpecies;
- private String url;
- private String description;
- private int searchPriority;
- private Date created;
-
- public VamdcSpeciesResources() {
- }
-
- public VamdcSpeciesResources(VamdcSpecies vamdcSpecies, String url,
- String description, int searchPriority, Date created) {
- this.vamdcSpecies = vamdcSpecies;
- this.url = url;
- this.description = description;
- this.searchPriority = searchPriority;
- this.created = created;
- }
-
- @Id
- @GeneratedValue(strategy = IDENTITY)
- @Column(name = "id", unique = true, nullable = false)
- public Integer getId() {
- return this.id;
- }
-
- public void setId(Integer id) {
- this.id = id;
- }
-
- @ManyToOne(fetch = FetchType.LAZY)
- @JoinColumn(name = "species_id", nullable = false)
- @NotNull
- public VamdcSpecies getVamdcSpecies() {
- return this.vamdcSpecies;
- }
-
- public void setVamdcSpecies(VamdcSpecies vamdcSpecies) {
- this.vamdcSpecies = vamdcSpecies;
- }
-
- @Column(name = "url", nullable = false)
- @NotNull
- public String getUrl() {
- return this.url;
- }
-
- public void setUrl(String url) {
- this.url = url;
- }
-
- @Column(name = "description", nullable = false, length = 150)
- @NotNull
- @Length(max = 150)
- public String getDescription() {
- return this.description;
- }
-
- public void setDescription(String description) {
- this.description = description;
- }
-
- @Column(name = "search_priority", nullable = false)
- public int getSearchPriority() {
- return this.searchPriority;
- }
-
- public void setSearchPriority(int searchPriority) {
- this.searchPriority = searchPriority;
- }
-
- @Temporal(TemporalType.TIMESTAMP)
- @Column(name = "created", nullable = false, length = 19)
- @NotNull
- public Date getCreated() {
- return this.created;
- }
-
- public void setCreated(Date created) {
- this.created = created;
- }
-
-}
diff --git a/portal.ejb/src/main/java/org/vamdc/portal/entity/species/VamdcSpeciesStructFormulae.java b/portal.ejb/src/main/java/org/vamdc/portal/entity/species/VamdcSpeciesStructFormulae.java
index 16064eb..de3fc6a 100644
--- a/portal.ejb/src/main/java/org/vamdc/portal/entity/species/VamdcSpeciesStructFormulae.java
+++ b/portal.ejb/src/main/java/org/vamdc/portal/entity/species/VamdcSpeciesStructFormulae.java
@@ -22,7 +22,7 @@
* VamdcSpeciesStructFormulae generated by hbm2java
*/
@Entity
-@Table(name = "vamdc_species_struct_formulae", catalog = "vamdc_species", uniqueConstraints = @UniqueConstraint(columnNames = {
+@Table(name = "vamdc_species_struct_formulae", catalog = "vamdc_species_dev", uniqueConstraints = @UniqueConstraint(columnNames = {
"species_id", "formula", "markup_type_id" }))
public class VamdcSpeciesStructFormulae implements java.io.Serializable {
diff --git a/portal.ejb/src/main/java/org/vamdc/portal/entity/species/VamdcSpeciesTypes.java b/portal.ejb/src/main/java/org/vamdc/portal/entity/species/VamdcSpeciesTypes.java
index b16d27f..d6c0d99 100644
--- a/portal.ejb/src/main/java/org/vamdc/portal/entity/species/VamdcSpeciesTypes.java
+++ b/portal.ejb/src/main/java/org/vamdc/portal/entity/species/VamdcSpeciesTypes.java
@@ -13,7 +13,7 @@
* VamdcSpeciesTypes generated by hbm2java
*/
@Entity
-@Table(name = "vamdc_species_types", catalog = "vamdc_species")
+@Table(name = "vamdc_species_types", catalog = "vamdc_species_dev")
public class VamdcSpeciesTypes implements java.io.Serializable {
private int id;
diff --git a/portal.ejb/src/main/java/org/vamdc/portal/registry/EmptyRegistry.java b/portal.ejb/src/main/java/org/vamdc/portal/registry/EmptyRegistry.java
index e105c95..3335fdd 100644
--- a/portal.ejb/src/main/java/org/vamdc/portal/registry/EmptyRegistry.java
+++ b/portal.ejb/src/main/java/org/vamdc/portal/registry/EmptyRegistry.java
@@ -59,4 +59,10 @@ public List getProcessors(String ivoaid) {
return null;
}
+ @Override
+ public Collection getInactiveIVOAIDs(Service standard) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
}
diff --git a/portal.ejb/src/main/java/org/vamdc/portal/registry/Nodes.java b/portal.ejb/src/main/java/org/vamdc/portal/registry/Nodes.java
index e175d6b..8c708bf 100644
--- a/portal.ejb/src/main/java/org/vamdc/portal/registry/Nodes.java
+++ b/portal.ejb/src/main/java/org/vamdc/portal/registry/Nodes.java
@@ -4,8 +4,6 @@
import java.util.Collection;
import java.util.Collections;
import java.util.List;
-
-
import org.jboss.seam.ScopeType;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Scope;
@@ -19,26 +17,44 @@ public class Nodes
{
private Registry registry;
+
+ private enum NodeStatus{
+ ACTIVE, INACTIVE
+ }
public Nodes(){
this.registry=Client.INSTANCE.get();
}
-
+
public List getNodes(){
+ return this.getNodes(NodeStatus.ACTIVE);
+ }
+
+ public List getInactiveNodes(){
+ return this.getNodes(NodeStatus.INACTIVE);
+ }
+
+ private List getNodes(NodeStatus status){
if (registry==null)
return Collections.emptyList();
- Collection ivoaIDs=registry.getIVOAIDs(Service.VAMDC_TAP);
+ Collection ivoaIDs = null;
+
+ if(status == NodeStatus.ACTIVE){
+ ivoaIDs=registry.getIVOAIDs(Service.VAMDC_TAP);
+ }else if(status == NodeStatus.INACTIVE){
+ ivoaIDs=registry.getInactiveIVOAIDs(Service.VAMDC_TAP);
+ }
if (ivoaIDs==null)
return Collections.emptyList();
List result = new ArrayList();
-
for (String id:ivoaIDs){
result.add(new VamdcNode(id));
}
+ Collections.sort(result);
return result;
}
diff --git a/portal.ejb/src/main/java/org/vamdc/portal/session/consumers/Consumer.java b/portal.ejb/src/main/java/org/vamdc/portal/session/consumers/Consumer.java
new file mode 100644
index 0000000..9c5e154
--- /dev/null
+++ b/portal.ejb/src/main/java/org/vamdc/portal/session/consumers/Consumer.java
@@ -0,0 +1,11 @@
+package org.vamdc.portal.session.consumers;
+
+public interface Consumer {
+ public void process();
+ public String getLocation();
+ public boolean isDone();
+ public boolean isProcessing();
+ public boolean isOk();
+ public boolean isErrorHappened();
+ public String getError();
+}
diff --git a/portal.ejb/src/main/java/org/vamdc/portal/session/consumers/ConsumerProcessor.java b/portal.ejb/src/main/java/org/vamdc/portal/session/consumers/ConsumerProcessor.java
new file mode 100644
index 0000000..d0fd3ff
--- /dev/null
+++ b/portal.ejb/src/main/java/org/vamdc/portal/session/consumers/ConsumerProcessor.java
@@ -0,0 +1,99 @@
+package org.vamdc.portal.session.consumers;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.Future;
+
+import org.jboss.seam.Component;
+import org.vamdc.portal.async.FutureTask;
+import org.vamdc.portal.registry.RegistryFacade;
+
+public class ConsumerProcessor implements Consumer, FutureTask{
+
+ RegistryFacade registryFacade;
+ private URL consumer;
+ private URL data;
+ private Future location;
+
+
+ public ConsumerProcessor(String consumer, String data){
+ registryFacade = (RegistryFacade) Component.getInstance("registryFacade");
+ try {
+ this.consumer = registryFacade.getConsumerServiceURL(consumer);
+ this.data = new URL(data);
+ } catch (MalformedURLException e) {
+ e.printStackTrace();
+ }
+
+ }
+
+ /**
+ * execute consumer
+ */
+ public void process() {
+ List nodes = new ArrayList();
+ nodes.add(data);
+ if (consumer != null) {
+ ExecutorService executor = Executors.newSingleThreadExecutor();
+ location = executor
+ .submit(new PostRequest(consumer, nodes));
+ executor.shutdown();
+ }
+ }
+
+ /**
+ * return consumer result url as a string
+ */
+ public String getLocation(){
+ String result = "";
+ try {
+ result = this.location.get().toExternalForm();
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ } catch (ExecutionException e) {
+ e.printStackTrace();
+ }
+
+ return result;
+ }
+
+ public boolean isDone() {
+ return (location != null && location.isDone() && !location
+ .isCancelled());
+ }
+
+ public boolean isProcessing() {
+ return (location != null && !location.isDone());
+ }
+
+ public boolean isOk() {
+ return (isDone() && !isErrorHappened());
+ }
+
+ public boolean isErrorHappened() {
+ if (isDone()) {
+ try {
+ location.get();
+ } catch (Exception e) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ public String getError() {
+ if (isDone()) {
+ try {
+ location.get();
+ } catch (Exception e) {
+ return e.getMessage();
+ }
+ }
+ return "";
+ }
+}
diff --git a/portal.ejb/src/main/java/org/vamdc/portal/session/consumers/ConsumerRequestRegistry.java b/portal.ejb/src/main/java/org/vamdc/portal/session/consumers/ConsumerRequestRegistry.java
new file mode 100644
index 0000000..0505ce2
--- /dev/null
+++ b/portal.ejb/src/main/java/org/vamdc/portal/session/consumers/ConsumerRequestRegistry.java
@@ -0,0 +1,127 @@
+package org.vamdc.portal.session.consumers;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
+
+import javax.faces.component.UIOutput;
+import javax.faces.event.ActionEvent;
+import javax.faces.model.SelectItem;
+
+import org.jboss.seam.ScopeType;
+import org.jboss.seam.annotations.In;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Scope;
+import org.vamdc.portal.registry.RegistryFacade;
+import org.vamdc.portal.session.queryLog.EmptyResponse;
+
+@Name("consumers")
+@Scope(ScopeType.PAGE)
+public class ConsumerRequestRegistry implements Serializable {
+
+ private static final long serialVersionUID = -4206391044359168710L;
+
+ @In(create = true)
+ RegistryFacade registryFacade;
+
+ /**
+ * map of consumers for each node
+ */
+ private Map> nodeConsumers;
+
+ /**
+ * Map of the last called consumer for each node
+ */
+ private Map processedConsumers = new ConcurrentHashMap();
+
+ /**
+ * selected consumer ivoaid
+ */
+ private String selectedConsumer = null;
+
+ /**
+ * Returns map of all consumers for each node
+ * @return
+ */
+ public Map> getNodeConsumers(){
+ if(this.nodeConsumers == null){
+ initNodeConsumers();
+ }
+ return this.nodeConsumers;
+ }
+
+ /**
+ * populates nodeConsumers Map
+ *
+ * @return
+ */
+ private void initNodeConsumers() {
+ Collection nodes = registryFacade.getTapIvoaIDs();
+ this.nodeConsumers = new HashMap>();
+ this.nodeConsumers.put(EmptyResponse.IVOA_ID, new ArrayList());
+ for (String node : nodes) {
+ List consumers = new ArrayList();
+
+ // search processors for selected nodes
+ Collection visibleConsumers = new ArrayList(
+ registryFacade.getConsumerIvoaIDs());
+ // Retain available consumers
+ visibleConsumers.retainAll(registryFacade.getNodeConsumers(node));
+
+ // recommended consumers
+ for (String ivoaID : visibleConsumers) {
+ consumers.add(new SelectItem(ivoaID, registryFacade.getResourceTitle(ivoaID)));
+ }
+
+ // other consumers
+ for (String ivoaID : registryFacade.getConsumerIvoaIDs()) {
+ if (!visibleConsumers.contains(ivoaID)) {
+ consumers.add(new SelectItem(ivoaID, " " + registryFacade
+ .getResourceTitle(ivoaID)));
+ }
+ }
+ this.nodeConsumers.put(node, consumers);
+
+ }
+ }
+
+ /**
+ * changes the currently selected consumer when user change selection in list
+ * @param event
+ */
+ public void changeConsumerSelected(ActionEvent event) {
+ if (event.getComponent().getParent() != null) {
+ UIOutput el = (UIOutput) event.getComponent().getParent();
+ this.setSelectedConsumer((String) el.getValue());
+ }
+ }
+
+
+ public void setSelectedConsumer(String ivoaID) {
+ this.selectedConsumer = ivoaID;
+ }
+
+ public String getSelectedConsumer() {
+ return selectedConsumer;
+ }
+
+ /**
+ * ask consumer execution for nodeIvoaID on data at nodeQueryUrl
+ * @param nodeQueryUrl
+ * @param nodeIvoaID
+ */
+ public void process(String nodeQueryUrl, String nodeIvoaID) {
+ Consumer consumer = new ConsumerProcessor(selectedConsumer, nodeQueryUrl);
+ this.processedConsumers.put(nodeIvoaID, consumer);
+ this.processedConsumers.get(nodeIvoaID).process();
+
+ }
+
+ public Map getConsumersByNode(){
+ return this.processedConsumers;
+ }
+}
diff --git a/portal.ejb/src/main/java/org/vamdc/portal/session/consumers/Consumers.java b/portal.ejb/src/main/java/org/vamdc/portal/session/consumers/Consumers.java
deleted file mode 100644
index 5db61da..0000000
--- a/portal.ejb/src/main/java/org/vamdc/portal/session/consumers/Consumers.java
+++ /dev/null
@@ -1,223 +0,0 @@
-package org.vamdc.portal.session.consumers;
-
-import java.io.Serializable;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.concurrent.ExecutionException;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-import java.util.concurrent.Future;
-
-import javax.faces.model.SelectItem;
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.In;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.vamdc.portal.registry.RegistryFacade;
-
-
-@Name("consumers")
-@Scope(ScopeType.PAGE)
-public class Consumers implements Serializable{
-
- private static final long serialVersionUID = -4206391044359168710L;
-
- @In(create=true) RegistryFacade registryFacade;
-
- private String selectedIvoaID = null;
- private Boolean consumerSelected = false;
-
- //selected nodes requests
- private Map queries = new HashMap();
-
- // selected nodes ids
- private Map selectedNodes = new HashMap();
-
- private Future consumerLocation;
-
- //list of processors
- private List consumers = new ArrayList();
-
-
- public List getConsumers(){
- return consumers;
- }
-
- public Integer getConsumersCount(){
- return consumers.size();
- }
-
- /**
- * update list of processors and returns its size
- * @return
- */
- public Integer getConsumersUpdatedCount(){
- return getConsumersUpdated().size();
- }
-
- private void clearConsumerSelection(){
- consumerSelected = false;
- consumers.clear();
- consumerLocation = null;
- selectedIvoaID = null;
- }
-
- /**
- * update list of processors for the currently selected nodes
- * @return
- */
- public List getConsumersUpdated(){
-
- List result = new ArrayList();
- if(getSelectedNodesCount() > 0){
- //search processors for selected nodes
- Collection visibleConsumers = new ArrayList(registryFacade.getConsumerIvoaIDs());
- for (Map.Entry node : selectedNodes.entrySet()){
- if (node.getValue()){
- //Retain available consumers
- visibleConsumers.retainAll(registryFacade.getNodeConsumers(node.getKey()));
- }
- }
-
- //recommended consumers
- for (String ivoaID:visibleConsumers){
- result.add(new SelectItem(ivoaID," ** "+registryFacade.getResourceTitle(ivoaID)));
- }
-
- //other consumers
- for(String ivoaID : registryFacade.getConsumerIvoaIDs()){
- if(visibleConsumers.contains(ivoaID) == false){
- result.add(new SelectItem(ivoaID,registryFacade.getResourceTitle(ivoaID)));
- }
- }
- }
- this.consumers = result;
- return this.consumers;
- }
-
- public Integer getSelectedNodesCount(){
- int result = 0;
- for (Map.Entry entry : this.queries.entrySet()){
- if((Boolean)entry.getValue())
- result++;
- }
- return result;
- }
-
- public String getSelectedNodes(){
- StringBuilder ret=new StringBuilder();
- for (Map.Entry entry : this.queries.entrySet()){
- if((Boolean)entry.getValue())
- ret.append(entry.getKey()+";");
- }
- return ret.toString();
- }
-
- public boolean getConsumerSelected(){
- return this.consumerSelected;
- }
-
- public void setSelectedConsumer(String ivoaID){
- this.consumerSelected = true;
- this.selectedIvoaID = ivoaID;
- }
-
- public String getSelectedConsumer(){
- return selectedIvoaID;
- }
-
-
- public Integer getSelectedConsumerNumberOfInput(){
- return registryFacade.getConsumerNumberOfInputs(selectedIvoaID);
- }
-
- public Map getQueries() {
- return queries;
- }
-
- public void setQueries(Map queries) {
- this.queries = queries;
- }
-
- public void process(){
- List nodes = new ArrayList();
- for (String req:queries.keySet()){
- if (queries.get(req)){
- try {
- nodes.add(new URL(req));
- } catch (MalformedURLException e) {}
- }
- }
-
- URL consumer = registryFacade.getConsumerServiceURL(selectedIvoaID);
-
- if (nodes.size()>0 && consumer!=null){
- ExecutorService executor = Executors.newSingleThreadExecutor();
- consumerLocation = executor.submit(new PostRequest(consumer,nodes));
- executor.shutdown();
- }
- }
-
- public boolean isDone(){
- return (consumerLocation!=null && consumerLocation.isDone() && !consumerLocation.isCancelled());
- }
-
- public boolean isProcessing(){
- return ((consumerLocation!=null && !consumerLocation.isDone()));
- }
-
- public boolean isOk(){
- return (isDone() && !isErrorHappened());
- }
-
- public boolean isErrorHappened(){
- if (isDone()){
- try{
- consumerLocation.get();
- } catch (Exception e) {
- return true;
- }
- }
- return false;
- }
-
- public String getError(){
- if (isDone()){
- try{
- consumerLocation.get();
- } catch (Exception e) {
- return e.getMessage();
- }
- }
- return "";
- }
-
- public String getLocation(){
- URL result = null;
- if (isDone())
- try {
- result= consumerLocation.get();
- } catch (InterruptedException e) {
- } catch (ExecutionException e) {
- e.printStackTrace();
- }
- if (result!=null)
- return result.toExternalForm();
- return "";
- }
-
- public void updateNodeIds(String text){
- clearConsumerSelection();
- if(selectedNodes.containsKey(text)){
- selectedNodes.put(text, !selectedNodes.get(text));
- }else{
- selectedNodes.put(text, true);
- }
- }
-
-}
diff --git a/portal.ejb/src/main/java/org/vamdc/portal/session/consumers/PostRequest.java b/portal.ejb/src/main/java/org/vamdc/portal/session/consumers/PostRequest.java
index 1149432..178b862 100644
--- a/portal.ejb/src/main/java/org/vamdc/portal/session/consumers/PostRequest.java
+++ b/portal.ejb/src/main/java/org/vamdc/portal/session/consumers/PostRequest.java
@@ -12,59 +12,55 @@
import org.vamdc.portal.Settings;
-
-
-public class PostRequest implements Callable{
+public class PostRequest implements Callable {
private URL consumer;
private Collection nodes;
- public PostRequest(URL consumer, Collection nodes){
+
+ public PostRequest(URL consumer, Collection nodes) {
this.consumer = consumer;
this.nodes = nodes;
}
-
+
@Override
public URL call() throws Exception {
-
+
HttpURLConnection connection = setupConnection();
-
+
return processResponse(connection);
}
- private URL processResponse(HttpURLConnection connection)
- throws IOException, MalformedURLException {
- URL result=null;
+ private URL processResponse(HttpURLConnection connection) throws IOException, MalformedURLException {
+ URL result = null;
int resultCode = connection.getResponseCode();
-
- if (resultCode== HttpURLConnection.HTTP_MOVED_TEMP || resultCode== HttpURLConnection.HTTP_SEE_OTHER || resultCode==HttpURLConnection.HTTP_MOVED_PERM){
+ if (resultCode == HttpURLConnection.HTTP_MOVED_TEMP || resultCode == HttpURLConnection.HTTP_SEE_OTHER
+ || resultCode == HttpURLConnection.HTTP_MOVED_PERM) {
result = new URL(connection.getHeaderField("Location"));
- }else{
- throw new IOException("XSAMS processor service returned "+resultCode+" status code.");
+ } else {
+ throw new IOException("XSAMS processor service returned " + resultCode + " status code.");
}
return result;
}
- private HttpURLConnection setupConnection() throws IOException,
- ProtocolException {
+ private HttpURLConnection setupConnection() throws IOException, ProtocolException {
HttpURLConnection connection = (HttpURLConnection) consumer.openConnection();
connection.setInstanceFollowRedirects(false);
connection.setRequestMethod("POST");
connection.setReadTimeout(Settings.HTTP_DATA_TIMEOUT.getInt());
connection.setDoOutput(true);
-
- String data="";
- for (URL node:nodes){
- if (data.length()>0)
- data+="&";
- data+=URLEncoder.encode("url", "UTF-8") + "=" + URLEncoder.encode(node.toString(), "UTF-8");
-
- };
+
+ String data = "";
+ for (URL node : nodes) {
+ if (data.length() > 0)
+ data += "&";
+ data += URLEncoder.encode("url", "UTF-8") + "=" + URLEncoder.encode(node.toString(), "UTF-8");
+ }
OutputStreamWriter wr = new OutputStreamWriter(connection.getOutputStream());
wr.write(data);
wr.flush();
wr.close();
-
+
return connection;
}
-
+
}
diff --git a/portal.ejb/src/main/java/org/vamdc/portal/session/preview/PreviewManager.java b/portal.ejb/src/main/java/org/vamdc/portal/session/preview/PreviewManager.java
index 2ac24b6..aae7079 100644
--- a/portal.ejb/src/main/java/org/vamdc/portal/session/preview/PreviewManager.java
+++ b/portal.ejb/src/main/java/org/vamdc/portal/session/preview/PreviewManager.java
@@ -23,60 +23,66 @@
import org.vamdc.portal.entity.query.HttpHeadResponse;
import org.vamdc.portal.entity.query.HttpHeadResponse.Response;
import org.vamdc.portal.registry.RegistryFacade;
-import org.vamdc.portal.session.consumers.Consumers;
+import org.vamdc.portal.session.consumers.ConsumerRequestRegistry;
import org.vamdc.portal.session.queryBuilder.QueryData;
@Name("preview")
@Scope(ScopeType.PAGE)
-public class PreviewManager implements Serializable{
+public class PreviewManager implements Serializable {
- //TODO: create meaningful test to check the serializability
private static final long serialVersionUID = 2029452631857959114L;
@Logger
Log log;
- @In transient QueryData queryData;
+ @In
+ transient QueryData queryData;
+
+ @In(create = true)
+ transient RegistryFacade registryFacade;
+
+ @In(create = true)
+ transient ConsumerRequestRegistry consumers;
+
+ //private volatile boolean completeEventCalled = false;
- @In(create=true) transient RegistryFacade registryFacade;
-
- @In(create=true) transient Consumers consumers;
-
- private volatile boolean completeEventCalled=false;
-
private Collection> nodeFutureResponses = new ArrayList>();
private long startTime;
-
+
private long percentDone;
-
- public void initiate(){
-
- if (nodeFutureResponses.size()>0)
+ private Boolean securedProtocolsAreSet = false;
+
+ public void initiate() {
+ this.setSSLProtocols();
+ if (!nodeFutureResponses.isEmpty())
return;
Collection activeNodes = queryData.getActiveNodes();
- if (activeNodes.size()==0)
+ if (activeNodes.isEmpty())
return;
-
- ExecutorService executor = Executors.newFixedThreadPool(activeNodes.size());
- for (String ivoaID:activeNodes){
- try{
- nodeFutureResponses.add(executor.submit(new PreviewThread(ivoaID,registryFacade.getVamdcTapMirrors(ivoaID),queryData.getQueryString())));
- }catch (IllegalArgumentException e){
+ ExecutorService executor = Executors.newFixedThreadPool(activeNodes
+ .size());
+
+ for (String ivoaID : activeNodes) {
+ try {
+ nodeFutureResponses.add(executor.submit(new PreviewThread(
+ ivoaID, registryFacade.getVamdcTapMirrors(ivoaID),
+ queryData.getQueryString())));
+ } catch (IllegalArgumentException e) {
}
}
-
+
executor.shutdown();
startTime = new Date().getTime();
}
-
- public List getNodes(){
- TreeSet nodes = new TreeSet(new HttpHeadResponseComparator());
- for (Future task:nodeFutureResponses){
- if (task.isDone()&& !task.isCancelled()){
+ public List getNodes() {
+ TreeSet nodes = new TreeSet(
+ new HttpHeadResponseComparator());
+ for (Future task : nodeFutureResponses) {
+ if (task.isDone() && !task.isCancelled()) {
try {
HttpHeadResponse response = task.get();
nodes.add(response);
@@ -92,104 +98,91 @@ public List getNodes(){
return new ArrayList(nodes);
}
- private class HttpHeadResponseComparator implements Comparator{
+ private class HttpHeadResponseComparator implements
+ Comparator {
@Override
public int compare(HttpHeadResponse o1, HttpHeadResponse o2) {
- if (o1==null || o2==null)
+ if (o1 == null || o2 == null)
return 0;
Integer value1 = Integer.valueOf(o1.getStatus().ordinal());
Integer value2 = Integer.valueOf(o2.getStatus().ordinal());
int compare = value1.compareTo(value2);
- if (compare!=0)
- return compare;
- else if(o1.getProcesses()!=o2.getProcesses())
- return o2.getProcesses()-o1.getProcesses();
- else
- return o1.getIvoaID().compareTo(o2.getIvoaID());
-
+ if (compare != 0)
+ return compare;
+ else if (o1.getProcesses() != o2.getProcesses())
+ return o2.getProcesses() - o1.getProcesses();
+ else
+ return o1.getIvoaID().compareTo(o2.getIvoaID());
+
}
-
-
}
-
- public boolean isDone(){
- if(this.percentDone <= 100){
- for (Future task:nodeFutureResponses){
- if (!task.isDone()){
+ public boolean isDone() {
+ if (this.percentDone <= 100) {
+ for (Future task : nodeFutureResponses) {
+ if (!task.isDone()) {
return false;
}
}
}
-
- if (!completeEventCalled)
- completeEvent();
-
+
return true;
}
-
- public Long getPercentsDone(){
- Long result=0L;
- if (isDone()){
- result=101L;
- } else{
+
+ public Long getPercentsDone() {
+ Long result;
+ if (isDone()) {
+ result = 101L;
+ } else {
Long now = new Date().getTime();
- result = (100L*(now-startTime)/Settings.HTTP_HEAD_TIMEOUT.getInt());
+ result = (100L * (now - startTime) / Settings.HTTP_HEAD_TIMEOUT
+ .getInt());
}
this.percentDone = result;
return result;
}
- public String getStringStatus(){
+ public String getStringStatus() {
if (isDone())
return "Done";
- return ""+getNodes().size()+" nodes of "+nodeFutureResponses.size()+" responded";
+ return "" + getNodes().size() + " nodes of "
+ + nodeFutureResponses.size() + " responded";
}
-
- public void cancel(){
- for (Future task:nodeFutureResponses){
+
+ public void cancel() {
+ for (Future task : nodeFutureResponses) {
if (!task.isDone())
task.cancel(true);
}
}
-
- public void clear(){
+
+ public void clear() {
cancel();
- nodeFutureResponses=new ArrayList>();
+ nodeFutureResponses = new ArrayList>();
}
-
- public String refine(){
+
+ public String refine() {
clear();
- if(!queryData.isGuidedQuery())
+ if (!queryData.isGuidedQuery())
return RedirectPage.QUERY;
else
return RedirectPage.QUERYTREE;
}
-
+
/**
- * Action that is called when the preview is complete.
+ * Set SSL protocols to be used.
+ * Fix a bug found when switching from java 7 to 8 :
+ * If this list is not set, the HTTPS request failed with java 8 but not
+ * with java 7
+ *
*/
- public void completeEvent(){
- this.completeEventCalled=true;
- List results = getNodes();
- int numActive=0;
- String nodeId = null;
-
-
- for (HttpHeadResponse node:results){
- if (node.isOk() && node.getStatus()==Response.OK){
- nodeId = node.getIvoaID();
- numActive++;
- }
- }
-
- if (numActive==1){
- consumers.updateNodeIds(nodeId);
- consumers.getQueries().put(results.get(0).getFullQueryURL(), true);
+ private void setSSLProtocols() {
+ if (!securedProtocolsAreSet) {
+ System.setProperty("https.protocols", "TLSv1,TLSv1.1,TLSv1.2");
+ this.securedProtocolsAreSet = true;
}
-
}
-
+
}
diff --git a/portal.ejb/src/main/java/org/vamdc/portal/session/preview/PreviewThread.java b/portal.ejb/src/main/java/org/vamdc/portal/session/preview/PreviewThread.java
index 3da24f5..c2e8109 100644
--- a/portal.ejb/src/main/java/org/vamdc/portal/session/preview/PreviewThread.java
+++ b/portal.ejb/src/main/java/org/vamdc/portal/session/preview/PreviewThread.java
@@ -1,5 +1,6 @@
package org.vamdc.portal.session.preview;
+import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
@@ -8,47 +9,85 @@
import java.util.Collection;
import java.util.concurrent.Callable;
+import javax.net.ssl.HttpsURLConnection;
+
+import org.jboss.seam.annotations.Logger;
+import org.jboss.seam.log.Log;
import org.vamdc.portal.Settings;
import org.vamdc.portal.entity.query.HttpHeadResponse;
+public class PreviewThread implements Callable {
+
-public class PreviewThread implements Callable{
+ @Logger
+ Log log;
private String ivoaID;
private String query;
private Collection mirrors;
-
- public PreviewThread(String ivoaID, Collection mirrors, String query){
+
+ public PreviewThread(String ivoaID, Collection mirrors, String query) {
this.ivoaID = ivoaID;
this.query = query;
- this.mirrors = mirrors;
+ this.mirrors = mirrors;
}
-
+
private URL getQuery(URL mirror) {
- URL result=null;
+ URL result = null;
try {
- result = new URL(mirror+"sync?LANG=VSS2&REQUEST=doQuery&FORMAT=XSAMS&QUERY="+URLEncoder.encode(query,"UTF-8"));
+ result = new URL(mirror
+ + "sync?LANG=VSS2&REQUEST=doQuery&FORMAT=XSAMS&QUERY="
+ + URLEncoder.encode(query, "UTF-8"));
} catch (MalformedURLException e) {
+ log.info(e);
} catch (UnsupportedEncodingException e) {
+ log.info(e);
}
return result;
}
+ private HttpURLConnection getHttpURLConnection(URL url) throws IOException {
+ HttpURLConnection connection = null;
+
+
+ //http request
+ if (!url.getProtocol().equals("https")) {
+ connection = (HttpURLConnection) url.openConnection();
+ }
+ //https request
+ else {
+ connection = (HttpsURLConnection) url.openConnection();
+ }
+
+ return connection;
+ }
+
+ /**
+ * Send a HEAD request to a node by testing its mirrors
+ */
@Override
public HttpHeadResponse call() throws Exception {
- HttpHeadResponse response =null;
- for (URL mirror:mirrors){
- URL queryURL = getQuery(mirror);
- HttpURLConnection connection = (HttpURLConnection) queryURL.openConnection();
-
+ HttpHeadResponse response = null;
+ for (URL mirror : mirrors) {
+ HttpURLConnection connection = null;
+ connection = this.getHttpURLConnection(getQuery(mirror));
connection.setRequestMethod("HEAD");
connection.setReadTimeout(Settings.HTTP_HEAD_TIMEOUT.getInt());
-
- response = new HttpHeadResponse(ivoaID,connection);
+ /*if(connection.getResponseCode() == 301 || connection.getResponseCode() == 302) {
+ connection.disconnect();
+ String newUrl = connection.getHeaderField("Location");
+ System.out.println("### try new url : " + newUrl);
+ connection = this.getHttpURLConnection(new URL(newUrl));
+ connection.setRequestMethod("HEAD");
+ connection.setReadTimeout(Settings.HTTP_HEAD_TIMEOUT.getInt());
+ }*/
+ response = new HttpHeadResponse(ivoaID, connection);
+
if (response.isOk())
return response;
}
+
return response;
}
diff --git a/portal.ejb/src/main/java/org/vamdc/portal/session/queryBuilder/FormHolder.java b/portal.ejb/src/main/java/org/vamdc/portal/session/queryBuilder/FormHolder.java
index 53e52c8..0765f09 100644
--- a/portal.ejb/src/main/java/org/vamdc/portal/session/queryBuilder/FormHolder.java
+++ b/portal.ejb/src/main/java/org/vamdc/portal/session/queryBuilder/FormHolder.java
@@ -28,5 +28,7 @@ public interface FormHolder {
void setComments(String comments);
void setRequest(Collection requestFor);
+
+ Integer getFormTypeCount(Form form);
}
diff --git a/portal.ejb/src/main/java/org/vamdc/portal/session/queryBuilder/QueryController.java b/portal.ejb/src/main/java/org/vamdc/portal/session/queryBuilder/QueryController.java
index 8b6ee33..37c55c3 100644
--- a/portal.ejb/src/main/java/org/vamdc/portal/session/queryBuilder/QueryController.java
+++ b/portal.ejb/src/main/java/org/vamdc/portal/session/queryBuilder/QueryController.java
@@ -63,7 +63,6 @@ public String saveQuery(){
if (queryData.isValid()){
persistQuery();
conversation.endAndRedirect();
- log.info("Save action");
return RedirectPage.QUERY_LOG;
}else{
return RedirectPage.QUERY;
@@ -85,38 +84,10 @@ public String asyncQuery(){
private void persistQuery() {
QueryPersister p = new QueryPersister(this);
- Query query = p.constructQuery();//constructQuery();
+ Query query = p.constructQuery();
queryLog.save(query,queryData.getEditQueryId());
}
-
- /*private Query constructQuery(){
- Query result=null;
- if (queryData.getEditQueryId()!=null)
- result = queryLog.getQuery(queryData.getEditQueryId());
- else
- result = new Query();
- result.setComments(queryData.getComments());
- result.setQueryString(queryData.getQueryString());
- result.setResponses(selectRespondedNodes());
- result.setUser(auth.getUser());
- result.setDate(new Date());
- return result;
- }
-
-
-
- private List selectRespondedNodes() {
- ArrayList responses = new ArrayList();
- for (HttpHeadResponse response:preview.getNodes()){
- if (response.getStatus()==Response.OK)
- responses.add(response);
- }
- return responses;
- }*/
-
-
-
public String preview(){
if (queryData.isValid()){
diff --git a/portal.ejb/src/main/java/org/vamdc/portal/session/queryBuilder/QueryData.java b/portal.ejb/src/main/java/org/vamdc/portal/session/queryBuilder/QueryData.java
index 643dced..d71c14f 100644
--- a/portal.ejb/src/main/java/org/vamdc/portal/session/queryBuilder/QueryData.java
+++ b/portal.ejb/src/main/java/org/vamdc/portal/session/queryBuilder/QueryData.java
@@ -106,13 +106,13 @@ private Collection loadActiveNodes() {
Collection activeKeywords = getActiveKeywords();
- if (activeKeywords.size()==0 && request!=null && request.size()>0){
+ if (activeKeywords.isEmpty() && request!=null && request.size() > 0){
result=ivoaIDs;
return result;
}
for (String ivoaID:ivoaIDs){
- if (activeKeywords.size()>0 && registryFacade.getRestrictables(ivoaID).containsAll(activeKeywords))
+ if (activeKeywords.size() > 0 && registryFacade.getRestrictables(ivoaID).containsAll(activeKeywords))
result.add(ivoaID);
}
return result;
@@ -217,7 +217,7 @@ private boolean quickAddForm(Form form){
if(form.getOrder() == Order.GuidedSpeciesType)
this.speciesFormPosition = forms.size()-1;
- if (form instanceof SpeciesForm)
+ if (form instanceof SpeciesForm) //
speciesForms.add((SpeciesForm) form);
else
unsortedFormsList.add(form);
@@ -251,20 +251,21 @@ public Integer getFormTypeCount(Form form){
return 0;
}
- public void deleteForm(Form form){
- if(form instanceof SpeciesForm){//Decrease form positions only for species forms
- Integer position = form.getPosition();
- for (SpeciesForm currentForm:speciesForms) {
- if(currentForm.getClass() == form.getClass()&¤tForm.getPosition()>position){
- currentForm.decreasePosition();
- }
- }
- }
+ public void deleteForm(Form form){
formCounts.put(form.getOrder(), getFormTypeCount(form)-1);
forms.remove(form);
unsortedFormsList.remove(form);
- if (form.getOrder()position){
+ currentForm.decreasePosition();
+ }
+ }
+ }
+ }
rebuildLists();
}
diff --git a/portal.ejb/src/main/java/org/vamdc/portal/session/queryBuilder/QueryTreeController.java b/portal.ejb/src/main/java/org/vamdc/portal/session/queryBuilder/QueryTreeController.java
index 73e51c0..43c15c7 100644
--- a/portal.ejb/src/main/java/org/vamdc/portal/session/queryBuilder/QueryTreeController.java
+++ b/portal.ejb/src/main/java/org/vamdc/portal/session/queryBuilder/QueryTreeController.java
@@ -1,8 +1,6 @@
package org.vamdc.portal.session.queryBuilder;
import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
import java.util.List;
import org.jboss.seam.Component;
@@ -20,13 +18,10 @@
import org.vamdc.portal.entity.security.User;
import org.vamdc.portal.session.preview.PersistableQueryInterface;
import org.vamdc.portal.session.preview.PreviewManager;
-import org.vamdc.portal.session.queryBuilder.fields.AbstractField;
import org.vamdc.portal.session.queryBuilder.forms.AbstractForm;
import org.vamdc.portal.session.queryBuilder.forms.Form;
import org.vamdc.portal.session.queryBuilder.forms.Order;
-import org.vamdc.portal.session.queryBuilder.formsTree.AtomsTreeForm;
import org.vamdc.portal.session.queryBuilder.formsTree.RootForm;
-import org.vamdc.portal.session.queryBuilder.formsTree.SearchMode;
import org.vamdc.portal.session.queryBuilder.formsTree.TreeFormInterface;
import org.vamdc.portal.session.queryLog.QueryLog;
import org.vamdc.portal.session.security.UserInfo;
@@ -38,12 +33,10 @@ public class QueryTreeController implements QueryTreeInterface, PersistableQuer
@In(create=true) @Out QueryData queryData;
@In(create=true) UserInfo auth;
@Logger
- transient private Log log;
+ private Log log;
@In(create=true) private PreviewManager preview;
- @In(create=true) private QueryLog queryLog;
-
- private SearchMode searchMode = SearchMode.species;
-
+ @In(create=true) private QueryLog queryLog;
+
public QueryTreeController(){
this.addForm(new RootForm(this));
}
@@ -52,8 +45,6 @@ public QueryTreeController(){
public String saveQuery(){
if (queryData.isValid()){
persistQuery();
- //conversation.endAndRedirect();
- log.info("Save action");
return RedirectPage.QUERY_LOG;
}else{
return RedirectPage.QUERYTREE;
@@ -93,59 +84,9 @@ private Integer requestableFormsCount(){
public List
-
-
- VAMDC forum
-
diff --git a/portal.war/src/main/webapp/home.xhtml b/portal.war/src/main/webapp/home.xhtml
index da69067..9f1f494 100644
--- a/portal.war/src/main/webapp/home.xhtml
+++ b/portal.war/src/main/webapp/home.xhtml
@@ -1,19 +1,37 @@
+ xmlns:s="http://jboss.com/products/seam/taglib"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:rich="http://richfaces.org/rich"
+ template="/layout/template.xhtml">
-
+
+ Welcome to the VAMDC portal!
- Welcome to the VAMDC portal!
-
-
-
+
-
+
VAMDC aims to be an interoperable e-infrastructure that
+ provides the international research community with access to a broad
+ range of atomic and molecular (A&M) data compiled within a set
+ of A&M databases accessible through the provision of this portal
+ and of user software. Furthermore VAMDC aims to provide A&M data
+ providers and compilers with a large dissemination platform for
+ their work.
+
+
VAMDC infrastructure was established to provide a service to
+ a wide international research community and has been developed in
+ conjunction with consultations and advice from the A&M user
+ community.
+
+
+
+
+
+
+
diff --git a/portal.war/src/main/webapp/img/vamdc_logo_old.png b/portal.war/src/main/webapp/img/vamdc_logo_old.png
new file mode 100755
index 0000000..b84b992
Binary files /dev/null and b/portal.war/src/main/webapp/img/vamdc_logo_old.png differ
diff --git a/portal.war/src/main/webapp/img/vamdc_partners_footer.jpg b/portal.war/src/main/webapp/img/vamdc_partners_footer.jpg
index 2326c68..ec6a028 100644
Binary files a/portal.war/src/main/webapp/img/vamdc_partners_footer.jpg and b/portal.war/src/main/webapp/img/vamdc_partners_footer.jpg differ
diff --git a/portal.war/src/main/webapp/img/vamdc_partners_footer.jpg_old b/portal.war/src/main/webapp/img/vamdc_partners_footer.jpg_old
new file mode 100644
index 0000000..26d0a27
Binary files /dev/null and b/portal.war/src/main/webapp/img/vamdc_partners_footer.jpg_old differ
diff --git a/portal.war/src/main/webapp/layout/footer.xhtml b/portal.war/src/main/webapp/layout/footer.xhtml
index 85f96a9..858ba7b 100644
--- a/portal.war/src/main/webapp/layout/footer.xhtml
+++ b/portal.war/src/main/webapp/layout/footer.xhtml
@@ -5,6 +5,5 @@
xmlns:s="http://jboss.com/products/seam/taglib"
xmlns:rich="http://richfaces.org/rich" styleClass="my-toolbar-header">
-
-
+
diff --git a/portal.war/src/main/webapp/layout/menu.xhtml b/portal.war/src/main/webapp/layout/menu.xhtml
index 71d4f9a..a1f74dc 100644
--- a/portal.war/src/main/webapp/layout/menu.xhtml
+++ b/portal.war/src/main/webapp/layout/menu.xhtml
@@ -19,13 +19,14 @@
+
+
-
-
-
+
+ contentType="text/html">
@@ -20,18 +21,22 @@ window.history.forward();
-
+
+
-
+
+
-
+
diff --git a/portal.war/src/main/webapp/login.xhtml b/portal.war/src/main/webapp/login.xhtml
index 829ad42..732a35f 100644
--- a/portal.war/src/main/webapp/login.xhtml
+++ b/portal.war/src/main/webapp/login.xhtml
@@ -10,7 +10,7 @@
-
+
Registration is not required.
diff --git a/portal.war/src/main/webapp/nodes.xhtml b/portal.war/src/main/webapp/nodes.xhtml
index 8a64fce..6800945 100644
--- a/portal.war/src/main/webapp/nodes.xhtml
+++ b/portal.war/src/main/webapp/nodes.xhtml
@@ -9,9 +9,17 @@
xmlns:a="http://richfaces.org/a4j" template="/layout/template.xhtml">
-
-
+
+
+
+
+
+
+
+
+
@@ -22,9 +30,6 @@
-
-
-
@@ -40,24 +45,58 @@
-
+
-
-
-
-
-
-
+
+
diff --git a/portal.war/src/main/webapp/preview.xhtml b/portal.war/src/main/webapp/preview.xhtml
index edc94de..b729818 100644
--- a/portal.war/src/main/webapp/preview.xhtml
+++ b/portal.war/src/main/webapp/preview.xhtml
@@ -6,83 +6,87 @@
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:rich="http://richfaces.org/rich"
- xmlns:a4j="http://richfaces.org/a4j" template="/layout/template.xhtml">
+ xmlns:a4j="http://richfaces.org/a4j"
+ template="/layout/template.xhtml">
-
-
-
-
-
-
-
-
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
+
+
+
diff --git a/portal.war/src/main/webapp/privacy.xhtml b/portal.war/src/main/webapp/privacy.xhtml
new file mode 100644
index 0000000..08605c3
--- /dev/null
+++ b/portal.war/src/main/webapp/privacy.xhtml
@@ -0,0 +1,63 @@
+
+
+
+
+ VAMDC Privacy policy
+
+
When you use VAMDC services, we may collect some personal data
+ (your IP address and if you provide it, your e-mail). Those data are
+ used only to offer you the service in question, nothing else. VAMDC
+ does not disclose, give or sell your data to anyone unless we are
+ required to do so pursuant to a mandatory provision of law. We may
+ use some of the data in research and development work to improve our
+ services, but for such purposes we always use the data in a fully
+ anonymized form, and no personal identifiers are left in the data.
+ Your data is stored on VAMDC ecosystem servers, which are located in
+ the EU.
+
Storage and accuracy of information
+
+ We only store the information as long as is necessary to fulfill the
+ purpose for which it was collected or required by law. You are
+ responsible for the accuracy of the information you provide. For any
+ question, you may also contact use: http://www.vamdc.org/contact/contact-category-1/
+
+
Security
+
There are always risks associated with providing personal data
+ via the internet and no system or technology is completely safe or
+ "tamper"/"hacker" proof. VAMDC takes appropriate precautions to
+ prevent unauthorized access to and improper use of your personal
+ data: we use industry standard security measures.
+
Your rights
+
You always have the right to access your personal information.
+ You have the right to know what information pertaining to you has
+ been collected, what this information is used for. To verify your
+ identity in order to carry out your request, we may have to ask for
+ additional information.
+
VAMDC is allowed to handle your personal information when the
+ handling is based on a legitimate interest. We use this legal basis
+ in some cases for our research and development activities, as we
+ constantly want to develop and improve our services. You have the
+ right to object to the handling of your personal information for
+ these purposes. However, your right to object is not absolute. The
+ data used in our research and development work is anonymized and
+ cannot be associated with you. You have the right to have any of
+ your information corrected or deleted If you want to have your
+ information deleted, we will delete your user credentials and all
+ information and data pertaining to you. The deleted data is not
+ retrievable.
+
+ If you suspect misuse of the information, you may submit a complaint
+ to the European data
+ protection board or a similar authority.
+
+
+
+
diff --git a/portal.war/src/main/webapp/query.xhtml b/portal.war/src/main/webapp/query.xhtml
index 4bbd1d5..2b6e643 100644
--- a/portal.war/src/main/webapp/query.xhtml
+++ b/portal.war/src/main/webapp/query.xhtml
@@ -25,7 +25,7 @@
-
+
diff --git a/portal.war/src/main/webapp/queryLog.xhtml b/portal.war/src/main/webapp/queryLog.xhtml
index b2ebffa..24e3019 100644
--- a/portal.war/src/main/webapp/queryLog.xhtml
+++ b/portal.war/src/main/webapp/queryLog.xhtml
@@ -9,116 +9,140 @@
xmlns:a4j="http://richfaces.org/a4j" template="/layout/template.xhtml">
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/portal.war/src/main/webapp/queryTree.xhtml b/portal.war/src/main/webapp/queryTree.xhtml
index 72daafa..1fe5254 100644
--- a/portal.war/src/main/webapp/queryTree.xhtml
+++ b/portal.war/src/main/webapp/queryTree.xhtml
@@ -5,33 +5,29 @@
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
- xmlns:rich="http://richfaces.org/rich"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:c="http://java.sun.com/jstl/core"
+ xmlns:rich="http://richfaces.org/rich"
template="/layout/template.xhtml">
-
-
+
+
-
+
-
-
+
+
-
-
+
+
-
-
-
-
-
-
-
+
+
+
+
-
diff --git a/portal.war/src/main/webapp/register.xhtml b/portal.war/src/main/webapp/register.xhtml
index 08f88d4..ead3d90 100644
--- a/portal.war/src/main/webapp/register.xhtml
+++ b/portal.war/src/main/webapp/register.xhtml
@@ -19,7 +19,7 @@
and email alerts on major updates.
-
+
register
diff --git a/portal.war/src/main/webapp/stylesheet/style.css b/portal.war/src/main/webapp/stylesheet/style.css
index f1f0312..164c289 100644
--- a/portal.war/src/main/webapp/stylesheet/style.css
+++ b/portal.war/src/main/webapp/stylesheet/style.css
@@ -1,3 +1,114 @@
+html {
+ overflow-y: scroll;
+}
+
+body {
+ font: normal 12px/1.7 "Lucida Sans", "Lucida Grande", "Lucida Sans Unicode", sans-serif;
+ margin: 0px;
+ background : #F1F1F1 url() repeat top center;
+}
+
+body .textContent{
+ width : 75%;
+ text-align : justify;
+ padding-left : 1em;
+}
+
+.container {
+ width : 1060px;
+ position : relative;
+ margin : auto;
+ background : #FFFFFF url() repeat top center;
+}
+
+a {
+ color : #F05A28;
+}
+
+a img {
+ border: none;
+}
+
+h1 {
+ font-size: 1.6em;
+ margin-top: 0;
+}
+
+input[type=submit], input[type=button] {
+ font-size: 11px;
+ margin: 5px 5px 5px 0;
+ cursor: pointer;
+}
+
+input[type=text], input[type=password], textarea {
+ font-size: 12px;
+ padding-left: 1px;
+}
+
+select {
+ font-size: 13px;
+}
+
+img.errors {
+ padding-right: 5px;
+}
+
+div.info {
+ font-size: 1.2em;
+}
+
+ul.bullets {
+ list-style: square;
+}
+
+ul.bullets li {
+ padding-bottom: 2px;
+}
+
+td.action {
+ text-align: center;
+ width: 8em;
+ white-space: nowrap;
+}
+
+td.action a {
+ padding-left: 1px;
+ padding-right: 1px;
+}
+
+table.radio {
+ border: 0;
+}
+
+table.radio td {
+ padding: 0 2px;
+}
+
+table.radio input[type=radio] {
+ vertical-align: bottom;
+}
+
+.header {
+ padding-top: 1em;
+ padding-bottom: 1em;
+}
+
+.footer {
+ text-align: right;
+ padding-top: 1em;
+ padding-bottom: 1em;
+}
+
+.footer img {
+ margin-right : 0.2em;
+}
+
+.content {
+ padding: 0.5em;
+ width : 100%;
+}
+
+
.field{
margin-top:0px;
margin-bottom:0px;
@@ -5,7 +116,7 @@
margin-left:5px;
}
.narrowfield{
- width: 70px;
+ width: 60px;
margin-top:0px;
margin-bottom:0px;
margin-right:5px;
@@ -19,53 +130,31 @@
.leftColumn {
width: 170px;
font-weight: bold;
- font-size: 12px;
font-family: none;
}
.simpleColumn {
width: 60px;
- /*font-weight: bold;*/
- font-size: 12px;
margin : 0px;
font-family: none;
}
.rightColumn {
- width: 250px;
- align: right;
+ width: 270px;
+ /*align: right;
text-align: right;
- float: right;
-}
-
-.rich-progress-bar-done{
- background-image: url("../img/progressBarComplete.png");
-}
-
-.rich-progress-bar-mockup{
- border-color: #D4CFC7;
- border-width: 1px;
- border-style: solid;
- color: #000000;
- font-family: Arial,Verdana,sans-serif;
- font-size: 11px;
- font-weight: bold;
- text-align: center;
- margin-bottom: 2px;
-}
-
-.rich-panel-body{
- padding: 3px;
+ float: right;*/
}
.queryMenuPanel{
position: fixed;
- top: 195px;
+ top: 140px;
+ width : 120px;
}
.queryMenu{
- width: 120px;
height: 100%;
+ width : 130px;
}
.queryMenuButton{
@@ -74,7 +163,6 @@
white-space: nowrap;
font-family: Arial,Verdana,sans-serif;
font-weight: bold;
- font-size: 11px;
margin: 3px;
line-height: 20px;
text-decoration: none;
@@ -92,35 +180,41 @@
.queryForms{
height: 100%;
vertical-align: top;
- width: 460px;
+ width : 460px;
+ /*max-width : 410px;*/
}
.queryRight{
height: 100%;
vertical-align: top;
- width: 450px;
+ max-width : 370px;
}
.showRequestPanel{
- width: 890px;
- height: 70px;
+ width: 400px;
+ height: 210px;
margin-left : 3px;
}
.showRequestText{
- width: 870px;
- height: 40px;
+ width: 98%;
+ height: 170px;
}
.queryProgressPanel{
- width: 450px;
+ width: 400px;
height: 210px;
}
.resultTable{
- margin-left : 4px;
+ margin-left : 0.2em;
+ margin-top : 0.5em;
+ width : 97%;
}
+.resultTable select{
+ width : 200px;
+}
.consumerPanel{
width: 430px;
@@ -129,13 +223,13 @@
.commentsPanel{
width: 98%;
- height: 120px;
+ height: 110px;
margin-top : 1em;
}
.commentsPanel textarea{
width: 98%;
- height: 80px;
+ height: 70px;
}
.consumerDescription{
@@ -143,6 +237,10 @@
height: 115px;
}
+.consumerUpdateImg{
+ margin-top : 5px;
+}
+
.scrollPanel{
overflow-y: auto;
}
@@ -172,20 +270,159 @@
background-color: inherit;
}
-.collisionSpecies{
+.collisionSpeciesText{
text-decoration:none;
border-bottom:1px dotted #D4CFC7;
}
-.alignCenter{
- text-align : center;
+
+.collisionSpeciesSelectionForm{
+ width : 49%;
+ float : left;
}
+
.roundButton {
-moz-border-radius: 10px;
border-radius: 10px;
}
+.largeButton{
+ width : 110px;
+ font-weight : bold;
+ padding : 1px;
+}
+
+.largerButton{
+ width : 220px;
+ font-weight : bold;
+ padding : 1px;
+}
+
+.buttonArea .largeButton{
+ margin : 0px 5px 0px 0px;
+}
+
.nodesTable{
- width : 90%;
+ width : 98%;
+ margin-bottom : 2em;
+}
+
+.registerForm{
+ width : 40%;
+}
+
+
+.bold{
+ font-weight : bold;
+}
+
+.alignJustify{
+ text-align : justify;
+}
+
+.alignCenter{
+ text-align : center;
+}
+
+.tableControl, .actionButtons, .isotopologue {
+ width: 100%;
+}
+
+.tableControl a {
+ padding-left: 10px;
+}
+
+.tableControl {
+ text-align: right;
+}
+
+
+.tableControl input[type=submit], .tableControl input[type=button], .tableControl select {
+ margin: 5px 0 5px 5px;
+}
+
+/* I don't know why this is necessary, but the select is off by a pixel on the top and is padding too much on the left */
+.tableControl select {
+ margin-left: 2px;
+ position: relative;
+ top: 1px;
+}
+
+.actionButtons {
+ padding-left: 1px;
+}
+
+.actionButtons select {
+ margin: 5px 5px 5px 0;
+ vertical-align: bottom;
+}
+
+.message {
+ padding: 5px;
+ list-style: none;
+ border: 0;
+ background: none;
+ padding: 0;
+ color: #000000;
+ margin: 5px 0 8px 0;
+ font-size: 12px;
+}
+
+.message li {
+ background: no-repeat left center;
+ padding-top: 1px;
+ padding-left: 20px;
+ margin-left: 3px;
+}
+
+.message li.infomsg {
+ background-image: url(../img/msginfo.png);
+}
+
+.message li.errormsg {
+ background-image: url(../img/msgerror.png);
+}
+
+.message li.warnmsg {
+ background-image: url(../img/msgwarn.png);
+}
+
+.name {
+ vertical-align: top;
+ font-weight: bold;
+ width: 115px;
+ float: left;
+ padding: 5px;
+ margin-top: 3px;
+ clear: left;
+}
+
+.value {
+ float: left;
+ padding: 5px;
+}
+
+.error {
+ float: left;
+ padding: 5px;
+}
+
+.errors {
+ color: #FF0000;
+ vertical-align: middle;
+}
+
+.errors input, .errors textarea, .errors select {
+ border: 1px solid red !important;
+}
+
+.required {
+ color: #FF0000;
+ padding-left: 2px;
+}
+
+.important{
+ text-decoration : underline;
+ font-weight : bold;
}
diff --git a/portal.war/src/main/webapp/stylesheet/theme.css b/portal.war/src/main/webapp/stylesheet/theme.css
index 7038934..5214969 100644
--- a/portal.war/src/main/webapp/stylesheet/theme.css
+++ b/portal.war/src/main/webapp/stylesheet/theme.css
@@ -1,138 +1,35 @@
-html {
- overflow-y: scroll;
+.rich-progress-bar-done{
+ background-image: url("../img/progressBarComplete.png");
}
-body {
- font-size: 12px;
- margin: 0px;
+.rich-progress-bar-mockup{
+ border-color: #D4CFC7;
+ border-width: 1px;
+ border-style: solid;
+ color: #000000;
+ font-family: Arial,Verdana,sans-serif;
+ /*font-size: 11px;*/
+ font-weight: bold;
+ text-align: center;
+ margin-bottom: 2px;
}
-a {
- color : #F05A28;
+.rich-panel-body{
+ font: normal 12px/1.7 "Lucida Sans", "Lucida Grande", "Lucida Sans Unicode", sans-serif;
+ padding: 3px;
+ font-size : 12px;
}
-a img {
- border: none;
+.rich-table-cell{
+ font-size : 12px;
}
-h1 {
- font-size: 1.6em;
- margin-top: 0;
+.rich-stglpanel-body{
+ font-size : 12px;
}
-input[type=submit], input[type=button] {
- font-size: 11px;
- margin: 5px 5px 5px 0;
- cursor: pointer;
-}
-
-input[type=text], input[type=password], textarea {
- font-size: 12px;
- padding-left: 1px;
-}
-
-select {
- font-size: 13px;
-}
-
-.tableControl, .actionButtons {
- width: 100%;
-}
-
-.tableControl a {
- padding-left: 10px;
-}
-
-.tableControl {
- text-align: right;
-}
-
-.footer {
- text-align: center;
- font-size: 11px;
- margin-bottom: 10px;
-}
-
-.rich-table {
- width: 100%;
-}
-
-.body {
- padding: 30px;
-}
-.message {
- padding: 5px;
- list-style: none;
- border: 0;
- background: none;
- padding: 0;
- color: #000000;
- margin: 5px 0 8px 0;
- font-size: 12px;
-}
-
-.message li {
- background: no-repeat left center;
- padding-top: 1px;
- padding-left: 20px;
- margin-left: 3px;
-}
-
-.message li.infomsg {
- background-image: url(../img/msginfo.png);
-}
-
-.message li.errormsg {
- background-image: url(../img/msgerror.png);
-}
-
-.message li.warnmsg {
- background-image: url(../img/msgwarn.png);
-}
-
-.name {
- vertical-align: top;
- font-weight: bold;
- width: 115px;
- float: left;
- padding: 5px;
- margin-top: 3px;
- clear: left;
-}
-
-.header {
- margin-top: 15px;
- margin-bottom: 20px;
- margin-left: 20px;
-
-}
-
-.value {
- float: left;
- padding: 5px;
-}
-
-.error {
- float: left;
- padding: 5px;
-}
-
-.errors {
- color: #FF0000;
- vertical-align: middle;
-}
-
-img.errors {
- padding-right: 5px;
-}
-
-.errors input, .errors textarea, .errors select {
- border: 1px solid red !important;
-}
-
-.required {
- color: #FF0000;
- padding-left: 2px;
+.rich-ddmenu-label{
+ font-size : 12px;
}
.rich-stglpanel-body {
@@ -151,26 +48,6 @@ img.errors {
margin-bottom: 0;
}
-.tableControl input[type=submit], .tableControl input[type=button], .tableControl select {
- margin: 5px 0 5px 5px;
-}
-
-/* I don't know why this is necessary, but the select is off by a pixel on the top and is padding too much on the left */
-.tableControl select {
- margin-left: 2px;
- position: relative;
- top: 1px;
-}
-
-.actionButtons {
- padding-left: 1px;
-}
-
-.actionButtons select {
- margin: 5px 5px 5px 0;
- vertical-align: bottom;
-}
-
.rich-toolbar-item a {
text-decoration: none;
}
@@ -198,46 +75,3 @@ img.errors {
color : #000000;
}
-
-div.info {
- font-size: 1.2em;
-}
-
-ul.bullets {
- list-style: square;
-}
-
-ul.bullets li {
- padding-bottom: 2px;
-}
-
-td.action {
- text-align: center;
- width: 8em;
- white-space: nowrap;
-}
-
-td.action a {
- padding-left: 1px;
- padding-right: 1px;
-}
-
-table.radio {
- border: 0;
-}
-
-table.radio td {
- padding: 0 2px;
-}
-
-table.radio input[type=radio] {
- vertical-align: bottom;
-}
-
-body .disclaimer{
- font-size : 14px;
- width : 50%;
- text-align : justify;
- padding-left : 2em;
-}
-
diff --git a/portal.war/src/main/webapp/tools.xhtml b/portal.war/src/main/webapp/tools.xhtml
new file mode 100644
index 0000000..cc87545
--- /dev/null
+++ b/portal.war/src/main/webapp/tools.xhtml
@@ -0,0 +1,33 @@
+
+
+
+
+ The VAMDC species database
+
+ Discover the content of each database in the VAMDC infrastructure
+
+
+
+
+ Hitran file display and comparison
+
+ Plot data exported in HITRAN format
+
+
+
+
+
+
+
+
diff --git a/portal.war/src/main/webapp/xhtml/consumer/consumerPanel.xhtml b/portal.war/src/main/webapp/xhtml/consumer/consumerPanel.xhtml
index 082558c..8b2ab48 100644
--- a/portal.war/src/main/webapp/xhtml/consumer/consumerPanel.xhtml
+++ b/portal.war/src/main/webapp/xhtml/consumer/consumerPanel.xhtml
@@ -56,15 +56,15 @@
disabled="#{consumers.selectedNodesCount == 0}"
reRender="consumerLocation" tabindex="25" />
-
-
+ direction="top-left" id="consumerErrorTex" />
diff --git a/portal.war/src/main/webapp/xhtml/disclaimer/disclaimerText.xhtml b/portal.war/src/main/webapp/xhtml/disclaimer/disclaimerText.xhtml
index 02cfba4..7e3dfd3 100644
--- a/portal.war/src/main/webapp/xhtml/disclaimer/disclaimerText.xhtml
+++ b/portal.war/src/main/webapp/xhtml/disclaimer/disclaimerText.xhtml
@@ -8,7 +8,7 @@
xmlns:rich="http://richfaces.org/rich">
-
+
General Disclaimer
The VAMDC Consortium and its activities are based upon a high trust model within an academic environment.
diff --git a/portal.war/src/main/webapp/xhtml/preview/table.xhtml b/portal.war/src/main/webapp/xhtml/preview/table.xhtml
index b68b8da..62778ff 100644
--- a/portal.war/src/main/webapp/xhtml/preview/table.xhtml
+++ b/portal.war/src/main/webapp/xhtml/preview/table.xhtml
@@ -6,120 +6,172 @@
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:rich="http://richfaces.org/rich"
- xmlns:a4j="http://richfaces.org/a4j">
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ xmlns:p="http://primefaces.org/ui"
+ xmlns:a4j="http://richfaces.org/a4j">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Last database update
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/portal.war/src/main/webapp/xhtml/query/actionButtons.xhtml b/portal.war/src/main/webapp/xhtml/query/actionButtons.xhtml
index 2b8b0d6..2d01c0f 100644
--- a/portal.war/src/main/webapp/xhtml/query/actionButtons.xhtml
+++ b/portal.war/src/main/webapp/xhtml/query/actionButtons.xhtml
@@ -7,11 +7,13 @@
xmlns:rich="http://richfaces.org/rich"
xmlns:a4j="http://richfaces.org/a4j">
-
+
-
+ styleClass="largeButton" disabled="#{!queryData.valid}" tabindex="20"/>
+
+
+
\ No newline at end of file
diff --git a/portal.war/src/main/webapp/xhtml/query/fields/proxyRangeField.xhtml b/portal.war/src/main/webapp/xhtml/query/fields/proxyRangeField.xhtml
index e2b0d71..683a6b1 100644
--- a/portal.war/src/main/webapp/xhtml/query/fields/proxyRangeField.xhtml
+++ b/portal.war/src/main/webapp/xhtml/query/fields/proxyRangeField.xhtml
@@ -15,13 +15,12 @@
-
-
+
-
+
diff --git a/portal.war/src/main/webapp/xhtml/query/fields/rangeField.xhtml b/portal.war/src/main/webapp/xhtml/query/fields/rangeField.xhtml
index 378f378..a271ce7 100644
--- a/portal.war/src/main/webapp/xhtml/query/fields/rangeField.xhtml
+++ b/portal.war/src/main/webapp/xhtml/query/fields/rangeField.xhtml
@@ -14,13 +14,12 @@
-
-
+
-
+
diff --git a/portal.war/src/main/webapp/xhtml/query/fields/simpleField.xhtml b/portal.war/src/main/webapp/xhtml/query/fields/simpleField.xhtml
index f5f7bd4..ec78c6b 100644
--- a/portal.war/src/main/webapp/xhtml/query/fields/simpleField.xhtml
+++ b/portal.war/src/main/webapp/xhtml/query/fields/simpleField.xhtml
@@ -14,7 +14,7 @@
-
+
diff --git a/portal.war/src/main/webapp/xhtml/query/fields/suggestionField.xhtml b/portal.war/src/main/webapp/xhtml/query/fields/suggestionField.xhtml
index dc88a54..efc126e 100644
--- a/portal.war/src/main/webapp/xhtml/query/fields/suggestionField.xhtml
+++ b/portal.war/src/main/webapp/xhtml/query/fields/suggestionField.xhtml
@@ -22,9 +22,9 @@
+ reRender="form#{form.id},nodeTree,buttonArea"/>
-
+
diff --git a/portal.war/src/main/webapp/xhtml/query/fields/textField.xhtml b/portal.war/src/main/webapp/xhtml/query/fields/textField.xhtml
index a449bff..4d4c3e8 100644
--- a/portal.war/src/main/webapp/xhtml/query/fields/textField.xhtml
+++ b/portal.war/src/main/webapp/xhtml/query/fields/textField.xhtml
@@ -14,7 +14,7 @@
-
+
diff --git a/portal.war/src/main/webapp/xhtml/query/fields/unitConvRangeField.xhtml b/portal.war/src/main/webapp/xhtml/query/fields/unitConvRangeField.xhtml
index 73f1f42..c546631 100644
--- a/portal.war/src/main/webapp/xhtml/query/fields/unitConvRangeField.xhtml
+++ b/portal.war/src/main/webapp/xhtml/query/fields/unitConvRangeField.xhtml
@@ -18,12 +18,12 @@
+ reRender="nodeTree,buttonArea,conv#{field.id}"/>
+ reRender="nodeTree,buttonArea,conv#{field.id}"/>
Launch your request asynchronously : you will receive an email telling you when computation
is done and how to get your data.
+ styleClass="largeButton" disabled="#{!queryData.valid}" tabindex="21" reRender="asyncForm"/>
diff --git a/portal.war/src/main/webapp/xhtml/query/forms/atomsForm.xhtml b/portal.war/src/main/webapp/xhtml/query/forms/atomsForm.xhtml
new file mode 100644
index 0000000..47ef798
--- /dev/null
+++ b/portal.war/src/main/webapp/xhtml/query/forms/atomsForm.xhtml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/portal.war/src/main/webapp/xhtml/query/forms/collisionsForm.xhtml b/portal.war/src/main/webapp/xhtml/query/forms/collisionsForm.xhtml
index 08b4966..e7c6466 100644
--- a/portal.war/src/main/webapp/xhtml/query/forms/collisionsForm.xhtml
+++ b/portal.war/src/main/webapp/xhtml/query/forms/collisionsForm.xhtml
@@ -1,4 +1,5 @@
-
+
-
+
diff --git a/portal.war/src/main/webapp/xhtml/query/forms/environmentForm.xhtml b/portal.war/src/main/webapp/xhtml/query/forms/environmentForm.xhtml
new file mode 100644
index 0000000..47ef798
--- /dev/null
+++ b/portal.war/src/main/webapp/xhtml/query/forms/environmentForm.xhtml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/portal.war/src/main/webapp/xhtml/query/forms/formTitle.xhtml b/portal.war/src/main/webapp/xhtml/query/forms/formTitle.xhtml
index 97923d7..53dedd2 100644
--- a/portal.war/src/main/webapp/xhtml/query/forms/formTitle.xhtml
+++ b/portal.war/src/main/webapp/xhtml/query/forms/formTitle.xhtml
@@ -15,17 +15,17 @@
-
+ value="Clear">
+
+
diff --git a/portal.war/src/main/webapp/xhtml/query/forms/moleculesForm.xhtml b/portal.war/src/main/webapp/xhtml/query/forms/moleculesForm.xhtml
index 32647fa..65d5dcb 100644
--- a/portal.war/src/main/webapp/xhtml/query/forms/moleculesForm.xhtml
+++ b/portal.war/src/main/webapp/xhtml/query/forms/moleculesForm.xhtml
@@ -13,11 +13,11 @@
-
-
-
-
-
+
+
+
+
+
@@ -30,7 +30,7 @@
+ value="#{form.molecules}" var="molecule" styleClass="isotopologue">
diff --git a/portal.war/src/main/webapp/xhtml/query/forms/particlesForm.xhtml b/portal.war/src/main/webapp/xhtml/query/forms/particlesForm.xhtml
new file mode 100644
index 0000000..47ef798
--- /dev/null
+++ b/portal.war/src/main/webapp/xhtml/query/forms/particlesForm.xhtml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/portal.war/src/main/webapp/xhtml/query/forms/radiativeForm.xhtml b/portal.war/src/main/webapp/xhtml/query/forms/radiativeForm.xhtml
new file mode 100644
index 0000000..47ef798
--- /dev/null
+++ b/portal.war/src/main/webapp/xhtml/query/forms/radiativeForm.xhtml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/portal.war/src/main/webapp/xhtml/query/forms/standardForm.xhtml b/portal.war/src/main/webapp/xhtml/query/forms/standardForm.xhtml
index 312b046..7e9cc51 100644
--- a/portal.war/src/main/webapp/xhtml/query/forms/standardForm.xhtml
+++ b/portal.war/src/main/webapp/xhtml/query/forms/standardForm.xhtml
@@ -9,14 +9,16 @@
xmlns:c="http://java.sun.com/jstl/core">
-
-
-
-
-
+
+
+
+
+
+
-
-
+
+
+
diff --git a/portal.war/src/main/webapp/xhtml/query/forms/utilForm.xhtml b/portal.war/src/main/webapp/xhtml/query/forms/utilForm.xhtml
new file mode 100644
index 0000000..47ef798
--- /dev/null
+++ b/portal.war/src/main/webapp/xhtml/query/forms/utilForm.xhtml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/portal.war/src/main/webapp/xhtml/query/queryTree/actionButtons.xhtml b/portal.war/src/main/webapp/xhtml/query/queryTree/actionButtons.xhtml
index 40c1e72..aeb665b 100644
--- a/portal.war/src/main/webapp/xhtml/query/queryTree/actionButtons.xhtml
+++ b/portal.war/src/main/webapp/xhtml/query/queryTree/actionButtons.xhtml
@@ -9,9 +9,9 @@
-
+ styleClass="largeButton" tabindex="21"/>
diff --git a/portal.war/src/main/webapp/xhtml/query/queryTree/allStatesEnergyForm.xhtml b/portal.war/src/main/webapp/xhtml/query/queryTree/allStatesEnergyForm.xhtml
index 95308d1..9f1cbfd 100644
--- a/portal.war/src/main/webapp/xhtml/query/queryTree/allStatesEnergyForm.xhtml
+++ b/portal.war/src/main/webapp/xhtml/query/queryTree/allStatesEnergyForm.xhtml
@@ -17,8 +17,8 @@
-
+
\ No newline at end of file
diff --git a/portal.war/src/main/webapp/xhtml/query/queryTree/atomsForm.xhtml b/portal.war/src/main/webapp/xhtml/query/queryTree/atomsForm.xhtml
index 7ace7ec..ed421fd 100644
--- a/portal.war/src/main/webapp/xhtml/query/queryTree/atomsForm.xhtml
+++ b/portal.war/src/main/webapp/xhtml/query/queryTree/atomsForm.xhtml
@@ -12,7 +12,9 @@
-
+
+
+
diff --git a/portal.war/src/main/webapp/xhtml/query/queryTree/collisionTreeForm.xhtml b/portal.war/src/main/webapp/xhtml/query/queryTree/collisionTreeForm.xhtml
index 606cb5d..d9a14ab 100644
--- a/portal.war/src/main/webapp/xhtml/query/queryTree/collisionTreeForm.xhtml
+++ b/portal.war/src/main/webapp/xhtml/query/queryTree/collisionTreeForm.xhtml
@@ -10,15 +10,18 @@
xmlns:c="http://java.sun.com/jstl/core">
-
+
-
-
-
-
+
+
+
+
+
@@ -26,11 +29,13 @@
-
-
+
+
-
+
diff --git a/portal.war/src/main/webapp/xhtml/query/queryTree/moleculesForm.xhtml b/portal.war/src/main/webapp/xhtml/query/queryTree/moleculesForm.xhtml
index 32db0b5..4b58deb 100644
--- a/portal.war/src/main/webapp/xhtml/query/queryTree/moleculesForm.xhtml
+++ b/portal.war/src/main/webapp/xhtml/query/queryTree/moleculesForm.xhtml
@@ -9,8 +9,11 @@
xmlns:c="http://java.sun.com/jstl/core">
-
-
+
+
+
+
+
diff --git a/portal.war/src/main/webapp/xhtml/query/queryTree/oneStateEnergyForm.xhtml b/portal.war/src/main/webapp/xhtml/query/queryTree/oneStateEnergyForm.xhtml
index 95308d1..6365501 100644
--- a/portal.war/src/main/webapp/xhtml/query/queryTree/oneStateEnergyForm.xhtml
+++ b/portal.war/src/main/webapp/xhtml/query/queryTree/oneStateEnergyForm.xhtml
@@ -7,7 +7,7 @@
xmlns:a4j="http://richfaces.org/a4j"
xmlns:c="http://java.sun.com/jstl/core">
-
+
@@ -17,8 +17,8 @@
-
+
-
+
\ No newline at end of file
diff --git a/portal.war/src/main/webapp/xhtml/query/queryTree/radiativeForm.xhtml b/portal.war/src/main/webapp/xhtml/query/queryTree/radiativeForm.xhtml
index a87a933..03ab75f 100644
--- a/portal.war/src/main/webapp/xhtml/query/queryTree/radiativeForm.xhtml
+++ b/portal.war/src/main/webapp/xhtml/query/queryTree/radiativeForm.xhtml
@@ -10,7 +10,7 @@
xmlns:c="http://java.sun.com/jstl/core">
-
+
@@ -26,13 +26,14 @@
-
+
+
-
+
-
+
\ No newline at end of file
diff --git a/portal.war/src/main/webapp/xhtml/query/queryTree/rootForm.xhtml b/portal.war/src/main/webapp/xhtml/query/queryTree/rootForm.xhtml
index 45d39cd..097818a 100644
--- a/portal.war/src/main/webapp/xhtml/query/queryTree/rootForm.xhtml
+++ b/portal.war/src/main/webapp/xhtml/query/queryTree/rootForm.xhtml
@@ -9,7 +9,7 @@
xmlns:a4j="http://richfaces.org/a4j">
-
+
@@ -25,8 +25,8 @@
layout="pageDirection" tabindex="10">
-
+
-
+
\ No newline at end of file
diff --git a/portal.war/src/main/webapp/xhtml/query/queryTree/sineReactionCollisionForm.xhtml b/portal.war/src/main/webapp/xhtml/query/queryTree/sineReactionCollisionForm.xhtml
index 3d50bff..539b7e1 100644
--- a/portal.war/src/main/webapp/xhtml/query/queryTree/sineReactionCollisionForm.xhtml
+++ b/portal.war/src/main/webapp/xhtml/query/queryTree/sineReactionCollisionForm.xhtml
@@ -10,50 +10,55 @@
xmlns:c="http://java.sun.com/jstl/core">
-
+
-
-
-
-
-
-
-
+
+
+
+
+
+
-
+
-
+
-
-
-
-
-
+
+
+
+
+
+
-
+
@@ -62,23 +67,26 @@
-
+
-
-
-
-
-
+
+
+
+
-
-
+
+
\ No newline at end of file
diff --git a/portal.war/src/main/webapp/xhtml/query/queryTree/speciesForm.xhtml b/portal.war/src/main/webapp/xhtml/query/queryTree/speciesForm.xhtml
index e725d3c..28132f1 100644
--- a/portal.war/src/main/webapp/xhtml/query/queryTree/speciesForm.xhtml
+++ b/portal.war/src/main/webapp/xhtml/query/queryTree/speciesForm.xhtml
@@ -11,7 +11,7 @@
-
+
@@ -24,5 +24,5 @@
-
+
\ No newline at end of file
diff --git a/portal.war/src/main/webapp/xhtml/query/queryTree/speciesSelectionForm.xhtml b/portal.war/src/main/webapp/xhtml/query/queryTree/speciesSelectionForm.xhtml
index 52717e8..d6f94b8 100644
--- a/portal.war/src/main/webapp/xhtml/query/queryTree/speciesSelectionForm.xhtml
+++ b/portal.war/src/main/webapp/xhtml/query/queryTree/speciesSelectionForm.xhtml
@@ -10,12 +10,12 @@
xmlns:c="http://java.sun.com/jstl/core">
-
+
+ value="Please, enter the number of species you wish to query" />
-
+
@@ -38,16 +38,14 @@
-
-
-
-
-
-
-
+
-
+
+
+
\ No newline at end of file
diff --git a/portal.war/src/main/webapp/xhtml/query/queryTree/withReactionCollisionForm.xhtml b/portal.war/src/main/webapp/xhtml/query/queryTree/withReactionCollisionForm.xhtml
index cce64cc..15a8dee 100644
--- a/portal.war/src/main/webapp/xhtml/query/queryTree/withReactionCollisionForm.xhtml
+++ b/portal.war/src/main/webapp/xhtml/query/queryTree/withReactionCollisionForm.xhtml
@@ -10,74 +10,79 @@
xmlns:c="http://java.sun.com/jstl/core">
-
+
-
-
-
-
-
-
-
+
+
+
+
+
-
-
+
+
-
+
-
-
-
-
-
-
+
+
+
+
+
+
+
-
-
+
+
-
+
-
-
-
-
-
+
+
-
-
+
+
\ No newline at end of file