Examples of match()


Examples of org.vietspider.html.path2.NodeMatcher.match()

        String indexValue = item.getText().substring(name.length());
        int index = Integer.parseInt(indexValue);
       
        if(inode instanceof NodeExp) {
          NodeExp nodeExp = (NodeExp)inode;
          if(expMatcher.match(nodeExp.getPattern(), index)) {
            Attribute [] attrs = nodeExp.getAttributes();
            if(attrs == null || attrs.length < 1) {
              list.add(item);
            } else {
              String data = (String)item.getData();

Examples of org.w3c.www.mime.LanguageTag.match()

          varyLang = true ;
          LanguageTag ftag = new LanguageTag(lang);
          int jmatch = -1 ;
          int jidx   = -1 ;
          for (int j = 0 ; j < languages.length ; j++) {
        int match = ftag.match(req_lang[j]);
        if ( match > jmatch ) {
            jmatch = match ;
            jidx   = j ;
        }
          }

Examples of org.w3c.www.mime.MimeType.match()

                                    ATTR_CONTENT_TYPE, null);
      int jmatch = -1 ;
      int jidx   = -1 ;
      for (int j = 0 ; j < accepts.length ; j++) {
          try {
        int match = vt.match(accepts[j].getMimeType());
        if ( match > jmatch ) {
            jmatch = match ;
            jidx   = j ;
        }
          } catch (HttpInvalidValueException ivex) {

Examples of org.wltea.analyzer.dic.DictSegment.match()

    Hit hit = null;
    int umCount = 0;
    int mCount = 0;
    for(String word : allWords){
      char[] chars = word.toCharArray();
      hit = _root_.match(chars , 0, chars.length);
      if(hit.isUnmatch()){
        //System.out.println(word);
        umCount++;
      }else{
        mCount++;

Examples of org.wso2.carbon.discovery.search.RFC3986ScopeMatchStrategy.match()

    URI[] f = new URI[] {URI.create("http://wso2.org/")};
    URI[] g = new URI[] {URI.create("http://wso2.org/")};

    public void testRFC3986Strategy() {
        ScopeMatchStrategy strategy = new RFC3986ScopeMatchStrategy();
        assertTrue(strategy.match(a,b));
        assertTrue(strategy.match(a,c));
        assertTrue(strategy.match(b,c));
        assertFalse(strategy.match(a,d));
        assertFalse(strategy.match(a,e));
        assertTrue(strategy.match(a,f));

Examples of org.wso2.carbon.discovery.search.ScopeMatchStrategy.match()

    URI[] f = new URI[] {URI.create("http://wso2.org/")};
    URI[] g = new URI[] {URI.create("http://wso2.org/")};

    public void testRFC3986Strategy() {
        ScopeMatchStrategy strategy = new RFC3986ScopeMatchStrategy();
        assertTrue(strategy.match(a,b));
        assertTrue(strategy.match(a,c));
        assertTrue(strategy.match(b,c));
        assertFalse(strategy.match(a,d));
        assertFalse(strategy.match(a,e));
        assertTrue(strategy.match(a,f));

Examples of org.wso2.carbon.discovery.search.StrCmpScopeMatchStrategy.match()

        assertTrue(strategy.match(a,f));
    }

    public void testStrCmpStrategy() {
        ScopeMatchStrategy strategy = new StrCmpScopeMatchStrategy();
        assertTrue(strategy.match(a,a));
        assertTrue(strategy.match(f,g));
        assertFalse(strategy.match(a,c));
        assertFalse(strategy.match(a,e));
    }

Examples of org.wso2.carbon.discovery.search.UUIDScopeMatchStrategy.match()

    public void testUUIDStrategy() {
        ScopeMatchStrategy strategy = new UUIDScopeMatchStrategy();
        String uuid = UUID.randomUUID().toString();
        String uuid2 = UUID.randomUUID().toString();
        assertTrue(strategy.match(new URI[] {URI.create(uuid)}, new URI[] {URI.create(uuid)}));
        assertFalse(strategy.match(new URI[] {URI.create(uuid)}, new URI[] {URI.create(uuid2)}));
    }
}

Examples of org.wymiwyg.wrhapi.util.MediaRange.match()

      throws HandlerException {
    Iterator<AcceptHeaderEntry> iterator = request.getAccept();
    while (iterator.hasNext()) {
      AcceptHeaderEntry element = iterator.next();
      MediaRange range = element.getRange();
      if (range.match(htmlType)) {
        return true;
      }
      if (range.match(xmlType)) {
        return false;
      }

Examples of org.xmlBlaster.engine.mime.I_AccessFilter.match()

                                                msgUnit.getContentMime(),
                                                msgUnit.getContentMimeExtended());
                  if (log.isLoggable(Level.FINE)) log.fine("Checking filter='" + filterQos[jj].getQuery() + "' on message content='" +
                                 msgUnit.getContentStr() + "'");
                  SessionInfo sessionInfo = null; // TODO: Pass sessionInfo here
                  if (filter != null && filter.match(sessionInfo, msgUnit, filterQos[jj].getQuery())) {
                     if (log.isLoggable(Level.FINE)) log.fine("Found master='" + nodeMasterInfo.getNodeId().getId() + "' stratum=" +
                                    nodeMasterInfo.getStratum() + " for message '" + msgUnit.getLogId() + "' with filter='" + filterQos[jj].getQuery() + "'.");
                     return nodeMasterInfo; // Found the master nodeMasterInfo.getClusterNode();
                  }
               }
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.