当前位置: 首页>>代码示例>>Java>>正文


Java ANode类代码示例

本文整理汇总了Java中org.basex.query.value.node.ANode的典型用法代码示例。如果您正苦于以下问题:Java ANode类的具体用法?Java ANode怎么用?Java ANode使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


ANode类属于org.basex.query.value.node包,在下文中一共展示了ANode类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: call

import org.basex.query.value.node.ANode; //导入依赖的package包/类
public ANode call(Str str) throws IOException
{
  String input = str.toJava();
  SingleParser singleParser = new SingleParser(new IOContent(""), MainOptions.get())
  {
    @Override
    protected void parse() throws IOException {}
  };
  MemBuilder memBuilder = new MemBuilder(input, singleParser);
  memBuilder.init();
  BaseXTreeBuilder treeBuilder = new BaseXTreeBuilder(memBuilder);
  Parse_xquery_10 parser = new Parse_xquery_10();
  parser.initialize(input, treeBuilder);
  try
  {
    execute(parser);
  }
  catch (ParseException pe)
  {
    memBuilder = new MemBuilder(input, singleParser);
    memBuilder.init();
    Atts atts = new Atts();
    atts.add(Token.token("b"), Token.token(pe.getBegin() + 1));
    atts.add(Token.token("e"), Token.token(pe.getEnd() + 1));
    if (pe.getOffending() < 0)
    {
      atts.add(Token.token("s"), Token.token(pe.getState()));
    }
    else
    {
      atts.add(Token.token("o"), Token.token(pe.getOffending()));
      atts.add(Token.token("x"), Token.token(pe.getExpected()));
    }
    memBuilder.openElem(Token.token("ERROR"), atts, new Atts());
    memBuilder.text(Token.token(parser.getErrorMessage(pe)));
    memBuilder.closeElem();
  }
  return new DBNode(memBuilder.data());
}
 
开发者ID:expkg-zone58,项目名称:ex-xparse,代码行数:40,代码来源:Parse_xquery_10.java

示例2: parseTrigDoc

import org.basex.query.value.node.ANode; //导入依赖的package包/类
public static ANode parseTrigDoc(Str str) throws IOException
{
  BaseXFunction baseXFunction = new BaseXFunction()
  {
    @Override
    public void execute(Graphs p) {p.parse_trigDoc();}
  };
  return baseXFunction.call(str);
}
 
开发者ID:metadataframes,项目名称:basex-rdf,代码行数:10,代码来源:Graphs.java

示例3: call

import org.basex.query.value.node.ANode; //导入依赖的package包/类
public ANode call(Str str) throws IOException
{
  String input = str.toJava();
  SingleParser singleParser = new SingleParser(new IOContent(""), MainOptions.get())
  {
    @Override
    protected void parse() throws IOException {}
  };
  MemBuilder memBuilder = new MemBuilder(input, singleParser);
  memBuilder.init();
  BaseXTreeBuilder treeBuilder = new BaseXTreeBuilder(memBuilder);
  Graphs parser = new Graphs();
  parser.initialize(input, treeBuilder);
  try
  {
    execute(parser);
  }
  catch (ParseException pe)
  {
    memBuilder = new MemBuilder(input, singleParser);
    memBuilder.init();
    Atts atts = new Atts();
    atts.add(Token.token("b"), Token.token(pe.getBegin() + 1));
    atts.add(Token.token("e"), Token.token(pe.getEnd() + 1));
    if (pe.getOffending() < 0)
    {
      atts.add(Token.token("s"), Token.token(pe.getState()));
    }
    else
    {
      atts.add(Token.token("o"), Token.token(pe.getOffending()));
      atts.add(Token.token("x"), Token.token(pe.getExpected()));
    }
    memBuilder.openElem(Token.token("ERROR"), atts, new Atts());
    memBuilder.text(Token.token(parser.getErrorMessage(pe)));
    memBuilder.closeElem();
  }
  return new DBNode(memBuilder.data());
}
 
开发者ID:metadataframes,项目名称:basex-rdf,代码行数:40,代码来源:Graphs.java

示例4: parseComments

