|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object sk.uniba.euromath.editor.widgets.namelist.DisplayableNameList<R>
R
- the rule type. Can be instance of AttributeRule
or
NewElementRule
only.public abstract class DisplayableNameList<R extends BaseRule>
Represents the displayable name list. There is one difference between 'DOM'
and 'Real' namespace: When the list represents elements then they are equal.
However, a local attribute (with null
DOM namespace) has a
'real' namespace equal to its owner namespace.
Field Summary | |
---|---|
boolean |
isElement
True if this object represents rules for element, false otherwise. |
String |
localNamespaceName
The name of the namespace of all local names, as defined in a config file. |
String |
localNamespaceUri
The namespace of all local names. |
Constructor Summary | |
---|---|
protected |
DisplayableNameList(String localNamespaceUri,
boolean isElement)
Basic constructor. |
Method Summary | |
---|---|
String |
getDomNamespaceUri(int i)
Returns the DOM namespace of the name. |
QName |
getDomQName(int i,
String prefix)
Returns the qname for the name. |
abstract QName |
getForeign(int i)
Returns the foreign name. |
int |
getLength()
Returns number of items in the list. |
abstract String |
getLocal(int i)
Returns the local name. |
abstract String |
getNamespace(int i)
Returns the namespace item. |
static String |
getNamespaceDescription(String namespaceUri)
Returns the name of the namespace, as defined in the config file. |
String |
getRealNamespaceDescription(int i)
Returns the name of the namespace, as defined in the config file. |
String |
getRealNamespaceUri(int i)
Returns the 'real' namespace of the name. |
abstract R |
getRule(int i)
Returns the rule for the name as returned by the NameList
class. |
abstract String[] |
getStrings()
Returns array of a displayable representation of names. |
abstract DisplayableNameItemTypeEnum |
getType(int i)
Determines the type of the item. |
boolean |
hasRule(int i)
Determines if item can have a rule. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public final String localNamespaceUri
public final boolean isElement
public final String localNamespaceName
Constructor Detail |
---|
protected DisplayableNameList(String localNamespaceUri, boolean isElement)
localNamespaceUri
- the namespace of the local elements/attributes.isElement
- true if this object will represent elements or
attributes. There is a difference: elements from non-null namespace will
have a prefix, attributes from non-null (local) namespace will have a
prefix only if this namespace is different than a namespace of the owner
element.Method Detail |
---|
public abstract String[] getStrings()
public abstract DisplayableNameItemTypeEnum getType(int i)
i
- index of the name, as in getStrings()
array.
public final boolean hasRule(int i)
i
- index
true
if the item can have rule.public abstract String getLocal(int i)
i
- index of the name, as in getStrings()
array.
IndexOutOfBoundsException
- if the index is out of bounds or does
not denote a local name.public abstract QName getForeign(int i)
i
- index of the name, as in getStrings()
array.
IndexOutOfBoundsException
- if the index is out of bounds or does
not denote a foreign qname.public abstract String getNamespace(int i)
i
- index of the name, as in getStrings()
array.
IndexOutOfBoundsException
- if the index is out of bounds or does
not denote a namespace.public final String getDomNamespaceUri(int i)
i
- index of the name, as in getStrings()
array.
public final String getRealNamespaceUri(int i)
i
- index of the name, as in getStrings()
array.
public final String getRealNamespaceDescription(int i)
i
- index of the name, as in getStrings()
array.
namespaceUri
if no
name is defined.public abstract R getRule(int i)
NameList
class. Only local and foreign items can have a rule.
i
- index of the name, as in getStrings()
array.
IndexOutOfBoundsException
- if the index is out of bounds
IllegalArgumentException
- if i does not denote local nor foreign
items.public final QName getDomQName(int i, String prefix)
i
- index of the name, as in getStrings()
array.prefix
- the prefix for the qname.
IndexOutOfBoundsException
- if the index is out of bounds
IllegalArgumentException
- if i does not denote local nor foreign
items.public static final String getNamespaceDescription(String namespaceUri)
namespaceUri
- the namespace to query.
namespaceUri
if no
name is defined.public final int getLength()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |