Examples of Field


Examples of org.drools.analytics.components.Field

    session.setAgendaFilter(new RuleNameMatchesAgendaFilter(
        "Remove useless integer gaps lesser or lesser and equal"));

    Collection<Object> testData = new ArrayList<Object>();

    Field f = new Field();
    testData.add(f);

    // > 10 covered
    LiteralRestriction lower = new LiteralRestriction();
    lower.setRuleName("> 10 covered");
    lower.setFieldId(f.getId());
    lower.setEvaluator(">");
    lower.setValue("10");
    testData.add(lower);

    // == 50 covered
    LiteralRestriction r1 = new LiteralRestriction();
    r1.setRuleName("== 50 covered");
    r1.setFieldId(f.getId());
    r1.setEvaluator("==");
    r1.setValue("50");
    testData.add(r1);

    // > 50 gap
    Gap g1 = new Gap(f, ">", r1);
    g1.setFiredRuleName("above");
    testData.add(g1);

    // < 50 gap
    Gap g2 = new Gap(f, "<", r1);
    g2.setFiredRuleName("below");
    testData.add(g2);
   
    // > 70 covered
    LiteralRestriction r2 = new LiteralRestriction();
    r2.setRuleName("> 70 covered");
    r2.setFieldId(f.getId());
    r2.setEvaluator(">");
    r2.setValue("70");
    testData.add(r2);

    // <= 70 gap
    Gap g3 = new Gap(f, "<=", r2);
    g3.setFiredRuleName("70gap");
    testData.add(g3);
   
    // < 100 covered
    LiteralRestriction higher = new LiteralRestriction();
    higher.setRuleName("< 100 covered");
    higher.setFieldId(f.getId());
    higher.setEvaluator("<");
    higher.setValue("100");
    testData.add(higher);

    AnalyticsData data = AnalyticsDataFactory.getAnalyticsData();
View Full Code Here

Examples of org.drools.verifier.components.Field

        return restrictionsByFieldId.get( id );
    }

    public void add(VerifierComponent object) {
        if ( VerifierComponentType.FIELD.equals( object.getVerifierComponentType() ) ) {
            Field field = (Field) object;
            ObjectType objectType = (ObjectType) getVerifierObject( VerifierComponentType.OBJECT_TYPE,
                                                                    field.getObjectTypePath() );
            fieldsByObjectTypeAndFieldName.put( objectType.getFullName() + "." + field.getName(),
                                                field );

            fieldsByObjectTypeId.put( field.getObjectTypePath(),
                                      field );
        } else if ( VerifierComponentType.RULE.equals( object.getVerifierComponentType() ) ) {
            VerifierRule rule = (VerifierRule) object;
            rulesByName.put( rule.getName(),
                             rule );
View Full Code Here

Examples of org.dspace.app.xmlui.wing.element.Field

         * @param dcValues
         *                      The field's pre-existing values.
         */
        private void renderSelectFromListField(List form, String fieldName, DCInput dcInput, DCValue[] dcValues, boolean readonly) throws WingException
        {
                Field listField = null;
               
                //if repeatable, this list of fields should be checkboxes
                if (dcInput.isRepeatable())
                {
                        listField = form.addItem().addCheckBox(fieldName);
                }
                else //otherwise this is a list of radio buttons
                {
                        listField = form.addItem().addRadio(fieldName);
                }
               
                if (readonly)
                {
                    listField.setDisabled();
                }
               
                //      Setup the field
                listField.setLabel(dcInput.getLabel());
                listField.setHelp(cleanHints(dcInput.getHints()));
                if (dcInput.isRequired())
                        listField.setRequired();
                if (isFieldInError(fieldName))
                    if (dcInput.getWarning() != null && dcInput.getWarning().length() > 0) {
                        listField.addError(dcInput.getWarning());
                    } else {
                        listField.addError(T_required_field);
                    }

       
                //Setup each of the possible options
                java.util.List<String> pairs = dcInput.getPairs();
View Full Code Here

Examples of org.eclipse.jetty.http.HttpFields.Field

      }
    }

    private void logHeaders(TreeLogger logger, TreeLogger.Type logLevel, HttpFields fields) {
      for (int i = 0; i < fields.size(); ++i) {
        Field field = fields.getField(i);
        logger.log(logLevel, field.getName() + ": " + field.getValue());
      }
    }
View Full Code Here

Examples of org.eclipse.persistence.internal.oxm.mappings.Field

     */
    public boolean isPositional() {
        if (getXmlPath() == null) {
            return false;
        }
        Field field = new XMLField(getXmlPath());
        XPathFragment frag = field.getXPathFragment();
        // loop until we have the last non-null, non-attribute, non-text fragment
        while (true) {
            if (frag.getNextFragment() != null && !frag.getNextFragment().isAttribute() && !frag.getNextFragment().nameIsText()) {
                frag = frag.getNextFragment();
            } else {
View Full Code Here

Examples of org.elasticsearch.hadoop.serialization.dto.mapping.Field

            // get original copy
            Settings settings = CascadingUtils.addDefaultsToSettings(CascadingUtils.extractOriginalProperties(flowProcess.getConfigCopy()), tapProperties, log);

            // will be closed by the query is finished
            RestRepository client = new RestRepository(settings);
            Field mapping = client.getMapping();
            Collection<String> fields = CascadingUtils.fieldToAlias(settings, getSourceFields());

            // validate if possible
            FieldPresenceValidation validation = settings.getFieldExistanceValidation();
            if (validation.isRequired()) {
View Full Code Here

Examples of org.graylog2.restclient.lib.Field

    }

    protected List<Field> getAllFields() {
        List<Field> allFields = Lists.newArrayList();
        for (String f : messagesService.getMessageFields()) {
            allFields.add(new Field(f));
        }
        return allFields;
    }
View Full Code Here

Examples of org.hibernate.search.annotations.Field

    }

    @Override
    public String toField(Path<?> path) {
        if (path.getAnnotatedElement() != null) {
            Field fieldAnn = path.getAnnotatedElement().getAnnotation(Field.class);
            if (fieldAnn != null && fieldAnn.name().length() > 0) {
                return fieldAnn.name();
            }
        }
        return super.toField(path);
    }
View Full Code Here

Examples of org.infinispan.schematic.document.Document.Field

    @Override
    public boolean equals( Object obj ) {
        if (obj == this) return true;
        if (obj instanceof Field) {
            Field that = (Field)obj;
            if (!this.getName().equals(that.getName())) return true;
            return this.getValue() != null ? this.getValue().equals(that.getValue()) : that.getValue() == null;
        }
        return false;
    }
View Full Code Here

Examples of org.jasig.portal.version.om.Version.Field

     * @param from Version updating from
     * @param to Version updating to
     * @return true if the major and minor versions match and the from.patch value is less than or equal to the to.patch value
     */
    public static boolean canUpdate(Version from, Version to) {
        final Field mostSpecificMatchingField = getMostSpecificMatchingField(from, to);
        switch (mostSpecificMatchingField) {
            case LOCAL: {
                return true;
            }
            case PATCH:
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.