Creates a resetform.
@param names	the objects to reset
@param flags	submit properties
@return A PdfAction
164262
public static PdfAction createResetForm(Object names[], int flags) {
        PdfAction action = new PdfAction();
        action.put(PdfName.S, PdfName.RESETFORM);
        if (names != null)
            action.put(PdfName.FIELDS, buildArray(names));
        action.put(PdfName.FLAGS, new PdfNumber(flags));
        return action;
    }
1055949
@GwtIncompatible("Unnecessary")
  private void outputNameMaps() throws IOException {

    String propertyMapOutputPath = null;
    String variableMapOutputPath = null;

    // Check the create_name_map_files FLAG.
    if (config.createNameMapFiles) {
      String basePath = getMapPath(config.jsOutputFile);

      propertyMapOutputPath = basePath + "_props_map.out";
      variableMapOutputPath = basePath + "_vars_map.out";
    }

    // Check the individual FLAGS.
    if (!config.variableMapOutputFile.isEmpty()) {
      if (variableMapOutputPath != null) {
        throw new FlagUsageException("The flags variable_map_output_file and "
            + "create_name_map_files cannot both be used simultaneously.");
      }

      variableMapOutputPath = config.variableMapOutputFile;
    }

    if (!config.propertyMapOutputFile.isEmpty()) {
      if (propertyMapOutputPath != null) {
        throw new FlagUsageException("The flags property_map_output_file and "
            + "create_name_map_files cannot both be used simultaneously.");
      }

      propertyMapOutputPath = config.propertyMapOutputFile;
    }

    // Output the maps.
    if (variableMapOutputPath != null && compiler.getVariableMap() != null) {
      compiler.getVariableMap().save(variableMapOutputPath);
    }

    if (propertyMapOutputPath != null && compiler.getPropertyMap() != null) {
      compiler.getPropertyMap().save(propertyMapOutputPath);
    }
  }
867765
private static void formatNames(Iterable<List<String>> names) {
    if (names != null) {
      for (List<String> list : names) {
        String name = list.get(0);
        String[] components = new String[5];
        int start = 0;
        int end;
        int componentIndex = 0;
        while (componentIndex < components.length - 1 && (end = name.indexOf(';', start)) >= 0) {
          components[componentIndex] = name.substring(start, end);
          componentIndex++;
          start = end + 1;
        }
        components[componentIndex] = name.substring(start);
        StringBuilder newName = new StringBuilder(100);
        maybeAppendComponent(components, 3, newName);
        maybeAppendComponent(components, 1, newName);
        maybeAppendComponent(components, 2, newName);
        maybeAppendComponent(components, 0, newName);
        maybeAppendComponent(components, 4, newName);
        list.set(0, newName.toString().trim());
      }
    }
  }
164458
public boolean isAttrFlagSet(String name, int flags)
    {
        return (null != m_attrs)
            ? ((m_attrs.getIgnoreCase(name) & flags) != 0)
            : false;
    }
656985
public void resetDestination(String destName)
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(tc, "resetDestination", destName);

        try
        {
            DestinationHandler dh = destinationIndex.findByName(
                                                                destName,
                                                                messageProcessor.getMessagingEngineBus(),
                                                                null);

            checkDestinationHandlerExists(
                                          dh != null,
                                          destName,
                                          messageProcessor.getMessagingEngineBus());

            // Only applicable to BaseDestinationHandlers
            if (dh instanceof BaseDestinationHandler)
            {
                BaseDestinationHandler bdh = (BaseDestinationHandler) dh;

                // Need to ensure that this change is persisted - specifically that the
                // BDH "toBeIgnored" flag is persisted
                LocalTransaction siTran = txManager.createLocalTransaction(true);

                // Drive the object's reset method
                bdh.reset();

                // Change our entry in the appropriate index.
                destinationIndex.reset(dh);

                // Persist the change
                bdh.requestUpdate((Transaction) siTran);

                // commit the transaction
                siTran.commit();

                if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                    SibTr.debug(tc, "Have reset destination " + bdh.getName());
            }
            else
            {
                if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                    SibTr.debug(tc, "Not a BDH, cannot reset destination " + dh.getName());
            }
        } catch (MessageStoreException e)
        {
            // No FFDC code needed

            SibTr.exception(tc, e);

            //throw e;
        } catch (SIException e)
        {
            // No FFDC code needed

            SibTr.exception(tc, e);

            //handleRollback(siTran);
            //        throw e;
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(tc, "resetDestination");
    }
