Codota Logo
FactTypes$FactType
Code IndexAdd Codota to your IDE (free)

How to use
FactTypes$FactType
in
org.drools.workbench.services.verifier.plugin.client.api

Best Java code snippets using org.drools.workbench.services.verifier.plugin.client.api.FactTypes$FactType (Showing top 18 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
DateTime d =
  • Codota Iconnew DateTime()
  • Codota IconDateTimeFormatter formatter;String text;formatter.parseDateTime(text)
  • Codota IconObject instant;new DateTime(instant)
  • Smart code suggestions by Codota
}
origin: kiegroup/drools-wb

  public FactTypes getFactTypes() {
    final FactTypes factTypes = new FactTypes();

    final Map<String, ModelField[]> filteredFactTypes = ((AsyncPackageDataModelOracleImpl) oracle).getFilteredFactTypes();

    for (final String factTypeName : filteredFactTypes.keySet()) {

      final Set<FactTypes.Field> fields = new HashSet<>();

      for (final ModelField modelField : filteredFactTypes.get(factTypeName)) {
        fields.add(new FactTypes.Field(modelField.getName(),
                        modelField.getType()));
      }

      factTypes.add(new FactTypes.FactType(factTypeName,
                         fields));
    }

    return factTypes;
  }
}
origin: kiegroup/drools-wb

@Override
public String toString() {
  StringBuilder builder = new StringBuilder();
  for (final FactType key : factTypes) {
    builder.append(key.getName());
    builder.append("{");
    for (final Field field : key.getFields()) {
      builder.append(field.toString());
      builder.append(", ");
    }
    builder.append("}");
  }
  return builder.toString();
}
origin: org.drools/drools-wb-verifier-guided-decision-table-adapter

public FactType getFactType(final String factTypeName) {
  for (final FactType factType : factTypes) {
    if (factType.getName()
        .equals(factTypeName)) {
      return factType;
    }
  }
  return null;
}
origin: kiegroup/drools-wb

public String getFieldType(final String factTypeName,
              final String fieldName) {
  PortablePreconditions.checkNotNull("factTypeName",
                    factTypeName);
  PortablePreconditions.checkNotNull("fieldName",
                    fieldName);
  final FactType factType = getFactType(factTypeName);
  if (factType == null) {
    return null;
  }
  for (final Field field : factType.getFields()) {
    if (field.getFieldName()
        .equals(fieldName)) {
      return field.getType();
    }
  }
  return null;
}
origin: org.drools/drools-wb-verifier-guided-decision-table-adapter

public String getFieldType(final String factTypeName,
              final String fieldName) {
  PortablePreconditions.checkNotNull("factTypeName",
                    factTypeName);
  PortablePreconditions.checkNotNull("fieldName",
                    fieldName);
  final FactType factType = getFactType(factTypeName);
  if (factType == null) {
    return null;
  }
  for (final Field field : factType.getFields()) {
    if (field.getFieldName()
        .equals(fieldName)) {
      return field.getType();
    }
  }
  return null;
}
origin: org.drools/drools-wb-verifier-guided-decision-table-adapter

@Override
@Before
public void setUp() throws
    Exception {
  super.setUp();
  analyzerProvider.getFactTypes()
      .add(new FactTypes.FactType("Employee",
                    new HashSet<FactTypes.Field>() {
                      {
                        add(new FactTypes.Field("age",
                                    DataType.TYPE_NUMERIC_INTEGER));
                        add(new FactTypes.Field("yearsService",
                                    DataType.TYPE_NUMERIC_INTEGER));
                        add(new FactTypes.Field("vacationEntitlement",
                                    DataType.TYPE_NUMERIC_INTEGER));
                      }
                    }));
}
origin: org.drools/drools-wb-guided-dtable-editor-client

  public FactTypes getFactTypes() {
    final FactTypes factTypes = new FactTypes();

    final Map<String, ModelField[]> filteredFactTypes = ((AsyncPackageDataModelOracleImpl) oracle).getFilteredFactTypes();

    for (final String factTypeName : filteredFactTypes.keySet()) {

      final Set<FactTypes.Field> fields = new HashSet<>();

      for (final ModelField modelField : filteredFactTypes.get(factTypeName)) {
        fields.add(new FactTypes.Field(modelField.getName(),
                        modelField.getType()));
      }

      factTypes.add(new FactTypes.FactType(factTypeName,
                         fields));
    }

    return factTypes;
  }
}
origin: org.drools/drools-wb-verifier-guided-decision-table-adapter

