Skip to content

Commit

Permalink
Finish annis-3.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
thomaskrause committed Jul 31, 2013
2 parents c98a4e3 + a7f70fe commit c63560c
Show file tree
Hide file tree
Showing 32 changed files with 693 additions and 214 deletions.
32 changes: 32 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,35 @@
Version 3.0.0
=============

**IMPORTANT**
This release changes the default user configuration directory from
/etc/annis/user_config_trunk/
to
/etc/annis/user_config/
Please either update your shiro.ini file to your custom location or
move the folder on your file system to the new default location.

Changelog is also available on GitHub:
https://github.com/korpling/ANNIS/issues?direction=asc&milestone=1&page=1&sort=created&state=closed

[Bugs]
#158 Exception when using "#c=" fragment
#155 Cannot create user specific corpus groups (3.0.0-rc.1)
#147 test fails when building service
#145 Presence of page annotation creates PDF icon in grid even if there is no PDF registered for the corpus
#144 Cancel import in Kickstarter does not work (3.0.0-rc.1)
#143 Kickstarter does not start if an older database exists (3.0.0-rc.1)
#141 Right-to-left detection in grid visualizer doesn't work
#139 example query not always sensitive to default segmentation
#137 Match highlighting in KWIC is incorrect/missing in parallel corpus query of non-terminal elements
#126 Hit marking in KWIC for segmentations precedence queries is incorrect

[Enhancements]
#157 Add CorefVisualizer that is only using the result context
#42 user-friendly message in "annis-service import" on duplicate corpus
#4 Annotation explorer should also show available document metadata categories


Version 3.0.0-rc.1
==================

Expand Down
2 changes: 1 addition & 1 deletion Misc/changelog.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import io
from subprocess import call

milestone_id = "7"
milestone_id = "1"

call(["curl", "-H", "Accept: application/vnd.github.beta.full+json", "-o", "issues.json", "https://api.github.com/repos/korpling/ANNIS/issues?state=closed&milestone=" + milestone_id + "&sort=created"])

Expand Down
2 changes: 1 addition & 1 deletion annis-gui/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>annis-all</artifactId>
<groupId>de.hu-berlin.german.korpling.annis</groupId>
<version>3.0.0-SNAPSHOT</version>
<version>3.0.0</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
29 changes: 28 additions & 1 deletion annis-gui/src/main/java/annis/gui/SearchUI.java
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import java.util.*;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import net.xeoh.plugins.base.PluginManager;
Expand Down Expand Up @@ -783,7 +784,33 @@ private void evaluateFragment(String fragment)
mappedCorpora.add(c);
}
}
queryController.setQuery(new Query("tok", mappedCorpora));

// get list of all corpora
WebResource rootRes = Helper.getAnnisWebResource();
List<AnnisCorpus> allCorpora = rootRes.path("query").path("corpora")
.get(new GenericType<List<AnnisCorpus>>() {});
Set<String> allCorpusNames = new HashSet<String>();
for(AnnisCorpus c : allCorpora)
{
allCorpusNames.add(c.getName());
}

// remove all corpora selections that do not exist
boolean someCorporaRemoved = mappedCorpora.retainAll(allCorpusNames);

if(someCorporaRemoved)
{
// show a warning message that the corpus was not imported yet
new Notification("Linked corpus does not exist",
"The corpus you wanted to access unfortunally does not (yet) exist in ANNIS<br/>"
+ "A possible reason is that it has not been imported yet. Please ask the "
+ "responsible person of the site that contained the link to import the corpus.",
Notification.Type.WARNING_MESSAGE, true).show(Page.getCurrent());
}
else
{
queryController.setQuery(new Query("tok", mappedCorpora));
}
}
else if (args.get("cl") != null && args.get("cr") != null)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ public Action[] getActions(Object target, Object sender)
return new Action[0];
}

if (VaadinSession.getCurrent().getAttribute(AnnisCorpus.class) == null)
if (Helper.getUser() == null)
{
// we can't change anything if we are not logged in so don't even try
return new Action[0];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ public SearchOptionsPanel()

corpusConfigurations = Helper.getCorpusConfigs();


if (corpusConfigurations == null
|| corpusConfigurations.get(DEFAULT_CONFIG) == null
|| corpusConfigurations.get(DEFAULT_CONFIG).isEmpty())
Expand Down Expand Up @@ -420,7 +421,7 @@ public int getResultsPerPage()
log.warn("Invalid integer submitted to search options ComboBox", ex);
}

return Math.max(0, result);
return Math.max(1, result);
}

public String getSegmentationLayer()
Expand Down Expand Up @@ -509,7 +510,14 @@ private String checkSegments(String key, Set<String> corpora)
}
}

return segmentation;
if(segmentation == null)
{
return corpusConfigurations.get(DEFAULT_CONFIG).getConfig(key);
}
else
{
return segmentation;
}
}

/**
Expand Down
2 changes: 1 addition & 1 deletion annis-interfaces/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<artifactId>annis-all</artifactId>
<groupId>de.hu-berlin.german.korpling.annis</groupId>
<version>3.0.0-SNAPSHOT</version>
<version>3.0.0</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import de.hu_berlin.german.korpling.saltnpepper.salt.saltCommon.sDocumentStructure.SToken;
import de.hu_berlin.german.korpling.saltnpepper.salt.saltCore.SAnnotation;
import de.hu_berlin.german.korpling.saltnpepper.salt.saltCore.SGraph;
import de.hu_berlin.german.korpling.saltnpepper.salt.saltCore.SNode;
import java.util.Collections;
import java.util.LinkedList;
import java.util.List;
Expand All @@ -42,7 +43,7 @@ public class TimeHelper
* one element of only start elements where found, 2 elements if both
* start and end time are found.
*/
public static double[] getOverlappedTime(SSpan node)
public static double[] getOverlappedTime(SNode node)
{
SGraph graph = node.getSGraph();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,14 @@ public void setConfig(String configName, String configValue)
config = new Properties();
}

config.setProperty(configName, configValue);
if(configValue == null)
{
config.remove(configName);
}
else
{
config.setProperty(configName, configValue);
}
}

/**
Expand Down
2 changes: 1 addition & 1 deletion annis-kickstarter/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>annis-all</artifactId>
<groupId>de.hu-berlin.german.korpling.annis</groupId>
<version>3.0.0-SNAPSHOT</version>
<version>3.0.0</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
</Properties>
<SyntheticProperties>
<SyntheticProperty name="formSizePolicy" type="int" value="1"/>
<SyntheticProperty name="generateCenter" type="boolean" value="false"/>
</SyntheticProperties>
<AuxValues>
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
Expand Down
Loading

0 comments on commit c63560c

Please sign in to comment.