222281
void setExistingNames(String... names) {
		this.existingNames = names;
		for (int i = 0; i < this.existingNames.length; ++i) {
			this.existingNames[i] = Strings.nullToEmpty(this.existingNames[i]);
		}
	}
666156
public static File file(String... names) {
		if (ArrayUtil.isEmpty(names)) {
			return null;
		}

		File file = null;
		for (String name : names) {
			if (file == null) {
				file = file(name);
			} else {
				file = file(file, name);
			}
		}
		return file;
	}
239908
function reformatFormIdAndName(submission) {
  var formName = "Unknown";
  if (submission && submission.formId && submission.formId.name) {
    formName = submission.formId.name;
  }

  if (submission && submission.formSubmittedAgainst) {
    formName = submission.formSubmittedAgainst.name;
  }

  submission.formName = formName;
  submission.formId = submission.formId.toString();
  return submission;
}
146045
public static String toDashedForm(String name, int start) {
		StringBuilder result = new StringBuilder();
		String replaced = name.replace('_', '-');
		for (int i = start; i < replaced.length(); i++) {
			char ch = replaced.charAt(i);
			if (Character.isUpperCase(ch) && result.length() > 0
					&& result.charAt(result.length() - 1) != '-') {
				result.append('-');
			}
			result.append(Character.toLowerCase(ch));
		}
		return result.toString();
	}
1362723
public static String name(String name, String... names) {
        final StringBuilder builder = new StringBuilder();
        append(builder, name);
        if (names != null) {
            for (String s : names) {
                append(builder, s);
            }
        }
        return builder.toString();
    }
876220
public function getActionToBePerformed($names = [], Event $contextEvent = null)
    {
        $result = null;
        if (empty($names)) {
            $actionsToCheck = $this->getRequiredActions();
        } else {
            $actionsToCheck = [];
            foreach ($names as $name) {
                $actionsToCheck[] = $this->getRequiredAction($name);
            }
        }
        /** @var  RequiredActionInterface $requiredAction */
        foreach ($actionsToCheck as $requiredAction) {
            if ($requiredAction->mustBeExecuted($contextEvent)) {
                $result = $requiredAction;
                break;
            }
        }
        return $result;
    }
1075767
int writeFlagAttrs(long flags) {
        int acount = 0;
        if ((flags & DEPRECATED) != 0) {
            int alenIdx = writeAttr(names.Deprecated);
            endAttr(alenIdx);
            acount++;
        }
        if ((flags & ENUM) != 0 && !target.useEnumFlag()) {
            int alenIdx = writeAttr(names.Enum);
            endAttr(alenIdx);
            acount++;
        }
        if ((flags & SYNTHETIC) != 0 && !target.useSyntheticFlag()) {
            int alenIdx = writeAttr(names.Synthetic);
            endAttr(alenIdx);
            acount++;
        }
        if ((flags & BRIDGE) != 0 && !target.useBridgeFlag()) {
            int alenIdx = writeAttr(names.Bridge);
            endAttr(alenIdx);
            acount++;
        }
        if ((flags & VARARGS) != 0 && !target.useVarargsFlag()) {
            int alenIdx = writeAttr(names.Varargs);
            endAttr(alenIdx);
            acount++;
        }
        if ((flags & ANNOTATION) != 0 && !target.useAnnotationFlag()) {
            int alenIdx = writeAttr(names.Annotation);
            endAttr(alenIdx);
            acount++;
        }
        return acount;
    }
326680
@Action(
            semantics = SemanticsOf.IDEMPOTENT,
            command = CommandReification.ENABLED,
            commandPersistence = CommandPersistence.NOT_PERSISTED
    )
    @ActionLayout(
            describedAs = "Change name directly (commandPersistence = NOT_PERSISTED, so none should be created)"
    )
    public SomeCommandAnnotatedObject changeNameCommandNotPersisted(
            @ParameterLayout(named = "New name")
            final String newName) {
        setName(newName);
        return this;
    }
