Add a term to the TBX document.

@param doc
@param langsetId
@param term
@param isVariant
@throws IOException
547459
private void addTermEntry(Document tbxDocument, TerminologyService termino, OccurrenceStore occurrenceStore, TermService term, boolean isVariant) {
		String langsetId = LANGSET_ID_PREFIX + getId(term.getTerm());
        Node body = tbxDocument.getElementsByTagName("body").item(0);

		Element termEntry = tbxDocument.createElement("termEntry");
		termEntry.setAttribute("xml:id",
				TERMENTRY_ID_PREFIX + getId(term.getTerm()));
		body.appendChild(termEntry);
		Element langSet = tbxDocument.createElement("langSet");
		langSet.setAttribute("xml:id", langsetId);
		langSet.setAttribute("xml:lang", termino.getLang().getCode());
		termEntry.appendChild(langSet);

		for (RelationService variation : term.inboundRelations().collect(toSet())) 
			this.addTermBase(tbxDocument, langSet, variation.getFrom().getGroupingKey(), null);

		for (RelationService variation : term.outboundRelations().collect(toSet())) {
			this.addTermVariant(tbxDocument, langSet, String.format("langset-%d", getId(variation.getTo().getTerm())),
					variation.getTo().getGroupingKey());
		}
		Collection<TermOccurrence> allOccurrences = occurrenceStore.getOccurrences(term.getTerm());
		this.addDescrip(tbxDocument, langSet, langSet, "nbOccurrences", allOccurrences.size());

		Element tig = tbxDocument.createElement("tig");
		tig.setAttribute("xml:id", TIG_ID_PREFIX + getId(term.getTerm()));
		langSet.appendChild(tig);
		Element termElmt = tbxDocument.createElement("term");
		termElmt.setTextContent(term.getGroupingKey());
		tig.appendChild(termElmt);

		List<Form> forms = occurrenceStore.getForms(term.getTerm());
		addNote(tbxDocument, langSet, tig, "termPilot", term.getPilot());

		this.addNote(tbxDocument, langSet, tig, "termType", isVariant ? "variant" : "termEntry");
		this.addNote(tbxDocument, 
				langSet,
				tig,
				"partOfSpeech",
				term.isMultiWord() ? "noun" : term.getWords().get(0).getSyntacticLabel());
		this.addNote(tbxDocument, langSet, tig, "termPattern", term.getWords().get(0).getSyntacticLabel());
		this.addNote(tbxDocument, langSet, tig, "termComplexity",
				this.getComplexity(term));
		this.addDescrip(tbxDocument, langSet, tig, "termSpecificity",
				NUMBER_FORMATTER.format(term.getSpecificity()));
		this.addDescrip(tbxDocument, langSet, tig, "nbOccurrences",
				term.getFrequency());
		this.addDescrip(tbxDocument, langSet, tig, "relativeFrequency",
				NUMBER_FORMATTER.format(term.getFrequency()));
		addDescrip(tbxDocument, langSet, tig, "formList",
					buildFormListJSON(occurrenceStore, term.getTerm(), forms.size()));
		 this.addDescrip(tbxDocument, langSet, tig, "domainSpecificity",
				 term.getSpecificity());
	}
364933
function(doclet, tag) {
			// debug("setting kind of " + doclet.name + " to 'interface'");
			doclet.kind = 'interface';
			if ( tag.value ) {
				doclet.classdesc = tag.value;
			}
		}
853742
public void addDocument(Document doc, int order) throws HelloSignException {
        if (doc == null) {
            throw new HelloSignException("Document cannot be null");
        }
        try {
            documents.add(order, doc);
        } catch (Exception ex) {
            throw new HelloSignException(ex);
        }
    }
58049
public static void setUpExample(XMLDocumentManager docMgr, String docId, String filename) throws IOException {
    InputStream docStream = Util.openStream("data"+File.separator+filename);
    if (docStream == null)
      throw new IOException("Could not read document example");

    DocumentMetadataHandle metadataHandle = new DocumentMetadataHandle();
    metadataHandle.getCollections().addAll("products", "real-estate");
    metadataHandle.getPermissions().add("app-user", Capability.UPDATE, Capability.READ);
    metadataHandle.getProperties().put("reviewed", true);
    metadataHandle.setQuality(1);
    metadataHandle.getMetadataValues().add("key1", "value1");

    InputStreamHandle handle = new InputStreamHandle();
    handle.set(docStream);

    docMgr.write(docId, metadataHandle, handle);
  }
