Examples of XmlStreamCursor


Examples of org.bladerunnerjs.utility.stax.XmlStreamCursor

    data.groupAliases = new HashMap<>();
   
    if(aliasDefinitionsFile.exists()) {
      try(Reader fileReader = new UnicodeReader(aliasDefinitionsFile, defaultFileCharacterEncoding)) {
        XMLStreamReader2 streamReader = XmlStreamReaderFactory.createReader(fileReader, aliasDefinitionsSchema);
        XmlStreamCursor cursor = new XmlStreamCursor(streamReader);
       
        while(cursor.isWithinInitialNode()) {
          if(streamReader.getEventType() == XMLStreamReader.START_ELEMENT) {
            switch(streamReader.getLocalName()) {
              case "alias":
                processAlias(streamReader, data, aliasDefinitionsFile, assetLocation);
                break;
             
              case "group":
                processGroup(streamReader, data, assetLocation);
                break;
            }
          }
         
          cursor.nextTag();
        }
      }
      catch (XMLStreamException e) {
        Location location = e.getLocation();
       
View Full Code Here

Examples of org.bladerunnerjs.utility.stax.XmlStreamCursor

   
    assetLocation.assertIdentifierCorrectlyNamespaced(aliasName);
   
    data.aliasDefinitions.add(new AliasDefinition(aliasName, aliasClass, aliasInterface));
   
    XmlStreamCursor cursor = new XmlStreamCursor(streamReader);
    while(cursor.isWithinInitialNode()) {
      if(streamReader.getEventType() == XMLStreamReader.START_ELEMENT) {
        switch(streamReader.getLocalName()) {
          case "scenario":
            processScenario(aliasName, streamReader, data);
            break;
        }
      }
     
      cursor.nextTag();
    }
  }
View Full Code Here

Examples of org.bladerunnerjs.utility.stax.XmlStreamCursor

  private static void processGroup(XMLStreamReader2 streamReader, AliasDefinitionsData data, AssetLocation assetLocation) throws XMLStreamException, NamespaceException, RequirePathException {
    String groupName = streamReader.getAttributeValue(null, "name");
   
    assetLocation.assertIdentifierCorrectlyNamespaced(groupName);
   
    XmlStreamCursor cursor = new XmlStreamCursor(streamReader);
   
    while(cursor.isWithinInitialNode()) {
      if(streamReader.getEventType() == XMLStreamReader.START_ELEMENT) {
        switch(streamReader.getLocalName()) {
          case "alias":
            processGroupAlias(groupName, streamReader, data);
            break;
        }
      }
     
      cursor.nextTag();
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.