Class TLcdDGNModelListDecoder
- All Implemented Interfaces:
ILcdDGNModelDecoder
,ILcdModelDecoder
ILcdModelDecoder
handles Intergraph Standard File
Formats (ISFF, with the extension DGN
). Internally, the actual decoding
is delegated to either a TLcdDGNModelDecoder
or to a user-specified
ILcdDGNModelDecoder
. The elements of the internally decoded DGN model are returned as a
TLcd2DBoundsIndexedModelList
. The descriptor of the model list is the same as the
descriptor of the internally decoded model.
Each component of the model list is a TLcd2DBoundsIndexedModel
containing only the
elements of a particular DGN level. The descriptors of the list components are copies of
the internal DGN model's descriptor, except that the display names
are replaced by the name of the corresponding DGN level.- Since:
- 9.0
- See Also:
-
Constructor Summary
ConstructorDescriptionCreates a new TLcdDGNModelListDecoder which will delegate the decoding toTLcdDGNModelDecoder
.TLcdDGNModelListDecoder
(ILcdDGNModelDecoder aDGNModelDecoder) Constructor which delegates the decoding to the given DGN model decoder. -
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 aSourceName) 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.Returns aTLcd2DBoundsIndexedModelList
whose elements are of typeTLcd2DBoundsIndexedModel
.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.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
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
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.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
-
TLcdDGNModelListDecoder
public TLcdDGNModelListDecoder()Creates a new TLcdDGNModelListDecoder which will delegate the decoding toTLcdDGNModelDecoder
. -
TLcdDGNModelListDecoder
Constructor which delegates the decoding to the given DGN model decoder.- Parameters:
aDGNModelDecoder
- the DGN model decoder to use
-
-
Method Details
-
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
-
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(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.
-
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:
-
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).
-
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.
-
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.
-
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:
- the displayable name of this
ILcdModelDecoder
.
-
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:
aSourceName
- the data source to be verified; typically a file name or a URL.- Returns:
true
if this decoder can likely decode the data specified by the source name,false
otherwise.- See Also:
-
decode
Returns aTLcd2DBoundsIndexedModelList
whose elements are of typeTLcd2DBoundsIndexedModel
. Each model in the list corresponds to a single DGN level.- Specified by:
decode
in interfaceILcdModelDecoder
- Parameters:
aSourceName
- the name of the file to decode- Returns:
- a list of submodels
- Throws:
IOException
- See Also:
-