Codota Logo
ImportUtil
Code IndexAdd Codota to your IDE (free)

How to use
ImportUtil
in
de.tudarmstadt.ukp.clarin.webanno.export

Best Java code snippets using de.tudarmstadt.ukp.clarin.webanno.export.ImportUtil (Showing top 12 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
SimpleDateFormat s =
  • Codota IconString pattern;new SimpleDateFormat(pattern)
  • Codota IconString template;Locale locale;new SimpleDateFormat(template, locale)
  • Codota Iconnew SimpleDateFormat()
  • Smart code suggestions by Codota
}
origin: de.tudarmstadt.ukp.inception.app/inception-ui-core

if (!ImportUtil.isZipValidWebanno(tempFile)) {
  throw new IOException("ZIP file is not a valid project archive");
origin: webanno/webanno

private IResourceStream exportLayerJson()
{
  try {
    AnnotationLayer layer = getModelObject();
    List<ExportedAnnotationLayer> exLayers = new ArrayList<>();
    ExportedAnnotationLayer exMainLayer = ImportUtil.exportLayerDetails(null, null,
        layer, annotationService);
    exLayers.add(exMainLayer);
    // If the layer is attached to another layer, then we also have to export
    // that, otherwise we would be missing it during re-import.
    if (layer.getAttachType() != null) {
      AnnotationLayer attachLayer = layer.getAttachType();
      ExportedAnnotationLayer exAttachLayer = ImportUtil.exportLayerDetails(null,
          null, attachLayer, annotationService);
      exMainLayer.setAttachType(
          new ExportedAnnotationLayerReference(exAttachLayer.getName()));
      exLayers.add(exAttachLayer);
    }
    return new InputStreamResourceStream(new ByteArrayInputStream(
        JSONUtil.toPrettyJsonString(exLayers).getBytes("UTF-8")));
  }
  catch (Exception e) {
    error("Unable to generate the JSON file: " + ExceptionUtils.getRootCauseMessage(e));
    ProjectLayersPanel.LOG.error("Unable to generate the JSON file", e);
    RequestCycle.get().find(IPartialPageRequestHandler.class)
        .ifPresent(handler -> handler.addChildren(getPage(), IFeedback.class));
    return null;
  }
}
origin: webanno/webanno

ImportUtil.setLayer(annotationService, layer, aExLayer, project, aUser);
ImportUtil.setLayer(annotationService, layer, aExLayer, project, aUser);
    && annotationService.existsTagSet(exTagset.getName(), project)) {
  tagSet = annotationService.getTagSet(exTagset.getName(), project);
  ImportUtil.createTagSet(tagSet, exTagset, project, aUser, annotationService);
  ImportUtil.createTagSet(tagSet, exTagset, project, aUser, annotationService);
      layer);
  feature.setTagset(tagSet);
  ImportUtil.setFeature(annotationService, feature, exfeature, project, aUser);
  continue;
feature.setLayer(layer);
feature.setTagset(tagSet);
ImportUtil.setFeature(annotationService, feature, exfeature, project, aUser);
origin: de.tudarmstadt.ukp.clarin.webanno/webanno-ui-project

String text = IOUtils.toString(tagInputStream, "UTF-8");
Map<String, String> tabbedTagsetFromFile = ImportUtil
    .getTagSetFromFile(text);
origin: de.tudarmstadt.ukp.clarin.webanno/webanno-ui-project

ImportUtil.setLayer(annotationService, layer, aExLayer, project, aUser);
ImportUtil.setLayer(annotationService, layer, aExLayer, project, aUser);
    && annotationService.existsTagSet(exTagset.getName(), project)) {
  tagSet = annotationService.getTagSet(exTagset.getName(), project);
  ImportUtil.createTagSet(tagSet, exTagset, project, aUser, annotationService);
  ImportUtil.createTagSet(tagSet, exTagset, project, aUser, annotationService);
      layer);
  feature.setTagset(tagSet);
  ImportUtil.setFeature(annotationService, feature, exfeature, project, aUser);
  continue;
