Codota Logo
ExportedAnnotationLayer.setAttachType
Code IndexAdd Codota to your IDE (free)

How to use
setAttachType
method
in
de.tudarmstadt.ukp.clarin.webanno.export.model.ExportedAnnotationLayer

Best Java code snippets using de.tudarmstadt.ukp.clarin.webanno.export.model.ExportedAnnotationLayer.setAttachType (Showing top 4 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
StringBuilder s =
  • Codota Iconnew StringBuilder()
  • Codota Iconnew StringBuilder(32)
  • Codota IconString str;new StringBuilder(str)
  • Smart code suggestions by Codota
}
origin: webanno/webanno

layerToExLayers.get(layer).setAttachType(
    new ExportedAnnotationLayerReference(layer.getAttachType().getName()));
origin: de.tudarmstadt.ukp.clarin.webanno/webanno-api-dao

layerToExLayers.get(layer).setAttachType(
    new ExportedAnnotationLayerReference(layer.getAttachType().getName()));
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: 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;
  }
}
de.tudarmstadt.ukp.clarin.webanno.export.modelExportedAnnotationLayersetAttachType

Popular methods of ExportedAnnotationLayer

  • getName
  • getType
  • <init>
  • getAnchoringMode
  • getAttachFeature
  • getAttachType
  • getDescription
  • getFeatures
  • getUiName
  • getValidationMode
  • isAllowStacking
  • isBuiltIn
  • isAllowStacking,
  • isBuiltIn,
  • isCrossSentence,
  • isEnabled,
  • isLinkedListBehavior,
  • isLockToTokenOffset,
  • isMultipleTokens,
  • isReadonly,
  • setAllowStacking,
  • setAnchoringMode

Popular in Java

  • Updating database using SQL prepared statement
  • notifyDataSetChanged (ArrayAdapter)
  • addToBackStack (FragmentTransaction)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • IOException (java.io)
    Signals that an I/O exception of some sort has occurred. This class is the general class of exceptio
  • InputStreamReader (java.io)
    An InputStreamReader is a bridge from byte streams to character streams: It reads bytes and decodes
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate(i
  • Vector (java.util)
    The Vector class implements a growable array of objects. Like an array, it contains components that
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement.A servlet is a small Java program that runs within
  • JList (javax.swing)
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