Returns tag formatted as an HTTP tag string.

@return The formatted HTTP tag string.

@see <a
href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.11">HTTP
Entity Tags</a>
161407
public String format() {
        if (getName().equals("*")) {
            return "*";
        }
        else {
            StringBuilder sb = new StringBuilder();
            if (isWeak()) {
                sb.append("W/");
            }
            return sb.append('"').append(getName()).append('"').toString();
        }
    }
637238
public function toString() {
        $str = $this->protocol . '://' . $this->hostName;
        if ($this->protocol==='http' && $this->portNumber==80) {
            //don't add port
        } else if ($this->protocol==='https' && $this->portNumber==443) {
            //don't add port
        } else {
            $str .= ':'. $this->portNumber;
        }
        return $str;
    }
739926
byte[] getTag() {
        return getCipherMode() != Cipher.ENCRYPT_MODE || finalBytes == null
             ? null
             : Arrays.copyOfRange(finalBytes,
                 finalBytes.length - tagLen, finalBytes.length)
             ;
    }
539463
def toString(self):
        
        output = ""

        if self.childs or self.isOpeningTag():
            output += self.tagToString()

            for c in self.childs:
                output += c.toString()

            if self.endtag is not None:
                output += self.endtag.tagToString()

        elif not self.isEndTag():
            output += self.tagToString()

        return output
1373225
public String toXML()
    {
        RepositoryTags tags = RepositoryTags.getInstance();
        String eol = SystemUtils.LINE_SEPARATOR;

        //opening tag + attributes
        StringBuffer result = new StringBuffer( 1024 );
        result.append( "      <" );
        result.append( tags.getTagById( INDEX_DESCRIPTOR ) );
        result.append( " " );

        // index name
        result.append( tags.getAttribute( NAME, getName() ) );
        result.append( " " );

        // unique attribute
        result.append( tags.getAttribute( UNIQUE, "" + isUnique() ) );
        result.append( ">" );
        result.append( eol );

        // index columns
        for( int i = 0; i < indexColumns.size(); i++ )
        {
            String l_name = ( String ) indexColumns.elementAt( i );
            result.append( "                " );
            result.append( tags.getOpeningTagNonClosingById( INDEX_COLUMN ) );
            result.append( " " );
            result.append( tags.getAttribute( NAME, l_name ) );
            result.append( " />" );
            result.append( eol );
        }

        // closing tag
        result.append( "      " );
        result.append( tags.getClosingTagById( INDEX_DESCRIPTOR ) );
        result.append( " " );
        result.append( eol );

        return result.toString();
    }
693961
public String getHtmlCode()
	{
		Object[] _params =
		{
			SgmlUtils.generateAttribute(HtmlUtils.AttributeNames.VALUE, getValue())
		};
		MessageFormat _format = (isSelected()) ? FORMAT__SELECTED : FORMAT__NOT_SELECTED;
		return _format.format(_params);
	}
1260060
public String toKey() {
        return (tag == null ? EMPTY_STRING : tag) + KEY_DELIMITER + (indicator == null ? EMPTY_STRING : indicator) +
                KEY_DELIMITER + subfieldIds;
    }
424302
protected List<TagAndLength> getLogFormat() throws CommunicationException {
		List<TagAndLength> ret = new ArrayList<TagAndLength>();
		if (LOGGER.isDebugEnabled()) {
			LOGGER.debug("GET log format");
		}
		// Get log format
		byte[] data = template.get().getProvider().transceive(new CommandApdu(CommandEnum.GET_DATA, 0x9F, 0x4F, 0).toBytes());
		if (ResponseUtils.isSucceed(data)) {
			ret = TlvUtil.parseTagAndLength(TlvUtil.getValue(data, EmvTags.LOG_FORMAT));
		} else {
			LOGGER.warn("No Log format found");
		}
		return ret;
	}
