Package elki.database.relation
Class ConvertToStringView
- java.lang.Object
-
- elki.database.relation.ConvertToStringView
-
-
Constructor Summary
Constructors Constructor Description ConvertToStringView(Relation<?> existing)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
get(DBIDRef id)
Get the representation of an object.SimpleTypeInformation<java.lang.String>
getDataTypeInformation()
Get the data type of this representationDBIDs
getDBIDs()
Get the IDs the query is defined for.java.lang.String
getLongName()
Get a long (human readable) name for the relation.DBIDIter
iterDBIDs()
Get an iterator access to the DBIDs.int
size()
Get the number of DBIDs.
-
-
-
Field Detail
-
existing
final Relation<?> existing
The database we use
-
-
Constructor Detail
-
ConvertToStringView
public ConvertToStringView(Relation<?> existing)
Constructor.- Parameters:
existing
- Existing representation
-
-
Method Detail
-
get
public java.lang.String get(DBIDRef id)
Description copied from interface:Relation
Get the representation of an object.
-
getDBIDs
public DBIDs getDBIDs()
Description copied from interface:Relation
Get the IDs the query is defined for.If possible, prefer
Relation.iterDBIDs()
.
-
iterDBIDs
public DBIDIter iterDBIDs()
Description copied from interface:Relation
Get an iterator access to the DBIDs.To iterate over all IDs, use the following code fragment:
for(DBIDIter iter = relation.iterDBIDs(); iter.valid(); iter.advance()) { relation.get(iter); // Get the current element }
-
size
public int size()
Description copied from interface:Relation
Get the number of DBIDs.
-
getDataTypeInformation
public SimpleTypeInformation<java.lang.String> getDataTypeInformation()
Description copied from interface:Relation
Get the data type of this representation- Specified by:
getDataTypeInformation
in interfaceRelation<java.lang.String>
- Returns:
- Data type
-
getLongName
public java.lang.String getLongName()
Description copied from interface:Relation
Get a long (human readable) name for the relation.- Specified by:
getLongName
in interfaceRelation<java.lang.String>
- Returns:
- Relation name
-
-