本文整理汇总了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());
}
示例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);
}
示例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());
}
示例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);
}
示例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());
}
示例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);
}
示例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());
}
示例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);
}
示例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());
}
示例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);
}
示例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());
}
示例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);
}
示例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());
}
示例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);
}
示例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());
}