Class TLcdDGNModelDecoder
- All Implemented Interfaces:
ILcdDGNModelDecoder
,ILcdInputStreamFactoryCapable
,ILcdModelDecoder
Input files
File | Required | Entry point | Description |
---|---|---|---|
*.dgn | x | x | Design file (V7 or V8) containing vector data |
Model reference
The model reference is obtained from anILcdModelReferenceDecoder
. The default reference decoder set on this
model decoder is based on all model reference decoders annotated with the LcdService
annotation, and can handle
- EPSG references (
<filename>.epsg
): seeTLcdEPSGModelReferenceDecoder
for more info. - WKT references (
<filename>.prj
): seeTLcdWKTModelReferenceDecoder
for more info. - Luciad encoded model references (
<filename>.ref
): seeTLcdModelReferenceDecoder
for more info.
Supported file transfer protocols
- This model decoder supports currently only supports reading data from files.
Model structure
- This model decoder creates a model per DGN file.
- All models returned by this model decoder implement
ILcd2DBoundsIndexedModel
. - The models are expose any DGN tags through its data model. See further for more details.
Model descriptor
- All models returned by this model decoder have a
TLcdDGNModelDescriptor
. Among other information, the descriptor contains the DGN symbology. - The type name of the model descriptor is the display name of this decoder.
- The model descriptor returned by this model decoder is a
TLcdDataModelDescriptor
. Its data model exposes the DGN tags in a uniform way.
Model elements
- Decoded models contain elements that all implement
ILcdDGNShape
. - All elements are
ILcdDataObject
s. If the element has any tags associated with it, the data object is a "TagSet" with property "Tags" that is a list of "AbstractTag" entities.
DGN element type | DGN element name | Decoded object |
---|---|---|
1 | LIBRARY_CELL | |
2 | CELL |
|
3 | LINE |
|
4 | LINE_STRING |
|
5 | GROUP_DATA | |
6 | SHAPE |
|
7 | TEXT_NODE |
|
9 | DESIGN_SETTINGS | |
10 | LEVEL_SYMBOLOGY | |
11 | CURVE |
|
12 | COMPLEX_CHAIN |
|
14 | COMPLEX_SHAPE |
|
15 | ELLIPSE |
|
16 | ARC |
|
17 | TEXT |
|
18 | 3D_SURFACE |
|
19 | SOLID |
|
33 | DIMENSION (note) |
|
34 | SHARED_CELL_DEFINITION | |
35 | SHARED_CELL_INSTANCE |
|
36 | CELL_MULTI_LINE |
|
37 | TAG_DATA |
DGN element type | DGN element name |
---|---|
8 | DIGITIZER_SETUP |
13 | CONIC |
20 | SUBFIGURE |
21 | B_SPLINE_CURVE |
22 | POINT_STRING |
23 | CONE |
24 | B_SPLINE_SURFACE |
25 | B_SPLINE_BOUNDARY |
26 | B_SPLINE_KNOT |
27 | B_SPLINE_WEIGHT |
28 | B_SPLINE |
33 | DIMENSION |
66 | APPLICATION |
87 | RASTER_HEADER |
88 | RASTER_DATA |
Useful settings
- By default, all element levels are decoded. You can restrict the decoding to the levels you are interested in, using the following methods:
- If you have restricted the levels to be decoded, you can still specify additional levels based on their names, using the following methods:
- By default, all element classes are decoded. You can restrict the decoding to the classes you are interested in, using the following methods:
- By default, no MSLINK attributes are decoded. You can control the decoding of MSLINK attributes based on the database types you are interested in, using the following methods: In addition, you will need to specify the entity numbers you are interested in, as described in the following paragraph.
- By default, no database attributes (either MSLINK or DMRS) are decoded. You can control the decoding of database attributes based on the database entity numbers you are interested in, using the following methods:
- By default, no tag attributes are decoded. You can control the decoding of tag attributes based on the tag set names, using the following methods: All decoded element attributes can have a String containing a URL assigned to them, for the convenience of the application that uses the decoder:
- The implementation was highly modified in version 10.1. The pre-10.1 implementation
is still available and can be activated using system property
dgn.decoder.legacy=true
.
Sample code
ILcdModelDecoder decoder =
new TLcdDGNNativeModelDecoder(new TLcdEPSGModelReferenceDecoder(),
new TLcdGeodeticReference(new TLcdGeodeticDatum()));
ILcdModel model = decoder.decode("vectordata.dgn");
Performance tips
- By default, attributes are not decoded, potentially saving some memory and some processing time.
Thread safety
- The decoding of models is not thread-safe.
- The decoded models are thread-safe for read access.
Supported versions and specifications
- DGN V7
- DGN V8
Known limitations
- The current implementation does not support splines, 3D surfaces, and rasters.
- The current implementation will bypass the ILcdInputStreamFactory if the source is
a regular file that can be read locally. If the source cannot be read locally (e.g. it
is a URL) the source is copied to a local temp file before decoding, using the
ILcdInputStreamFactory.
Note that you can force the decoder to always use the input stream factory
using system property
dgn.decoder.alwaysuseinputstream=true
. - The current implementation does not support user-defined fonts.
- The symbology of the model elements corresponds to the first DGN view.
-
Constructor Summary
ConstructorDescriptionCreates a newTLcdDGNModelDecoder
.TLcdDGNModelDecoder
(ILcdModelReference aDefaultModelReference) Creates a newTLcdDGNModelDecoder
.TLcdDGNModelDecoder
(ILcdModelReferenceDecoder aModelReferenceDecoder) Creates a newTLcdDGNModelDecoder
.TLcdDGNModelDecoder
(ILcdModelReferenceDecoder aModelReferenceDecoder, ILcdModelReference aDefaultModelReference) Creates a newTLcdDGNModelDecoder
. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addAttributeEntity
(int aEntity) Adds an attribute entity number to the set of numbers that is decoded.void
addElementClass
(int aElementClass) Adds an element class to the list of element classes that is included into decoded models.void
addLevel
(int aLevel) Adds a level to the list of DGN levels that is included into all decoded models.void
addLevelName
(String aLevelName) Adds a name of a DGN level to the list of names of DGN levels that are to be included into all decoded models, in addition to the numeric level selection.void
Adds a tag set name to the set of names that is decoded.void
addUserAttributeType
(int aType) Adds a DGN MSLINK attribute type to the set of types that is decoded.void
addUserAttributeType
(String aType) Adds a DGN MSLINK attribute type to the set of types that is decoded.boolean
canDecodeSource
(String aSourceAsString) Checks whether this model decoder can decode the specified data source.void
Clears the set of DGN database attributes that is decoded.void
Clears the list of names of DGN levels that are to be included into all decoded models.void
Clears the list of DGN levels that is included into decoded models.void
Clears the set of DGN tag sets that is decoded.void
Clears the set of DGN MSLINK attributes that is decoded.void
clearUserDefinedFont
(int aFontIndex) Creates a new model from the given data source.int[]
Returns a short, displayable name for the format that is decoded by thisILcdModelDecoder
.int
Gets the the bitmask specifying list of element classes that is included into decoded models.Returns the input stream factory that is used.String[]
long
Deprecated.the returned value is limited to the first 64 levels.Deprecated.int[]
String[]
int[]
boolean
isLevelSelected
(int aLevel) boolean
void
Resets the set of DGN database attributes that is decoded.void
Resets the list of DGN element classes that is included into decoded models; As a result, all DGN element classes will be included in the models when decoding DGN files.void
Resets the list of DGN levels that is included into decoded models.void
Resets the set of DGN tag sets that is decoded.void
Resets the set of DGN MSLINK attributes that is decoded.void
setAttributeEntitySelection
(int[] aEntities) Sets the set of DGN database attributes that is decoded.void
setDatabaseURL
(String aDatabaseURL) Sets the default database URL that is assigned to all decoded attributes.void
setDefaultModelReference
(ILcdModelReference aDefaultModelReference) Sets the default model reference for decoded models, in case the model reference decoder doesn't provide one.void
setElementClassSelection
(int aElementClasses) Sets the list of element classes that is included into decoded models.void
setElementClassSelection
(int[] aElementClasses) Sets the list of element classes that is included into decoded models.void
setInputStreamFactory
(ILcdInputStreamFactory aInputStreamFactory) Sets the input stream factory to be used.void
setLevelNameSelection
(String[] aLevelNames) Sets the list of names of DGN levels that are to be included into all decoded models, in addition to the numeric level selection.void
setLevelSelection
(int[] aLevels) Sets the list of DGN levels that is included into all decoded models.void
setLevelSelection
(long aLevels) Deprecated.this method is limited to the first 64 levels.void
setModelReference
(ILcdModelReference aDefaultModelReference) Deprecated.void
setModelReferenceDecoder
(ILcdModelReferenceDecoder aModelReferenceDecoder) Sets the model reference decoder that will be used for creating model references for decoded models.void
setTagSetSelection
(String[] aTagSetNames) Sets the set of DGN tag attributes that is decoded.void
setUseFloat
(boolean aUseFloat) Specifies whether to use memory-conserving floating point data structures for the decoded models.void
setUserAttributeTypeSelection
(int[] aTypes) Sets the set of DGN MSLINK attributes that is decoded.void
setUserAttributeTypeSelection
(String[] aTypes) Sets the set of DGN MSLINK attributes that is decoded.void
setUserDefinedFont
(int aFontIndex, String aFontFileName) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.luciad.model.ILcdModelDecoder
canDecodeSource, decodeModelMetadata, decodeModelMetadata, decodeSource, discoverDataSources
-
Constructor Details
-
TLcdDGNModelDecoder
public TLcdDGNModelDecoder()Creates a newTLcdDGNModelDecoder
. -
TLcdDGNModelDecoder
Creates a newTLcdDGNModelDecoder
.- Parameters:
aModelReferenceDecoder
- the model reference decoder that can assign references to decoded models.
-
TLcdDGNModelDecoder
Creates a newTLcdDGNModelDecoder
.- Parameters:
aDefaultModelReference
- the model reference that decoded models will get if the model reference decoder can't decode one.
-
TLcdDGNModelDecoder
public TLcdDGNModelDecoder(ILcdModelReferenceDecoder aModelReferenceDecoder, ILcdModelReference aDefaultModelReference) Creates a newTLcdDGNModelDecoder
.- Parameters:
aModelReferenceDecoder
- the model reference decoder that can assign references to decoded models.aDefaultModelReference
- the model reference that decoded models will get if the model reference decoder can't decode one.
-
-
Method Details
-
clearUserDefinedFont
public void clearUserDefinedFont(int aFontIndex) -
setUserDefinedFont
- Throws:
IOException
-
setInputStreamFactory
Description copied from interface:ILcdInputStreamFactoryCapable
Sets the input stream factory to be used.- Specified by:
setInputStreamFactory
in interfaceILcdInputStreamFactoryCapable
- Parameters:
aInputStreamFactory
- the input stream factory to be used.
-
getInputStreamFactory
Description copied from interface:ILcdInputStreamFactoryCapable
Returns the input stream factory that is used.- Specified by:
getInputStreamFactory
in interfaceILcdInputStreamFactoryCapable
- Returns:
- the input stream factory that is used.
-
setModelReferenceDecoder
Description copied from interface:ILcdDGNModelDecoder
Sets the model reference decoder that will be used for creating model references for decoded models.- Specified by:
setModelReferenceDecoder
in interfaceILcdDGNModelDecoder
-
getModelReferenceDecoder
- Specified by:
getModelReferenceDecoder
in interfaceILcdDGNModelDecoder
-
setDefaultModelReference
Description copied from interface:ILcdDGNModelDecoder
Sets the default model reference for decoded models, in case the model reference decoder doesn't provide one.- Specified by:
setDefaultModelReference
in interfaceILcdDGNModelDecoder
-
getDefaultModelReference
- Specified by:
getDefaultModelReference
in interfaceILcdDGNModelDecoder
-
setModelReference
Deprecated. -
getModelReference
Deprecated. -
setDatabaseURL
Description copied from interface:ILcdDGNModelDecoder
Sets the default database URL that is assigned to all decoded attributes. The URL can then be used by the application.- Specified by:
setDatabaseURL
in interfaceILcdDGNModelDecoder
-
getDatabaseURL
- Specified by:
getDatabaseURL
in interfaceILcdDGNModelDecoder
-
setUseFloat
public void setUseFloat(boolean aUseFloat) Description copied from interface:ILcdDGNModelDecoder
Specifies whether to use memory-conserving floating point data structures for the decoded models.- Specified by:
setUseFloat
in interfaceILcdDGNModelDecoder
-
isUseFloat
public boolean isUseFloat()- Specified by:
isUseFloat
in interfaceILcdDGNModelDecoder
-
resetLevelSelection
public void resetLevelSelection()Description copied from interface:ILcdDGNModelDecoder
Resets the list of DGN levels that is included into decoded models. As a result, all DGN levels will be included in the models when decoding DGN files.- Specified by:
resetLevelSelection
in interfaceILcdDGNModelDecoder
-
clearLevelSelection
public void clearLevelSelection()Description copied from interface:ILcdDGNModelDecoder
Clears the list of DGN levels that is included into decoded models. As a result, only level 0 will be included in the models when decoding DGN files.- Specified by:
clearLevelSelection
in interfaceILcdDGNModelDecoder
- See Also:
-
setLevelSelection
public void setLevelSelection(long aLevels) Deprecated.this method is limited to the first 64 levels. Starting with DGN version 8, this is no longer sufficient. UsesetLevelSelection(long)
oraddLevel(int)
instead. -
getLevelSelection
public long getLevelSelection()Deprecated.the returned value is limited to the first 64 levels. Starting with DGN version 8, this is no longer sufficient. UseisLevelSelected(int)
orgetSelectedLevels()
instead. -
setLevelSelection
public void setLevelSelection(int[] aLevels) Description copied from interface:ILcdDGNModelDecoder
Sets the list of DGN levels that is included into all decoded models. Level 0 is always included, irrespective of the selection setting.- Specified by:
setLevelSelection
in interfaceILcdDGNModelDecoder
- Parameters:
aLevels
- the levels to be included in the decoded models. They can be listed in any order, and duplicate numbers are allowed.
-
addLevel
public void addLevel(int aLevel) Description copied from interface:ILcdDGNModelDecoder
Adds a level to the list of DGN levels that is included into all decoded models.- Specified by:
addLevel
in interfaceILcdDGNModelDecoder
- Parameters:
aLevel
- the level to be included in the decoded models.
-
clearLevelNameSelection
public void clearLevelNameSelection()Description copied from interface:ILcdDGNModelDecoder
Clears the list of names of DGN levels that are to be included into all decoded models. As a result, only levels specified in the numeric level selection will be included.- Specified by:
clearLevelNameSelection
in interfaceILcdDGNModelDecoder
- See Also:
-
setLevelNameSelection
Description copied from interface:ILcdDGNModelDecoder
Sets the list of names of DGN levels that are to be included into all decoded models, in addition to the numeric level selection.- Specified by:
setLevelNameSelection
in interfaceILcdDGNModelDecoder
- Parameters:
aLevelNames
- the names of levels to be included in the decoded models. They can be listed in any order, and duplicate names are allowed.
-
getLevelNameSelection
-
addLevelName
Description copied from interface:ILcdDGNModelDecoder
Adds a name of a DGN level to the list of names of DGN levels that are to be included into all decoded models, in addition to the numeric level selection.- Specified by:
addLevelName
in interfaceILcdDGNModelDecoder
- Parameters:
aLevelName
- the name of the level to be included in the decoded models.
-
resetElementClassSelection
public void resetElementClassSelection()Description copied from interface:ILcdDGNModelDecoder
Resets the list of DGN element classes that is included into decoded models; As a result, all DGN element classes will be included in the models when decoding DGN files.- Specified by:
resetElementClassSelection
in interfaceILcdDGNModelDecoder
-
setElementClassSelection
public void setElementClassSelection(int aElementClasses) Description copied from interface:ILcdDGNModelDecoder
Sets the list of element classes that is included into decoded models. This property allows to exclude certain classes from the decoded models, e.g. construction elements.- Specified by:
setElementClassSelection
in interfaceILcdDGNModelDecoder
- Parameters:
aElementClasses
- a bitmask, specifying the element classes to be included in the decoded models. It is a logical OR of 1-bits that are shifted left by the following constants:- TLcdDGNDisplayInfo.CLASS_PRIMARY
- TLcdDGNDisplayInfo.CLASS_PATTERN
- TLcdDGNDisplayInfo.CLASS_CONSTRUCTION
- TLcdDGNDisplayInfo.CLASS_DIMENSION
- TLcdDGNDisplayInfo.CLASS_PRIMARY_RULE
- TLcdDGNDisplayInfo.CLASS_LINEAR_PATTERN
- TLcdDGNDisplayInfo.CLASS_CONSTRUCTION_RULE
-
getElementClassSelection
public int getElementClassSelection()Description copied from interface:ILcdDGNModelDecoder
Gets the the bitmask specifying list of element classes that is included into decoded models.- Specified by:
getElementClassSelection
in interfaceILcdDGNModelDecoder
-
setElementClassSelection
public void setElementClassSelection(int[] aElementClasses) Description copied from interface:ILcdDGNModelDecoder
Sets the list of element classes that is included into decoded models. This property allows to exclude certain classes from the decoded models, e.g. construction elements.- Specified by:
setElementClassSelection
in interfaceILcdDGNModelDecoder
- Parameters:
aElementClasses
- the element classes to be included in the decoded models. They can be listed in any order, and duplicate entries are allowed.The available DGN element classes are
- TLcdDGNDisplayInfo.CLASS_PRIMARY
- TLcdDGNDisplayInfo.CLASS_PATTERN
- TLcdDGNDisplayInfo.CLASS_CONSTRUCTION
- TLcdDGNDisplayInfo.CLASS_DIMENSION
- TLcdDGNDisplayInfo.CLASS_PRIMARY_RULE
- TLcdDGNDisplayInfo.CLASS_LINEAR_PATTERN
- TLcdDGNDisplayInfo.CLASS_CONSTRUCTION_RULE
- See Also:
-
addElementClass
public void addElementClass(int aElementClass) Description copied from interface:ILcdDGNModelDecoder
Adds an element class to the list of element classes that is included into decoded models. This property allows to exclude certain classes from the decoded models, e.g. construction elements.- Specified by:
addElementClass
in interfaceILcdDGNModelDecoder
- Parameters:
aElementClass
- the element class to be included in the decoded models.The available DGN element classes are
- TLcdDGNDisplayInfo.CLASS_PRIMARY
- TLcdDGNDisplayInfo.CLASS_PATTERN
- TLcdDGNDisplayInfo.CLASS_CONSTRUCTION
- TLcdDGNDisplayInfo.CLASS_DIMENSION
- TLcdDGNDisplayInfo.CLASS_PRIMARY_RULE
- TLcdDGNDisplayInfo.CLASS_LINEAR_PATTERN
- TLcdDGNDisplayInfo.CLASS_CONSTRUCTION_RULE
-
resetUserAttributeTypeSelection
public void resetUserAttributeTypeSelection()Description copied from interface:ILcdDGNModelDecoder
Resets the set of DGN MSLINK attributes that is decoded. All MSLINK attributes will now be included in the models when decoding DGN files.- Specified by:
resetUserAttributeTypeSelection
in interfaceILcdDGNModelDecoder
- See Also:
-
clearUserAttributeTypeSelection
public void clearUserAttributeTypeSelection()Description copied from interface:ILcdDGNModelDecoder
Clears the set of DGN MSLINK attributes that is decoded. None of the MSLINK attributes will now be included in the models when decoding DGN files.- Specified by:
clearUserAttributeTypeSelection
in interfaceILcdDGNModelDecoder
- See Also:
-
setUserAttributeTypeSelection
Description copied from interface:ILcdDGNModelDecoder
Sets the set of DGN MSLINK attributes that is decoded. Only MSLINK attributes with the specified types will now be included in the models when decoding DGN files.Note that the attribute entities to be decoded have to be specified as well, using the
addAttributeEntity
method.- Specified by:
setUserAttributeTypeSelection
in interfaceILcdDGNModelDecoder
- Parameters:
aTypes
- a list of MSLINK attribute types, specified as numbers in RAD50 format (strings of length 3, e.g."ODB"
). Note that RAD50 is actually radix 40, with the following 40 digits: <space>A
...Z $ . 0
...9
-
setUserAttributeTypeSelection
public void setUserAttributeTypeSelection(int[] aTypes) Description copied from interface:ILcdDGNModelDecoder
Sets the set of DGN MSLINK attributes that is decoded. Only MSLINK attributes with the specified types will now be included in the models when decoding DGN files.- Specified by:
setUserAttributeTypeSelection
in interfaceILcdDGNModelDecoder
- Parameters:
aTypes
- a list of MSLINK attribute types, specified as integers (unsigned shorts, e.g. 0x5e62, which corresponds to 'ODB' in radix 50).- See Also:
-
getUserAttributeTypeSelection
public int[] getUserAttributeTypeSelection() -
addUserAttributeType
Description copied from interface:ILcdDGNModelDecoder
Adds a DGN MSLINK attribute type to the set of types that is decoded.- Specified by:
addUserAttributeType
in interfaceILcdDGNModelDecoder
- Parameters:
aType
- an MSLINK attribute type specified as a number in RAD50 format (a string of length 3, e.g."ODB"
). Note that RAD50 is actually radix 40, with the following 40 digits: <space>A
...Z $ . 0
...9
- See Also:
-
addUserAttributeType
public void addUserAttributeType(int aType) Description copied from interface:ILcdDGNModelDecoder
Adds a DGN MSLINK attribute type to the set of types that is decoded. Only MSLINK attributes that have types in this set are decoded.Note that the attribute entities to be decoded have to be specified as well, using the
addAttributeEntity
method.- Specified by:
addUserAttributeType
in interfaceILcdDGNModelDecoder
- Parameters:
aType
- an MSLINK attribute type specified as an integer (an unsigned short, e.g. 0x5e62, which corresponds to 'ODB' in radix 50).- See Also:
-
resetAttributeEntitySelection
public void resetAttributeEntitySelection()Description copied from interface:ILcdDGNModelDecoder
Resets the set of DGN database attributes that is decoded. All DGN database attributes will now be included in the models when decoding DGN files.- Specified by:
resetAttributeEntitySelection
in interfaceILcdDGNModelDecoder
- See Also:
-
clearAttributeEntitySelection
public void clearAttributeEntitySelection()Description copied from interface:ILcdDGNModelDecoder
Clears the set of DGN database attributes that is decoded. None of the DGN database attributes will now be included in the models when decoding DGN files.- Specified by:
clearAttributeEntitySelection
in interfaceILcdDGNModelDecoder
- See Also:
-
setAttributeEntitySelection
public void setAttributeEntitySelection(int[] aEntities) Description copied from interface:ILcdDGNModelDecoder
Sets the set of DGN database attributes that is decoded. Only DGN database attributes with the specified entity numbers will now be included in the models when decoding DGN files.- Specified by:
setAttributeEntitySelection
in interfaceILcdDGNModelDecoder
- Parameters:
aEntities
- a list of entity numbers of database attributes (user or non-user).
-
getAttributeEntitySelection
public int[] getAttributeEntitySelection() -
addAttributeEntity
public void addAttributeEntity(int aEntity) Description copied from interface:ILcdDGNModelDecoder
Adds an attribute entity number to the set of numbers that is decoded. Only attributes that have entity numbers in this set are decoded.Note that, for decoding user attributes, the user attribute types to be decoded have to be specified as well, using the
addUserAttributeType
method.Also note that the fill color, which is also stored as an element attribute, is an exception: it is always decoded as part of the display info.
- Specified by:
addAttributeEntity
in interfaceILcdDGNModelDecoder
- Parameters:
aEntity
- an entity number of an database attribute (user or non-user).
-
resetTagSetSelection
public void resetTagSetSelection()Description copied from interface:ILcdDGNModelDecoder
Resets the set of DGN tag sets that is decoded. All tag sets and their attributes will now be included in the models when decoding DGN files.- Specified by:
resetTagSetSelection
in interfaceILcdDGNModelDecoder
- See Also:
-
clearTagSetSelection
public void clearTagSetSelection()Description copied from interface:ILcdDGNModelDecoder
Clears the set of DGN tag sets that is decoded. None of the tag sets will now be included in the models when decoding DGN files.- Specified by:
clearTagSetSelection
in interfaceILcdDGNModelDecoder
- See Also:
-
setTagSetSelection
Description copied from interface:ILcdDGNModelDecoder
Sets the set of DGN tag attributes that is decoded. Only the specified tag sets and their attributes will now be included in the models when decoding DGN files.- Specified by:
setTagSetSelection
in interfaceILcdDGNModelDecoder
- Parameters:
aTagSetNames
- a list of tag set names.
-
getTagSetSelection
-
addTagSet
Description copied from interface:ILcdDGNModelDecoder
Adds a tag set name to the set of names that is decoded. Only the specified tag sets and their attributes will now be included in the models when decoding DGN files.- Specified by:
addTagSet
in interfaceILcdDGNModelDecoder
- Parameters:
aTagSetName
- a tag set name.
-
getDefaultExtension
-
getSelectedLevels
public int[] getSelectedLevels() -
isLevelSelected
public boolean isLevelSelected(int aLevel) -
getDisplayName
Description copied from interface:ILcdModelDecoder
Returns a short, displayable name for the format that is decoded by thisILcdModelDecoder
.- Specified by:
getDisplayName
in interfaceILcdModelDecoder
- Returns:
- "DGN".
-
canDecodeSource
Description copied from interface:ILcdModelDecoder
Checks whether this model decoder can decode the specified data source. It is acceptable for this method to returntrue
for a source name whiledecode
throws an exception for that same source name.For performance reasons, we strongly recommend that this will only be a simple test. For example: check the file extension of a file, but not that the file exists or contains expected content.
- Specified by:
canDecodeSource
in interfaceILcdModelDecoder
- Parameters:
aSourceAsString
- the data source to be verified; typically a file name or a URL.- Returns:
true
if the file extension is <defaultExtension> or <defaultExtension>.gz, <code>false</code> otherwise (<defaultExtension> is the String returned by getDefaultExtension).- See Also:
-
decode
Description copied from interface:ILcdModelDecoder
Creates a new model from the given data source.- Specified by:
decode
in interfaceILcdModelDecoder
- Parameters:
aSourceName
- the data source to be decoded; typically a file name or a URL.- Returns:
- A model containing the decoded data. While
null
is allowed, implementors are advised to throw an error instead. - Throws:
IOException
- for any exceptions caused by IO problems or invalid data. Since decoding invalid data almost always results in RunTimeExceptions (NullPointerException, IndexOutOfBoundsException, IllegalArgumentException, ...) on unexpected places, implementations are advised to catch RuntimeExceptions in their decode() method, and wrap them into an IOException, as illustrated in the code snippet below.public ILcdModel decode( String aSourceName ) throws IOException { try (InputStream input = fInputStreamFactory.createInputStream(aSourceName)) { // Perform decoding ... } catch (RuntimeException e) { throw new IOException(e); } }
- See Also:
-