|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectschema2template.model.XMLModel
public class XMLModel
The most important model, the first access to the XML Schema information. Provides all XML attribute and XML element definitions from the schema. All further information can be accessed from those definitions (e.g. dependencies, constant values, data types, etc.).
Constructor Summary | |
---|---|
XMLModel(com.sun.msv.grammar.Expression root)
Constructs new model by the MSV root expression |
Method Summary | |
---|---|
static String |
camelCase(QNamed def)
Convert a-few:words into AFewWords in CamelCase spelling |
static String |
camelCase(String raw)
Convert a-few:words into AFewWords in CamelCase spelling |
static String |
constantCase(QNamed def)
Convert a-few:words into A_FEW_WORDS in spelling used for Java constants |
static String |
constantCase(String raw)
Convert a-few:words into A_FEW_WORDS in spelling used for Java constants |
static String |
escapeKeyword(QNamed in)
(Java) member variable may not start with a number, so escape it |
static String |
escapeKeyword(String in)
(Java) Keyword may not start with a number, so escape it |
static String |
escapeLiteral(QNamed in)
Escape the quotation marks of String literals |
static String |
escapeLiteral(String in)
Escape the quotation marks of String literals |
static String |
extractLocalname(QNamed def)
Extract localname local from ns:local name |
static String |
extractLocalname(String name)
Extract localname local from ns:local name |
static String |
extractNamespace(QNamed def)
Extract namespace ns from ns:local name |
static String |
extractNamespace(String name)
Extract namespace ns from ns:local name |
static String |
firstWord(QNamed def)
Maybe not used anymore: Get first word out of a QNamed object containing delimiters like "-:/ _.," |
static String |
firstWord(String raw)
Assist method for camel-case adaptions or namespace extraction. |
QNamedPuzzleComponent |
getAttribute(String name)
Get attribute by tag name. |
PuzzlePiece |
getAttribute(String name,
int hashCode)
Get attribute by tag name and hash code. |
PuzzlePieceSet |
getAttributes()
Get all attributes, sorted by ns:local name. |
QNamedPuzzleComponent |
getElement(String name)
Get element(s) by tag name. |
PuzzlePiece |
getElement(String name,
int hashCode)
Get element by tag name and hash code. |
PuzzlePieceSet |
getElements()
Get all elements, sorted by ns:local name. |
static String |
javaCase(QNamed def)
Convert a-few:words into aFewWords in spelling for java method names |
static String |
javaCase(String raw)
Convert a-few:words into aFewWords in spelling for java method names |
static String |
lastWord(QNamed def)
Maybe not used anymore: Get last word out of a String containing delimiters like "-:/ _.," |
static String |
lastWord(String raw)
Maybe not used anymore: Get last word out of a String containing delimiters like "-:/ _.," |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public XMLModel(com.sun.msv.grammar.Expression root)
root
- MSV root ExpressionMethod Detail |
---|
public PuzzlePieceSet getElements()
public PuzzlePieceSet getAttributes()
public QNamedPuzzleComponent getElement(String name)
name
-
public PuzzlePiece getElement(String name, int hashCode)
name
- hashCode
-
public QNamedPuzzleComponent getAttribute(String name)
name
-
public PuzzlePiece getAttribute(String name, int hashCode)
name
- hashCode
-
public static String camelCase(String raw)
raw
- input String
public static String camelCase(QNamed def)
def
- input
public static String javaCase(String raw)
raw
- input String
public static String javaCase(QNamed def)
def
- input
public static String constantCase(String raw)
raw
- input String
public static String constantCase(QNamed def)
def
- input
public static String firstWord(String raw)
raw
- input String
public static String firstWord(QNamed def)
def
- input
public static String lastWord(String raw)
raw
- input
public static String lastWord(QNamed def)
def
- input
public static String escapeKeyword(QNamed in)
in
- raw input
public static String escapeKeyword(String in)
in
- raw input
public static String escapeLiteral(QNamed in)
in
- raw input
public static String escapeLiteral(String in)
in
- raw input
public static String extractNamespace(String name)
name
- in form ns:local
public static String extractNamespace(QNamed def)
def
- QNamed object
public static String extractLocalname(String name)
name
- in form ns:local
public static String extractLocalname(QNamed def)
def
- QNamed object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |