Package org.opengis.cite.kml22.level1
Class StyleTests
java.lang.Object
org.opengis.cite.kml22.BaseFixture
org.opengis.cite.kml22.level1.StyleTests
Contains test methods that apply to style definitions.
- See Also:
-
- "OGC 07-134r2: OGC KML 2.2 - Abstract Test Suite"
-
Field Summary
Fields inherited from class org.opengis.cite.kml22.BaseFixture
NS_MAP, testSubject -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) void(package private) voidcheckFragmentIdentifier(Node styleUrl, org.opengis.cite.validation.ValidationErrorHandler errHandler) An error is produced if a kml:styleUrl does not contain fragment identifier ("#").(package private) voidcheckStyleTarget(Node styleUrl, org.opengis.cite.validation.ValidationErrorHandler errHandler) An error is produced if a kml:styleUrl does not refer to a valid style element (which substitutes for kml:AbstractStyleSelectorGroup).(package private) voidcheckUriScheme(Node styleUrl, org.opengis.cite.validation.ValidationErrorHandler errHandler) An error is produced if an absolute kml:styleUrl is not of a supported URI scheme (http).void[Test] Verifies that if a kml:ItemIcon element (with parent kml:ListStyle) is not a descendant of kml:Update, then it has a kml:href child element (that specifies the location of the image used in the list view).void[Test] Verifies that if a style element (any element that may substitute for kml:AbstractStyleSelectorGroup) has a parent kml:Document it is a 'shared' style.void[Test] Verifies that if a kml:StyleMap/kml:Pair element is not a descendant of kml:Update, then it contains (a) a kml:key element, and (b) at least one of kml:styleURL element or any element that substitutes for kml:AbstractStyleSelectorGroup (kml:Style, kml:StyleMap).void[Test] Verifies that a kml:styleUrl element satisfies all of the following constraints: its value is a valid relative or absolute URL that refers to a shared style definition (any element that substitutes for kml:AbstractStyleSelectorGroup); if the reference is an absolute URI, the value conforms to the 'http' or 'file' URI schemes; it includes a fragment identifier conforming to the shorthand pointer syntax as defined in the W3C XPointer framework. A relative URL is resolved according to the reference resolution algorithm described in section 5 of RFC 3986.Methods inherited from class org.opengis.cite.kml22.BaseFixture
obtainTestSubject, setTestSubject, verifyElementNotEmpty
-
Constructor Details
-
StyleTests
public StyleTests()
-
-
Method Details
-
verifyStyleReference
public void verifyStyleReference()[Test] Verifies that a kml:styleUrl element satisfies all of the following constraints:- its value is a valid relative or absolute URL that refers to a shared style definition (any element that substitutes for kml:AbstractStyleSelectorGroup);
- if the reference is an absolute URI, the value conforms to the 'http' or 'file' URI schemes;
- it includes a fragment identifier conforming to the shorthand pointer syntax as defined in the W3C XPointer framework.
- See Also:
-
- "OGC 07-134r2, ATC 6: Style reference"
- RFC 3986: Reference Resolution
- XPointer Framework: Shorthand Pointer
-
verifyStyleMap
public void verifyStyleMap()[Test] Verifies that if a kml:StyleMap/kml:Pair element is not a descendant of kml:Update, then it contains (a) a kml:key element, and (b) at least one of kml:styleURL element or any element that substitutes for kml:AbstractStyleSelectorGroup (kml:Style, kml:StyleMap).- See Also:
-
- "OGC 07-134r2, ATC 36: Pair"
-
verifyItemIconURI
public void verifyItemIconURI()[Test] Verifies that if a kml:ItemIcon element (with parent kml:ListStyle) is not a descendant of kml:Update, then it has a kml:href child element (that specifies the location of the image used in the list view).- See Also:
-
- "OGC 07-134r2, ATC 37: ItemIcon"
-
checkFragmentIdentifier
void checkFragmentIdentifier(Node styleUrl, org.opengis.cite.validation.ValidationErrorHandler errHandler) An error is produced if a kml:styleUrl does not contain fragment identifier ("#").- Parameters:
styleUrl- A kml:styleUrl element.errHandler- The error handler that receives any errors that were detected.
-
checkUriScheme
An error is produced if an absolute kml:styleUrl is not of a supported URI scheme (http).- Parameters:
styleUrl- A kml:styleUrl element.errHandler- The error handler that receives any errors that were detected.
-
checkStyleTarget
An error is produced if a kml:styleUrl does not refer to a valid style element (which substitutes for kml:AbstractStyleSelectorGroup).- Parameters:
styleUrl- A kml:styleUrl element.errHandler- The error handler that receives any errors that were detected.
-
addError
void addError(Node node, String msgKey, org.opengis.cite.validation.ValidationErrorHandler errHandler) - Parameters:
node- nodemsgKey- msgKeyerrHandler- errHandler
-