Skip to content

Commit

Permalink
Merge branch 'release-4.2.4'
Browse files Browse the repository at this point in the history
  • Loading branch information
noedelta committed Jul 25, 2016
2 parents fb2634f + 6d4a775 commit 7905643
Show file tree
Hide file tree
Showing 22 changed files with 428 additions and 76 deletions.
85 changes: 54 additions & 31 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
<parent>
<groupId>uk.ac.ebi.intact.maven</groupId>
<artifactId>intact-hibernate-master</artifactId>
<!--The version can not be updated to 43 or 44 without breaking the compilation -> java.lang.NoClassDefFoundError: org/hibernate/util/PropertiesHelper -->
<version>42</version>
</parent>

Expand All @@ -17,20 +18,15 @@
<groupId>uk.ac.ebi.intact.service.sandbox</groupId>
<artifactId>intact-view</artifactId>
<packaging>war</packaging>
<version>4.2.3.3-SNAPSHOT</version>
<version>4.2.4</version>

<name>IntAct Services :: View</name>

<!--<scm>-->
<!--<connection>scm:svn:https://intact.googlecode.com/svn/repo/service/trunk/intact-view</connection>-->
<!--<developerConnection>scm:svn:https://intact.googlecode.com/svn/repo/service/trunk/intact-view</developerConnection>-->
<!--<url>https://intact.googlecode.com/svn/repo/service/trunk/intact-view</url>-->
<!--</scm>-->

<scm>
<connection>scm:git:https://github.com/EBI-IntAct/IntAct-View.git</connection>
<developerConnection>scm:git:https://github.com/EBI-IntAct/IntAct-View.git</developerConnection>
<url>https://github.com/EBI-IntAct/IntAct-View</url>
<connection>scm:git:https://github.com/EBI-IntAct/intact-view.git</connection>
<developerConnection>scm:git:https://github.com/EBI-IntAct/intact-view.git</developerConnection>
<url>https://github.com/EBI-IntAct/intact-view</url>
<tag>HEAD</tag>
</scm>

Expand Down Expand Up @@ -93,7 +89,7 @@
</properties>

<build>
<finalName>${artifactId}-${version}</finalName>
<finalName>${project.artifactId}-${project.version}</finalName>

<resources>
<resource>
Expand Down Expand Up @@ -129,7 +125,7 @@
<scanIntervalSeconds>0</scanIntervalSeconds>
<webAppConfig>
<contextPath>${jetty.contextPath}</contextPath>
<jettyEnvXml>${build.outputDirectory}/META-INF/jetty-env.xml</jettyEnvXml>
<jettyEnvXml>${project.build.outputDirectory}/META-INF/jetty-env.xml</jettyEnvXml>
</webAppConfig>
<systemProperties>
<systemProperty>
Expand All @@ -138,7 +134,7 @@
</systemProperty>
</systemProperties>
<!-- configure the container -->
<jettyConfig>${build.outputDirectory}/META-INF/jetty.xml</jettyConfig>
<jettyConfig>${project.build.outputDirectory}/META-INF/jetty.xml</jettyConfig>
</configuration>
<dependencies>
<dependency>
Expand Down Expand Up @@ -186,16 +182,35 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.5.1</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
<!--Avoids deployment and install at release time-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
<version>2.5.2</version>
<configuration>
<skip>true</skip>
</configuration>
</plugin>

<!-- Conversion of XML Schema into Java source code using JAXB-XJC -->
<plugin>
<groupId>org.jvnet.jaxb2.maven2</groupId>
<artifactId>maven-jaxb2-plugin</artifactId>
<version>0.12.3</version>
<configuration>
<schemaDirectory>src/main/resources/META-INF/schema</schemaDirectory>
<schemaIncludes>
Expand Down Expand Up @@ -226,19 +241,37 @@
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.5</version>
<groupId>external.atlassian.jgitflow</groupId>
<artifactId>jgitflow-maven-plugin</artifactId>
<version>1.0-m5.1</version>
<configuration>
<remoteTagging>true</remoteTagging>
<goals>deploy</goals>
<flowInitContext>
<masterBranchName>master</masterBranchName>
<developBranchName>develop</developBranchName>
<featureBranchPrefix>feature-</featureBranchPrefix>
<releaseBranchPrefix>release-</releaseBranchPrefix>
<hotfixBranchPrefix>hotfix-</hotfixBranchPrefix>
<versionTagPrefix>${project.artifactId}-</versionTagPrefix>
</flowInitContext>
<!-- see goals wiki page for configuration options -->
<allowUntracked>true</allowUntracked>
</configuration>
</plugin>
</plugins>

</build>

<profiles>
<!--Avoids problems in java8 with the documentation at release time-->
<profile>
<id>disable-java8-doclint</id>
<activation>
<jdk>[1.8,)</jdk>
</activation>
<properties>
<additionalparam>-Xdoclint:none</additionalparam>
</properties>
</profile>
<profile>
<id>integration-tests</id>
<properties>
Expand Down Expand Up @@ -914,19 +947,9 @@

