@LcdService(service=ILcdModelEncoder.class, priority=20000) public class TLcdNVG15ModelEncoder extends ALcdXMLModelEncoder
TLcdNVG15Model
.
This encoder only supports NVG 1.5 models.
File | Description |
---|---|
*.xml, *.nvg | NVG XML file |
outputStreamFactory
of this encoder.TLcdNVGModelDecoder
.
These models are instances of TLcdNVG15Model
.
ILcdModelEncoder encoder = new TLcdNVG15ModelEncoder();
encoder.export(nvgModel, "file.nvg");
Constructor and Description |
---|
TLcdNVG15ModelEncoder()
Creates a new
TLcdNVG15ModelEncoder , ready to use. |
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.
|
void |
export(ILcdModel aModel,
String aDestinationName)
Exports the specified model to the specified destination.
|
String |
getDisplayName()
Returns a short, displayable name for the format this
ILcdModelEncoder encodes to. |
EntityResolver2 |
getEntityResolver()
Returns the
org.xml.sax.ext.EntityResolver2 that is used for creating input sources for
XSD schemas. |
ILcdOutputStreamFactory |
getOutputStreamFactory()
Returns the
ILcdOutputStreamFactory that is used for creating output streams. |
XMLOutputFactory |
getXMLOutputFactory()
Returns the
javax.xml.stream.XMLOutputFactory that is used by this encoder for creating
javax.xml.stream.XMLStreamWriter instances. |
void |
save(ILcdModel aModel)
Saves the model to the location where it originally came from.
|
void |
setEntityResolver(EntityResolver2 aEntityResolver)
Sets the
org.xml.sax.ext.EntityResolver2 to be used for creating input sources for XSD
schemas. |
void |
setOutputStreamFactory(ILcdOutputStreamFactory aOutputStreamFactory)
Sets the
ILcdOutputStreamFactory to be used for creating output streams. |
void |
setXMLOutputFactory(XMLOutputFactory aXMLOutputFactory)
Sets the
javax.xml.stream.XMLOutputFactory to be used by this encoder for creating
javax.xml.stream.XMLStreamWriter instances. |
export
public TLcdNVG15ModelEncoder()
TLcdNVG15ModelEncoder
, ready to use.public String getDisplayName()
ILcdModelEncoder
ILcdModelEncoder
encodes to.ILcdModelEncoder
.public boolean canSave(ILcdModel aModel)
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
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
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
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.public ILcdOutputStreamFactory getOutputStreamFactory()
ALcdXMLModelEncoder
ILcdOutputStreamFactory
that is used for creating output streams.getOutputStreamFactory
in interface ILcdOutputStreamFactoryCapable
getOutputStreamFactory
in class ALcdXMLModelEncoder
ILcdOutputStreamFactory
that is used for creating output streams.ALcdXMLModelEncoder.setOutputStreamFactory(com.luciad.io.ILcdOutputStreamFactory)
public void setOutputStreamFactory(ILcdOutputStreamFactory aOutputStreamFactory)
ALcdXMLModelEncoder
ILcdOutputStreamFactory
to be used for creating output streams. This
output stream factory is used for output streams for both the data files and the XSD schemas.setOutputStreamFactory
in interface ILcdOutputStreamFactoryCapable
setOutputStreamFactory
in class ALcdXMLModelEncoder
aOutputStreamFactory
- the output stream factory to be used by this model encoder.ALcdXMLModelEncoder.setOutputStreamFactory(com.luciad.io.ILcdOutputStreamFactory)
public XMLOutputFactory getXMLOutputFactory()
ALcdXMLModelEncoder
javax.xml.stream.XMLOutputFactory
that is used by this encoder for creating
javax.xml.stream.XMLStreamWriter
instances.getXMLOutputFactory
in class ALcdXMLModelEncoder
javax.xml.stream.XMLOutputFactory
that is used by this encoder for creating
javax.xml.stream.XMLStreamWriter
instances.public void setXMLOutputFactory(XMLOutputFactory aXMLOutputFactory)
ALcdXMLModelEncoder
javax.xml.stream.XMLOutputFactory
to be used by this encoder for creating
javax.xml.stream.XMLStreamWriter
instances.setXMLOutputFactory
in class ALcdXMLModelEncoder
aXMLOutputFactory
- the javax.xml.stream.XMLOutputFactory
to be used by this encoder
for creating javax.xml.stream.XMLStreamWriter
instances.public EntityResolver2 getEntityResolver()
ALcdXMLModelEncoder
org.xml.sax.ext.EntityResolver2
that is used for creating input sources for
XSD schemas.getEntityResolver
in class ALcdXMLModelEncoder
public void setEntityResolver(EntityResolver2 aEntityResolver)
ALcdXMLModelEncoder
org.xml.sax.ext.EntityResolver2
to be used for creating input sources for XSD
schemas. This entity resolver is only used for retrieving runtime extension schemas.setEntityResolver
in class ALcdXMLModelEncoder
aEntityResolver
- the entity resolver to be used for creating input sources for XSD
schemas.