congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
Characteristic.getExtensions
Code IndexAdd Tabnine to your IDE (free)

How to use
getExtensions
method
in
org.dmg.pmml.pmml_4_2.descr.Characteristic

Best Java code snippets using org.dmg.pmml.pmml_4_2.descr.Characteristic.getExtensions (Showing top 9 results out of 315)

origin: org.drools/drools-scorecards

private void checkForMissingAttributes() {
  for (Object obj :scorecard.getExtensionsAndCharacteristicsAndMiningSchemas()){
    if (obj instanceof Characteristics){
      Characteristics characteristics = (Characteristics)obj;
      for (Characteristic characteristic : characteristics.getCharacteristics()){
        String newCellRef = ScorecardPMMLUtils.getExtensionValue(characteristic.getExtensions(), "cellRef");
        if ( characteristic.getAttributes().size() == 0 ) {
          parseErrors.add(new ScorecardError(newCellRef, "Missing Attribute Bins for Characteristic '"+characteristic.getName()+"'."));
        }
      }
    }
  }
}
origin: org.drools/drools-scorecards

private void removeEmptyExtensions(Scorecard pmmlScorecard) {
  for (Object obj : pmmlScorecard.getExtensionsAndCharacteristicsAndMiningSchemas()) {
    if (obj instanceof Characteristics) {
      Characteristics characteristics = (Characteristics) obj;
      for (org.dmg.pmml.pmml_4_2.descr.Characteristic characteristic : characteristics.getCharacteristics()) {
        List<Extension> toRemoveExtensionsList = new ArrayList<Extension>();
        for (Extension extension : characteristic.getExtensions()) {
          if (StringUtils.isEmpty(extension.getValue())) {
            toRemoveExtensionsList.add(extension);
          }
        }
        for (Extension extension : toRemoveExtensionsList) {
          characteristic.getExtensions().remove(extension);
        }
        for (Attribute attribute : characteristic.getAttributes()) {
          List<Extension> toRemoveExtensionsList2 = new ArrayList<Extension>();
          for (Extension extension : attribute.getExtensions()) {
            if (StringUtils.isEmpty(extension.getValue())) {
              toRemoveExtensionsList2.add(extension);
            }
          }
          for (Extension extension : toRemoveExtensionsList2) {
            attribute.getExtensions().remove(extension);
          }
        }
      }
    }
  }
}
origin: org.drools/drools-scorecards

private void validateBaselineScores() {
  for (Object obj :scorecard.getExtensionsAndCharacteristicsAndMiningSchemas()){
    Double scorecardBaseline = scorecard.getBaselineScore();
    if (obj instanceof Characteristics){
      Characteristics characteristics = (Characteristics)obj;
      for (Characteristic characteristic : characteristics.getCharacteristics()){
        Double charBaseline = characteristic.getBaselineScore();
        if  ( (charBaseline == null || charBaseline.doubleValue() == 0)
            && ((scorecardBaseline == null || scorecardBaseline.doubleValue() == 0)) ){
          String newCellRef = createDataTypeCellRef(ScorecardPMMLUtils.getExtensionValue(characteristic.getExtensions(), "cellRef"),2);
          parseErrors.add(new ScorecardError(newCellRef, "Characteristic is missing Baseline Score"));
        }
      }
    }
  }
}
origin: org.drools/drools-scorecards

