|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.jackrabbit.spi.commons.nodetype.compact.CompactNodeTypeDefReader
public class CompactNodeTypeDefReader
CompactNodeTypeDefReader. Parses node type definitions written in the compact node type definition format and returns a list of QNodeTypeDefinition objects that can then be used to register node types.
The EBNF grammar of the compact node type definition:
cnd ::= ns_mapping* node_type_def+
ns_mapping ::= "<" prefix "=" namespace ">"
prefix ::= string
namespace ::= string
node_type_def ::= node_type_name [super_types] [options] {property_def | node_def}
node_type_name ::= "[" string "]"
super_types ::= ">" string_list
options ::= orderable_opt | mixin_opt | orderable_opt mixin_opt | mixin_opt orderable_opt
orderable_opt ::= "orderable" | "ord" | "o"
mixin_opt ::= "mixin" | "mix" | "m"
property_def ::= "-" property_name [property_type_decl] [default_values] [attributes] [value_constraints]
property_name ::= string
property_type_decl ::= "(" property_type ")"
property_type ::= "STRING" | "String |"string" |
"BINARY" | "Binary" | "binary" |
"LONG" | "Long" | "long" |
"DOUBLE" | "Double" | "double" |
"BOOLEAN" | "Boolean" | "boolean" |
"DATE" | "Date" | "date" |
"NAME | "Name | "name |
"PATH" | "Path" | "path" |
"REFERENCE" | "Reference" | "reference" |
"UNDEFINED" | "Undefined" | "undefined" | "*"
default_values ::= "=" string_list
value_constraints ::= "<" string_list
node_def ::= "+" node_name [required_types] [default_type] [attributes]
node_name ::= string
required_types ::= "(" string_list ")"
default_type ::= "=" string
attributes ::= "primary" | "pri" | "!" |
"autocreated" | "aut" | "a" |
"mandatory" | "man" | "m" |
"protected" | "pro" | "p" |
"multiple" | "mul" | "*" |
"COPY" | "Copy" | "copy" |
"VERSION" | "Version" | "version" |
"INITIALIZE" | "Initialize" | "initialize" |
"COMPUTE" | "Compute" | "compute" |
"IGNORE" | "Ignore" | "ignore" |
"ABORT" | "Abort" | "abort"
string_list ::= string {"," string}
string ::= quoted_string | unquoted_string
quoted_string :: = "'" unquoted_string "'"
unquoted_string ::= [A-Za-z0-9:_]+
| Constructor Summary | |
|---|---|
CompactNodeTypeDefReader(Reader r,
String systemId,
NamespaceMapping mapping,
QNodeTypeDefinitionsBuilder builder)
Creates a new CND reader. |
|
CompactNodeTypeDefReader(Reader r,
String systemId,
QNodeTypeDefinitionsBuilder builder)
Creates a new CND reader. |
|
| Method Summary | |
|---|---|
NamespaceMapping |
getNamespaceMapping()
Returns the namespace mapping. |
List |
getNodeTypeDefs()
Returns the list of parsed QNodeTypeDefinition definitions. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CompactNodeTypeDefReader(Reader r,
String systemId,
QNodeTypeDefinitionsBuilder builder)
throws ParseException
r - systemId - builder -
ParseException
public CompactNodeTypeDefReader(Reader r,
String systemId,
NamespaceMapping mapping,
QNodeTypeDefinitionsBuilder builder)
throws ParseException
r - builder -
ParseException| Method Detail |
|---|
public List getNodeTypeDefs()
public NamespaceMapping getNamespaceMapping()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||