@Override
@Before
public void setUp() throws
    Exception {
  super.setUp();
  analyzerProvider.getFactTypes().add(new FactTypes.FactType("LoanApplication",
                                new HashSet<FactTypes.Field>() {{
                                  add(new FactTypes.Field("amount",
                                              DataType.TYPE_NUMERIC_INTEGER));
                                  add(new FactTypes.Field("lengthYears",
                                              DataType.TYPE_NUMERIC_INTEGER));
                                  add(new FactTypes.Field("approvedRate",
                                              DataType.TYPE_NUMERIC_INTEGER));
                                  add(new FactTypes.Field("explanation",
                                              DataType.TYPE_STRING));
                                  add(new FactTypes.Field("approved",
                                              DataType.TYPE_BOOLEAN));
                                }}));
}
origin: kiegroup/drools-wb

@Override
@Before
public void setUp() throws
    Exception {
  super.setUp();
  analyzerProvider.getFactTypes().add(new FactTypes.FactType("LoanApplication",
                                new HashSet<FactTypes.Field>() {{
                                  add(new FactTypes.Field("amount",
                                              DataType.TYPE_NUMERIC_INTEGER));
                                  add(new FactTypes.Field("lengthYears",
                                              DataType.TYPE_NUMERIC_INTEGER));
                                  add(new FactTypes.Field("approvedRate",
                                              DataType.TYPE_NUMERIC_INTEGER));
                                  add(new FactTypes.Field("explanation",
                                              DataType.TYPE_STRING));
                                  add(new FactTypes.Field("approved",
                                              DataType.TYPE_BOOLEAN));
                                }}));
}
origin: org.drools/drools-wb-verifier-guided-decision-table-adapter

@Test
public void testFileScoreAchievementsGDST() throws
    Exception {
  analyzerProvider.getFactTypes()
      .add(new FactTypes.FactType("Player",
                    new HashSet<FactTypes.Field>() {
                      {
                        add(new FactTypes.Field("score",
                                    DataType.TYPE_NUMERIC_INTEGER));
                      }
                    }));
  final String xml = loadResource("Score Achievements.gdst");
  final Analyzer analyzer = analyzerProvider.makeAnalyser(GuidedDTXMLPersistence.getInstance()
                                  .unmarshal(xml));
  analyzer.resetChecks();
  analyzer.analyze();
  assertOnlyContains(analyzerProvider.getAnalysisReport(),
            CheckType.MISSING_RANGE,
            CheckType.SINGLE_HIT_LOST);
}
origin: kiegroup/drools-wb

@Test
public void testFileScoreAchievementsGDST() throws
    Exception {
  analyzerProvider.getFactTypes()
      .add(new FactTypes.FactType("Player",
                    new HashSet<FactTypes.Field>() {
                      {
                        add(new FactTypes.Field("score",
                                    DataType.TYPE_NUMERIC_INTEGER));
                      }
                    }));
  final String xml = loadResource("Score Achievements.gdst");
  final Analyzer analyzer = analyzerProvider.makeAnalyser(GuidedDTXMLPersistence.getInstance()
                                  .unmarshal(xml));
  analyzer.resetChecks();
  analyzer.analyze();
  assertOnlyContains(analyzerProvider.getAnalysisReport(),
            CheckType.MISSING_RANGE,
            CheckType.SINGLE_HIT_LOST);
}
origin: org.drools/drools-wb-verifier-guided-decision-table-adapter

public AnalyzerProvider() {
  factTypes.add(new FactTypes.FactType("Applicant",
                     new HashSet<FactTypes.Field>() {{
                       add(new FactTypes.Field("age",
                                   DataType.TYPE_NUMERIC_INTEGER));
                     }}));
  factTypes.add(new FactTypes.FactType("Account",
                     new HashSet<FactTypes.Field>() {{
                       add(new FactTypes.Field("deposit",
                                   DataType.TYPE_NUMERIC_DOUBLE));
                     }}));
  factTypes.add(new FactTypes.FactType("Person",
                     new HashSet<FactTypes.Field>() {{
                       add(new FactTypes.Field("age",
                                   DataType.TYPE_NUMERIC_INTEGER));
                       add(new FactTypes.Field("name",
                                   DataType.TYPE_STRING));
                       add(new FactTypes.Field("lastName",
                                   DataType.TYPE_STRING));
                       add(new FactTypes.Field("description",
                                   DataType.TYPE_STRING));
                       add(new FactTypes.Field("approved",
                                   DataType.TYPE_BOOLEAN));
                       add(new FactTypes.Field("salary",
                                   DataType.TYPE_NUMERIC_INTEGER));
                     }}));
}
origin: kiegroup/drools-wb