Characteristics characteristics = (Characteristics)obj;
for (Characteristic characteristic : characteristics.getCharacteristics()){
  String dataType = ScorecardPMMLUtils.getExtensionValue(characteristic.getExtensions(), ScorecardPMMLExtensionNames.CHARACTERTISTIC_DATATYPE);
  String newCellRef = createDataTypeCellRef(ScorecardPMMLUtils.getExtensionValue(characteristic.getExtensions(), "cellRef"),1);
  if ( dataType == null || StringUtils.isEmpty(dataType)) {
    parseErrors.add(new ScorecardError(newCellRef, "Missing Data Type!"));
origin: org.drools/drools-scorecards

private void createAndSetPredicates(Scorecard pmmlScorecard) {
  for (Object obj : pmmlScorecard.getExtensionsAndCharacteristicsAndMiningSchemas()) {
    if (obj instanceof Characteristics) {
      Characteristics characteristics = (Characteristics) obj;
      for (org.dmg.pmml.pmml_4_2.descr.Characteristic characteristic : characteristics.getCharacteristics()) {
        String dataType = ScorecardPMMLUtils.getExtensionValue(characteristic.getExtensions(), ScorecardPMMLExtensionNames.CHARACTERTISTIC_DATATYPE);
        Extension predicateExtension = null;
        for (Attribute attribute : characteristic.getAttributes()) {
          String predicateAsString = "";
          String field = ScorecardPMMLUtils.getExtensionValue(attribute.getExtensions(), ScorecardPMMLExtensionNames.CHARACTERTISTIC_FIELD);
          for (Extension extension : attribute.getExtensions()) {
            if ("predicateResolver".equalsIgnoreCase(extension.getName())) {
              predicateAsString = extension.getValue();
              predicateExtension = extension;
              break;
            }
          }
          setPredicatesForAttribute(attribute, dataType, field, predicateAsString);
          attribute.getExtensions().remove(predicateExtension);
        }
      }
    }
  }
}
origin: org.drools/drools-scorecards

Extension dataTypeExtension = ScorecardPMMLUtils.getExtension(characteristic.getExtensions(), ScorecardPMMLExtensionNames.CHARACTERTISTIC_DATATYPE);
String dataType = dataTypeExtension.getValue();
String factType = ScorecardPMMLUtils.getExtensionValue(characteristic.getExtensions(), ScorecardPMMLExtensionNames.CHARACTERTISTIC_FACTTYPE);
characteristic.getExtensions().remove(dataTypeExtension);
ctr++;
origin: org.drools/drools-scorecards

String characteristicName = ScorecardPMMLUtils.extractFieldNameFromCharacteristic(characteristic);
if (fieldName.equalsIgnoreCase(characteristicName)){
  Extension extension = ScorecardPMMLUtils.getExtension(characteristic.getExtensions(), PMMLExtensionNames.EXTERNAL_CLASS );
  if ( extension != null ) {
    characteristic.getExtensions().remove(extension);
    if ( ScorecardPMMLUtils.getExtension(miningField.getExtensions(), PMMLExtensionNames.EXTERNAL_CLASS ) == null ) {
      miningField.getExtensions().add(extension);
origin: org.drools/drools-scorecards

extension.setName( ScorecardPMMLExtensionNames.SCORECARD_CELL_REF);
addExpectation(currentRowCtr + 1, currentColCtr, "value", extension, null);
_characteristic.getExtensions().add(extension);
extension.setName( PMMLExtensionNames.EXTERNAL_CLASS );
addExpectation(currentRowCtr + 1, currentColCtr, "value", extension, null);
_characteristic.getExtensions().add(extension);
_characteristic.getExtensions().add(extension);
addExpectation(currentRowCtr + 1, currentColCtr, "value", extension, "Characteristic (Property) Data Type is missing.");
origin: org.drools/drools-workbench-models-guided-scorecard

extension.setName(PMMLExtensionNames.EXTERNAL_CLASS);
extension.setValue(characteristic.getFact());
_characteristic.getExtensions().add(extension);
    throw new IllegalArgumentException("Unknown datatype found: " + characteristic.getDataType() + "!");
_characteristic.getExtensions().add(extension);
org.dmg.pmml.pmml_4_2.descrCharacteristicgetExtensions

Javadoc

Gets the value of the extensions property.

This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is not a set method for the extensions property.

For example, to add a new item, do as follows:

 
getExtensions().add(newItem); 

Objects of the following type(s) are allowed in the list Extension

Popular methods of Characteristic

  • <init>
  • getAttributes
    Gets the value of the attributes property. This accessor method returns a reference to the live list
  • getName
    Gets the value of the name property.
  • getBaselineScore
    Gets the value of the baselineScore property.
  • getCompatability
  • getReasonCode
    Gets the value of the reasonCode property.
  • setBaselineScore
    Sets the value of the baselineScore property.
  • setName
    Sets the value of the name property.
  • setReasonCode
    Sets the value of the reasonCode property.

Popular in Java

  • Finding current android device location
  • scheduleAtFixedRate (ScheduledExecutorService)
  • getSystemService (Context)
  • compareTo (BigDecimal)
  • Pointer (com.sun.jna)
    An abstraction for a native pointer data type. A Pointer instance represents, on the Java side, a na
  • BigDecimal (java.math)
    An immutable arbitrary-precision signed decimal.A value is represented by an arbitrary-precision "un
  • ServerSocket (java.net)
    This class represents a server-side socket that waits for incoming client connections. A ServerSocke
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • Executor (java.util.concurrent)
    An object that executes submitted Runnable tasks. This interface provides a way of decoupling task s
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now