<repositories>
<repository>
<id>intact.nexus</id>
<name>IntAct Nexus</name>
<url>http://www.ebi.ac.uk/intact/maven/nexus/content/groups/public</url>
<id>nexus-ebi-release-repo</id>
<url>http://www.ebi.ac.uk/Tools/maven/repos/content/groups/ebi-repo/</url>
</repository>
</repositories>

<pluginRepositories>
<pluginRepository>
<id>intact.nexus</id>
<name>IntAct Nexus</name>
<url>http://www.ebi.ac.uk/intact/maven/nexus/content/groups/public</url>
</pluginRepository>

</pluginRepositories>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,13 @@ public class OntologyInteractorTypeConfig implements InitializingBean{
private IntactViewConfiguration viewConfiguration;

private String [] proteinTypes;
private String [] complexTypes;
private String [] compoundTypes;
private String [] nucleicAcidTypes;
private String[] geneTypes;

private boolean proteinTypesInitialized;
private boolean complexTypesInitialized;
private boolean compoundTypesInitialized;
private boolean nucleicAcidTypesInitialized;
private boolean geneTypesInitialized;
Expand All @@ -55,6 +57,10 @@ public void afterPropertiesSet() throws Exception {
log.info("Loading protein types...");
loadProteins(ontologySearcher);

// load complexes
log.info("Loading complex types...");
loadComplexes(ontologySearcher);

// load nucleic acids
log.info("Loading nucleic acid types...");
loadNucleicAcids(ontologySearcher);
Expand All @@ -76,6 +82,11 @@ public void refreshTypes(){
log.info("Loading protein types...");
loadProteins(ontologySearcher);

// load complexes
log.info("Loading complexes types...");
loadComplexes(ontologySearcher);


// load nucleic acids
log.info("Loading nucleic acid types...");
loadNucleicAcids(ontologySearcher);
Expand Down Expand Up @@ -121,6 +132,30 @@ private void loadProteins(OntologySearcher ontologySearcher){
}
}

private void loadComplexes(OntologySearcher ontologySearcher){
try{
OntologyTerm bioActiveEntity = new LazyLoadedOntologyTerm( ontologySearcher, "MI:0314", "complex" );

List<OntologyTerm> complexChildren = loadChildrenFor(bioActiveEntity);

this.complexTypes = new String[1+complexChildren.size()];

this.complexTypes[0] = bioActiveEntity.getId();

int index = 1;
for (OntologyTerm term : complexChildren){
this.complexTypes[index] = term.getId();
index++;
}
complexTypesInitialized = true;
}
catch (SolrServerException e){
log.error("Could not load complexes types from SOLR index. Use defaults.", e);
complexTypesInitialized = false;
complexTypes = new String[]{"MI:0314", "MI:1302"};
}
}

private void loadCompounds(OntologySearcher ontologySearcher){
try{
OntologyTerm bioActiveEntity = new LazyLoadedOntologyTerm( ontologySearcher, "MI:1100", "bioactive entity" );
Expand Down Expand Up @@ -218,6 +253,15 @@ public String[] getProteinTypes() {
return proteinTypes;
}

public String[] getComplexTypes() {
if (!complexTypesInitialized){
final SolrServer ontologySolrServer = viewConfiguration.getOntologySolrServer();
OntologySearcher ontologySearcher = new OntologySearcher(ontologySolrServer);
loadComplexes(ontologySearcher);
}
return complexTypes;
}

public String[] getCompoundTypes() {
if (!compoundTypesInitialized){
final SolrServer ontologySolrServer = viewConfiguration.getOntologySolrServer();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
import uk.ac.ebi.intact.view.webapp.controller.search.SearchController;
import uk.ac.ebi.intact.view.webapp.controller.search.UserQuery;
import uk.ac.ebi.intact.view.webapp.model.ParticipantLazyDataModel;
import uk.ac.ebi.intact.view.webapp.model.ParticipantWrapper;

import javax.faces.context.FacesContext;
import javax.persistence.Query;
Expand Down Expand Up @@ -92,6 +93,8 @@ public class DetailsController extends JpaBaseController {
private Experiment experiment;
private int numberInteractions=0;
private int numberParticipants=0;
private boolean containComplexes=false;

private ParticipantLazyDataModel participants;
private boolean featureAvailable;
private int numberOfInteractorsInExperiment=0;
Expand Down Expand Up @@ -751,6 +754,19 @@ else if (exp != null && exp.getFullName() != null){
return "-";
}

public boolean isContainComplexes() {

containComplexes =false;
for (ParticipantWrapper participant : participants) {
if (participant.getInteractorTypeShortlabel().contains("complex")) {
containComplexes = true;
break;
}
}

return containComplexes;
}

public ParticipantLazyDataModel getParticipants() {
return participants;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/**
* Copyright 2008 The European Bioinformatics Institute, and others.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package uk.ac.ebi.intact.view.webapp.controller.list;


import org.apache.myfaces.orchestra.conversation.annotations.ConversationName;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;

/**
* Controller for ProteinList View
*
* @author Bruno Aranda (baranda@ebi.ac.uk)
* @version $Id$
* @since 0.9
*/
@Controller
@Scope( "conversation.access" )
@ConversationName( "general" )
public class ComplexListController extends InteractorListController {


}
Loading

0 comments on commit 7905643

Please sign in to comment.