239684
public String toHTML() {
        if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_CORE.isLoggable(Level.FINE)) {
            LoggingUtil.SESSION_LOGGER_CORE.entering(methodClassName, "toHTML");
        }
        StringBuffer strbuf = new StringBuffer();
        String appName = _sap.getJ2EEName();
        String globalScopeComment;
        MemoryStore ms = (MemoryStore) _coreHttpSessionManager.getIStore();
        int size = 0;
        if (ms._sessions != null) {
            size = ms._sessions.size();
        }
        globalScopeComment = "<b> (for this webapp) : </b> ";
        strbuf.append("<center><h3>J2EE NAME(AppName#WebModuleName):: " + appName + " </h3></center>" + "<UL>\n");
        strbuf.append("<b>  cloneId</b> : ");
        strbuf.append(((SessionAffinityManager) _sam).getCloneId());
        strbuf.append("<BR>");
        strbuf.append("<BR>");
        strbuf.append("<b>  Number of sessions in memory: </b>");
        strbuf.append(globalScopeComment);
        strbuf.append(size);
        strbuf.append("<BR>");
        if (_smc.isUsingMemory()) {
            strbuf.append("<b>  use overflow</b> : ");
            strbuf.append(_smc.getEnableOverflow());
            strbuf.append("<BR>");
            if (_smc.getEnableOverflow()) {
                strbuf.append("<b>  overflow size</b> ");
                strbuf.append(globalScopeComment);
                strbuf.append(((SessionSimpleHashMap) ms._sessions).getOverflowSize());
                strbuf.append("<BR>");
            }
        }
        strbuf.append("<b>  Invalidation alarm poll interval (for this webapp) </b> : ");
        strbuf.append(_smc.getInvalidationCheckInterval());
        strbuf.append("<BR>");
        strbuf.append("<b> Max invalidation timeout (for this webapp) </b> : ");
        strbuf.append(_smc.getSessionInvalidationTime());
        strbuf.append("<BR>");
        strbuf.append("<b> Using Cookies </b> : ");
        strbuf.append(_smc.getEnableCookies());
        strbuf.append("<BR>");
        strbuf.append("<b> Using URL Rewriting </b> : ");
        strbuf.append(_smc.getEnableUrlRewriting());
        strbuf.append("<BR>");
        strbuf.append("<b> use SSLId </b> : ");
        strbuf.append(_smc.useSSLId());
        strbuf.append("<BR>");
        strbuf.append("<b> URL Protocol Switch Rewriting </b> : ");
        strbuf.append(_smc.getEnableUrlProtocolSwitchRewriting());
        strbuf.append("<BR>");
        strbuf.append("<b> Session Cookie Name </b> : ");
        strbuf.append(_smc.getSessionCookieName());
        strbuf.append("<BR>");
        strbuf.append("<b> Session Cookie Comment </b> : ");
        strbuf.append(_smc.getSessionCookieComment());
        strbuf.append("<BR>");
        strbuf.append("<b> Session Cookie Domain </b> : ");
        strbuf.append(_smc.getSessionCookieDomain());
        strbuf.append("<BR>");
        strbuf.append("<b> Session Cookie Path </b> : ");
        strbuf.append(_smc.getSessionCookiePath());
        strbuf.append("<BR>");
        strbuf.append("<b> Session Cookie MaxAge </b> : ");
        strbuf.append(_smc.getSessionCookieMaxAge());
        strbuf.append("<BR>");
        strbuf.append("<b> Session Cookie Secure </b> : ");
        strbuf.append(_smc.getSessionCookieSecure());
        strbuf.append("<BR>");
        strbuf.append("<b> Maximum in memory table size </b> : ");
        strbuf.append(_smc.getInMemorySize());
        strbuf.append("<BR>");
        strbuf.append("<b> current time </b> : ");
        strbuf.append(new Date(System.currentTimeMillis()).toString());
        strbuf.append("<BR>");
        strbuf.append("<b>  integrateWASSec</b> :");
        strbuf.append(_smc.getIntegrateSecurity());
        strbuf.append("<BR><b>Session locking </b>: ");
        strbuf.append(_smc.getAllowSerializedSessionAccess());
        if (_smc.getAllowSerializedSessionAccess()) {
            strbuf.append("<BR><b>Session locking timeout</b>: ");
            strbuf.append(_smc.getSerializedSessionAccessMaxWaitTime());
            strbuf.append("<BR><b>Allow access on lock timeout</b>:");
            strbuf.append(_smc.getAccessSessionOnTimeout());
        }
        if (ms.getSessionStatistics() != null) {
            strbuf.append(ms.getSessionStatistics().toHTML());
        }
        strbuf.append(ms.toHTML());
        // .append(this.scPmiData.toHTML())
        // .append(this.mbeanAdapter.toHTML()); //done in WsSessionContext

        return (strbuf.toString());
    }