1089349
protected void addTagsInfo(Doc doc, Content htmltree) {
        if (configuration.nocomment) {
            return;
        }
        Content dl = new HtmlTree(HtmlTag.DL);
        if (doc instanceof MethodDoc) {
            addMethodInfo((MethodDoc) doc, dl);
        }
        Content output = new ContentBuilder();
        TagletWriter.genTagOuput(configuration.tagletManager, doc,
            configuration.tagletManager.getCustomTaglets(doc),
                getTagletWriterInstance(false), output);
        dl.addContent(output);
        htmltree.addContent(dl);
    }
545887
public static void add(Document document, String name) {
        Element element = findElement(document, name);

        AssertUtils.assertNotNull(element, "Failed to find element by name: " + name);

        add(element);
    }
113514
public void setDocType(String v) {
    if (Header_Type.featOkTst && ((Header_Type)jcasType).casFeat_docType == null)
      jcasType.jcas.throwFeatMissing("docType", "de.julielab.jules.types.Header");
    jcasType.ll_cas.ll_setStringValue(addr, ((Header_Type)jcasType).casFeatCode_docType, v);}
1312797
public void setKeywordList(int i, Keyword v) { 
    if (ManualDescriptor_Type.featOkTst && ((ManualDescriptor_Type)jcasType).casFeat_keywordList == null)
      jcasType.jcas.throwFeatMissing("keywordList", "de.julielab.jules.types.pubmed.ManualDescriptor");
    jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr, ((ManualDescriptor_Type)jcasType).casFeatCode_keywordList), i);
    jcasType.ll_cas.ll_setRefArrayValue(jcasType.ll_cas.ll_getRefValue(addr, ((ManualDescriptor_Type)jcasType).casFeatCode_keywordList), i, jcasType.ll_cas.ll_getFSRef(v));}
618543
public void addDocumentUriParticipantObject(String documentRetrieveUri, String documentUniqueId)
	{
		List<TypeValuePairType> tvp = new LinkedList<>();
		if (documentUniqueId != null) {
			tvp.add(getTypeValuePair("XDSDocumentEntry.uniqueId", documentUniqueId.getBytes()));
		}
		addParticipantObjectIdentification(
				new RFC3881ParticipantObjectCodes.RFC3881ParticipantObjectIDTypeCodes.URI(), 
				null, 
				null, 
				tvp, 
				documentRetrieveUri, 
				RFC3881ParticipantObjectTypeCodes.SYSTEM, 
				RFC3881ParticipantObjectTypeRoleCodes.REPORT,
				null, 
				null);
	}
617697
public void add(IWord word)
    {
        //check and extends the entity from the base word
        if ( word.getEntity() == null ) {
            word.setEntity(rootWord.getEntity());
        }
        
        //check and extends the part of speech from the base word
        if ( word.getPartSpeech() == null ) {
            word.setPartSpeech(rootWord.getPartSpeech());
        }
        
        word.setSyn(this);
        synsList.add(word);
    }
891136
public void add(DOCUMENT doc) {
      if (doc != null) {
         documents.add(doc);
         int id = documents.size() - 1;
         for (KEY key : documentMapper.apply(doc)) {
            index.put(key, id);
         }
      }
   }
820206
@Override
    public int docAppearedIn(String word) {
        T element = extendedVocabulary.get(word);
        if (element != null) {
            return (int) element.getSequencesCount();
        } else
            return -1;
    }
1215938
public void addVariant(CmsDocumentDependency dep) {

        // check if already exists
        for (CmsDocumentDependency lang : m_variants) {
            if (lang.getLocale().equals(dep.getLocale())) {
                return;
            }
        }
        dep.setType(DependencyType.variant);
        m_variants.add(dep);
        addDependency(dep);
    }
1276937
public void setText(Document doc, String text)
    {
        StringReader reader = new StringReader(text);
        HTMLEditorKit kit = (HTMLEditorKit) m_editorPane.getEditorKitForContentType(HTML_CONTENT);
        try {
            int iLength = doc.getLength();
            if (iLength > 0)
                doc.remove(0, iLength);
            kit.read(reader, doc, 0);
        } catch (IOException ex) {
            ex.printStackTrace();
        } catch (BadLocationException ex) {
            ex.printStackTrace();
        }    	
    }
1351000
final public void addIdFromDoc(Integer docId, Long reference) {
    if (!closed && (docId != null)) {
      addSinglePoint(docId, 0, 0, docId, reference);
    }
  }
659103
public static <TERM> Map<TERM, Double> tf(Collection<TERM> document)
    {
        return tf(document, TfType.NATURAL);
    }
99046
public void setDocTitle(String docTitle) {
        this.log("Setting doc title to: " + docTitle, LogLevel.DEBUG.getLevel());
        this.docTitle = new StringResource(this.getProject(), docTitle);
    }