import org.basex.query.value.node.ANode; //导入依赖的package包/类
public static ANode parseComments(Str str) throws IOException
{
  BaseXFunction baseXFunction = new BaseXFunction()
  {
    @Override
    public void execute(Parse_XQDocComments p) {p.parse_Comments();}
  };
  return baseXFunction.call(str);
}
 
开发者ID:expkg-zone58,项目名称:ex-xparse,代码行数:10,代码来源:Parse_XQDocComments.java

示例5: call

import org.basex.query.value.node.ANode; //导入依赖的package包/类
public ANode call(Str str) throws IOException
{
  String input = str.toJava();
  SingleParser singleParser = new SingleParser(new IOContent(""), MainOptions.get())
  {
    @Override
    protected void parse() throws IOException {}
  };
  MemBuilder memBuilder = new MemBuilder(input, singleParser);
  memBuilder.init();
  BaseXTreeBuilder treeBuilder = new BaseXTreeBuilder(memBuilder);
  Parse_XQDocComments parser = new Parse_XQDocComments();
  parser.initialize(input, treeBuilder);
  try
  {
    execute(parser);
  }
  catch (ParseException pe)
  {
    memBuilder = new MemBuilder(input, singleParser);
    memBuilder.init();
    Atts atts = new Atts();
    atts.add(Token.token("b"), Token.token(pe.getBegin() + 1));
    atts.add(Token.token("e"), Token.token(pe.getEnd() + 1));
    if (pe.getOffending() < 0)
    {
      atts.add(Token.token("s"), Token.token(pe.getState()));
    }
    else
    {
      atts.add(Token.token("o"), Token.token(pe.getOffending()));
      atts.add(Token.token("x"), Token.token(pe.getExpected()));
    }
    memBuilder.openElem(Token.token("ERROR"), atts, new Atts());
    memBuilder.text(Token.token(parser.getErrorMessage(pe)));
    memBuilder.closeElem();
  }
  return new DBNode(memBuilder.data());
}
 
开发者ID:expkg-zone58,项目名称:ex-xparse,代码行数:40,代码来源:Parse_XQDocComments.java

示例6: parseXPath

import org.basex.query.value.node.ANode; //导入依赖的package包/类
public static ANode parseXPath(Str str) throws IOException
{
  BaseXFunction baseXFunction = new BaseXFunction()
  {
    @Override
    public void execute(Parse_xpath_30 p) {p.parse_XPath();}
  };
  return baseXFunction.call(str);
}
 
开发者ID:expkg-zone58,项目名称:ex-xparse,代码行数:10,代码来源:Parse_xpath_30.java

示例7: call

import org.basex.query.value.node.ANode; //导入依赖的package包/类
public ANode call(Str str) throws IOException
{
  String input = str.toJava();
  SingleParser singleParser = new SingleParser(new IOContent(""), MainOptions.get())
  {
    @Override
    protected void parse() throws IOException {}
  };
  MemBuilder memBuilder = new MemBuilder(input, singleParser);
  memBuilder.init();
  BaseXTreeBuilder treeBuilder = new BaseXTreeBuilder(memBuilder);
  Parse_xpath_30 parser = new Parse_xpath_30();
  parser.initialize(input, treeBuilder);
  try
  {
    execute(parser);
  }
  catch (ParseException pe)
  {
    memBuilder = new MemBuilder(input, singleParser);
    memBuilder.init();
    Atts atts = new Atts();
    atts.add(Token.token("b"), Token.token(pe.getBegin() + 1));
    atts.add(Token.token("e"), Token.token(pe.getEnd() + 1));
    if (pe.getOffending() < 0)
    {
      atts.add(Token.token("s"), Token.token(pe.getState()));
    }
    else
    {
      atts.add(Token.token("o"), Token.token(pe.getOffending()));
      atts.add(Token.token("x"), Token.token(pe.getExpected()));
    }
    memBuilder.openElem(Token.token("ERROR"), atts, new Atts());
    memBuilder.text(Token.token(parser.getErrorMessage(pe)));
    memBuilder.closeElem();
  }
  return new DBNode(memBuilder.data());
}
 
开发者ID:expkg-zone58,项目名称:ex-xparse,代码行数:40,代码来源:Parse_xpath_30.java

示例8: parseProgram

