Convert a Identification to a By used in WebDriver Drivers.

@return the correct By specification of the current Identification.
329948
public By getWebDriverBy() {

		switch (how) {
			case name:
				return By.name(this.value);

			case xpath:
				// Work around HLWK driver bug
				return By.xpath(this.value.replaceAll("/BODY\\[1\\]/", "/BODY/"));

			case id:
				return By.id(this.value);

			case tag:
				return By.tagName(this.value);

			case text:
				return By.linkText(this.value);

			case partialText:
				return By.partialLinkText(this.value);

			default:
				return null;

		}

	}
826569
private String getDriverClassName() {
	if (driverClassName != null) {
	    return driverClassName;
	}
	ServletContext application = pageContext.getServletContext();
	return application.getInitParameter(DRIVER_CLASS_NAME);
    }
642500
public int identity()
  {
    if (tc.isEntryEnabled()) Tr.entry(tc, "identity",this);
    if (tc.isEntryEnabled()) Tr.exit(tc, "identity",new Integer(_identity));
    return _identity;
  }
1087283
private static String cleanIdentifier(final String identifier) {
        final String id = identifier.split("#")[0].split("\\?")[0];
        if (id.endsWith("/")) {
            return id.substring(0, id.length() - 1);
        }
        return id;
    }
1197972
public String getIdName() {
        String result = null;
        if (idAccessor != null) {
            result = idAccessor.getPropertyName();
        }
        return result;
    }
276210
public String qualifiedIdentifier() throws RecognitionException {
        String qi = "";
        try {
            Token first = match(input,
                    DRL6Lexer.ID,
                    null,
                    new int[]{DRL6Lexer.DOT},
                    DroolsEditorType.IDENTIFIER);
            if (state.failed)
                return qi;

            Token last = first;
            while (input.LA(1) == DRL6Lexer.DOT && input.LA(2) == DRL6Lexer.ID) {
                last = match(input,
                        DRL6Lexer.DOT,
                        null,
                        new int[]{DRL6Lexer.ID},
                        DroolsEditorType.IDENTIFIER);
                if (state.failed)
                    return qi;
                last = match(input,
                        DRL6Lexer.ID,
                        null,
                        new int[]{DRL6Lexer.DOT},
                        DroolsEditorType.IDENTIFIER);
                if (state.failed)
                    return qi;
            }
            qi = input.toString(first,
                    last);
            qi = qi.replace(" ",
                    "");
        } catch (RecognitionException re) {
            reportError(re);
        }
        return qi;
    }
22863
public int getStartingID()
    {
        int iStartingID = 1;   // (default)
        if (this.getProperty(STARTING_ID) != null)
        {
            try {
                iStartingID = Integer.parseInt(this.getProperty(STARTING_ID));
            } catch (NumberFormatException e) {
                iStartingID = 1;
            }
        }
        return iStartingID;
    }
641284
@JsonIgnore
	public String getIdentifier() {

		String tags = "";

		Map<String, String> sortedTags = new TreeMap<>();
		sortedTags.putAll(getTags());
		if(!sortedTags.isEmpty()) {
			StringBuilder tagListBuffer = new StringBuilder("{");
			for (String tagKey : sortedTags.keySet()) {
				tagListBuffer.append(tagKey).append('=').append(sortedTags.get(tagKey)).append(',');
			}

			tags = tagListBuffer.substring(0, tagListBuffer.length() - 1).concat("}");
		}

		String namespace = getNamespace();
		Object[] params = { namespace == null ? "" : namespace + ":", getScope(), getMetric(), tags };
		String format = "{0}{1}:{2}" + "{3}";

		return MessageFormat.format(format, params);
	}
746333
public WebDriver getDriver() {
        // Driver's name is retrieved by system properties
        String driverName = Context.getBrowser();
        driverName = driverName != null ? driverName : DEFAULT_DRIVER;
        WebDriver driver = null;
        if (!drivers.containsKey(driverName)) {
            try {
                driver = generateWebDriver(driverName);
            } catch (final TechnicalException e) {
                logger.error("error DriverFactory.getDriver()", e);
            }
        } else {
            driver = drivers.get(driverName);
        }
        return driver;
    }
341354
public String getId() {
        String value = null;
        if (_iSess != null) {
            value = _iSess.getId();
        }
        return value;
    }
1263022
public String getId() {
        Pattern replace = Pattern.compile("\\W+");
        return StringUtils.defaultIfEmpty(id, replace.matcher(getName()).replaceAll(""));
    }
58262
protected PaasEntityDriver doInitDriver(CloudFoundryPaasLocation location) {
        if (driver != null) {
            if (location.equals(driver.getLocation())) {
                return driver; //just reuse
            } else {
                log.warn("driver/location change is untested for {} at {}; " +
                        "changing driver and continuing", this, location);
                return newDriver(location);
            }
        } else {
            return newDriver(location);
        }
    }
471353
public String generarIdentificador( ) {
        String UUID = Long.toHexString(System.currentTimeMillis());
        UUID = UUID.concat(obtenerDireccionIP());
        UUID = UUID.concat(identityHashCode);
        UUID = UUID.concat(Integer.toHexString(_oAleatorioSeguro.nextInt()));
        return UUID;
    }
717670
@SuppressWarnings("unchecked")
    public <M extends T> M byId(ID id) {
        return (M) server().find(getModelType(), id);
    }
474920
private String stringId() throws RecognitionException {
        if ( input.LA( 1 ) == DRL5Lexer.ID ) {
            Token id = match( input,
                              DRL5Lexer.ID,
                              null,
                              null,
                              DroolsEditorType.IDENTIFIER );
            if ( state.failed ) return null;
            return id.getText();
        } else if ( input.LA( 1 ) == DRL5Lexer.STRING ) {
            Token id = match( input,
                              DRL5Lexer.STRING,
                              null,
                              null,
                              DroolsEditorType.IDENTIFIER );
            if ( state.failed ) return null;
            return StringUtils.unescapeJava( safeStripStringDelimiters( id.getText() ) );
        } else {
            throw new MismatchedTokenException( DRL5Lexer.ID,
                                                input );
        }
    }
1014641
public static EncodedElement getIdentifier() {
    EncodedElement ele = new EncodedElement();
    ele.setData(marker.clone());
    ele.setUsableBits(32);
    return ele;
  }
899158
public String getId()
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "getId");

    String id = consumerDispatcher.getSubscriptionUuid().toString();
    
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())             
      SibTr.exit(tc, "getId", id);
    return id;
  }