Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redesigned and added dataset control functions to /manager context #3

Merged
merged 24 commits into from
Oct 5, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
410350c
Add security barrier for /manager context using the basic property fi…
hkmoon Feb 19, 2015
704a05c
Modify data set calculation logic including partitions()
hkmoon Feb 26, 2015
796b156
Create new manager view including Dashboard and Datasets
hkmoon Mar 5, 2015
0d4511f
Activate/deactivate the dataset in the manager context
hkmoon Mar 6, 2015
74176a1
Add deploy/undeploy & active/inactive dataset controls
hkmoon Mar 10, 2015
2e0083f
Update to bigdataviewer-core 1.0.8
hkmoon Mar 23, 2015
9c62c64
Add "activate/deactivate" dataset function in the manager context
hkmoon Mar 23, 2015
6a01c21
Update to the parent 1.1.2
hkmoon Mar 23, 2015
feb492f
Use Resource for the password property file
hkmoon Mar 23, 2015
d0722b2
Update the jetty version to 9.2 because it have SecuredRedirectHandler
hkmoon Apr 2, 2015
f39cf8c
Apply https secure channel for /manager context
hkmoon Apr 2, 2015
b005c3a
Set default ENABLE_EXPERIMENTAL_FEATURES false
hkmoon Apr 2, 2015
450cbb4
Fix the added context is not starting properly
hkmoon May 7, 2015
8e521f1
Change the message convention not to confuse people regarding "regist…
hkmoon May 21, 2015
901d8ae
Fix the bug of not showing the actual "active" status in datasets
hkmoon May 21, 2015
34cb87e
Add manager functionalities to modify description, category and index…
hkmoon May 29, 2015
1eebb83
Store the dataset list file when the manager changes category, index …
hkmoon Jun 1, 2015
db7070c
Disable EXPERIMENTAL_FEATURES for the release
hkmoon Jun 1, 2015
cffc1a9
Support Category based browsing BigDataServer
hkmoon Jun 1, 2015
6ee30aa
Fix the problem of not having category,index, description when deploy…
hkmoon Jun 1, 2015
8fd826f
Add sc.fiji.spim_data for spimdata exception
hkmoon Aug 31, 2015
979b86b
Add command line option for https port of manager
hkmoon Aug 31, 2015
7632595
Support dataset list file internally
hkmoon Sep 1, 2015
bcb76e2
Move ssl port configuration into Parameter class
hkmoon Sep 1, 2015
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
159 changes: 86 additions & 73 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,85 +1,98 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>sc.fiji</groupId>
<artifactId>pom-bigdataviewer</artifactId>
<version>1.0.7</version>
</parent>
<parent>
<groupId>sc.fiji</groupId>
<artifactId>pom-bigdataviewer</artifactId>
<version>1.1.2</version>
</parent>

<artifactId>bigdataviewer-server</artifactId>
<version>1.0.2-SNAPSHOT</version>
<artifactId>bigdataviewer-server</artifactId>
<version>1.0.4-SNAPSHOT</version>

<name>BigDataServer</name>
<description>A web server for BigDataViewer datasets</description>
<name>BigDataServer</name>
<description>A web server for BigDataViewer datasets</description>

<properties>
<scijava.jvm.version>1.7</scijava.jvm.version>
</properties>
<properties>
<scijava.jvm.version>1.7</scijava.jvm.version>
<jetty.version>9.2.10.v20150310</jetty.version>
</properties>

<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
</plugins>
</build>
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
</plugins>
</build>

<dependencies>
<dependency>
<groupId>sc.fiji</groupId>
<artifactId>bigdataviewer-core</artifactId>
<version>1.0.4-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-server</artifactId>
</dependency>
<dependency>
<groupId>org.antlr</groupId>
<artifactId>stringtemplate</artifactId>
<version>3.2.1</version>
</dependency>
<dependency>
<groupId>commons-cli</groupId>
<artifactId>commons-cli</artifactId>
<version>1.2</version>
</dependency>
</dependencies>
<dependencies>
<dependency>
<groupId>sc.fiji</groupId>
<artifactId>bigdataviewer-core</artifactId>
</dependency>
<dependency>
<groupId>sc.fiji</groupId>
<artifactId>spim_data</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-server</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-security</artifactId>
</dependency>
<dependency>
<groupId>org.antlr</groupId>
<artifactId>stringtemplate</artifactId>
<version>3.2.1</version>
</dependency>
<dependency>
<groupId>commons-cli</groupId>
<artifactId>commons-cli</artifactId>
<version>1.2</version>
</dependency>
<dependency>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
<version>3.2.1</version>
</dependency>
</dependencies>

