schema2template.model
public class QNameValue extends Object implements QNamed, Comparable<QNameValue>
Domain specific models (Odf, Java, ...) often return 'ns:localname' Strings. The purpose of this class is to encapsulate these Strings so in templates they can be treated like other QNamed objects.
Contract: These objects are distincted only by the encapsulated String. So they use this String for equals(o), hashCode() and compareTo(o).
Constructor and Description |
---|
QNameValue(String name)
Constructor to create a String wrapper
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(QNameValue o) |
boolean |
equals(Object o) |
String |
getLocalName()
Get only localname
|
String |
getNamespace()
Get only namespace
|
String |
getQName()
Get the QName (i.e.
|
int |
hashCode() |
public QNameValue(String name)
name
- the String to wrappublic String getLocalName()
QNamed
getLocalName
in interface QNamed
public String getQName()
QNamed
public String getNamespace()
QNamed
getNamespace
in interface QNamed
public int compareTo(QNameValue o)
compareTo
in interface Comparable<QNameValue>
Copyright © 2010-2014 The Apache Software Foundation. All Rights Reserved.