public final class LasSection extends Object
A LAS section title has the following format on disk:
The optional modifier is either _Parameter, _Definition or _Data if it is present. The association is the name of a different section that this one is associated with, typically in a definition/data relation.~name[modifier] [| association]
In a disk file a section contains all records between the section title record and the next section title record.
See LAS 3.0 Specification for details.
Modifier and Type | Class and Description |
---|---|
static class |
LasSection.Type
The different section types.
|
Constructor and Description |
---|
LasSection(String name)
Create an empty LAS parameter section with the specified name.
|
LasSection(String name,
String association)
Create an empty LAS parameter section with the specified
name and association.
|
Modifier and Type | Method and Description |
---|---|
void |
addRecord(int index,
LasRecord record)
Add the specified record at the given index of this LAS section.
|
void |
addRecord(LasRecord record)
Add the specified record to this LAS section.
|
boolean |
equals(Object object) |
LasParameterRecord |
findParameterRecord(String parameterName)
Find a specific parameter record of this section.
|
String |
getAssociation()
Return name of the associated section of this section.
|
String |
getName()
Return name of this section.
|
List<LasParameterRecord> |
getParameterRecords()
Get all the parameter records of this section.
|
String |
getParameterValue(String parameterName)
Get value of a specific parameter of this section.
|
List<LasRecord> |
getRecords()
Return all (non-data) records of this section.
|
LasSection.Type |
getType()
Return type of this section.
|
int |
hashCode() |
void |
removeRecord(LasRecord record)
Remove the specified record from this section.
|
String |
toString() |
public LasSection(String name, String association)
name
- Name of section. Non-null.association
- Section association. Null if N/A.IllegalArgumentException
- If name is null.public LasSection(String name)
name
- Name of section. Non-null.IllegalArgumentException
- If name is null.public String getName()
public LasSection.Type getType()
public String getAssociation()
public void addRecord(LasRecord record)
record
- Record to add. Non-null.IllegalArgumentException
- If record is null.public void addRecord(int index, LasRecord record)
index
- Index to insert to. [0,nRecords>.record
- Record to insert. Non-null.IllegalArgumentException
- If index is out of bounds or record is null.public void removeRecord(LasRecord record)
record
- Record to remove. Non-null.IllegalArgumentException
- If record is null.public List<LasRecord> getRecords()
public List<LasParameterRecord> getParameterRecords()
public LasParameterRecord findParameterRecord(String parameterName)
parameterName
- Name of parameter record to find.
Case insensitive. Non-null.IllegalArgumentException
- If parameterName is null.public String getParameterValue(String parameterName)
parameterName
- Name of parameter record to find value of.
Case insensitive. Non-null.IllegalArgumentException
- If parameterName is null.Copyright © 2024 Petroware AS - https://petroware.no