|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.oxygenxml.validate.nvdl.FilteredAttributes
class FilteredAttributes
Implementation of the Attributes interface that filters out some of the attributes of an actual Attributes implementation. We will keep only the attributes whose indexes are specified in a given set of indexes.
| Field Summary | |
|---|---|
private Attributes |
attributes
The actual attributes, we will filter out some of them. |
private IntSet |
indexSet
The set of indexes of the attributes to used. |
private int[] |
reverseIndexMap
Maps indexes in the real attributes list to 1 based indexes in the filtered attributes list. |
| Constructor Summary | |
|---|---|
FilteredAttributes(IntSet indexSet,
Attributes attributes)
Creates a filtered attributes instance. |
|
| Method Summary | |
|---|---|
int |
getIndex(String qName)
|
int |
getIndex(String uri,
String localName)
|
int |
getLength()
The number of attributes, the same as the length of the list of indexes. |
String |
getLocalName(int index)
Get the local name for the index-th attribute. |
String |
getQName(int index)
Get the QName for the index-th attribute. |
private int |
getRealIndex(String qName)
Get the real index, in the initial attributes list of a given attribute. |
private int |
getRealIndex(String uri,
String localName)
Get the real index, in the initial attributes list of a given attribute. |
String |
getType(int index)
Get the type for the index-th attribute. |
String |
getType(String qName)
Get the type of the attribute. |
String |
getType(String uri,
String localName)
Get the type of the attribute. |
String |
getURI(int index)
Get the URI for the index-th attribute. |
String |
getValue(int index)
Get the value for the index-th attribute. |
String |
getValue(String qName)
Get the value of the attribute. |
String |
getValue(String uri,
String localName)
Get the value of the attribute. |
private int |
reverseIndex(int k)
Gets the index in the filtered set for a given real index. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private final Attributes attributes
private final IntSet indexSet
private int[] reverseIndexMap
| Constructor Detail |
|---|
public FilteredAttributes(IntSet indexSet,
Attributes attributes)
indexSet - The set with indexes that we will keep.attributes - The actual attributes.| Method Detail |
|---|
private int reverseIndex(int k)
k - The index in the real attributes.
public int getLength()
getLength in interface Attributespublic String getURI(int index)
getURI in interface Attributespublic String getLocalName(int index)
getLocalName in interface Attributespublic String getQName(int index)
getQName in interface Attributespublic String getType(int index)
getType in interface Attributespublic String getValue(int index)
getValue in interface Attributes
public int getIndex(String uri,
String localName)
getIndex in interface Attributespublic int getIndex(String qName)
getIndex in interface Attributes
private int getRealIndex(String uri,
String localName)
uri - The attribute uri.localName - The attribute local name.
private int getRealIndex(String qName)
qName - The attribute qualified name.
public String getType(String uri,
String localName)
getType in interface Attributesuri - The attribute uri.localName - The attribute local name.
public String getValue(String uri,
String localName)
getValue in interface Attributesuri - The attribute uri.localName - The attribute local name.public String getType(String qName)
getType in interface AttributesqName - The attribute qualified name.public String getValue(String qName)
getValue in interface AttributesqName - The attribute qualified name.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||