|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectinfo.sswap.http.representation.Prefixes
public class Prefixes
Represents the map of prefixes and provides methods for expanding prefixed QNames into URIs
| Field Summary | |
|---|---|
private java.util.Map<java.lang.String,java.lang.String> |
prefixes
The map of prefixes. |
| Constructor Summary | |
|---|---|
Prefixes()
|
|
Prefixes(java.util.Map<java.lang.String,java.lang.String> prefixes)
Creates a new Prefixes object. |
|
| Method Summary | |
|---|---|
private void |
addPredefinedPrefixes()
Adds predefined prefixes to the map of prefixes. |
java.lang.String |
expandPotentialQName(java.lang.String qName)
Assumes that the argument is a QName and attempts to expand it to the absolute URI. |
private static java.lang.String |
getLocalName(java.lang.String parameter)
Extracts the local part (i.e., the part after the prefix and the colon) from the argument. |
private static java.lang.String |
getPotentialPrefix(java.lang.String parameter)
Extracts a potential prefix from the argument. |
java.util.Map<java.lang.String,java.lang.String> |
getPrefixMap()
|
private static boolean |
hasPotentialPrefix(java.lang.String parameter)
Checks whether the argument has (potentially) a prefix. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private java.util.Map<java.lang.String,java.lang.String> prefixes
| Constructor Detail |
|---|
public Prefixes()
public Prefixes(java.util.Map<java.lang.String,java.lang.String> prefixes)
prefixes - the map with prefixes (the keys are prefix names, and the values are the URIs for the corresponding
namespace).| Method Detail |
|---|
public java.util.Map<java.lang.String,java.lang.String> getPrefixMap()
private void addPredefinedPrefixes()
public java.lang.String expandPotentialQName(java.lang.String qName)
qName - the potential QName to be expanded to the absolute URI
private static boolean hasPotentialPrefix(java.lang.String parameter)
parameter - the argument to be checked whether it contains a potential prefix
private static java.lang.String getPotentialPrefix(java.lang.String parameter)
throws java.lang.IllegalArgumentException
parameter - the string from which the potential prefix should be extracted
java.lang.IllegalArgumentException - if the argument cannot contain a prefixprivate static java.lang.String getLocalName(java.lang.String parameter)
parameter - the string from which the local part should be extracted.
java.lang.IllegalArgumentException - if the argument cannot contain a prefix
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||