public class RDFDatabaseReader extends Object implements DatabaseReader
This works by first reading every RDF:Description that can be found and storing the results in a HashMap<String, Account> where the key is the RDF:about Mozilla-RDF hash thing. This is then used to build the Account hierarchy by reading in all the RDF:Seq and nested RDF:li nodes.
DatabaseReader.BuggyAlgoAction| Modifier and Type | Field and Description |
|---|---|
static String |
EXTENSION |
static String |
FF_GLOBAL_SETTINGS_URI |
static int |
MAX_PATTERNS |
| Constructor and Description |
|---|
RDFDatabaseReader() |
| Modifier and Type | Method and Description |
|---|---|
Account |
deserializeAccount(InputStream is) |
static Database |
ensureDefaultProfileExist(Database db) |
static List<Account> |
findMatchingNameCI(List<Account> allAccounts,
String regex) |
Pair<AlgorithmType,Boolean> |
fromRdfString(Account account,
String algorithm) |
String |
getExtension() |
List<IncompatibleException> |
getIncompatibleAccounts() |
Database |
read(InputStream i) |
void |
setBuggyAlgoUseAction(DatabaseReader.BuggyAlgoAction action) |
void |
setIgnoreBuggyJavascript(boolean b)
Set whether or not to ignore Accounts which use the old buggy javascript
version of HMAC-SHA256.
|
public static final String EXTENSION
public static final String FF_GLOBAL_SETTINGS_URI
public static final int MAX_PATTERNS
public void setIgnoreBuggyJavascript(boolean b)
b - true to ignore, false to abort.public void setBuggyAlgoUseAction(DatabaseReader.BuggyAlgoAction action)
setBuggyAlgoUseAction in interface DatabaseReaderpublic Database read(InputStream i) throws Exception
read in interface DatabaseReaderExceptionpublic static Database ensureDefaultProfileExist(Database db) throws Exception
Exceptionpublic static List<Account> findMatchingNameCI(List<Account> allAccounts, String regex)
public Account deserializeAccount(InputStream is) throws Exception
deserializeAccount in interface DatabaseReaderExceptionpublic List<IncompatibleException> getIncompatibleAccounts()
getIncompatibleAccounts in interface DatabaseReaderpublic String getExtension()
getExtension in interface DatabaseReaderpublic Pair<AlgorithmType,Boolean> fromRdfString(Account account, String algorithm) throws IncompatibleException
IncompatibleExceptionCopyright © 2018. All rights reserved.