import org.basex.query.value.node.ANode; //导入依赖的package包/类
public static ANode parseProgram(Str str) throws IOException
{
  BaseXFunction baseXFunction = new BaseXFunction()
  {
    @Override
    public void execute(Parse_EcmaScript p) {p.parse_Program();}
  };
  return baseXFunction.call(str);
}
 
开发者ID:expkg-zone58,项目名称:ex-xparse,代码行数:10,代码来源:Parse_EcmaScript.java

示例9: call

import org.basex.query.value.node.ANode; //导入依赖的package包/类
public ANode call(Str str) throws IOException
{
  String input = str.toJava();
  SingleParser singleParser = new SingleParser(new IOContent(""), MainOptions.get())
  {
    @Override
    protected void parse() throws IOException {}
  };
  MemBuilder memBuilder = new MemBuilder(input, singleParser);
  memBuilder.init();
  BaseXTreeBuilder treeBuilder = new BaseXTreeBuilder(memBuilder);
  Parse_EcmaScript parser = new Parse_EcmaScript();
  parser.initialize(input, treeBuilder);
  try
  {
    execute(parser);
  }
  catch (ParseException pe)
  {
    memBuilder = new MemBuilder(input, singleParser);
    memBuilder.init();
    Atts atts = new Atts();
    atts.add(Token.token("b"), Token.token(pe.getBegin() + 1));
    atts.add(Token.token("e"), Token.token(pe.getEnd() + 1));
    if (pe.getOffending() < 0)
    {
      atts.add(Token.token("s"), Token.token(pe.getState()));
    }
    else
    {
      atts.add(Token.token("o"), Token.token(pe.getOffending()));
      atts.add(Token.token("x"), Token.token(pe.getExpected()));
    }
    memBuilder.openElem(Token.token("ERROR"), atts, new Atts());
    memBuilder.text(Token.token(parser.getErrorMessage(pe)));
    memBuilder.closeElem();
  }
  return new DBNode(memBuilder.data());
}
 
开发者ID:expkg-zone58,项目名称:ex-xparse,代码行数:40,代码来源:Parse_EcmaScript.java

示例10: parseXQuery

import org.basex.query.value.node.ANode; //导入依赖的package包/类
public static ANode parseXQuery(Str str) throws IOException
{
  BaseXFunction baseXFunction = new BaseXFunction()
  {
    @Override
    public void execute(Parse_BaseX p) {p.parse_XQuery();}
  };
  return baseXFunction.call(str);
}
 
开发者ID:expkg-zone58,项目名称:ex-xparse,代码行数:10,代码来源:Parse_BaseX.java

示例11: call

import org.basex.query.value.node.ANode; //导入依赖的package包/类
public ANode call(Str str) throws IOException
{
  String input = str.toJava();
  SingleParser singleParser = new SingleParser(new IOContent(""), MainOptions.get())
  {
    @Override
    protected void parse() throws IOException {}
  };
  MemBuilder memBuilder = new MemBuilder(input, singleParser);
  memBuilder.init();
  BaseXTreeBuilder treeBuilder = new BaseXTreeBuilder(memBuilder);
  Parse_BaseX parser = new Parse_BaseX();
  parser.initialize(input, treeBuilder);
  try
  {
    execute(parser);
  }
  catch (ParseException pe)
  {
    memBuilder = new MemBuilder(input, singleParser);
    memBuilder.init();
    Atts atts = new Atts();
    atts.add(Token.token("b"), Token.token(pe.getBegin() + 1));
    atts.add(Token.token("e"), Token.token(pe.getEnd() + 1));
    if (pe.getOffending() < 0)
    {
      atts.add(Token.token("s"), Token.token(pe.getState()));
    }
    else
    {
      atts.add(Token.token("o"), Token.token(pe.getOffending()));
      atts.add(Token.token("x"), Token.token(pe.getExpected()));
    }
    memBuilder.openElem(Token.token("ERROR"), atts, new Atts());
    memBuilder.text(Token.token(parser.getErrorMessage(pe)));
    memBuilder.closeElem();
  }
  return new DBNode(memBuilder.data());
}
 
开发者ID:expkg-zone58,项目名称:ex-xparse,代码行数:40,代码来源:Parse_BaseX.java

示例12: parseXQuery

