Page 1 of 1

Batch Validate referenced DITA resources

Posted: Fri Nov 13, 2020 10:29 am
by vishwavaranasi
Hello team , We want the option "Batch Validate referenced DITA resources" to checked automatically under the dialog box "DITA Map Completeness check"

we want to set this through the oxygen API something like pluginWorkspaceAccess.setGlobalObjectProperty(); or similar

would you please help us here?

Thanks,
vishwa

Re: Batch Validate referenced DITA resources

Posted: Fri Nov 13, 2020 1:12 pm
by adrian_sorop
Hi vishwa,

Using the

Code: Select all

pluginWorkspaceAccess.setGlobalObjectProperty(String, Object)
you can set the default value associated with the option key

Code: Select all

ro.sync.exml.options.OptionTags.CHECK_COMPLETENESS_OPTIONS
to value

Code: Select all

ro.sync.ecss.dita.mapeditor.actions.checkcompleteness.CheckCompletnessOptionsPO.CheckCompletnessOptionsPO(boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, SerializableList<String>, String)
Constructor's signature and javadoc:

Code: Select all

  /**
   * Constructor.
   * 
   * @param batchValidateDITAResources            <code>true</code> to batch validate DITA resources with their associated validation scenarios.
   * @param useDitavalFileSelected                <code>true</code> if useDitavalFile is selected.
   * @param fromCurrentConditionSetSelected       <code>true</code> if from the current condition set.
   * @param fromAllConditionSetsSelected          <code>true</code> if from all condition sets.
   * @param fromAssociatedScenarioRadioSelected   <code>true</code> if fromAssociatedScenarioRadio is selected.
   * @param checkNonDITAReferencesSelected        <code>true</code> to check if images and other referenced binary resources exist.
   * @param includeRemoteResourcesSelected        <code>true</code> if includeRemoteResources is selected.
   * @param checkForDuplicateTopicIDs             <code>true</code> if we should check for duplicate topic IDs.
   * @param onlyTopicInMap                        <code>true</code> to warn if referenced topic is not referenced in the map.
   * @param identifyProfilingConflicts            <code>true</code> to check the profiling conflicts.
   * @param reportProfilingConflictsWithPrefs 
   * @param checkTableLayoutCheckbox              <code>true</code> to report tables layout errors.
   * @param reportDuplicateTopics                 Report duplicate topics referenced in the entire DITA Map context. 
   * @param reportExternalReferences              <code>true</code> to report references to resources outside of DITA Map folder.
   * @param reportDuplicateKeyDefs                <code>true</code> to report duplicate key definitions.
   * @param reportNotUsedKeyDefs                  <code>true</code> to report not used key definitions.
   * @param reportUnusedElemsWithID               <code>true</code> to report unused elements that have an ID.
   * @param ditavalFilePaths                      The DITAVAL file list.
   * @param additionalSchematronChecksURL         The additional Schematron Checks URL.
   */
  public CheckCompletnessOptionsPO(
      boolean batchValidateDITAResources,
      boolean useDitavalFileSelected,
      boolean fromCurrentConditionSetSelected,
      boolean fromAllConditionSetsSelected,
      boolean fromAssociatedScenarioRadioSelected,
      boolean checkNonDITAReferencesSelected,
      boolean includeRemoteResourcesSelected, 
      boolean checkForDuplicateTopicIDs, 
      boolean onlyTopicInMap,
      boolean identifyProfilingConflicts,
      boolean reportProfilingConflictsWithPrefs,
      boolean checkTableLayoutCheckbox,
      boolean reportDuplicateTopics,
      boolean reportExternalReferences,
      boolean reportDuplicateKeyDefs,
      boolean reportNotUsedKeyDefs,
      boolean reportUnusedElemsWithID,
      SerializableList<String> ditavalFilePaths,
      String additionalSchematronChecksURL) {
      // 
      }
Best regards,
Adrian S.

Re: Batch Validate referenced DITA resources

Posted: Tue Nov 17, 2020 10:28 am
by vishwavaranasi
Thanks for the reply.

I have tried as below

1 SerializableList<String> ditavalFilePaths=null;
2 String additionalSchematronChecksURL=null;

3 CheckCompletnessOptionsPO settigs=ro.sync.ecss.dita.mapeditor.actions.checkcompleteness.CheckCompletnessOptionsPO
(true,false,false,false,false,false,false,false,false,false,false,
false,false,false,false,false,false,ditavalFilePaths, additionalSchematronChecksURL);
pluginWorkspaceAccess.setGlobalObjectProperty(ro.sync.exml.options.OptionTags.CHECK_COMPLETENESS_OPTIONS,settigs);

but line 3 giving me error checkcompleteness can not be resolved to a type.

Re: Batch Validate referenced DITA resources

Posted: Tue Nov 17, 2020 11:28 am
by adrian_sorop
Hi,

When you created the " CheckCompletnessOptionsPO" object, you forgot the keyword "new".

It should be
CheckCompletnessOptionsPO settigs = new CheckCompletnessOptionsPO(true, false,......all other params....);

Regards,
Adrian S.

Re: Batch Validate referenced DITA resources

Posted: Mon Jan 18, 2021 4:22 pm
by vishwavaranasi
Thanks , it's worked for me.