feature.setLayer(layer);
feature.setTagset(tagSet);
ImportUtil.setFeature(annotationService, feature, exfeature, project, aUser);
origin: webanno/webanno

String text = IOUtils.toString(tagInputStream, "UTF-8");
Map<String, String> tabbedTagsetFromFile = ImportUtil
    .getTagSetFromFile(text);
origin: de.tudarmstadt.ukp.clarin.webanno/webanno-remote

if (!ImportUtil.isZipValidWebanno(tempFile)) {
  throw new UnsupportedFormatException("Incompatible to webanno ZIP file");
origin: de.tudarmstadt.ukp.clarin.webanno/webanno-ui-project

private IResourceStream exportLayerJson()
{
  try {
    AnnotationLayer layer = getModelObject();
    List<ExportedAnnotationLayer> exLayers = new ArrayList<>();
    ExportedAnnotationLayer exMainLayer = ImportUtil.exportLayerDetails(null, null,
        layer, annotationService);
    exLayers.add(exMainLayer);
    // If the layer is attached to another layer, then we also have to export
    // that, otherwise we would be missing it during re-import.
    if (layer.getAttachType() != null) {
      AnnotationLayer attachLayer = layer.getAttachType();
      ExportedAnnotationLayer exAttachLayer = ImportUtil.exportLayerDetails(null,
          null, attachLayer, annotationService);
      exMainLayer.setAttachType(
          new ExportedAnnotationLayerReference(exAttachLayer.getName()));
      exLayers.add(exAttachLayer);
    }
    return new InputStreamResourceStream(new ByteArrayInputStream(
        JSONUtil.toPrettyJsonString(exLayers).getBytes("UTF-8")));
  }
  catch (Exception e) {
    error("Unable to generate the JSON file: " + ExceptionUtils.getRootCauseMessage(e));
    ProjectLayersPanel.LOG.error("Unable to generate the JSON file", e);
    RequestCycle.get().find(IPartialPageRequestHandler.class)
        .ifPresent(handler -> handler.addChildren(getPage(), IFeedback.class));
    return null;
  }
}
origin: webanno/webanno

if (!ImportUtil.isZipValidWebanno(tempFile)) {
  throw new UnsupportedFormatException("Incompatible to webanno ZIP file");
origin: inception-project/inception

if (!ImportUtil.isZipValidWebanno(tempFile)) {
  throw new IOException("ZIP file is not a valid project archive");
origin: webanno/webanno

if (!ImportUtil.isZipValidWebanno(tempFile)) {
  throw new IOException("ZIP file is not a WebAnno project archive");
origin: de.tudarmstadt.ukp.clarin.webanno/webanno-ui-project

if (!ImportUtil.isZipValidWebanno(tempFile)) {
  throw new IOException("ZIP file is not a WebAnno project archive");
de.tudarmstadt.ukp.clarin.webanno.exportImportUtil

Javadoc

This class contains Utility methods that can be used in Project settings.

Most used methods

  • isZipValidWebanno
    Check if the zip file is webanno compatible
  • createTagSet
  • exportLayerDetails
  • getTagSetFromFile
    Read Tag and Tag Description. A line has a tag name and a tag description separated by a TAB
  • setFeature
  • setLayer

Popular in Java

  • Making http requests using okhttp
  • scheduleAtFixedRate (ScheduledExecutorService)
  • compareTo (BigDecimal)
    Compares this BigDecimal with the specified BigDecimal. Two BigDecimal objects that are equal in val
  • addToBackStack (FragmentTransaction)
  • Pointer (com.sun.jna)
    An abstraction for a native pointer data type. A Pointer instance represents, on the Java side, a na
  • FileWriter (java.io)
    Convenience class for writing character files. The constructors of this class assume that the defaul
  • MessageFormat (java.text)
    MessageFormat provides a means to produce concatenated messages in language-neutral way. Use this to
  • SimpleDateFormat (java.text)
    Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • ImageIO (javax.imageio)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now