Package com.luciad.format.xml.bind.xlink
Class TLcdXLinkExpressionFactory
java.lang.Object
com.luciad.format.xml.bind.xlink.TLcdXLinkExpressionFactory
- All Implemented Interfaces:
ILcdXLinkExpressionFactory
Implementation of ILcdXLinkExpressionFactory
that is able to resolve
references based on XML ID (i.e. hrefs like '#id') and xpointer expressions. In both cases,
the linked elements have to be inside the document that is being decoded.
This class requires access to the TLcdXMLSchemaBasedMapping
of the decoder. It expects the mapping to be available in the given ILcdXMLDocumentContext
with key SCHEMA_BASED_MAPPING
.
- Since:
- 10.0
-
Field Summary
Modifier and TypeFieldDescriptionstatic final Object
Key by which the mapping context should be available as value in theILcdXMLDocumentContext
. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncompile
(TLcdXLinkSimpleLink aLink, ILcdXMLDocumentContext aContext) Compiles a given href attribute into anILcdXLinkExpression
.
-
Field Details
-
SCHEMA_BASED_MAPPING
Key by which the mapping context should be available as value in theILcdXMLDocumentContext
.
-
-
Constructor Details
-
TLcdXLinkExpressionFactory
public TLcdXLinkExpressionFactory()Creates a new XLink expression factory.
-
-
Method Details
-
compile
Description copied from interface:ILcdXLinkExpressionFactory
Compiles a given href attribute into an
ILcdXLinkExpression
. This method is typically called during decoding when anxlink:href
attribute is encountered.If no expression can be created for the given href,
null
should be returned.- Specified by:
compile
in interfaceILcdXLinkExpressionFactory
- Parameters:
aLink
- the link for which an expression is to be createdaContext
- the document context in which the href is to be evaluated- Returns:
- an expression that can be evaluated to resolve the xlink
-