public class TLcdWFSModelEncoder extends Object implements ILcdWFSModelEncoder
ILcdModelEncoder
with a content type
(MIME type).
The content type will be used for the HTTP response.
You can use null
to indicate 'unspecified content type', but it is recommended to specify a content type
since it allows clients to make smarter decisions.Constructor and Description |
---|
TLcdWFSModelEncoder(ILcdModelEncoder aDelegate,
String aContentType)
Constructs an instance of this class from a given
ILcdModelEncoder and content type. |
Modifier and Type | Method and Description |
---|---|
boolean |
canExport(ILcdModel aModel,
String aDestinationName)
Returns whether this encoder can export the specified model to the specified destination.
|
boolean |
canSave(ILcdModel aModel)
Returns whether this model encoder can save the specified model to the location it originally came from.
|
boolean |
equals(Object aObject) |
void |
export(ILcdModel aModel,
String aDestinationName)
Exports the specified model to the specified destination.
|
String |
getContentType()
Gets the content type (MIME type) of the encoded schema that will be used for the HTTP response to a WFS
GetFeature request.
|
String |
getDisplayName()
Returns a short, displayable name for the format this
ILcdModelEncoder encodes to. |
int |
hashCode() |
void |
save(ILcdModel aModel)
Saves the model to the location where it originally came from.
|
String |
toString() |
public TLcdWFSModelEncoder(ILcdModelEncoder aDelegate, String aContentType)
ILcdModelEncoder
and content type.
The content type may be null
to indicate 'unspecified content type', but it is recommended to specify a
content type.aDelegate
- a delegate model encoder, must not be null
aContentType
- a content type (MIME type), which may be null
to indicate 'unspecified content type'public String getContentType()
ILcdWFSModelEncoder
null
, the content type is undefined and no content type will be set on the
response.
It is recommended to always explicitly define a content type because browsers and clients often depend on it for
correct and well-defined behavior.
A typical content type is "text/xml; subtype=gml/3.1.1"
for GML 3.1.
getContentType
in interface ILcdWFSModelEncoder
null
public String getDisplayName()
ILcdModelEncoder
ILcdModelEncoder
encodes to.getDisplayName
in interface ILcdModelEncoder
ILcdModelEncoder
.public boolean canSave(ILcdModel aModel)
ILcdModelEncoder
canSave
in interface ILcdModelEncoder
aModel
- the model to be verified.true
if this encoder can save the model in the location where it originally came from,
false
otherwise.ILcdModelEncoder.save(com.luciad.model.ILcdModel)
public void save(ILcdModel aModel) throws IllegalArgumentException, IOException
ILcdModelEncoder
save
in interface ILcdModelEncoder
aModel
- the model to be saved.IllegalArgumentException
- if the model cannot be saved by this encoder (!canSave(aModel)
).IOException
- if an I/O error occurs during encoding.public boolean canExport(ILcdModel aModel, String aDestinationName)
ILcdModelEncoder
canExport
in interface ILcdModelEncoder
aModel
- the model to be verified.aDestinationName
- the location where the model should be exported to.true
if this encoder can export the specified model to the
specified location, false
otherwise.ILcdModelEncoder.export(com.luciad.model.ILcdModel, java.lang.String)
public void export(ILcdModel aModel, String aDestinationName) throws IllegalArgumentException, IOException
ILcdModelEncoder
export
in interface ILcdModelEncoder
aModel
- the model to be exported.aDestinationName
- the location where the model should be saved. Typically, this is a name for the output
file, but it can also point to a file containing the required properties to create a set
of data files.IllegalArgumentException
- if the model cannot be saved by this encoder (!canExport(aModel, aDestinationName)
).IOException
- if an I/O error occurs during encoding.