Examples of Predicate


Examples of org.jboss.as.console.client.widgets.nav.Predicate

        LHSNavTreeItem web = new LHSNavTreeItem("Web", NameTokens.WebMetricPresenter);
        LHSNavTreeItem jpa = new LHSNavTreeItem("JPA", NameTokens.JPAMetricPresenter);
        LHSNavTreeItem ws = new LHSNavTreeItem("Webservices", NameTokens.WebServiceRuntimePresenter);
        LHSNavTreeItem naming = new LHSNavTreeItem("JNDI View", NameTokens.JndiPresenter);

        metricPredicates.add(new Predicate("datasources", datasources));
        metricPredicates.add(new Predicate("messaging", jmsQueues));
        metricPredicates.add(new Predicate("web", web));
        metricPredicates.add(new Predicate("jpa", jpa));
        metricPredicates.add(new Predicate("webservices", ws));
        metricPredicates.add(new Predicate("naming", naming));


        // Extension based additions
        RuntimeExtensionRegistry registry = Console.getRuntimeLHSItemExtensionRegistry();
        List<RuntimeExtensionMetaData> menuExtensions = registry.getExtensions();
        for (RuntimeExtensionMetaData ext : menuExtensions) {

            if(RuntimeGroup.METRICS.equals(ext.getGroup()))
            {
                metricPredicates.add(
                        new Predicate(
                                ext.getKey(), new LHSNavTreeItem(ext.getName(), ext.getToken())
                        )
                );
            }
            else if(RuntimeGroup.OPERATiONS.equals(ext.getGroup()))
            {
                runtimePredicates.add(
                        new Predicate(
                                ext.getKey(), new LHSNavTreeItem(ext.getName(), ext.getToken())
                        )
                );
            }
            else
View Full Code Here

Examples of org.mizartools.dli.Predicate

      type = Adapter.getType(abstractSignature, constructor.getTypList().getFirst());
      itemDefinition = new Mode(locusList, type, properties, redefinition);
      itemType = ItemType.mode;
      break;
    case R :
      itemDefinition = new Predicate(locusList, properties, redefinition);
      itemType = ItemType.pred;
      break;
    case K : 
      type = Adapter.getType(abstractSignature, constructor.getTypList().getFirst());
      itemDefinition = new Functor(locusList, type, properties, redefinition);
View Full Code Here

Examples of org.modeshape.jcr.ValidateQuery.Predicate

        Query query = session.getWorkspace().getQueryManager().createQuery(sql, Query.JCR_SQL2);
        QueryResult result = query.execute();
        final Set<String> expectedPaths = new HashSet<String>();
        expectedPaths.add("/Other/NodeA[2]");
        expectedPaths.add("/Other/NodeA[3]");
        validateQuery().rowCount(2).hasColumns("pa", "pb").onEachRow(new Predicate() {
            @Override
            public void validate( int rowNumber,
                                  Row row ) throws RepositoryException {
                // All the rows are identical ...
                assertThat(row.getValue("pa").getString(), is("value1"));
View Full Code Here

Examples of org.neo4j.helpers.Predicate

            keys = idNameOnly;
          }

          for (PropertyKey key : keys) {

            final Predicate predicate  = writer.getSecurityContext().getRange(key.jsonName());
            final Object value         = source.getProperty(key, predicate);
            final Class relatedType    = key.relatedType();
            final PropertyKey localKey = key;

            if (value != null) {
View Full Code Here

Examples of org.springframework.data.solr.core.query.Criteria.Predicate

  @SuppressWarnings("rawtypes")
  @Test
  public void testWildcardProcessorCanProcess() {
    WildcardProcessor processor = this.parser.new WildcardProcessor();
    Assert.assertTrue(processor.canProcess(new Predicate(OperationKey.STARTS_WITH, SOME_VALUE)));
    Assert.assertTrue(processor.canProcess(new Predicate(OperationKey.ENDS_WITH, SOME_VALUE)));
    Assert.assertTrue(processor.canProcess(new Predicate(OperationKey.CONTAINS, SOME_VALUE)));
    assertProcessorCannotProcessInvalidOrNullOperationKey(processor);
  }
View Full Code Here

Examples of plan_runner.predicates.Predicate

  }

  @Override
  public void visit(BetweenPredicate between) {
    // In between there is only an and predicate
    final Predicate p = (Predicate) between.getInnerPredicates().get(0);
    visit(p);
  }
View Full Code Here

Examples of prefuse.data.expression.Predicate

        usesRenderer.setHorizontalAlignment1( Constants.CENTER );
        usesRenderer.setHorizontalAlignment2( Constants.CENTER );
        usesRenderer.setVerticalAlignment1( Constants.BOTTOM );
        usesRenderer.setVerticalAlignment2( Constants.TOP );

        Predicate usesPredicate = (Predicate) ExpressionParser.parse( "ingroup('graph.edges') AND [" + USES_EDGES + "]==true", true );

        // set up the renderers - one for nodes and one for LABELS
        DefaultRendererFactory rf = new DefaultRendererFactory();
        rf.add( new InGroupPredicate( GRAPH_NODES ), new NodeRenderer() );
        rf.add( new InGroupPredicate( LABELS ), labelRenderer );
View Full Code Here

Examples of ru.bmstu.datalog.data.Predicate

    String name = parseName();   
    parseSymbol('(');   
    ArrayList<Argument> arguments = parseArguments();
    parseSymbol(')');
   
    return new Predicate(name, arguments);
  }
View Full Code Here

Examples of weka.associations.tertius.Predicate

   */
  private Predicate buildPredicate(Instances instances,
           Attribute attr, boolean isClass)
    throws Exception {

    Predicate predicate; /* The result. */
    Literal lit;
    Literal negation;
    boolean missingValues; /* Missing values for this attribute ? */
    boolean individual = (m_parts != null); /* Individual-based learning ? */
    int type = (instances == m_parts)
      ? IndividualLiteral.PART_PROPERTY
      : IndividualLiteral.INDIVIDUAL_PROPERTY; /* Type of property. */

    if (attr.isNumeric()) {
      throw new Exception("Can't handle numeric attributes!");
    }
 
    missingValues = instances.attributeStats(attr.index()).missingCount > 0;

    /* Build predicate. */
    if (individual) {
      predicate = new Predicate(instances.relationName() + "." + attr.name(),
        attr.index(), isClass);
    } else {
      predicate = new Predicate(attr.name(), attr.index(), isClass);
    }
 
    if (attr.numValues() == 2
  && (!missingValues || m_missing == EXPLICIT)) {
      /* Case of two values.
       * If there are missing values, this case is treated like other cases.
       */
      if (individual) {
  lit = new IndividualLiteral(predicate, attr.value(0), 0,
            Literal.POS, m_missing, type);
  negation = new IndividualLiteral(predicate, attr.value(1), 1,
           Literal.POS, m_missing, type);
      } else {
  lit = new AttributeValueLiteral(predicate, attr.value(0), 0,
          Literal.POS, m_missing);
  negation = new AttributeValueLiteral(predicate, attr.value(1), 1,
               Literal.POS, m_missing);
      }
      lit.setNegation(negation);
      negation.setNegation(lit);
      predicate.addLiteral(lit);     
    } else {
      /* Case of several values. */
      for (int i = 0; i < attr.numValues(); i++) {
  if (individual) {
    lit = new IndividualLiteral(predicate, attr.value(i), i,
              Literal.POS, m_missing, type);
  } else {
    lit = new AttributeValueLiteral(predicate, attr.value(i), i,
            Literal.POS, m_missing);
  }
  if (m_negation != NONE) {
    if (individual) {
      negation = new IndividualLiteral(predicate, attr.value(i), i,
               Literal.NEG, m_missing, type);
    } else {
      negation = new AttributeValueLiteral(predicate, attr.value(i), i,
             Literal.NEG, m_missing);
    }
    lit.setNegation(negation);
    negation.setNegation(lit);
  }
  predicate.addLiteral(lit);
      }

      /* One more value if missing is significant. */
      if (missingValues && m_missing == SIGNIFICANT) {
  if (individual) {
    lit = new IndividualLiteral(predicate, "?", -1,
              Literal.POS, m_missing, type);
  } else {
    lit = new AttributeValueLiteral(predicate, "?", -1,
            Literal.POS, m_missing);
  }
  if (m_negation != NONE) {
    if (individual) {
      negation = new IndividualLiteral(predicate, "?", -1,
               Literal.NEG, m_missing, type);
    } else {
      negation = new AttributeValueLiteral(predicate, "?", -1,
             Literal.NEG, m_missing);
    }
    lit.setNegation(negation);
    negation.setNegation(lit);
  }
  predicate.addLiteral(lit);
      }
    }
    return predicate;
  }
View Full Code Here
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.