Create the id of a section header.

<p>The ID format follows the ReadCarpet standards.

@param header the section header text.
@return the identifier.
355999
public static String computeHeaderId(String header) {
		String id = header.replaceAll("[^a-zA-Z0-9]+", "-"); //$NON-NLS-1$ //$NON-NLS-2$
		id = id.toLowerCase();
		id = id.replaceFirst("^[^a-zA-Z0-9]+", ""); //$NON-NLS-1$ //$NON-NLS-2$
		id = id.replaceFirst("[^a-zA-Z0-9]+$", ""); //$NON-NLS-1$ //$NON-NLS-2$
		if (Strings.isEmpty(id)) {
			return "section"; //$NON-NLS-1$
		}
		return id;
	}
1054729
private void createHeader(RollingSegmentHandle handle) throws StreamSegmentException {
        Preconditions.checkArgument(handle.getHeaderHandle() == null, "handle already has a header.");

        // Create a new Header SegmentChunk.
        String headerName = StreamSegmentNameUtils.getHeaderSegmentName(handle.getSegmentName());
        this.baseStorage.create(headerName);
        val headerHandle = this.baseStorage.openWrite(headerName);

        // Create a new Handle and serialize it, after which update the original handle.
        val newHandle = new RollingSegmentHandle(headerHandle, handle.getRollingPolicy(), handle.chunks());
        serializeHandle(newHandle);
        handle.refresh(newHandle);
    }
1177584
public static String id(String name, ClassDefinition appender, Map<String, String> appenderArgs, ClassDefinition layout, Map<String, String> layoutArgs, int level,
	    boolean readOnly) {
	StringBuilder sb = new StringBuilder(name).append(';').append(appender).append(';');
	toString(sb, appenderArgs);
	sb.append(';').append(layout).append(';');
	toString(sb, layoutArgs);
	sb.append(';').append(level).append(';').append(readOnly);

	return HashUtil.create64BitHashAsString(sb.toString(), Character.MAX_RADIX);
    }
278807
public String getHeader(String headerName) {
        List<String> headers = null;
        for (String h : headers().keySet()) {
            if (headerName.equalsIgnoreCase(h)) {
                headers = headers().get(h);
                break;
            }
        }
        if (headers == null || headers.isEmpty()) {
            return null;
        }
        return headers.get(0);
    }
638895
public final B addHeaders(Headers<AsciiString, String, ?> headers) {
        requireNonNull(headers, "headers");
        getOrCreateHeaders().add(headers);
        return self();
    }
1350733
@Override
    public void setRequestHeader(Header header) {
        
        Header[] headers = getRequestHeaderGroup().getHeaders(header.getName());
        
        for (int i = 0; i < headers.length; i++) {
            getRequestHeaderGroup().removeHeader(headers[i]);
        }
        
        getRequestHeaderGroup().addHeader(header);
        
    }
210809
Header readHeader(@NonNull ArrayView input) throws SerializationException {
        byte version = input.get(VERSION_POSITION);
        int keyLength = BitConverter.readInt(input, KEY_POSITION);
        int valueLength = BitConverter.readInt(input, VALUE_POSITION);
        long entryVersion = BitConverter.readLong(input, ENTRY_VERSION_POSITION);
        validateHeader(keyLength, valueLength);
        return new Header(version, keyLength, valueLength, entryVersion);
    }
941300
public static String createId(String name, int index) {

        StringBuffer result = new StringBuffer();
        result.append(name);
        result.append('.');
        result.append(index);

        return result.toString();
    }
578722
public static final SegmentId decode(final Segment segment) {
        Preconditions.checkNotNull(segment, "segment");
        return createSegmentId(segment.getScope(), segment.getStreamName(), segment.getSegmentId());
    }
697474
public void setHeader(HasJqmHeader header) {
        removeHeader();
        this.header = header;
        if (this.header == null) return;

        addLogical(header.getHeaderStage());

        if (panel == null) {
        	getElement().insertBefore(header.getJqmHeader().getElement(), getElement().getFirstChild());
        } else {
        	getElement().insertAfter(header.getJqmHeader().getElement(), panel.getElement());
        }
    }
536029
public static ClientAddressSource ofHeader(CharSequence header) {
        checkArgument(header != null && header.length() > 0, "empty header");
        return new ClientAddressSource(HttpHeaderNames.of(header));
    }
895717
Header readHeader(@NonNull InputStream input) throws IOException {
        byte version = (byte) input.read();
        int keyLength = BitConverter.readInt(input);
        int valueLength = BitConverter.readInt(input);
        long entryVersion = BitConverter.readLong(input);
        validateHeader(keyLength, valueLength);
        return new Header(version, keyLength, valueLength, entryVersion);
    }
1227116
public ExcelReader addHeaderAlias(String header, String alias) {
		this.headerAlias.put(header, alias);
		return this;
	}
567336
public StreamMessageHeader createHeader(Object input) throws ConvertFailException
    {
        StreamMessageHeader header = new StreamMessageHeader();
        header.setType(getType());

        return header;
    }
442807
public T header(String title, Iterable<HtmlResource> resources) throws IOException {
		return (T) begin("html")
			.begin("head")
			.begin("title").text("Simon Console: ").text(title).end("title")
			.resources(resources)
			.end("head")
			.begin("body")
			.begin("h1")
			.write("<img id=\"logo\" src=\"../resource/images/logo.png\" alt=\"Logo\" />")
			.text("Simon Console: ").text(title)
			.end("h1");
	}
253167
public void setSectionId(String v) {
    if (Section_Type.featOkTst && ((Section_Type)jcasType).casFeat_sectionId == null)
      jcasType.jcas.throwFeatMissing("sectionId", "de.julielab.jules.types.Section");
    jcasType.ll_cas.ll_setStringValue(addr, ((Section_Type)jcasType).casFeatCode_sectionId, v);}
28269
@SuppressWarnings("unchecked")
    public <R> R getHeader(String name) {
        return (R) headers().get(name);
    }