Class LexicalConventionTests
java.lang.Object
org.opengis.cite.iso19136.general.SchemaModelFixture
org.opengis.cite.iso19136.recommendations.LexicalConventionTests
Includes tests for compliance with various lexical conventions that are "strongly
recommended" in the specification. These recommendations primarily deal with the names
of schema components.
Sources
- ISO 19136:2007, cl. A.1.1.5: Support for the GML model and syntax
- ISO 19136:2007, 7.1.2: Lexical conventions
-
Field Summary
Fields inherited from class org.opengis.cite.iso19136.general.SchemaModelFixture
gmlObjects, model, schemaInfo
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription(package private) boolean
isLowerCamelCase
(String localName) Checks if a String value is in lowerCamelCase form.(package private) boolean
isUpperCamelCase
(String localName) Checks if a String value is in UpperCamelCase form.void
[Test
] The [local name] of an abstract GML object should start with "Abstract".void
[Test
] The [local name] of a complex type definition should 1) be in UpperCamelCase form, and 2) end with "Type".void
[Test
] The [local name] of a GML object should be in UpperCamelCase form.void
[Test
] The [local name] of a GML object property should be in lowerCamelCase form.Methods inherited from class org.opengis.cite.iso19136.general.SchemaModelFixture
initSchemaModelFixture, setSchemaModel
-
Constructor Details
-
LexicalConventionTests
public LexicalConventionTests()
-
-
Method Details
-
verifyObjectNameIsUpperCamelCase
public void verifyObjectNameIsUpperCamelCase()[Test
] The [local name] of a GML object should be in UpperCamelCase form.- See Also:
-
- "ISO 19136:2007, 7.1.2: Lexical conventions"
-
verifyObjectPropertyNameIsLowerCamelCase
public void verifyObjectPropertyNameIsLowerCamelCase()[Test
] The [local name] of a GML object property should be in lowerCamelCase form. Furthermore, the name of an abstract element should start with "abstract".- See Also:
-
- "ISO 19136:2007, 7.1.2: Lexical conventions"
-
verifyAbstractObjectName
public void verifyAbstractObjectName()[Test
] The [local name] of an abstract GML object should start with "Abstract".- See Also:
-
- "ISO 19136:2007, 7.1.2: Lexical conventions"
-
verifyComplexTypeName
public void verifyComplexTypeName()[Test
] The [local name] of a complex type definition should 1) be in UpperCamelCase form, and 2) end with "Type". Furthermore, the name of an abstract complex type definition should start with "Abstract".- See Also:
-
- "ISO 19136:2007, 7.1.2: Lexical conventions"
-
isUpperCamelCase
Checks if a String value is in UpperCamelCase form. The following rules apply:- The first character is upper case.
- At least one of the remaining characters is not upper case.
- Parameters:
localName
- The [local name] of the schema component to check.- Returns:
- 'true' if the given string is in UpperCamelCase form; 'false' otherwise.
-
isLowerCamelCase
Checks if a String value is in lowerCamelCase form. That is, the first character is lower case. Since the name may consist of only a single word, all lower case characters are acceptable.- Parameters:
localName
- The [local name] of the schema component to check.- Returns:
- 'true' if the given string is in lowerCamelCase form; 'false' otherwise.
-