|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.jackrabbit.commons.cnd.CompactNodeTypeDefReader<T,N>
T - N - public class CompactNodeTypeDefReader<T,N>
CompactNodeTypeDefReader. Parses node type definitions written in the compact
node type definition format and provides a list of type definition
objects that can then be used to register node types.
The CompactNodeTypeDefReader is parameterizable in the type of the node type
definition T and the type of the namespace mapping N
which the parser should build. For types T and N the
parser's constructor takes a DefinitionBuilderFactory for
T and N.
Cnd ::= {NamespaceMapping | NodeTypeDef}
NamespaceMapping ::= '<' Prefix '=' Uri '>'
Prefix ::= String
Uri ::= String
NodeTypeDef ::= NodeTypeName [Supertypes]
[NodeTypeAttribute {NodeTypeAttribute}]
{PropertyDef | ChildNodeDef}
NodeTypeName ::= '[' String ']'
Supertypes ::= '>' (StringList | '?')
NodeTypeAttribute ::= Orderable | Mixin | Abstract | Query |
PrimaryItem
Orderable ::= ('orderable' | 'ord' | 'o') ['?']
Mixin ::= ('mixin' | 'mix' | 'm') ['?']
Abstract ::= ('abstract' | 'abs' | 'a') ['?']
Query ::= ('noquery' | 'nq') | ('query' | 'q' )
PrimaryItem ::= ('primaryitem'| '!')(String | '?')
PropertyDef ::= PropertyName [PropertyType] [DefaultValues]
[PropertyAttribute {PropertyAttribute}]
[ValueConstraints]
PropertyName ::= '-' String
PropertyType ::= '(' ('STRING' | 'BINARY' | 'LONG' | 'DOUBLE' |
'BOOLEAN' | 'DATE' | 'NAME' | 'PATH' |
'REFERENCE' | 'WEAKREFERENCE' |
'DECIMAL' | 'URI' | 'UNDEFINED' | '*' |
'?') ')'
DefaultValues ::= '=' (StringList | '?')
ValueConstraints ::= '<' (StringList | '?')
ChildNodeDef ::= NodeName [RequiredTypes] [DefaultType]
[NodeAttribute {NodeAttribute}]
NodeName ::= '+' String
RequiredTypes ::= '(' (StringList | '?') ')'
DefaultType ::= '=' (String | '?')
PropertyAttribute ::= Autocreated | Mandatory | Protected |
Opv | Multiple | QueryOps | NoFullText |
NoQueryOrder
NodeAttribute ::= Autocreated | Mandatory | Protected |
Opv | Sns
Autocreated ::= ('autocreated' | 'aut' | 'a' )['?']
Mandatory ::= ('mandatory' | 'man' | 'm') ['?']
Protected ::= ('protected' | 'pro' | 'p') ['?']
Opv ::= 'COPY' | 'VERSION' | 'INITIALIZE' | 'COMPUTE' |
'IGNORE' | 'ABORT' | ('OPV' '?')
Multiple ::= ('multiple' | 'mul' | '*') ['?']
QueryOps ::= ('queryops' | 'qop')
(('''Operator {','Operator}''') | '?')
Operator ::= '=' | '<>' | '<' | '<=' | '>' | '>=' | 'LIKE'
NoFullText ::= ('nofulltext' | 'nof') ['?']
NoQueryOrder ::= ('noqueryorder' | 'nqord') ['?']
Sns ::= ('sns' | '*') ['?']
StringList ::= String {',' String}
String ::= QuotedString | UnquotedString
QuotedString ::= SingleQuotedString | DoubleQuotedString
SingleQuotedString ::= ''' UnquotedString '''
DoubleQuotedString ::= '"' UnquotedString '"'
UnquotedString ::= XmlChar {XmlChar}
XmlChar ::= see 3.2.2 Local Names
| Constructor Summary | |
|---|---|
CompactNodeTypeDefReader(Reader r,
String systemId,
DefinitionBuilderFactory<T,N> factory)
Creates a new CND reader and parses the given stream. |
|
CompactNodeTypeDefReader(Reader r,
String systemId,
N nsMapping,
DefinitionBuilderFactory<T,N> factory)
Creates a new CND reader and parses the given stream. |
|
| Method Summary | |
|---|---|
N |
getNamespaceMapping()
Returns the namespace mapping. |
List<T> |
getNodeTypeDefinitions()
Returns the list of parsed node type definitions definitions. |
String |
getSystemId()
Returns the previously assigned system id |
| 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,
DefinitionBuilderFactory<T,N> factory)
throws ParseException
r - a reader to the CNDsystemId - a informative id of the given streamfactory - builder for creating new definitions and handling namespaces
ParseException - if an error occurs
public CompactNodeTypeDefReader(Reader r,
String systemId,
N nsMapping,
DefinitionBuilderFactory<T,N> factory)
throws ParseException
r - a reader to the CNDsystemId - a informative id of the given streamnsMapping - default namespace mapping to usefactory - builder for creating new definitions and handling namespaces
ParseException - if an error occurs| Method Detail |
|---|
public String getSystemId()
public List<T> getNodeTypeDefinitions()
public N getNamespaceMapping()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||