protected void parseNodeTypeDefinition ( TokenStream tokens ) { // Parse the name, and create the path and a property for the name ... Name name = parseNodeTypeName ( tokens ) ; JcrNodeTypeTemplate nodeType = new JcrNodeTypeTemplate ( context ) ; try { nodeType . setName ( string ( name ) ) ; } catch ( ConstraintViolationException e ) { assert false : "Names should always be syntactically valid" ; } // Read the (optional) supertypes ... List < Name > supertypes = parseSupertypes ( tokens ) ; try { nodeType . setDeclaredSuperTypeNames ( names ( supertypes ) ) ; // Read the node type options (and vendor extensions) ... parseNodeTypeOptions ( tokens , nodeType ) ; // Parse property and child node definitions ... parsePropertyOrChildNodeDefinitions ( tokens , nodeType ) ; } catch ( ConstraintViolationException e ) { assert false : "Names should always be syntactically valid" ; } this . nodeTypes . add ( nodeType ) ; }
Parse the node type definition that is next on the token stream .