public class Astral
extends java.lang.Object
Set<String> astralSet = Astral.getRepresentatives(Astral.AstralSet.NINETY_FIVE_175B);This class uses a multiton pattern with soft references for caching. In short: the first time you call the above, it will fetch the data from ASTRAL; the second time will (probably) not have to; and the instances can still be garbage-collected if necessary (meaning they don't require heap memory).
Modifier and Type | Class and Description |
---|---|
static class |
Astral.AstralSet
An ASTRAL sequence-identity cutoff with an identifier such as:
|
Constructor and Description |
---|
Astral(Astral.AstralSet cutoff)
Constructs a new Astral object.
|
Astral(java.lang.String id,
java.io.Reader reader)
Constructs a new Astral object.
|
Astral(java.lang.String id,
java.net.URL url)
Constructs a new Astral object.
|
Modifier and Type | Method and Description |
---|---|
java.util.LinkedHashMap<java.lang.Integer,java.lang.String> |
getFailedLines()
Gets a map describing lines read in the file that weren't understood.
|
java.util.Set<java.lang.String> |
getNames() |
static java.util.Set<java.lang.String> |
getRepresentatives(Astral.AstralSet cutoff)
Get a list of representatives' names for the specified ASTRAL cutoff.
|
static java.util.Set<java.lang.String> |
getRepresentatives(java.lang.String id)
Get a list of representatives' names for the specified ASTRAL cutoff.
|
public Astral(Astral.AstralSet cutoff)
getRepresentatives(AstralSet)
instead. This constructor should only be used when an ASTRAL set not
included in Astral(AstralSet)
is required.cutoff
- The ASTRAL sequence-identity cutoff requiredjava.lang.RuntimeException
- If the Astral set could not be parsed or accessed for any reasonpublic Astral(java.lang.String id, java.net.URL url)
getRepresentatives(AstralSet)
instead. This constructor should only be used when an ASTRAL set not
included in Astral(AstralSet)
is required.java.lang.RuntimeException
- If the Astral set could not be parsed or accessed for any reasonpublic Astral(java.lang.String id, java.io.Reader reader)
getRepresentatives(AstralSet)
instead. This constructor should only be used when an ASTRAL set not
included in Astral(AstralSet)
is required.java.lang.RuntimeException
- If the Astral set could not be parsed or accessed for any reasonpublic static java.util.Set<java.lang.String> getRepresentatives(Astral.AstralSet cutoff)
public static java.util.Set<java.lang.String> getRepresentatives(java.lang.String id)
An
- ASTRAL Id, such as 1.75A_95.public java.util.Set<java.lang.String> getNames()
public java.util.LinkedHashMap<java.lang.Integer,java.lang.String> getFailedLines()