<commit_before>package org.ontohub.client;

import org.ontohub.shared.AnchorData;
import org.ontohub.shared.Ontology;

import com.google.gwt.core.client.GWT;
import com.google.gwt.event.dom.client.KeyPressEvent;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.uibinder.client.UiHandler;
import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.ui.Anchor;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.Image;
import com.google.gwt.user.client.ui.InlineLabel;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.Widget;

public class OntologyWidget extends Composite {

	private static OntologyWidgetUiBinder uiBinder = GWT.create(OntologyWidgetUiBinder.class);

	interface OntologyWidgetUiBinder extends UiBinder<Widget, OntologyWidget> {
	}

	@UiField
	Image iconImage;

	@UiField
	Anchor titleAnchor;
//
	@UiField
	InlineLabel acronymLabel;

//	@UiField
//	InlineLabel languageLabel;

	@UiField
	InlineLabel logicLabel;

	@UiField
	Label iriLabel;

	@UiField
	Label descriptionLabel;

	@UiField
	Anchor typeAnchor;

	@UiField
	Anchor topic0Anchor;

	@UiField
	Anchor topic1Anchor;

	@UiField
	Anchor topic2Anchor;

	@UiField
	Anchor project0Anchor;

	@UiField
	Anchor project1Anchor;

	@UiField
	Anchor project2Anchor;
	
	public OntologyWidget() {
		initWidget(uiBinder.createAndBindUi(this));
	}

	public OntologyWidget(Ontology ontology) {
		initWidget(uiBinder.createAndBindUi(this));
		setOntology(ontology);
	}

	private final void setOntology(Ontology ontology) {
		iconImage.setUrl(ontology.getIcon().getSrc());
		iconImage.setAltText(ontology.getIcon().getAlt());
		titleAnchor.setText(ontology.getName());
		titleAnchor.setHref(ontology.getHref());
		titleAnchor.setTabIndex(-1);
		if (null != ontology.getAcronym() && ontology.getAcronym().length() != 0) {
			acronymLabel.setVisible(true);
			acronymLabel.setText("(" + ontology.getAcronym() + ")");
		} else {<commit_msg>Display ontology type when cursor hovers the icon<commit_after>package org.ontohub.client;

import org.ontohub.shared.AnchorData;
import org.ontohub.shared.Ontology;

import com.google.gwt.core.client.GWT;
import com.google.gwt.event.dom.client.KeyPressEvent;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.uibinder.client.UiHandler;
import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.ui.Anchor;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.Image;
import com.google.gwt.user.client.ui.InlineLabel;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.Widget;

public class OntologyWidget extends Composite {

	private static OntologyWidgetUiBinder uiBinder = GWT.create(OntologyWidgetUiBinder.class);

	interface OntologyWidgetUiBinder extends UiBinder<Widget, OntologyWidget> {
	}

	@UiField
	Image iconImage;

	@UiField
	Anchor titleAnchor;
//
	@UiField
	InlineLabel acronymLabel;

//	@UiField
//	InlineLabel languageLabel;

	@UiField
	InlineLabel logicLabel;

	@UiField
	Label iriLabel;

	@UiField
	Label descriptionLabel;

	@UiField
	Anchor typeAnchor;

	@UiField
	Anchor topic0Anchor;

	@UiField
	Anchor topic1Anchor;

	@UiField
	Anchor topic2Anchor;

	@UiField
	Anchor project0Anchor;

	@UiField
	Anchor project1Anchor;

	@UiField
	Anchor project2Anchor;
	
	public OntologyWidget() {
		initWidget(uiBinder.createAndBindUi(this));
	}

	public OntologyWidget(Ontology ontology) {
		initWidget(uiBinder.createAndBindUi(this));
		setOntology(ontology);
	}

	private final void setOntology(Ontology ontology) {
		iconImage.setUrl(ontology.getIcon().getSrc());
		iconImage.setAltText(ontology.getIcon().getAlt());
		iconImage.setTitle(ontology.getIcon().getAlt());
		titleAnchor.setText(ontology.getName());
		titleAnchor.setHref(ontology.getHref());
		titleAnchor.setTabIndex(-1);
		if (null != ontology.getAcronym() && ontology.getAcronym().length() != 0) {
			acronymLabel.setVisible(true);
			acronymLabel.setText("(" + ontology.getAcronym() + ")");
		} else {
{'fraction_non_alphanumeric': 0.11903047756179505, 'fraction_numerical': 0.003839692824574034, 'mean_word_length': 5.392638036809816, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1884987', 'n_tokens_mistral': 1526, 'n_tokens_neox': 1463, 'n_words': 236}