public AnalyzerProvider() {
  factTypes.add(new FactTypes.FactType("Applicant",
                     new HashSet<FactTypes.Field>() {{
                       add(new FactTypes.Field("age",
                                   DataType.TYPE_NUMERIC_INTEGER));
                     }}));
  factTypes.add(new FactTypes.FactType("Account",
                     new HashSet<FactTypes.Field>() {{
                       add(new FactTypes.Field("deposit",
                                   DataType.TYPE_NUMERIC_DOUBLE));
                     }}));
  factTypes.add(new FactTypes.FactType("Person",
                     new HashSet<FactTypes.Field>() {{
                       add(new FactTypes.Field("age",
                                   DataType.TYPE_NUMERIC_INTEGER));
                       add(new FactTypes.Field("name",
                                   DataType.TYPE_STRING));
                       add(new FactTypes.Field("lastName",
                                   DataType.TYPE_STRING));
                       add(new FactTypes.Field("description",
                                   DataType.TYPE_STRING));
                       add(new FactTypes.Field("approved",
                                   DataType.TYPE_BOOLEAN));
                       add(new FactTypes.Field("salary",
                                   DataType.TYPE_NUMERIC_INTEGER));
                     }}));
}
origin: org.drools/drools-wb-verifier-guided-decision-table-adapter

@Override
public String toString() {
  StringBuilder builder = new StringBuilder();
  for (final FactType key : factTypes) {
    builder.append(key.getName());
    builder.append("{");
    for (final Field field : key.getFields()) {
      builder.append(field.toString());
      builder.append(", ");
    }
    builder.append("}");
  }
  return builder.toString();
}
origin: org.drools/drools-wb-verifier-guided-decision-table-adapter

.add(new FactTypes.FactType("LoanApplication",
              new HashSet<FactTypes.Field>() {
.add(new FactTypes.FactType("IncomeSource",
              new HashSet<FactTypes.Field>() {
.add(new FactTypes.FactType("Person",
              new HashSet<FactTypes.Field>() {
origin: kiegroup/drools-wb

public FactType getFactType(final String factTypeName) {
  for (final FactType factType : factTypes) {
    if (factType.getName()
        .equals(factTypeName)) {
      return factType;
    }
  }
  return null;
}
origin: kiegroup/drools-wb

.add(new FactTypes.FactType("LoanApplication",
              new HashSet<FactTypes.Field>() {
.add(new FactTypes.FactType("IncomeSource",
              new HashSet<FactTypes.Field>() {
.add(new FactTypes.FactType("Person",
              new HashSet<FactTypes.Field>() {
origin: kiegroup/drools-wb

@Override
@Before
public void setUp() throws
    Exception {
  super.setUp();
  analyzerProvider.getFactTypes()
      .add(new FactTypes.FactType("Employee",
                    new HashSet<FactTypes.Field>() {
                      {
                        add(new FactTypes.Field("age",
                                    DataType.TYPE_NUMERIC_INTEGER));
                        add(new FactTypes.Field("yearsService",
                                    DataType.TYPE_NUMERIC_INTEGER));
                        add(new FactTypes.Field("vacationEntitlement",
                                    DataType.TYPE_NUMERIC_INTEGER));
                      }
                    }));
}
org.drools.workbench.services.verifier.plugin.client.apiFactTypes$FactType

Most used methods

  • <init>
  • getFields
  • getName

Popular in Java

  • Reactive rest calls using spring rest template
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • getResourceAsStream (ClassLoader)
    Returns a stream for the resource with the specified name. See #getResource(String) for a descriptio
  • scheduleAtFixedRate (ScheduledExecutorService)
    Creates and executes a periodic action that becomes enabled first after the given initial delay, and
  • Point (java.awt)
    A point representing a location in (x, y) coordinate space, specified in integer precision.
  • Socket (java.net)
    Provides a client-side TCP socket.
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • ExecutorService (java.util.concurrent)
    An Executor that provides methods to manage termination and methods that can produce a Future for tr
  • Collectors (java.util.stream)
  • Logger (org.apache.log4j)
    This is the central class in the log4j package. Most logging operations, except configuration, are d
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now