public class Options extends Object
Those options are designed to be used in conjunction with the ReqIF model reader and writer, as illustrated in the snippet below:
Map<String, Object> options = new HashMap<String, Object>(); options.put(Options.OPTION_VALIDATE, true); options.put(Options.OPTION_GENERATE_IDENTIFIERS, true); myModel.write("ReqIF 1.1", myFilepath, options).
Options might also be set as a Java System property. For example, for an option named "xyz"
, setting a value as a Java Virtual Machine
argument is done this way:
-Dxyz=myValue
Modifier and Type | Field and Description |
---|---|
static String |
OPTION_ATTACHMENT_RESOLVER
An instance of the interface
AttachmentResolver that determines the physical location of OLE object files
to be written in the ReqIF file. |
static String |
OPTION_GENERATE_DATES
Requests to set the current date in the
Identifiable.lastChange field
of elements missing this information in the XML document. |
static String |
OPTION_GENERATE_DATES_USING_CREATION_TIME
Requests to set the
ReqIFHeader.creationTime value in the Identifiable.lastChange field
of elements missing this information in the XML document. |
static String |
OPTION_GENERATE_IDENTIFIERS
Requests to generate identifiers for
Identifiable elements
whose id information is missing in the XML document. |
static String |
OPTION_IGNORE_TOOL_EXTENSIONS
Requests to discard any Tool Extension in the XML document.
|
static String |
OPTION_SCHEMA_LOCATION_REQ_IF
Requests to use a custom schema location for the ReqIF XML schema.
|
static String |
OPTION_SCHEMA_LOCATION_XHTML
Requests to use a custom schema location for the ReqIF XHTML schema.
|
static String |
OPTION_SCHEMA_LOCATION_XHTML_REQUIRED
Requests to force the writing of the ReqIF XHTML schema location,
even if the XML document does not use XHTML values.
|
static String |
OPTION_SOURCE_TOOL_VERSION
References the source authoring tool (instance of
SourceToolVersion )
that was used to generate the ReqIF data. |
static String |
OPTION_TIDY_XHTML
Requests to tidy XHTML values read and written in the XML document.
|
static String |
OPTION_VALIDATE
Requests to validate the XML document using the corresponding RIF/ReqIF schema.
|
public static final String OPTION_VALIDATE
false
.public static final String OPTION_IGNORE_TOOL_EXTENSIONS
false
.public static final String OPTION_TIDY_XHTML
<b>
tags are converted to <strong>
, as defined by the XHTML standard.
Default value is false
.public static final String OPTION_ATTACHMENT_RESOLVER
AttachmentResolver
that determines the physical location of OLE object files
to be written in the ReqIF file.
The API XHTMLUtils.createAttachmentResolver(File)
method
provides a default implementation.public static final String OPTION_GENERATE_IDENTIFIERS
Identifiable
elements
whose id information is missing in the XML document.
Default value is false
.public static final String OPTION_GENERATE_DATES
Identifiable.lastChange
field
of elements missing this information in the XML document.
Default value is false
.public static final String OPTION_GENERATE_DATES_USING_CREATION_TIME
ReqIFHeader.creationTime
value in the Identifiable.lastChange
field
of elements missing this information in the XML document.public static final String OPTION_SCHEMA_LOCATION_REQ_IF
public static final String OPTION_SCHEMA_LOCATION_XHTML
public static final String OPTION_SCHEMA_LOCATION_XHTML_REQUIRED
false
, meaning the XHTML schema location is written in the XML document
only if at least one XHTML value is used in the ReqIF data.public static final String OPTION_SOURCE_TOOL_VERSION
SourceToolVersion
)
that was used to generate the ReqIF data.
Setting this information can help the ReqIF reader to accommodate to specificities of a tool.