|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectGene
@ThreadSafe public final class Gene
Utilities for working with genes.
| Field Summary | |
|---|---|
static String |
EMBEDDABLE_STUB_LOCAL_NAME
Local name of stub elements that represent contained genes in embeddable forms. |
static int |
G_INDEX_FLAG_DOUBLE_DASH
G-index flag indicating a 'g' attribute value that begins '--'. |
static int |
G_INDEX_FLAG_NONE
G-index flag indicating that a node has no 'g' attribute. |
static int |
G_INDEX_FLAG_SINGLE_DASH
G-index flag indicating a 'g' attribute value that begins with a single '-'. |
static int |
G_INDEX_FLAG_UNKNOWN
G-index flag indicating an unrecognized 'g' attribute value. |
| Method Summary | |
|---|---|
static void |
abstract_embeddable(Element sequence,
List<Element> gList)
Tranforms a genetic-form sequence into an abstract form suitable for embeddable encoding. |
static void |
adjustLeftPadding(Element element,
int delta,
StringBuilder b)
Adjusts the left padding (leading space content) of an element. |
static Element |
createG(String locus,
Element gg,
StringBuilder b)
Creates an unattached gene meta-data ('g') element. |
static Element |
createGG(Element metaData,
StringBuilder b)
Creates an unattached 'g' list ('gg') element. |
static Element |
ensureGG(Element metaData,
StringBuilder b)
Returns a document's 'gg' element; if necessary creating it. |
static void |
escape_embeddable(StringBuilder b)
Tranforms an embeddable sequence from unescaped to escaped form. |
static Element |
findGG(Element metaData)
Finds a document's 'gg' element. |
static boolean |
gIndexIsGene(int gIndex)
Returns true iff gIndexOf >= 0, indicating a gene. |
static boolean |
gIndexIsNonGenetic(int gIndex)
Returns true iff gIndexOf indicates a non-genetic element; either G_INDEX_FLAG_SINGLE_DASH or G_INDEX_FLAG_DOUBLE_DASH. |
static int |
gIndexOf(Element element)
Returns the g-index of an element, derived from its 'g' attribute value. |
static int |
gIndexOf(String g)
Returns the g-index of a 'g' attribute value. |
static int |
gIndexOfNode(Node node)
Returns the g-index of a node. |
static String |
gOf(int gIndex)
Returns the g-index encoded as a string suitable for a 'g' attribute value. |
static String |
gROf(Element element)
Returns the effective 'gR' attribute of an element. |
static boolean |
hasChildGene(Node node)
Returns true iff the node has a child gene. |
static boolean |
isGene(Element element)
Returns true if the element is a gene. |
static int |
linkG(Element g,
Element sequenceElement,
Element gg,
int gIndex,
StringBuilder b)
Links a gene meta-data ('g') element into the document. |
static Element |
selfOrAncestorAsGene(Node node)
Returns the node if it is a gene; otherwise the nearest ancestor that is a gene. |
static void |
unescape_embeddable(StringBuilder b)
Tranforms an embeddable sequence from escaped to unescaped form. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String EMBEDDABLE_STUB_LOCAL_NAME
public static final int G_INDEX_FLAG_NONE
gIndexOf(Element),
Constant Field Valuespublic static final int G_INDEX_FLAG_UNKNOWN
gIndexOf(String),
Constant Field Valuespublic static final int G_INDEX_FLAG_SINGLE_DASH
gIndexOf(String),
gIndexIsNonGenetic(int),
Constant Field Valuespublic static final int G_INDEX_FLAG_DOUBLE_DASH
gIndexOf(String),
gIndexIsNonGenetic(int),
Constant Field Values| Method Detail |
|---|
public static void abstract_embeddable(Element sequence,
List<Element> gList)
sequence - genetic-form sequencegList - list of gene meta-data ('g') elements in the document
public static void adjustLeftPadding(Element element,
int delta,
StringBuilder b)
element - whose padding to adjustdelta - number of space characters to remove (negative)
or add (positive)b - string builder to use, overwriting its existing content
public static Element createG(String locus,
Element gg,
StringBuilder b)
locus - of the genegg - the meta-data 'gg' element,
to which caller will attach new 'g' elementb - string builder to use, overwriting its existing content
public static Element createGG(Element metaData,
StringBuilder b)
metaData - the document's
meta-data element,
to which caller will attach new 'gg' elementb - string builder to use, overwriting its existing contentensureGG(Element,StringBuilder)
public static Element ensureGG(Element metaData,
StringBuilder b)
metaData - the document's
meta-data elementb - string builder to use, overwriting its existing contentcreateGG(Element,StringBuilder),
findGG(Element)public static void escape_embeddable(StringBuilder b)
b - string builder containing the unescaped sequenceunescape_embeddable(StringBuilder),
d/gene/note.xht#Escapingpublic static Element findGG(Element metaData)
metaData - the document's
meta-data element
ensureGG(Element,StringBuilder)public static boolean gIndexIsNonGenetic(int gIndex)
public static boolean gIndexIsGene(int gIndex)
public static int gIndexOf(Element element)
gIndexOfNode(Node)public static int gIndexOfNode(Node node)
public static int gIndexOf(String g)
gIndexOf(Element),
gOf(int)public static String gOf(int gIndex)
gIndexOf(String)public static String gROf(Element element)
element - e.g. a meta-data 'gg' or ancestor 'a' element
public static boolean hasChildGene(Node node)
public static boolean isGene(Element element)
gIndexOf(Element)
public static int linkG(Element g,
Element sequenceElement,
Element gg,
int gIndex,
StringBuilder b)
g - gene meta-data elementsequenceElement - element that will become the gene;
it should itself be attached in the document,
or the namespace prefix lookup may failgg - the meta-data 'gg' elementgIndex - prior count of 'g' elements,
and offset for the newly created 'g' element, in 'gg' listb - string builder to use, overwriting its existing content
createG(String,Element,StringBuilder)public static Element selfOrAncestorAsGene(Node node)
node - reference node, which may be null
public static void unescape_embeddable(StringBuilder b)
b - string builder containing the escaped sequenceescape_embeddable(StringBuilder),
d/gene/note.xht#Escaping
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||