Package org.eclipse.persistence.internal.libraries.antlr.runtime.tree

Examples of org.eclipse.persistence.internal.libraries.antlr.runtime.tree.Tree


  public MismatchedTreeNodeException() {
  }

  public MismatchedTreeNodeException(int expecting, TreeNodeStream input) {
    super(input);
    Tree t = (Tree)input.LT(1);
    if ( input.LT(1) instanceof Tree ) {
      line = t.getLine();
      charPositionInLine = t.getCharPositionInLine();
      // TODO: if DOWN/UP, there is no line info currently
    }
    this.expecting = expecting;
  }
View Full Code Here


        return;
      }
     
        switch(tree.getType()) {
        case JSONLexer.PAIR: {
            Tree valueTree = tree.getChild(1);
            if(valueTree.getType() == JSONLexer.ARRAY) {
                parse(valueTree);
            } else {             
                Tree stringTree = tree.getChild(0);
                String qualifiedName = stringTree.getText().substring(1, stringTree.getText().length() - 1);
                String localName = qualifiedName;
                if(attributePrefix != null && qualifiedName.startsWith(attributePrefix)){
                  break;
                }
                String uri = XMLConstants.EMPTY_STRING;
                if(namespaceAware && namespaces != null){
                    if(localName.length() > 2){                       
                        int nsIndex = localName.indexOf(namespaceSeparator, 1);
                        String prefix = XMLConstants.EMPTY_STRING;
                        if(nsIndex > -1){
                            prefix = localName.substring(0, nsIndex);                           
                        }
                        uri = namespaces.resolveNamespacePrefix(prefix);
                        if(uri == null){                           
                            uri = namespaces.getDefaultNamespaceURI();
                        }else{
                            localName = localName.substring(nsIndex + 1);
                        }
                        if(localName.equals(XMLConstants.SCHEMA_TYPE_ATTRIBUTE) && uri.equals(XMLConstants.SCHEMA_INSTANCE_URL)){
                            break;
                        }  
                    }else{
                        uri = namespaces.getDefaultNamespaceURI();
                    }
                }
               
                if(contentHandler instanceof XMLRootRecord || contentHandler instanceof DeferredContentHandler){
                  //if its not namespaceAware don't report the "type" child as it is will be read by the xsi:type lookup
                  if(!namespaceAware && localName.equals(XMLConstants.SCHEMA_TYPE_ATTRIBUTE)){
                    break;
                    }
                  if(textWrapper != null && textWrapper.equals(localName)){
                      parse(valueTree);
                      break;
                    }
                }else if(contentHandler instanceof UnmarshalRecord && ((UnmarshalRecord)contentHandler).getXPathNode() != null){
                  if(!namespaceAware && localName.equals(XMLConstants.SCHEMA_TYPE_ATTRIBUTE) && !((UnmarshalRecord)contentHandler).getXPathNode().hasTypeChild()){
                    break;
                  }
                  boolean isTextValue = isTextValue(localName);
                  if(isTextValue){
                      parse(valueTree);
                       break;
                  }
                }
                if(valueTree != null && valueTree.getType() == JSONLexer.NULL){
                  contentHandler.setNil(true);
                }
            
                contentHandler.startElement(uri, localName, localName, attributes.setTree(valueTree, attributePrefix, namespaces, namespaceSeparator, namespaceAware));
                parse(valueTree);
                contentHandler.endElement(uri, localName, localName);
            }
            break;
        }
        case JSONLexer.STRING: {
            String string = string(tree.getChild(0).getText());
            contentHandler.characters(string);
            break;
        }
        case JSONLexer.NUMBER: {
            contentHandler.characters(tree.getChild(0).getText());
            break;
        }
        case JSONLexer.TRUE: {
            contentHandler.characters(TRUE);
            break;
        }
        case JSONLexer.FALSE: {
            contentHandler.characters(FALSE);
            break;
        }
        case JSONLexer.NULL: {
            break;
        }
        case JSONLexer.ARRAY: {
            Tree parentStringTree = tree.getParent().getChild(0);
            String parentLocalName = parentStringTree.getText().substring(1, parentStringTree.getText().length() - 1);
           
            if(attributePrefix != null && parentLocalName.startsWith(attributePrefix)){
              break;
            }
           
View Full Code Here

                return NO_ATTRIBUTES;
              }
                if(tree.getType() == JSONLexer.OBJECT) {
                    ArrayList<Attribute> attributesList = new ArrayList<Attribute>(tree.getChildCount());
                    for(int x=0; x<tree.getChildCount(); x++) {
                        Tree childTree = tree.getChild(x);
                        String attributeLocalName = childTree.getChild(0).getText().substring(1, childTree.getChild(0).getText().length() - 1);

                        if(attributePrefix != null){
                            if(attributeLocalName.startsWith(attributePrefix)){
                                attributeLocalName = attributeLocalName.substring(attributePrefix.length());
                            }else{
                                break;
                            }
                        }

                        String uri = XMLConstants.EMPTY_STRING;                       
                        if(namespaceAware && namespaces != null){
                            if(attributeLocalName.length() > 2){
                                String prefix = XMLConstants.EMPTY_STRING;
                                int nsIndex = attributeLocalName.indexOf(namespaceSeparator, 1);
                                if(nsIndex > -1){
                                    prefix = attributeLocalName.substring(0, nsIndex);                                   
                                }
                                uri = namespaces.resolveNamespacePrefix(prefix);
                                if(uri == null){
                                    uri = namespaces.getDefaultNamespaceURI();
                                }else{
                                    attributeLocalName = attributeLocalName.substring(nsIndex + 1);
                                }
                            }else{
                                uri = namespaces.getDefaultNamespaceURI();
                            }
                        }

                        Tree childValueTree = childTree.getChild(1);
                        if(childValueTree.getType() == JSONLexer.ARRAY){
                          int size = childValueTree.getChildCount();
                          if(size == 0){                
                            attributesList.add(new Attribute(uri, attributeLocalName, attributeLocalName, ""));
                          }
                            for(int y=0; y<size; y++) {
                                CommonTree nextChildTree = (CommonTree) childValueTree.getChild(y);
                                addSimpleAttribute(attributesList, uri, attributeLocalName, nextChildTree);
                            }
                        }else{
                            addSimpleAttribute(attributesList, uri, attributeLocalName, childValueTree);
                        }
View Full Code Here

        return;
      }
     
        switch(tree.getType()) {
        case JSONLexer.PAIR: {
            Tree valueTree = tree.getChild(1);
            if(valueTree.getType() == JSONLexer.ARRAY) {
                parse(valueTree);
            } else {             
                Tree stringTree = tree.getChild(0);
                String qualifiedName = stringTree.getText().substring(1, stringTree.getText().length() - 1);
                String localName = qualifiedName;
                if(attributePrefix != null && qualifiedName.startsWith(attributePrefix)){
                  break;
                }
                String uri = Constants.EMPTY_STRING;
                if(namespaceAware && namespaces != null){
                    if(localName.length() > 2){                       
                        int nsIndex = localName.indexOf(namespaceSeparator, 1);
                        String prefix = Constants.EMPTY_STRING;
                        if(nsIndex > -1){
                            prefix = localName.substring(0, nsIndex);                           
                        }
                        uri = namespaces.resolveNamespacePrefix(prefix);
                        if(uri == null){                           
                            uri = namespaces.getDefaultNamespaceURI();
                        }else{
                            localName = localName.substring(nsIndex + 1);
                        }
                        if(localName.equals(Constants.SCHEMA_TYPE_ATTRIBUTE) && uri != null && uri.equals(javax.xml.XMLConstants.W3C_XML_SCHEMA_INSTANCE_NS_URI)){
                            break;
                        }  
                    }else{
                        uri = namespaces.getDefaultNamespaceURI();
                    }
                }
               
                if(contentHandler instanceof XMLRootRecord || contentHandler instanceof DeferredContentHandler){
                  //if its not namespaceAware don't report the "type" child as it is will be read by the xsi:type lookup
                  if(!namespaceAware && localName.equals(Constants.SCHEMA_TYPE_ATTRIBUTE)){
                    break;
                    }
                  if(textWrapper != null && textWrapper.equals(localName)){
                      parse(valueTree);
                      break;
                    }
                }else if(contentHandler instanceof UnmarshalRecord && ((UnmarshalRecord)contentHandler).getXPathNode() != null){
                  if(!namespaceAware && localName.equals(Constants.SCHEMA_TYPE_ATTRIBUTE) && !((UnmarshalRecord)contentHandler).getXPathNode().hasTypeChild()){
                    break;
                  }
                  boolean isTextValue = isTextValue(localName);
                  if(isTextValue){
                      parse(valueTree);
                       break;
                  }
                    NodeValue nv = ((UnmarshalRecord)contentHandler).getAttributeChildNodeValue(uri, localName);
                    if(attributePrefix == null && nv !=null ){
                        break;
                    }
                }
                if(valueTree != null && valueTree.getType() == JSONLexer.NULL){
                  contentHandler.setNil(true);
                }
            
                contentHandler.startElement(uri, localName, localName, attributes.setTree(valueTree, attributePrefix, namespaces, namespaceSeparator, namespaceAware));
                parse(valueTree);
                contentHandler.endElement(uri, localName, localName);               
            }
            break;
        }
        case JSONLexer.STRING: {
            String string = string(tree.getChild(0).getText());
            contentHandler.characters(string);
            break;
        }
        case JSONLexer.NUMBER: {
            contentHandler.characters(tree.getChild(0).getText());
            break;
        }
        case JSONLexer.TRUE: {
            contentHandler.characters(TRUE);
            break;
        }
        case JSONLexer.FALSE: {
            contentHandler.characters(FALSE);
            break;
        }
        case JSONLexer.NULL: {
            break;
        }
        case JSONLexer.ARRAY: {
            Tree parentStringTree = tree.getParent().getChild(0);
            String parentLocalName = parentStringTree.getText().substring(1, parentStringTree.getText().length() - 1);
           
            if(attributePrefix != null && parentLocalName.startsWith(attributePrefix)){
              break;
            }
           
View Full Code Here

                return NO_ATTRIBUTES;
              }
                if(tree.getType() == JSONLexer.OBJECT) {
                    ArrayList<Attribute> attributesList = new ArrayList<Attribute>(tree.getChildCount());
                    for(int x=0; x<tree.getChildCount(); x++) {
                        Tree childTree = tree.getChild(x);
                        String attributeLocalName = childTree.getChild(0).getText().substring(1, childTree.getChild(0).getText().length() - 1);

                        if(attributePrefix != null){
                            if(attributeLocalName.startsWith(attributePrefix)){
                                attributeLocalName = attributeLocalName.substring(attributePrefix.length());
                            }else{
                                break;
                            }
                        }

                        String uri = Constants.EMPTY_STRING;                       
                        if(namespaceAware && namespaces != null){
                            if(attributeLocalName.length() > 2){
                                String prefix = Constants.EMPTY_STRING;
                                int nsIndex = attributeLocalName.indexOf(namespaceSeparator, 1);
                                if(nsIndex > -1){
                                    prefix = attributeLocalName.substring(0, nsIndex);                                   
                                }
                                uri = namespaces.resolveNamespacePrefix(prefix);
                                if(uri == null){
                                    uri = namespaces.getDefaultNamespaceURI();
                                }else{
                                    attributeLocalName = attributeLocalName.substring(nsIndex + 1);
                                }
                            }else{
                                uri = namespaces.getDefaultNamespaceURI();
                            }
                        }

                        Tree childValueTree = childTree.getChild(1);
                        if(childValueTree.getType() == JSONLexer.ARRAY){
                          int size = childValueTree.getChildCount();
                          if(size == 0){                
                            attributesList.add(new Attribute(uri, attributeLocalName, attributeLocalName, ""));
                          }
                            for(int y=0; y<size; y++) {
                                CommonTree nextChildTree = (CommonTree) childValueTree.getChild(y);
                                addSimpleAttribute(attributesList, uri, attributeLocalName, nextChildTree);
                            }
                        }else{
                            addSimpleAttribute(attributesList, uri, attributeLocalName, childValueTree);
                        }
View Full Code Here

        return;
      }
     
        switch(tree.getType()) {
        case JSONLexer.PAIR: {
            Tree valueTree = tree.getChild(1);
            if(valueTree.getType() == JSONLexer.ARRAY) {
                parse(valueTree);
            } else {             
                Tree stringTree = tree.getChild(0);
                String qualifiedName = stringTree.getText().substring(1, stringTree.getText().length() - 1);
                String localName = qualifiedName;
                if(attributePrefix != null && qualifiedName.startsWith(attributePrefix)){
                  break;
                }
                String uri = Constants.EMPTY_STRING;
                if(namespaceAware && namespaces != null){
                    if(localName.length() > 2){                       
                        int nsIndex = localName.indexOf(namespaceSeparator, 1);
                        String prefix = Constants.EMPTY_STRING;
                        if(nsIndex > -1){
                            prefix = localName.substring(0, nsIndex);                           
                        }
                        uri = namespaces.resolveNamespacePrefix(prefix);
                        if(uri == null){                           
                            uri = namespaces.getDefaultNamespaceURI();
                        }else{
                            localName = localName.substring(nsIndex + 1);
                        }
                        if(localName.equals(Constants.SCHEMA_TYPE_ATTRIBUTE) && uri != null && uri.equals(javax.xml.XMLConstants.W3C_XML_SCHEMA_INSTANCE_NS_URI)){
                            break;
                        }  
                    }else{
                        uri = namespaces.getDefaultNamespaceURI();
                    }
                }
               
                if(contentHandler instanceof XMLRootRecord || contentHandler instanceof DeferredContentHandler){
                  //if its not namespaceAware don't report the "type" child as it is will be read by the xsi:type lookup
                  if(!namespaceAware && localName.equals(Constants.SCHEMA_TYPE_ATTRIBUTE)){
                    break;
                    }
                  if(textWrapper != null && textWrapper.equals(localName)){
                      parse(valueTree);
                      break;
                    }
                }else if(contentHandler instanceof UnmarshalRecord && ((UnmarshalRecord)contentHandler).getXPathNode() != null){
                  if(!namespaceAware && localName.equals(Constants.SCHEMA_TYPE_ATTRIBUTE) && !((UnmarshalRecord)contentHandler).getXPathNode().hasTypeChild()){
                    break;
                  }
                  boolean isTextValue = isTextValue(localName);
                  if(isTextValue){
                      parse(valueTree);
                       break;
                  }
                }
                if(valueTree != null && valueTree.getType() == JSONLexer.NULL){
                  contentHandler.setNil(true);
                }
            
                contentHandler.startElement(uri, localName, localName, attributes.setTree(valueTree, attributePrefix, namespaces, namespaceSeparator, namespaceAware));
                parse(valueTree);
                contentHandler.endElement(uri, localName, localName);               
            }
            break;
        }
        case JSONLexer.STRING: {
            String string = string(tree.getChild(0).getText());
            contentHandler.characters(string);
            break;
        }
        case JSONLexer.NUMBER: {
            contentHandler.characters(tree.getChild(0).getText());
            break;
        }
        case JSONLexer.TRUE: {
            contentHandler.characters(TRUE);
            break;
        }
        case JSONLexer.FALSE: {
            contentHandler.characters(FALSE);
            break;
        }
        case JSONLexer.NULL: {
            break;
        }
        case JSONLexer.ARRAY: {
            Tree parentStringTree = tree.getParent().getChild(0);
            String parentLocalName = parentStringTree.getText().substring(1, parentStringTree.getText().length() - 1);
           
            if(attributePrefix != null && parentLocalName.startsWith(attributePrefix)){
              break;
            }
           
View Full Code Here

                return NO_ATTRIBUTES;
              }
                if(tree.getType() == JSONLexer.OBJECT) {
                    ArrayList<Attribute> attributesList = new ArrayList<Attribute>(tree.getChildCount());
                    for(int x=0; x<tree.getChildCount(); x++) {
                        Tree childTree = tree.getChild(x);
                        String attributeLocalName = childTree.getChild(0).getText().substring(1, childTree.getChild(0).getText().length() - 1);

                        if(attributePrefix != null){
                            if(attributeLocalName.startsWith(attributePrefix)){
                                attributeLocalName = attributeLocalName.substring(attributePrefix.length());
                            }else{
                                break;
                            }
                        }

                        String uri = Constants.EMPTY_STRING;                       
                        if(namespaceAware && namespaces != null){
                            if(attributeLocalName.length() > 2){
                                String prefix = Constants.EMPTY_STRING;
                                int nsIndex = attributeLocalName.indexOf(namespaceSeparator, 1);
                                if(nsIndex > -1){
                                    prefix = attributeLocalName.substring(0, nsIndex);                                   
                                }
                                uri = namespaces.resolveNamespacePrefix(prefix);
                                if(uri == null){
                                    uri = namespaces.getDefaultNamespaceURI();
                                }else{
                                    attributeLocalName = attributeLocalName.substring(nsIndex + 1);
                                }
                            }else{
                                uri = namespaces.getDefaultNamespaceURI();
                            }
                        }

                        Tree childValueTree = childTree.getChild(1);
                        if(childValueTree.getType() == JSONLexer.ARRAY){
                          int size = childValueTree.getChildCount();
                          if(size == 0){                
                            attributesList.add(new Attribute(uri, attributeLocalName, attributeLocalName, ""));
                          }
                            for(int y=0; y<size; y++) {
                                CommonTree nextChildTree = (CommonTree) childValueTree.getChild(y);
                                addSimpleAttribute(attributesList, uri, attributeLocalName, nextChildTree);
                            }
                        }else{
                            addSimpleAttribute(attributesList, uri, attributeLocalName, childValueTree);
                        }
View Full Code Here

        return;
      }
     
        switch(tree.getType()) {
        case JSONLexer.PAIR: {
            Tree valueTree = tree.getChild(1);
            if(valueTree.getType() == JSONLexer.ARRAY) {
                parse(valueTree);
            } else {             
                Tree stringTree = tree.getChild(0);
                String qualifiedName = stringTree.getText().substring(1, stringTree.getText().length() - 1);
                String localName = qualifiedName;
                if(attributePrefix != null && qualifiedName.startsWith(attributePrefix)){
                  break;
                }
                String uri = XMLConstants.EMPTY_STRING;
                if(namespaceAware && namespaces != null){
                    if(localName.length() > 2){                       
                        int nsIndex = localName.indexOf(namespaceSeparator, 1);
                        String prefix = XMLConstants.EMPTY_STRING;
                        if(nsIndex > -1){
                            prefix = localName.substring(0, nsIndex);                           
                        }
                        uri = namespaces.resolveNamespacePrefix(prefix);
                        if(uri == null){                           
                            uri = namespaces.getDefaultNamespaceURI();
                        }else{
                            localName = localName.substring(nsIndex + 1);
                        }
                        if(localName.equals(XMLConstants.SCHEMA_TYPE_ATTRIBUTE) && uri.equals(XMLConstants.SCHEMA_INSTANCE_URL)){
                            break;
                        }  
                    }else{
                        uri = namespaces.getDefaultNamespaceURI();
                    }
                }
               
                if(contentHandler instanceof XMLRootRecord || contentHandler instanceof DeferredContentHandler){
                  //if its not namespaceAware don't report the "type" child as it is will be read by the xsi:type lookup
                  if(!namespaceAware && localName.equals(XMLConstants.SCHEMA_TYPE_ATTRIBUTE)){
                    break;
                    }
                  if(textWrapper != null && textWrapper.equals(localName)){
                      parse(valueTree);
                      break;
                    }
                }else if(contentHandler instanceof UnmarshalRecord && ((UnmarshalRecord)contentHandler).getXPathNode() != null){
                  if(!namespaceAware && localName.equals(XMLConstants.SCHEMA_TYPE_ATTRIBUTE) && !((UnmarshalRecord)contentHandler).getXPathNode().hasTypeChild()){
                    break;
                  }
                  boolean isTextValue = isTextValue(localName);
                  if(isTextValue){
                      parse(valueTree);
                       break;
                  }
                }
            
                contentHandler.startElement(uri, localName, localName, attributes.setTree(valueTree, attributePrefix, namespaces, namespaceSeparator, namespaceAware));
                parse(valueTree);
                contentHandler.endElement(uri, localName, localName);               
            }
            break;
        }
        case JSONLexer.STRING: {
            String string = string(tree.getChild(0).getText());
            contentHandler.characters(string);
            break;
        }
        case JSONLexer.NUMBER: {
            contentHandler.characters(tree.getChild(0).getText());
            break;
        }
        case JSONLexer.TRUE: {
            contentHandler.characters(TRUE);
            break;
        }
        case JSONLexer.FALSE: {
            contentHandler.characters(FALSE);
            break;
        }
        case JSONLexer.NULL: {
            break;
        }
        case JSONLexer.ARRAY: {
            Tree parentStringTree = tree.getParent().getChild(0);
            String parentLocalName = parentStringTree.getText().substring(1, parentStringTree.getText().length() - 1);
           
            if(attributePrefix != null && parentLocalName.startsWith(attributePrefix)){
              break;
            }
           
View Full Code Here

                }
                if(tree.getType() == JSONLexer.OBJECT) {
                    ArrayList<Attribute> attributesList = new ArrayList<Attribute>(tree.getChildCount());
                    for(int x=0; x<tree.getChildCount(); x++) {
                        Tree childTree = tree.getChild(x);
                        String attributeLocalName = childTree.getChild(0).getText().substring(1, childTree.getChild(0).getText().length() - 1);

                        if(attributePrefix != null){
                            if(attributeLocalName.startsWith(attributePrefix)){
                                attributeLocalName = attributeLocalName.substring(attributePrefix.length());
                            }else{
                                break;
                            }
                        }

                        String uri = XMLConstants.EMPTY_STRING;                       
                        if(namespaceAware && namespaces != null){
                            if(attributeLocalName.length() > 2){
                                String prefix = XMLConstants.EMPTY_STRING;
                                int nsIndex = attributeLocalName.indexOf(namespaceSeparator, 1);
                                if(nsIndex > -1){
                                    prefix = attributeLocalName.substring(0, nsIndex);                                   
                                }
                                uri = namespaces.resolveNamespacePrefix(prefix);
                                if(uri == null){
                                    uri = namespaces.getDefaultNamespaceURI();
                                }else{
                                    attributeLocalName = attributeLocalName.substring(nsIndex + 1);
                                }
                            }else{
                                uri = namespaces.getDefaultNamespaceURI();
                            }
                        }

                        Tree childValueTree = childTree.getChild(1);
                        if(childValueTree.getType() == JSONLexer.ARRAY){
                          int size = childValueTree.getChildCount();
                          if(size == 0){                
                            attributesList.add(new Attribute(uri, attributeLocalName, attributeLocalName, ""));
                          }
                            for(int y=0; y<size; y++) {
                                CommonTree nextChildTree = (CommonTree) childValueTree.getChild(y);
                                addSimpleAttribute(attributesList, uri, attributeLocalName, nextChildTree);
                            }
                        }else{
                            addSimpleAttribute(attributesList, uri, attributeLocalName, childValueTree);
                        }
View Full Code Here

        return;
      }
     
        switch(tree.getType()) {
        case JSONLexer.PAIR: {
            Tree valueTree = tree.getChild(1);
            if(valueTree.getType() == JSONLexer.ARRAY) {
                parse(valueTree);
            } else {             
                Tree stringTree = tree.getChild(0);
                String qualifiedName = stringTree.getText().substring(1, stringTree.getText().length() - 1);
                String localName = qualifiedName;
                if(attributePrefix != null && qualifiedName.startsWith(attributePrefix)){
                  break;
                }
                String uri = XMLConstants.EMPTY_STRING;
                if(namespaceAware && namespaces != null){
                  int nsIndex = localName.indexOf(namespaceSeparator);
                  if(nsIndex > -1){
                    String prefix = localName.substring(0, nsIndex);
                    localName = localName.substring(nsIndex + 1);
                    uri = namespaces.resolveNamespacePrefix(prefix);                   
                  }
                  if(localName.equals(XMLConstants.SCHEMA_TYPE_ATTRIBUTE) && uri.equals(XMLConstants.SCHEMA_INSTANCE_URL)){
                  break;
               
                }
               
                if(contentHandler instanceof XMLRootRecord || contentHandler instanceof DeferredContentHandler){
                  //if its not namespaceAware don't report the "type" child as it is will be read by the xsi:type lookup
                  if(!namespaceAware && localName.equals(XMLConstants.SCHEMA_TYPE_ATTRIBUTE)){
                    break;
                    }
                  if(textWrapper != null && textWrapper.equals(localName)){
                      parse(valueTree);
                      break;
                    }
                }else if(contentHandler instanceof UnmarshalRecord && ((UnmarshalRecord)contentHandler).getXPathNode() != null){
                  if(!namespaceAware && localName.equals(XMLConstants.SCHEMA_TYPE_ATTRIBUTE) && !((UnmarshalRecord)contentHandler).getXPathNode().hasTypeChild()){
                    break;
                  }
                  boolean isTextValue = isTextValue(localName);
                  if(isTextValue){
                      parse(valueTree);
                       break;
                  }
                }
            
                contentHandler.startElement(uri, localName, localName, attributes.setTree(valueTree, attributePrefix, namespaces, namespaceSeparator, namespaceAware));
                parse(valueTree);
                contentHandler.endElement(uri, localName, localName);               
            }
            break;
        }
        case JSONLexer.STRING: {
            String string = string(tree.getChild(0).getText());
            contentHandler.characters(string);
            break;
        }
        case JSONLexer.NUMBER: {
            contentHandler.characters(tree.getChild(0).getText());
            break;
        }
        case JSONLexer.TRUE: {
            contentHandler.characters(TRUE);
            break;
        }
        case JSONLexer.FALSE: {
            contentHandler.characters(FALSE);
            break;
        }
        case JSONLexer.NULL: {
            break;
        }
        case JSONLexer.ARRAY: {
            Tree parentStringTree = tree.getParent().getChild(0);
            String parentLocalName = parentStringTree.getText().substring(1, parentStringTree.getText().length() - 1);
           
            if(attributePrefix != null && parentLocalName.startsWith(attributePrefix)){
              break;
            }
           
View Full Code Here

TOP

Related Classes of org.eclipse.persistence.internal.libraries.antlr.runtime.tree.Tree

Copyright © 2018 www.massapicom. 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.