public abstract class Profile extends BaseEntity implements Comparable<Profile>
values for a single
Component gathered under a unique Id.
All profiles belong to one of the four components: hardware, software,
crawler and browser and have a number of values associated with each profile.
The contents of existing profiles should not change over time. Each value
contains a getter method for the corresponding Property.
Profiles make up the unique Id of a device. Each device Id consists of
Each profile relates to one or more Signature.
New profiles are added with each data file update. Some profiles may be removed if we do not see any use of the profile for a long period of time. Premium and Enterprise data contain a lot more profiles and hence provide better detection results, especially for less common devices. Compare data options.
Objects of this class should not be created directly as they are part of the
internal logic. Use the relevant Dataset method to access these
objects.
For more information see: 51Degrees pattern data model.
| Modifier and Type | Field and Description |
|---|---|
int |
profileId
Unique Id of the profile.
|
protected int[] |
signatureIndexes
An array of the signature indexes associated with the profile.
|
protected int[] |
valueIndexes
A list of the indexes of the values associated with the profile.
|
dataSet, index| Constructor and Description |
|---|
Profile(Dataset dataSet,
int offset,
BinaryReader reader)
Constructs a new instance of the Profile
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(Profile other)
Compares this profile to another using the numeric ProfileId field.
|
Component |
getComponent()
The component the profile belongs to.
|
Property[] |
getProperties()
Returns an array of properties the profile relates to.
|
abstract int[] |
getSignatureIndexes()
An array of the signature indexes associated with the profile.
|
Signature[] |
getSignatures()
Gets the signatures related to the profile.
|
abstract int[] |
getValueIndexes()
A array of the indexes of the values associated with the profile in order
of value index in the data set values list.
|
Value[] |
getValues()
Gets the values associated with the profile.
|
Values |
getValues(Property property)
Gets the values associated with the property.
|
Values |
getValues(String propertyName)
Gets the values associated with the property name.
|
void |
init()
Called after the entire data set has been loaded to ensure
any further initialisation steps that require other items in
the data set can be completed.
|
String |
toString()
A string representation of the profiles display values.
|
compareTo, compareTo, getDataSet, getIndex, getIsNumeric, getNumber, readIntegerArray, readIntegerListprotected volatile int[] signatureIndexes
public final int profileId
protected volatile int[] valueIndexes
public Profile(Dataset dataSet, int offset, BinaryReader reader)
dataSet - The data set the profile will be contained within.offset - The offset of the profile in the source data structure.reader - Reader connected to the input stream.public int compareTo(Profile other)
compareTo in interface Comparable<Profile>other - The component to be compared against.public Component getComponent() throws IOException
Component the profile belongs to.IOException - if there was a problem accessing data file.public Property[] getProperties() throws IOException
properties associated with this profile.IOException - if there was a problem accessing data file.public Values getValues(String propertyName) throws IOException
propertyName - string name of the Property required.Values associated with the property, or null
if the property does not exist.IOException - if there was a problem accessing data file.public Values getValues(Property property) throws IOException
property - the Property whose values are required.Values associated with the property, or null
if the property does not exist.IOException - if there was a problem accessing data file.public Signature[] getSignatures() throws IOException
signatures associated with this profile.IOException - if there was a problem accessing data file.public Value[] getValues() throws IOException
values associated with this profile.IOException - if there was a problem accessing data file.public void init()
throws IOException
This method should not be called as it is part of the internal logic.
IOException - if there was a problem accessing data file.public String toString()
public abstract int[] getValueIndexes()
throws IOException
IOException - if there was a problem accessing data file.public abstract int[] getSignatureIndexes()
throws IOException
IOException - if there was a problem accessing data file.Copyright © 2017 51Degrees. All rights reserved.