<developers>
<developer>
<id>tpietzsch</id>
<name>Tobias Pietzsch</name>
<email>[email protected]</email>
<url />
<organization>MPI-CBG</organization>
<organizationUrl>http://www.mpi-cbg.de/</organizationUrl>
<roles>
<role>architect</role>
<role>developer</role>
</roles>
<timezone>+1</timezone>
</developer>
</developers>
<developers>
<developer>
<id>tpietzsch</id>
<name>Tobias Pietzsch</name>
<email>[email protected]</email>
<url/>
<organization>MPI-CBG</organization>
<organizationUrl>http://www.mpi-cbg.de/</organizationUrl>
<roles>
<role>architect</role>
<role>developer</role>
</roles>
<timezone>+1</timezone>
</developer>
</developers>

<repositories>
<repository>
<id>imagej.public</id>
<url>http://maven.imagej.net/content/groups/public</url>
</repository>
</repositories>
<repositories>
<repository>
<id>imagej.public</id>
<url>http://maven.imagej.net/content/groups/public</url>
</repository>
</repositories>

<scm>
<connection>scm:git:git://github.com/tpietzsch/spimviewer</connection>
<developerConnection>scm:git:[email protected]:tpietzsch/spimviewer</developerConnection>
<tag>HEAD</tag>
<url>https://github.com/tpietzsch/spimviewer</url>
</scm>
<scm>
<connection>scm:git:git://github.com/tpietzsch/spimviewer</connection>
<developerConnection>scm:git:[email protected]:tpietzsch/spimviewer</developerConnection>
<tag>HEAD</tag>
<url>https://github.com/tpietzsch/spimviewer</url>
</scm>
</project>
219 changes: 219 additions & 0 deletions src/main/java/bdv/model/DataSet.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,219 @@
package bdv.model;

import java.io.BufferedWriter;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.ArrayList;

/**
* DataSet class holds SPIM dataset information
*/
public class DataSet
{
private static Path dataSetListPath;
/**
* DataSet Context name of this {@link bdv.server.CellHandler} is serving.
*/
private final String name;

/**
* Full path of the dataset xml file this {@link bdv.server.CellHandler} is serving.
*/
private final String xmlPath;

private String category;
private String description;
private String index;
private long size;

private String thumbnailUrl;
private String datasetUrl;

/**
* Instantiates a new DataSet
*
* @param name the dataset Context name
* @param xmlPath the dataset XML file path
* @param category the category of the dataset
* @param description the description of the dataset
* @param index the index of the dataset
*/
public DataSet( String name, String xmlPath, String category, String description, String index )
{
this.name = name;
this.xmlPath = xmlPath;
this.category = category;
this.description = description;
this.index = index;
}

/**
* Sets dataSetList path.
*
* @param dataSetListPath the data set list path
*/
public static void setDataSetListPath( Path dataSetListPath )
{
DataSet.dataSetListPath = dataSetListPath;
}

/**
* Gets the dataset name.
*
* @return the dataset name
*/
public String getName()
{
return name;
}

/**
* Gets the dataset xml file path.
*
* @return the xml file path
*/
public String getXmlPath()
{
return xmlPath;
}

/**
* Gets the dataset category.
*
* @return the dataset category name
*/
public String getCategory()
{
return category;
}

/**
* Sets the dataset category name.
*
* @param category the category name
*/
public void setCategory( String category )
{
this.category = category;
}

/**
* Gets description.
*
* @return the description
*/
public String getDescription()
{
return description;
}

/**
* Sets description.
*
* @param description the description
*/
public void setDescription( String description )
{
this.description = description;
}

/**
* Gets index.
*
* @return the index
*/
public String getIndex()
{
return index;
}

/**
* Sets index.
*
* @param index the index
*/
public void setIndex( String index )
{
this.index = index;
}

/**
* Gets dataset size.
*
* @return the dataset size
*/
public long getSize()
{
return size;
}

/**
* Sets dataset size.
*
* @param size the dataset size
*/
public void setSize( long size )
{
this.size = size;
}

/**
* Gets thumbnail url.
*
* @return the thumbnail url
*/
public String getThumbnailUrl()
{
return datasetUrl + "png";
}

/**
* Gets dataset url.
*
* @return the dataset url
*/
public String getDatasetUrl()
{
return datasetUrl;
}

/**
* Sets dataset url.
*
* @param datasetUrl the dataset url
*/
public void setDatasetUrl( String datasetUrl )
{
this.datasetUrl = datasetUrl;
}

/**
* Store datasets
* @param list the dataset list
* @throws IOException the iO exception
*/
public static void storeDataSet( ArrayList< DataSet > list ) throws IOException
{
if ( dataSetListPath != null )
{
BufferedWriter writer = Files.newBufferedWriter( dataSetListPath, StandardCharsets.UTF_8 );
for ( DataSet ds : list )
{
writer.write( ds.getName() );
writer.write( '\t' );
writer.write( ds.getXmlPath() );
writer.write( '\t' );
writer.write( ds.getCategory() );
writer.write( '\t' );
writer.write( ds.getDescription() );
writer.write( '\t' );
writer.write( ds.getIndex() );
writer.write( '\n' );
}
writer.flush();
writer.close();
}
}
}
Loading