import org.basex.query.value.node.ANode; //导入依赖的package包/类
public static ANode parseXQuery(Str str) throws IOException
{
  BaseXFunction baseXFunction = new BaseXFunction()
  {
    @Override
    public void execute(Parse_xquery_30 p) {p.parse_XQuery();}
  };
  return baseXFunction.call(str);
}
 
开发者ID:expkg-zone58,项目名称:ex-xparse,代码行数:10,代码来源:Parse_xquery_30.java

示例13: call

import org.basex.query.value.node.ANode; //导入依赖的package包/类
public ANode call(Str str) throws IOException
{
  String input = str.toJava();
  SingleParser singleParser = new SingleParser(new IOContent(""), MainOptions.get())
  {
    @Override
    protected void parse() throws IOException {}
  };
  MemBuilder memBuilder = new MemBuilder(input, singleParser);
  memBuilder.init();
  BaseXTreeBuilder treeBuilder = new BaseXTreeBuilder(memBuilder);
  Parse_xquery_30 parser = new Parse_xquery_30();
  parser.initialize(input, treeBuilder);
  try
  {
    execute(parser);
  }
  catch (ParseException pe)
  {
    memBuilder = new MemBuilder(input, singleParser);
    memBuilder.init();
    Atts atts = new Atts();
    atts.add(Token.token("b"), Token.token(pe.getBegin() + 1));
    atts.add(Token.token("e"), Token.token(pe.getEnd() + 1));
    if (pe.getOffending() < 0)
    {
      atts.add(Token.token("s"), Token.token(pe.getState()));
    }
    else
    {
      atts.add(Token.token("o"), Token.token(pe.getOffending()));
      atts.add(Token.token("x"), Token.token(pe.getExpected()));
    }
    memBuilder.openElem(Token.token("ERROR"), atts, new Atts());
    memBuilder.text(Token.token(parser.getErrorMessage(pe)));
    memBuilder.closeElem();
  }
  return new DBNode(memBuilder.data());
}
 
开发者ID:expkg-zone58,项目名称:ex-xparse,代码行数:40,代码来源:Parse_xquery_30.java

示例14: parseGrammar

import org.basex.query.value.node.ANode; //导入依赖的package包/类
public static ANode parseGrammar(Str str) throws IOException
{
  BaseXFunction baseXFunction = new BaseXFunction()
  {
    @Override
    public void execute(Parse_REx p) {p.parse_Grammar();}
  };
  return baseXFunction.call(str);
}
 
开发者ID:expkg-zone58,项目名称:ex-xparse,代码行数:10,代码来源:Parse_REx.java

示例15: call

import org.basex.query.value.node.ANode; //导入依赖的package包/类
public ANode call(Str str) throws IOException
{
  String input = str.toJava();
  SingleParser singleParser = new SingleParser(new IOContent(""), MainOptions.get())
  {
    @Override
    protected void parse() throws IOException {}
  };
  MemBuilder memBuilder = new MemBuilder(input, singleParser);
  memBuilder.init();
  BaseXTreeBuilder treeBuilder = new BaseXTreeBuilder(memBuilder);
  Parse_REx parser = new Parse_REx();
  parser.initialize(input, treeBuilder);
  try
  {
    execute(parser);
  }
  catch (ParseException pe)
  {
    memBuilder = new MemBuilder(input, singleParser);
    memBuilder.init();
    Atts atts = new Atts();
    atts.add(Token.token("b"), Token.token(pe.getBegin() + 1));
    atts.add(Token.token("e"), Token.token(pe.getEnd() + 1));
    if (pe.getOffending() < 0)
    {
      atts.add(Token.token("s"), Token.token(pe.getState()));
    }
    else
    {
      atts.add(Token.token("o"), Token.token(pe.getOffending()));
      atts.add(Token.token("x"), Token.token(pe.getExpected()));
    }
    memBuilder.openElem(Token.token("ERROR"), atts, new Atts());
    memBuilder.text(Token.token(parser.getErrorMessage(pe)));
    memBuilder.closeElem();
  }
  return new DBNode(memBuilder.data());
}
 
开发者ID:expkg-zone58,项目名称:ex-xparse,代码行数:40,代码来源:Parse_REx.java


注:本文中的org.basex.query.value.node.ANode类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。