|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface GxNameBridge<S>
The name bridge provides reliable support for symbols. Symbols enable string comparisons to be performed much faster
than than character-by-character comparisons using String
. These comparisons may then be applied to improving
the performance of the comparison of element, attribute and type names where symbols are used to represent the
namespace-uri and local-name parts of a xs:QName.
String
. However, the symbol must be comparable using Object.equals(java.lang.Object)
. If the implementation provides
symbol support, the Object.equals(java.lang.Object)
method implementation may be optimized.
The name bridge provides support for converting symbols to-and-from String
, conversion of QName
and
SmNativeType
to-and-from SmName
, and utilities for commonly used namespaces.
Method Summary | |
---|---|
S |
empty()
Returns a symbol equivalent to the empty string. |
boolean |
equal(S one,
S two)
Determines whether two symbols are equal. |
java.lang.String |
getPrefix(S namespaceURI,
boolean mayUseDefaultMapping)
Returns a prefix String by recognizing the namespaceURI symbol. |
boolean |
isEmpty(S symbol)
Determines whether the specified symbol is equivalent to an empty string. |
boolean |
isXmlNamespaceURI(S symbol)
|
SmName<S> |
name(javax.xml.namespace.QName name)
Given an QName , return a corresponding SmName . |
S[] |
nameArray(int size)
Allocates an empty array of symbols. |
SmNativeType |
nativeType(SmName<S> name)
Given a name, return a corresponding SmNativeType . |
SmName<S> |
nativeType(SmNativeType nativeType)
Given an SmNativeType , lookup a corresponding name. |
S |
symbolize(java.lang.String strval)
Converts a String into a parametrized symbol. |
java.lang.String |
toString(S symbol)
Converts a parametrized symbol into a String . |
Methods inherited from interface org.gxml.xs.SmNameBridge |
---|
isNoNamespaceSchemaLocation, isW3cXmlSchemaInstanceNamespaceURI, isW3cXmlSchemaNamespaceURI, isXsiNil, isXsiSchemaLocation, isXsiType |
Method Detail |
---|
S empty()
empty
in interface SmNameBridge<S>
boolean equal(S one, S two)
equal
in interface SmNameBridge<S>
java.lang.String getPrefix(S namespaceURI, boolean mayUseDefaultMapping)
namespaceURI | mayUseDefaultMapping | prefix |
---|---|---|
"" | true |
"" |
"http://www.w3.org/XML/1998/namespace" | ignored | "xml" |
"http://www.w3.org/2000/xmlns/" | ignored | "xmlns" |
otherwise | ignored | null |
boolean isEmpty(S symbol)
isEmpty
in interface SmNameBridge<S>
boolean isXmlNamespaceURI(S symbol)
SmName<S> name(javax.xml.namespace.QName name)
QName
, return a corresponding SmName
.
If the name argument is null
, then null
is returned.
name
in interface SmNameBridge<S>
name
- The QName
, may be null
.S[] nameArray(int size)
nameArray
in interface SmNameBridge<S>
size
- The size of the array of symbols.SmNativeType nativeType(SmName<S> name)
SmNativeType
. null
.
nativeType
in interface SmNameBridge<S>
SmName<S> nativeType(SmNativeType nativeType)
SmNativeType
, lookup a corresponding name.
nativeType
in interface SmNameBridge<S>
S symbolize(java.lang.String strval)
String
into a parametrized symbol.
symbolize
in interface SmNameBridge<S>
strval
- The String
to be converted to a symbol.
null
if the input was null.java.lang.String toString(S symbol)
String
.
toString
in interface SmNameBridge<S>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |