Examples of RutaColoring


Examples of org.apache.uima.ruta.type.RutaColoring

  @Override
  public void execute(RuleMatch match, RuleElement element, RutaStream stream, InferenceCrowd crowd) {
    Type casType = stream.getJCas().getCasType(RutaColoring.type);
    FeatureStructure newAnnotationFS = stream.getCas().createFS(casType);
    RutaColoring coloring = null;
    if (newAnnotationFS instanceof RutaColoring) {
      coloring = (RutaColoring) newAnnotationFS;
      RutaBlock parent = element.getParent();
      coloring.setBgColor(bgcolor.getStringValue(parent, match, element, stream));
      coloring.setFgColor(fgcolor.getStringValue(parent, match, element, stream));
      coloring.setSelected(selected.getBooleanValue(parent, match, element, stream));
      coloring.setTargetType(type.getType(parent).getName());
      coloring.addToIndexes();
    }
  }
View Full Code Here

Examples of org.apache.uima.ruta.type.RutaColoring

  private List<StyleMapEntry> createStyleList(JCas jcas) {
    List<StyleMapEntry> result = new ArrayList<StyleMapEntry>();
    Type type = jcas.getCasType(RutaColoring.type);
    FSIterator<FeatureStructure> iterator = jcas.getFSIndexRepository().getAllIndexedFS(type);
    while (iterator.hasNext()) {
      RutaColoring each = (RutaColoring) iterator.next();
      StyleMapEntry entry = new StyleMapEntry();
      entry.setAnnotationTypeName(each.getTargetType());
      String fgColor = each.getFgColor();
      entry.setForeground(parseColorBackground(fgColor));
      String bgColor = each.getBgColor();
      entry.setBackground(parseColorBackground(bgColor));
      entry.setChecked(each.getSelected());
      result.add(entry);
    }

    return result;
  }
View Full Code Here

Examples of org.apache.uima.ruta.type.RutaColoring

  @Override
  public void execute(RuleMatch match, RuleElement element, RutaStream stream,
          InferenceCrowd crowd) {
    Type casType = stream.getJCas().getCasType(RutaColoring.type);
    FeatureStructure newAnnotationFS = stream.getCas().createFS(casType);
    RutaColoring coloring = null;
    if (newAnnotationFS instanceof RutaColoring) {
      coloring = (RutaColoring) newAnnotationFS;
      coloring.setBgColor(bgcolor.getStringValue(element.getParent()));
      coloring.setFgColor(fgcolor.getStringValue(element.getParent()));
      coloring.setSelected(selected.getBooleanValue(element.getParent()));
      coloring.setTargetType(type.getType(element.getParent()).getName());
      coloring.addToIndexes();
    }
  }
View Full Code Here

Examples of org.apache.uima.ruta.type.RutaColoring

  @Override
  public void execute(RuleMatch match, RuleElement element, RutaStream stream, InferenceCrowd crowd) {
    Type casType = stream.getJCas().getCasType(RutaColoring.type);
    FeatureStructure newAnnotationFS = stream.getCas().createFS(casType);
    RutaColoring coloring = null;
    if (newAnnotationFS instanceof RutaColoring) {
      coloring = (RutaColoring) newAnnotationFS;
      RutaBlock parent = element.getParent();
      coloring.setBgColor(bgcolor.getStringValue(parent, match, element, stream));
      coloring.setFgColor(fgcolor.getStringValue(parent, match, element, stream));
      coloring.setSelected(selected.getBooleanValue(parent, match, element, stream));
      coloring.setTargetType(type.getType(parent).getName());
      coloring.addToIndexes();
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.