T - N - public class CompactNodeTypeDefReader<T,N> extends Object
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.
The EBNF grammar of the compact node type definition:
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 and Description |
|---|
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.
|
| Modifier and Type | Method and Description |
|---|---|
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
|
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 namespacesParseException - if an error occurspublic 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 namespacesParseException - if an error occurspublic String getSystemId()
public List<T> getNodeTypeDefinitions()
public N getNamespaceMapping()
Copyright © 2004-2020 The Apache Software Foundation. All Rights Reserved.