public class ISMVocabulary
extends Object
In DDMS | 2.0 | 3.0 | 3.1 | 4.0.1/4.1 | 5.0 |
Token values are read from the CVEnumISM.xml files accompanying the "XML Data Encoding Specification for Information
Security Marking Metadata". They can then be used to validate the contents of the attributes
in a SecurityAttributes
or NoticeAttributes
instance.
Some of these vocabularies include regular expression patterns.
Modifier and Type | Field and Description |
---|---|
static String |
CVE_ALL_CLASSIFICATIONS
Filename for the enumerations allowed in a classification attribute
|
static String |
CVE_ATOMIC_ENERGY_MARKINGS
Filename for the enumerations allowed in an atomicEnergyMarkings attribute
|
static String |
CVE_COMPLIES_WITH
Filename for the enumerations allowed in a compliesWith attribute
|
static String |
CVE_DECLASS_EXCEPTION
Filename for the enumerations allowed in a declassException attribute
|
static String |
CVE_DISPLAY_ONLY_TO
Filename for the enumerations allowed in a displayOnlyTo attribute
|
static String |
CVE_DISSEMINATION_CONTROLS
Filename for the enumerations allowed in a disseminationControls attribute
|
static String |
CVE_FGI_SOURCE_OPEN
Filename for the enumerations allowed in a FGIsourceOpen attribute
|
static String |
CVE_FGI_SOURCE_PROTECTED
Filename for the enumerations allowed in a FGIsourceProtected attribute
|
static String |
CVE_NON_IC_MARKINGS
Filename for the enumerations allowed in a nonICmarkings attribute
|
static String |
CVE_NON_US_CONTROLS
Filename for the enumerations allowed in a nonUSControls attribute
|
static String |
CVE_NOTICE_TYPE
Filename for the enumerations allowed in a noticeType attribute
|
static String |
CVE_OWNER_PRODUCERS
Filename for the enumerations allowed in an ownerProducer attribute
|
static String |
CVE_POC_TYPE
Filename for the enumerations allowed in a pocType attribute
|
static String |
CVE_RELEASABLE_TO
Filename for the enumerations allowed in a releasableTo attribute
|
static String |
CVE_SAR_IDENTIFIER
Filename for the enumerations allowed in a SARIdentifier attribute
|
static String |
CVE_SCI_CONTROLS
Filename for the enumerations allowed in a SCIcontrols attribute
|
static String |
CVE_TYPE_EXEMPTED_SOURCE
Filename for the enumerations allowed in a typeOfExemptedSource attribute
|
static String |
CVE_US_CLASSIFICATIONS
Filename for the enumerations allowed in a classification attribute (US only)
|
Modifier and Type | Method and Description |
---|---|
protected static boolean |
enumContains(DDMSVersion version,
String enumerationKey,
String value)
Checks if a value exists in the controlled vocabulary identified by the key.
|
protected static Set<String> |
getEnumerationPatterns(DDMSVersion version,
String enumerationKey)
Returns an unmodifiable set of controlled vocabulary regular expression patterns.
|
static Set<String> |
getEnumerationTokens(DDMSVersion version,
String enumerationKey)
Returns an unmodifiable set of controlled vocabulary tokens.
|
static String |
getInvalidMessage(String enumerationKey,
String value)
Generates a message for an invalid value.
|
static void |
requireValidNetwork(String network)
Validates the value of a network attribute from the IC-COMMON schema.
|
static boolean |
usingOldClassification(String classification)
Checks if one of the classifications that existed in DDMS 2.0 but was removed for DDMS 3.0 is being used.
|
static void |
validateEnumeration(DDMSVersion version,
String enumerationKey,
String value)
Helper method to validate a value from a controlled vocabulary.
|
public static final String CVE_DECLASS_EXCEPTION
public static final String CVE_ATOMIC_ENERGY_MARKINGS
public static final String CVE_ALL_CLASSIFICATIONS
public static final String CVE_US_CLASSIFICATIONS
public static final String CVE_COMPLIES_WITH
public static final String CVE_DISPLAY_ONLY_TO
public static final String CVE_DISSEMINATION_CONTROLS
public static final String CVE_FGI_SOURCE_OPEN
public static final String CVE_FGI_SOURCE_PROTECTED
public static final String CVE_NON_IC_MARKINGS
public static final String CVE_NON_US_CONTROLS
public static final String CVE_NOTICE_TYPE
public static final String CVE_OWNER_PRODUCERS
public static final String CVE_POC_TYPE
public static final String CVE_RELEASABLE_TO
public static final String CVE_SAR_IDENTIFIER
public static final String CVE_SCI_CONTROLS
public static final String CVE_TYPE_EXEMPTED_SOURCE
public static void validateEnumeration(DDMSVersion version, String enumerationKey, String value) throws InvalidDDMSException
version
- the DDMS Version which maps to the version of ISM you wish to useenumerationKey
- the key of the enumerationvalue
- the test valueInvalidDDMSException
- if the value is not and validation should result in errorspublic static Set<String> getEnumerationTokens(DDMSVersion version, String enumerationKey)
If you wish to use these tokens in that way, you must explicitly call
setDDMSVersion()
in advance, to ensure that the appropriate set of CVE files is used
to look up the tokens, OR you may use the configurable property, icism.cve.customEnumLocation
, to
force the use of a custom set of CVE files. If neither option is used, the default set of tokens returned will be
based on the current value of DDMSVersion.getCurrentVersion()
.
version
- the DDMS Version which maps to the version of ISM you wish to useenumerationKey
- the key of the enumerationIllegalArgumentException
- if the key does not match a controlled vocabularyprotected static boolean enumContains(DDMSVersion version, String enumerationKey, String value)
version
- the DDMS Version which maps to the version of ISM you wish to useenumerationKey
- the key of the enumerationvalue
- the test valueIllegalArgumentException
- on an invalid keyprotected static Set<String> getEnumerationPatterns(DDMSVersion version, String enumerationKey)
version
- the DDMS Version which maps to the version of ISM you wish to useenumerationKey
- the key of the enumerationpublic static boolean usingOldClassification(String classification)
classification
- the classification to testpublic static String getInvalidMessage(String enumerationKey, String value)
enumerationKey
- the key of the enumerationvalue
- the test value which was invalidpublic static void requireValidNetwork(String network) throws InvalidDDMSException
network
- the network token to testInvalidDDMSException
- if the network is not a valid tokenCopyright 2010 - 2019 by Brian Uri!
Generated on 09/15/2016 12:36 PM
https://ddmsence.urizone.net/