1031389
private function prepareGetTagName()
    {
        $fragment = new CNabuPHPMethodBuilder(
            $this, 'getTagName', CNabuPHPMethodBuilder::METHOD_PROTECTED, true, false, false, true, 'string'
        );
        $fragment->addComment("Static method to get the Tag name of this XML Element.");
        $fragment->addComment("@return string Return the Tag name.");

        $fragment->addFragment("return '$this->element';");

        $this->addFragment($fragment);
    }
723318
public List<TagFileType<TldTaglibType<T>>> getAllTagFile()
   {
      List<TagFileType<TldTaglibType<T>>> list = new ArrayList<TagFileType<TldTaglibType<T>>>();
      List<Node> nodeList = childNode.get("tag-file");
      for(Node node: nodeList)
      {
         TagFileType<TldTaglibType<T>>  type = new TagFileTypeImpl<TldTaglibType<T>>(this, "tag-file", childNode, node);
         list.add(type);
      }
      return list;
   }
533651
public String generateNewTag() {
    // This scheme of using random numbers to generate a
    // unique tag has a small probability of
    // causing duplicate tags.
    // TODO at some point, we may want to change it.

    int r = parent.getRandom().nextInt();
    r = (r < 0) ? 0 - r : r; // generate a positive number

    // incorporate registration/session ID (myRegistrationId) into all tags
    // from this
    // client? (for jiplet call identification purposes)

    return Integer.toString(r);
  }
257069
public java.util.List<TagSpecification> getTagSpecifications() {
        if (tagSpecifications == null) {
            tagSpecifications = new com.amazonaws.internal.SdkInternalList<TagSpecification>();
        }
        return tagSpecifications;
    }
843271
@HtmlSafe
	public String getBodyHtml()
	{
		String body = execution.getResults().trim();

		return body.replaceAll("<html>", "").replaceAll("</html>", "");
	}
31293
public String toHttpString() {
        StringBuilder sb = new StringBuilder();

        sb.append(getHttpVerb()).append(' ').append(getHttpURI()).append(' ')
                .append(getHttpVersion()).append(HttpProxyConstants.CRLF);

        boolean hostHeaderFound = false;

        if (getHeaders() != null) {
            for (Map.Entry<String, List<String>> header : getHeaders()
                    .entrySet()) {
                if (!hostHeaderFound) {
                    hostHeaderFound = header.getKey().equalsIgnoreCase("host");
                }

                for (String value : header.getValue()) {
                    sb.append(header.getKey()).append(": ").append(value)
                            .append(HttpProxyConstants.CRLF);
                }
            }

            if (!hostHeaderFound
                    && getHttpVersion() == HttpProxyConstants.HTTP_1_1) {
                sb.append("Host: ").append(getHost()).append(
                        HttpProxyConstants.CRLF);
            }
        }

        sb.append(HttpProxyConstants.CRLF);

        return sb.toString();
    }
305920
public String asString()
    {
        TreeMap<Tag, Value> orderedAttributes = new TreeMap<Tag, Value>(attributes);
        StringBuilder result = new StringBuilder();
        for (Iterator<Map.Entry<Tag, Value>> entries = orderedAttributes.entrySet().iterator(); entries.hasNext(); )
        {
            Map.Entry<Tag, Value> mapEntry = entries.next();
            Tag tag = mapEntry.getKey();
            Value value = mapEntry.getValue();
            if (value.isPresenceType())
            {
                result.append(tag.tag);
            }
            else
            {
                result.append("(").append(tag.tag).append("=");
                if (value.multiValued)
                {
                    Object[] values = value.getValues();
                    for (int i = 0; i < values.length; ++i)
                    {
                        if (i > 0) result.append(",");
                        if (value.isOpaqueType())
                            result.append(bytesToOpaque((byte[])values[i]));
                        else
                            result.append(escapeValue(String.valueOf(values[i])));
                    }
                }
                else
                {
                    if (value.isOpaqueType())
                        result.append(bytesToOpaque((byte[])value.getValue()));
                    else
                        result.append(escapeValue(String.valueOf(value.getValue())));
                }
                result.append(")");
            }
            if (entries.hasNext()) result.append(",");
        }
        return result.toString();
    }
509695
public static Tag clientName(HttpRequest request) {
		String host = request.getURI().getHost();
		if (host == null) {
			host = "none";
		}
		return Tag.of("clientName", host);
	}