623639
@Override
    public PmdRuleSet create() {
        final SAXBuilder parser = new SAXBuilder();
        final Document dom;
        try {
            dom = parser.build(source);
        } catch (JDOMException | IOException e) {
            if (messages != null) {
                messages.addErrorText(INVALID_INPUT + " : " + e.getMessage());
            }
            LOG.error(INVALID_INPUT, e);
            return new PmdRuleSet();
        }

        final Element eltResultset = dom.getRootElement();
        final Namespace namespace = eltResultset.getNamespace();
        final PmdRuleSet result = new PmdRuleSet();

        final String name = eltResultset.getAttributeValue("name");
        final Element descriptionElement = getChild(eltResultset, namespace);

        result.setName(name);

        if (descriptionElement != null) {
            result.setDescription(descriptionElement.getValue());
        }

        for (Element eltRule : getChildren(eltResultset, "rule", namespace)) {
            PmdRule pmdRule = new PmdRule(eltRule.getAttributeValue("ref"));
            pmdRule.setClazz(eltRule.getAttributeValue("class"));
            pmdRule.setName(eltRule.getAttributeValue("name"));
            pmdRule.setMessage(eltRule.getAttributeValue("message"));
            parsePmdPriority(eltRule, pmdRule, namespace);
            parsePmdProperties(eltRule, pmdRule, namespace);
            result.addRule(pmdRule);
        }
        return result;
    }
817111
public static PdfAction gotoLocalPage(String dest, boolean isName) {
        PdfAction action = new PdfAction();
        action.put(PdfName.S, PdfName.GOTO);
        if (isName)
            action.put(PdfName.D, new PdfName(dest));
        else
            action.put(PdfName.D, new PdfString(dest, null));
        return action;
    }
853601
public FormAction setValuesInForm(Form form) {
		FormAction formAction = new FormAction();
		form.setFormAction(formAction);
		this.forms.add(form);
		return formAction;
	}
539145
private void cmdCreateMappingActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_cmdCreateMappingActionPerformed
		// Stop any editing action and save whatever in the text field
		if (!pnlPropertyEditorList.isEmpty() && pnlPropertyEditorList.isEditing()) {
			pnlPropertyEditorList.stopCellEditing();
		}
		try {
			// Prepare the mapping source
			String source = txtQueryEditor.getText();

			if (source.isEmpty()) {
				JOptionPane.showMessageDialog(this, "ERROR: The SQL source cannot be empty", "Error", JOptionPane.ERROR_MESSAGE);
				return;
			}
			String subjectTargetString = predicateSubjectMap.getTargetMapping();
			if(subjectTargetString.equals(":")){
				JOptionPane.showMessageDialog(this, "ERROR: Focus on URI cannot be empty", "Error", JOptionPane.ERROR_MESSAGE);
				return;
			}
			// Prepare the mapping target
			List<MapItem> predicateObjectMapsList = pnlPropertyEditorList.getPredicateObjectMapsList();
			ImmutableList<TargetAtom> target = prepareTargetQuery(predicateSubjectMap, predicateObjectMapsList);

			if (target.isEmpty()) {
				JOptionPane.showMessageDialog(this, "ERROR: The target cannot be empty. Add a class or a property", "Error", JOptionPane.ERROR_MESSAGE);
				return;
			}
			// Create the mapping axiom
			SQLPPTriplesMap mappingAxiom = new OntopNativeSQLPPTriplesMap(MAPPING_FACTORY.getSQLQuery(source), target);
			obdaModel.addTriplesMap(mappingAxiom, false);

			// Clear the form afterwards
			clearForm();
		} catch (DuplicateMappingException e) {
			DialogUtils.showQuickErrorDialog(null, e, "Duplicate mapping identification.");
			return;
		} catch (NullPointerException e) {
			DialogUtils.showQuickErrorDialog(null, new Exception("Data source has not been defined."));
			return;
		} catch (RuntimeException e) {
			DialogUtils.showQuickErrorDialog(null, e, "Empty property mapping.");
			return;
		}
	}