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
ConstructorsConstructorDescriptionCreates 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 TypeMethodDescriptionvoidaddAttributeEntity(int aEntity) Adds an attribute entity number to the set of numbers that is decoded.voidaddElementClass(int aElementClass) Adds an element class to the list of element classes that is included into decoded models.voidaddLevel(int aLevel) Adds a level to the list of DGN levels that is included into all decoded models.voidaddLevelName(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.voidAdds a tag set name to the set of names that is decoded.voidaddUserAttributeType(int aType) Adds a DGN MSLINK attribute type to the set of types that is decoded.voidaddUserAttributeType(String aType) Adds a DGN MSLINK attribute type to the set of types that is decoded.booleancanDecodeSource(String aSourceName) Checks whether this model decoder can decode the specified data source.voidClears the set of DGN database attributes that is decoded.voidClears the list of names of DGN levels that are to be included into all decoded models.voidClears the list of DGN levels that is included into decoded models.voidClears the set of DGN tag sets that is decoded.voidClears the set of DGN MSLINK attributes that is decoded.Returns aTLcd2DBoundsIndexedModelListwhose elements are of typeTLcd2DBoundsIndexedModel.Returns a short, displayable name for the format that is decoded by thisILcdModelDecoder.intGets the the bitmask specifying list of element classes that is included into decoded models.booleanvoidResets the set of DGN database attributes that is decoded.voidResets 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.voidResets the list of DGN levels that is included into decoded models.voidResets the set of DGN tag sets that is decoded.voidResets the set of DGN MSLINK attributes that is decoded.voidsetAttributeEntitySelection(int[] aEntities) Sets the set of DGN database attributes that is decoded.voidsetDatabaseURL(String aDatabaseURL) Sets the default database URL that is assigned to all decoded attributes.voidsetDefaultModelReference(ILcdModelReference aDefaultModelReference) Sets the default model reference for decoded models, in case the model reference decoder doesn't provide one.voidsetElementClassSelection(int aElementClasses) Sets the list of element classes that is included into decoded models.voidsetElementClassSelection(int[] aElementClasses) Sets the list of element classes that is included into decoded models.voidsetLevelNameSelection(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.voidsetLevelSelection(int[] aLevels) Sets the list of DGN levels that is included into all decoded models.voidsetModelReferenceDecoder(ILcdModelReferenceDecoder aModelReferenceDecoder) Sets the model reference decoder that will be used for creating model references for decoded models.voidsetTagSetSelection(String[] aTagSetNames) Sets the set of DGN tag attributes that is decoded.voidsetUseFloat(boolean aUseFloat) Specifies whether to use memory-conserving floating point data structures for the decoded models.voidsetUserAttributeTypeSelection(int[] aTypes) Sets the set of DGN MSLINK attributes that is decoded.voidsetUserAttributeTypeSelection(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, waitMethods 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:ILcdDGNModelDecoderSets the model reference decoder that will be used for creating model references for decoded models.- Specified by:
setModelReferenceDecoderin interfaceILcdDGNModelDecoder
-
getModelReferenceDecoder
- Specified by:
getModelReferenceDecoderin interfaceILcdDGNModelDecoder
-
setDefaultModelReference
Description copied from interface:ILcdDGNModelDecoderSets the default model reference for decoded models, in case the model reference decoder doesn't provide one.- Specified by:
setDefaultModelReferencein interfaceILcdDGNModelDecoder
-
getDefaultModelReference
- Specified by:
getDefaultModelReferencein interfaceILcdDGNModelDecoder
-
setDatabaseURL
Description copied from interface:ILcdDGNModelDecoderSets the default database URL that is assigned to all decoded attributes. The URL can then be used by the application.- Specified by:
setDatabaseURLin interfaceILcdDGNModelDecoder
-
getDatabaseURL
- Specified by:
getDatabaseURLin interfaceILcdDGNModelDecoder
-
setUseFloat
public void setUseFloat(boolean aUseFloat) Description copied from interface:ILcdDGNModelDecoderSpecifies whether to use memory-conserving floating point data structures for the decoded models.- Specified by:
setUseFloatin interfaceILcdDGNModelDecoder
-
isUseFloat
public boolean isUseFloat()- Specified by:
isUseFloatin interfaceILcdDGNModelDecoder
-
resetLevelSelection
public void resetLevelSelection()Description copied from interface:ILcdDGNModelDecoderResets 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:
resetLevelSelectionin interfaceILcdDGNModelDecoder
-
clearLevelSelection
public void clearLevelSelection()Description copied from interface:ILcdDGNModelDecoderClears 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:
clearLevelSelectionin interfaceILcdDGNModelDecoder- See Also:
-
setLevelSelection
public void setLevelSelection(int[] aLevels) Description copied from interface:ILcdDGNModelDecoderSets the list of DGN levels that is included into all decoded models. Level 0 is always included, irrespective of the selection setting.- Specified by:
setLevelSelectionin 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:ILcdDGNModelDecoderAdds a level to the list of DGN levels that is included into all decoded models.- Specified by:
addLevelin interfaceILcdDGNModelDecoder- Parameters:
aLevel- the level to be included in the decoded models.
-
clearLevelNameSelection
public void clearLevelNameSelection()Description copied from interface:ILcdDGNModelDecoderClears 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:
clearLevelNameSelectionin interfaceILcdDGNModelDecoder- See Also:
-
setLevelNameSelection
Description copied from interface:ILcdDGNModelDecoderSets 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:
setLevelNameSelectionin 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:ILcdDGNModelDecoderAdds 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:
addLevelNamein interfaceILcdDGNModelDecoder- Parameters:
aLevelName- the name of the level to be included in the decoded models.
-
resetElementClassSelection
public void resetElementClassSelection()Description copied from interface:ILcdDGNModelDecoderResets 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:
resetElementClassSelectionin interfaceILcdDGNModelDecoder
-
setElementClassSelection
public void setElementClassSelection(int aElementClasses) Description copied from interface:ILcdDGNModelDecoderSets 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:
setElementClassSelectionin 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:ILcdDGNModelDecoderGets the the bitmask specifying list of element classes that is included into decoded models.- Specified by:
getElementClassSelectionin interfaceILcdDGNModelDecoder
-
setElementClassSelection
public void setElementClassSelection(int[] aElementClasses) Description copied from interface:ILcdDGNModelDecoderSets 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:
setElementClassSelectionin 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:ILcdDGNModelDecoderAdds 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:
addElementClassin 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:ILcdDGNModelDecoderResets 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:
resetUserAttributeTypeSelectionin interfaceILcdDGNModelDecoder- See Also:
-
clearUserAttributeTypeSelection
public void clearUserAttributeTypeSelection()Description copied from interface:ILcdDGNModelDecoderClears 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:
clearUserAttributeTypeSelectionin interfaceILcdDGNModelDecoder- See Also:
-
setUserAttributeTypeSelection
Description copied from interface:ILcdDGNModelDecoderSets 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
addAttributeEntitymethod.- Specified by:
setUserAttributeTypeSelectionin 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:ILcdDGNModelDecoderSets 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:
setUserAttributeTypeSelectionin 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:ILcdDGNModelDecoderAdds a DGN MSLINK attribute type to the set of types that is decoded.- Specified by:
addUserAttributeTypein 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:ILcdDGNModelDecoderAdds 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
addAttributeEntitymethod.- Specified by:
addUserAttributeTypein 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:ILcdDGNModelDecoderResets 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:
resetAttributeEntitySelectionin interfaceILcdDGNModelDecoder- See Also:
-
clearAttributeEntitySelection
public void clearAttributeEntitySelection()Description copied from interface:ILcdDGNModelDecoderClears 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:
clearAttributeEntitySelectionin interfaceILcdDGNModelDecoder- See Also:
-
setAttributeEntitySelection
public void setAttributeEntitySelection(int[] aEntities) Description copied from interface:ILcdDGNModelDecoderSets 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:
setAttributeEntitySelectionin 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:ILcdDGNModelDecoderAdds 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
addUserAttributeTypemethod.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:
addAttributeEntityin interfaceILcdDGNModelDecoder- Parameters:
aEntity- an entity number of an database attribute (user or non-user).
-
resetTagSetSelection
public void resetTagSetSelection()Description copied from interface:ILcdDGNModelDecoderResets 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:
resetTagSetSelectionin interfaceILcdDGNModelDecoder- See Also:
-
clearTagSetSelection
public void clearTagSetSelection()Description copied from interface:ILcdDGNModelDecoderClears 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:
clearTagSetSelectionin interfaceILcdDGNModelDecoder- See Also:
-
setTagSetSelection
Description copied from interface:ILcdDGNModelDecoderSets 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:
setTagSetSelectionin interfaceILcdDGNModelDecoder- Parameters:
aTagSetNames- a list of tag set names.
-
addTagSet
Description copied from interface:ILcdDGNModelDecoderAdds 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:
addTagSetin interfaceILcdDGNModelDecoder- Parameters:
aTagSetName- a tag set name.
-
getDisplayName
Description copied from interface:ILcdModelDecoderReturns a short, displayable name for the format that is decoded by thisILcdModelDecoder.- Specified by:
getDisplayNamein interfaceILcdModelDecoder- Returns:
- the displayable name of this
ILcdModelDecoder.
-
canDecodeSource
Description copied from interface:ILcdModelDecoderChecks whether this model decoder can decode the specified data source. It is acceptable for this method to returntruefor a source name whiledecodethrows 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:
canDecodeSourcein interfaceILcdModelDecoder- Parameters:
aSourceName- the data source to be verified; typically a file name or a URL.- Returns:
trueif this decoder can likely decode the data specified by the source name,falseotherwise.- See Also:
-
decode
Returns aTLcd2DBoundsIndexedModelListwhose elements are of typeTLcd2DBoundsIndexedModel. Each model in the list corresponds to a single DGN level.- Specified by:
decodein interfaceILcdModelDecoder- Parameters:
aSourceName- the name of the file to decode- Returns:
- a list of submodels
- Throws:
IOException- See Also:
-