Batch Validate referenced DITA resources

Post here questions and problems related to oXygen frameworks/document types.
vishwavaranasi
Posts: 144
Joined: Fri Feb 28, 2020 4:02 pm

Batch Validate referenced DITA resources

Post 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
Thanks,
vishwa
adrian_sorop
Posts: 73
Joined: Wed Jun 22, 2016 2:48 pm

Re: Batch Validate referenced DITA resources

Post 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.
Adrian Sorop
<oXygen/> XML Editor
http://www.oxygenxml.com
vishwavaranasi
Posts: 144
Joined: Fri Feb 28, 2020 4:02 pm

Re: Batch Validate referenced DITA resources

Post 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.
Thanks,
vishwa
adrian_sorop
Posts: 73
Joined: Wed Jun 22, 2016 2:48 pm

Re: Batch Validate referenced DITA resources

Post 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.
Adrian Sorop
<oXygen/> XML Editor
http://www.oxygenxml.com
vishwavaranasi
Posts: 144
Joined: Fri Feb 28, 2020 4:02 pm

Re: Batch Validate referenced DITA resources

Post by vishwavaranasi »

Thanks , it's worked for me.
Thanks,
vishwa
Post Reply