當前位置: 首頁>>代碼示例>>Java>>正文


Java StringUtil.startsWithIgnoreCase方法代碼示例

本文整理匯總了Java中org.teiid.core.util.StringUtil.startsWithIgnoreCase方法的典型用法代碼示例。如果您正苦於以下問題:Java StringUtil.startsWithIgnoreCase方法的具體用法?Java StringUtil.startsWithIgnoreCase怎麽用?Java StringUtil.startsWithIgnoreCase使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.teiid.core.util.StringUtil的用法示例。


在下文中一共展示了StringUtil.startsWithIgnoreCase方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: addNamespace

import org.teiid.core.util.StringUtil; //導入方法依賴的package包/類
public void addNamespace(String prefix, String uri) {
	if (uri == null || uri.indexOf('}') != -1) {
		throw new MetadataException(DataPlugin.Event.TEIID60018, DataPlugin.Util.gs(DataPlugin.Event.TEIID60018, uri));
	}
       
	if (StringUtil.startsWithIgnoreCase(prefix, TEIID_RESERVED)) {
	    String validURI = BUILTIN_NAMESPACES.get(prefix);
	    if (validURI == null || !uri.equals(validURI)) {
	        throw new MetadataException(DataPlugin.Event.TEIID60017, DataPlugin.Util.gs(DataPlugin.Event.TEIID60017, prefix));
	    }
       }
	
	if (this.namespaces == null) {
		 this.namespaces = new TreeMap<String, String>(String.CASE_INSENSITIVE_ORDER);
	}
	this.namespaces.put(prefix, uri);
}
 
開發者ID:kenweezy,項目名稱:teiid,代碼行數:18,代碼來源:MetadataFactory.java

示例2: matchesPartialName

import org.teiid.core.util.StringUtil; //導入方法依賴的package包/類
protected boolean matchesPartialName(String partialGroupName, String name, Schema schema) {
	if (!StringUtil.endsWithIgnoreCase(name, partialGroupName)) {
		return false;
	}
	int schemaMatch = partialGroupName.length() - name.length();
	if (schemaMatch > 0) {
		if (schemaMatch != schema.getName().length() + 1 
				|| !StringUtil.startsWithIgnoreCase(partialGroupName, schema.getName())
				|| partialGroupName.charAt(schemaMatch + 1) != '.') {
			return false;
		}
	} else if (schemaMatch < 0 && name.charAt(-schemaMatch - 1) != '.') {
		return false;
	}
	return true;
}
 
開發者ID:kenweezy,項目名稱:teiid,代碼行數:17,代碼來源:CompositeMetadataStore.java

示例3: sendCommandComplete

import org.teiid.core.util.StringUtil; //導入方法依賴的package包/類
@Override
public void sendCommandComplete(String sql, Integer count) {
	startMessage('C');
	String tag;
	if (StringUtil.startsWithIgnoreCase(sql, "BEGIN") || StringUtil.startsWithIgnoreCase(sql, "START TRANSACTION")) {
		tag = "BEGIN";
	} else if (sql.indexOf(' ') == -1) {
		//should already be a completion tag
		tag = sql.toUpperCase();
		if (count != null) {
			tag += " " + count;
		}
	} else if (StringUtil.startsWithIgnoreCase(sql, "SET ")) {
		tag = "SET";
	} else {
		tag = SqlUtil.getKeyword(sql).toUpperCase();
		if (tag.equals("EXEC") || tag.equals("CALL")) {
			tag = "SELECT"; 
		}
		if (count != null) {
			tag += " " + count;
		}
	}
	writeString(tag);
	sendMessage();
}
 
開發者ID:kenweezy,項目名稱:teiid,代碼行數:27,代碼來源:PgBackendProtocol.java

示例4: getElementsUnderNode

import org.teiid.core.util.StringUtil; //導入方法依賴的package包/類
static List<ElementSymbol> getElementsUnderNode(Object mid, Collection<ElementSymbol> validElements, QueryMetadataInterface metadata) 
    throws TeiidComponentException, QueryMetadataException {
    
    List<ElementSymbol> elements = new ArrayList<ElementSymbol>();
    String nodeName = metadata.getFullName(mid);
    for (ElementSymbol validElement : validElements) {
        String qualifiedName = validElement.getName();
        if (StringUtil.startsWithIgnoreCase(qualifiedName, nodeName) && (qualifiedName.length() == nodeName.length() || qualifiedName.charAt(nodeName.length()) == '.')) {
            elements.add(validElement);
        }
    }
    return elements;
}
 
開發者ID:kenweezy,項目名稱:teiid,代碼行數:14,代碼來源:XMLQueryResolver.java

示例5: TeiidURL

import org.teiid.core.util.StringUtil; //導入方法依賴的package包/類
/**
   * Create an MMURL from the server URL.  For use by the server-side.
   * @param serverURL   Expected format: mm[s]://server1:port1[,server2:port2]
   * @throws MalformedURLException 
   * @since 4.2
   */
  public TeiidURL(String serverURL) throws MalformedURLException {
      if (serverURL == null) {
          throw new MalformedURLException(INVALID_FORMAT_SERVER);
      } 
      if (StringUtil.startsWithIgnoreCase(serverURL, SECURE_PROTOCOL)) {
      	usingSSL = true;
      } else if (!StringUtil.startsWithIgnoreCase(serverURL, DEFAULT_PROTOCOL)) {
      	throw new MalformedURLException(INVALID_FORMAT_SERVER);
      }

      appServerURL = serverURL;
parseServerURL(serverURL.substring(usingSSL?SECURE_PROTOCOL.length():DEFAULT_PROTOCOL.length()), INVALID_FORMAT_SERVER);
  }
 
開發者ID:kenweezy,項目名稱:teiid,代碼行數:20,代碼來源:TeiidURL.java


注:本文中的org.teiid.core.util.StringUtil.startsWithIgnoreCase方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。