public class LinkValidator extends Object
<xsd:complexType name="LinkType" final="#all">
<xsd:complexContent>
<xsd:extension base="kml:BasicLinkType">
<xsd:all>
<xsd:element ref="kml:abstractRefreshMode" minOccurs="0"/>
<xsd:element ref="kml:refreshInterval" minOccurs="0"/>
<xsd:element ref="kml:abstractViewRefreshMode" minOccurs="0"/>
<xsd:element ref="kml:viewRefreshTime" minOccurs="0"/>
<xsd:element ref="kml:viewBoundScale" minOccurs="0"/>
<xsd:element ref="kml:viewFormat" minOccurs="0"/>
<xsd:element ref="kml:httpQuery" minOccurs="0"/>
<xsd:element ref="kml:LinkSimpleExtensionGroup" minOccurs="0"
maxOccurs="unbounded"/>
<xsd:element ref="kml:LinkObjectExtensionGroup" minOccurs="0"
maxOccurs="unbounded"/>
</xsd:all>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
| Constructor and Description |
|---|
LinkValidator(int level,
javax.ws.rs.core.MediaType... mediaTypes)
Constructs a LinkValidator to check the constraints that apply to the
specified conformance level.
|
LinkValidator(javax.ws.rs.core.MediaType... mediaTypes)
Constructs a LinkValidator to check all mandatory constraints.
|
| Modifier and Type | Method and Description |
|---|---|
(package private) void |
checkLinkConstraintsAtLevel2(Element link)
Checks that all link constraints defined for CL2 are satisfied.
|
(package private) void |
checkLinkProperties(Element link)
Checks various properties that affect link processing.
|
(package private) void |
checkLinkReferent(Element link)
Checks that the link URI (href value) refers to an accessible resource
whose content type is compatible with an acceptable media type.
|
String |
getErrorMessages()
Returns all error messages reported during the last call to
isValid. |
Iterator<org.opengis.cite.validation.ValidationError> |
getErrors()
Returns the errors reported during the last call to
isValid. |
boolean |
isValid(Node node)
Validates a link element by checking that:
the URI it contains is accessible (using a HEAD request for 'http'
URIs)
the media type of the referenced resource is acceptable
the values of various properties that affect link processing do not
violate any constraints
|
void |
reset()
Resets the error handler.
|
public LinkValidator(javax.ws.rs.core.MediaType... mediaTypes)
mediaTypes - A collection of acceptable media types; if null or empty any
type is acceptable.public LinkValidator(int level,
javax.ws.rs.core.MediaType... mediaTypes)
level - The applicable conformance level.mediaTypes - A collection of acceptable media types; if null or empty any
type is acceptable.public String getErrorMessages()
isValid.public Iterator<org.opengis.cite.validation.ValidationError> getErrors()
isValid.public void reset()
public boolean isValid(Node node)
node - A kml:Link or kml:Icon element.void checkLinkReferent(Element link)
If the URI contains tile parameters (for a large image), the single tile at level 0 will be requested. That is, all tile parameters are replaced with 0.
link - An Element representing a link (of type kml:LinkType).void checkLinkProperties(Element link)
link - An Element representing a link (of type kml:LinkType).void checkLinkConstraintsAtLevel2(Element link)
link - An Element representing a link (of type kml:LinkType).Copyright © 2016 Open Geospatial Consortium. All rights reserved.