org.apache.jena.atlas.lib.Lib类的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(4.7k)|赞(0)|评价(0)|浏览(228)

本文整理了Java中org.apache.jena.atlas.lib.Lib类的一些代码示例,展示了Lib类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Lib类的具体详情如下:
包路径:org.apache.jena.atlas.lib.Lib
类名称:Lib

Lib介绍

暂无

代码示例

代码示例来源:origin: apache/jena

@Override
protected Binding moveToNextBinding()
{ throw new NoSuchElementException(Lib.className(this)) ; }

代码示例来源:origin: apache/jena

@Override
protected String getCommandName()
{
  return Lib.classShortName(rdfxml.class) ;
}

代码示例来源:origin: apache/jena

@Override
  public void run() {
    try {
      log.info(format("[%d] >> Sleep start", actionId)) ;
      Lib.sleep(sleepMilli) ;
      log.info(format("[%d] << Sleep finish", actionId)) ;
    } catch (Exception ex) {
      log.info(format("[%d] **** Exception", actionId), ex) ;
    }
  }
}

代码示例来源:origin: apache/jena

@Test
public void timeout_01() {
  // Test unstable on loaded Jenkins CI on Windows.
  String qs = prefix + "SELECT * { ?s ?p ?o }" ;
  QueryExecution qExec = QueryExecutionFactory.create(qs, ds) ;
  qExec.setTimeout(50, TimeUnit.MILLISECONDS) ;
  ResultSet rs = qExec.execSelect() ;
  sleep(timeout(100, 300)) ;
  exceptionExpected(rs) ; 
}

代码示例来源:origin: apache/jena

@Override
public void output(IndentedWriter out, SerializationContext sCxt)
{   
  out.println(Lib.className(this)+"/"+Lib.className(iterator)) ;
  out.incIndent() ;
  iterator.output(out, sCxt) ;
  out.decIndent() ;
  //out.println(Utils.className(this)+"/"+Utils.className(iterator)) ;
}

代码示例来源:origin: apache/jena

@Test
public void timeout_21()
{
  String qs = prefix + "SELECT * { ?s ?p ?o }" ;
  ARQ.getContext().set(ARQ.queryTimeout, "20,10") ;
  QueryExecution qExec = QueryExecutionFactory.create(qs, ds) ;
  ResultSet rs = qExec.execSelect() ;
  sleep(50) ;
  exceptionExpected(rs) ; 
}

代码示例来源:origin: apache/jena

@Override
  public void output(IndentedWriter out, SerializationContext cxt)
  {
    out.print(Lib.className(this)) ;
  }
}

代码示例来源:origin: apache/jena

@Override
  protected void details(IndentedWriter out, SerializationContext cxt)
  { 
    out.println(Lib.className(this)) ;
  }
}

代码示例来源:origin: apache/jena

public static void printPlan(Query query, QueryExecution qe)
{
  QueryEngineFactory f = QueryEngineRegistry.findFactory(query, qe.getDataset().asDatasetGraph(), ARQ.getContext()) ;
  if ( f == null )
    System.err.println("printPlan: Unknown engine type: "+Lib.className(qe)) ;
  
  Plan plan = f.create(query, qe.getDataset().asDatasetGraph(), BindingRoot.create(), ARQ.getContext()) ;
  SerializationContext sCxt = new SerializationContext(query) ;
  IndentedWriter out = IndentedWriter.stdout ;

  plan.output(out, sCxt) ;
  out.flush();
}

代码示例来源:origin: apache/jena

@Override
public final void remove()
{
  Log.warn(this, "Call to QueryIterator.remove() : "+Lib.className(this)+".remove") ;
  throw new UnsupportedOperationException(Lib.className(this)+".remove") ;
}

代码示例来源:origin: apache/jena

@Override
public int hashCode() {
  return 31*Lib.hashCodeObject(op,1) + Lib.hashCodeObject(unplaced) ;
}
@Override

代码示例来源:origin: apache/jena

/** Faster than CRC32, nearly as good.
 * @see Adler32
 */
public static long adler32(byte[] bytes) {
  return crc(new Adler32(), bytes) ;
}

代码示例来源:origin: apache/jena

@Test
public void timeout_04()
{
  String qs = prefix + "SELECT * { ?s ?p ?o }" ;
  try(QueryExecution qExec = QueryExecutionFactory.create(qs, ds)) {
    qExec.setTimeout(50, TimeUnit.MILLISECONDS) ;
    ResultSet rs = qExec.execSelect() ;
    ResultSetFormatter.consume(rs) ;
    sleep(100) ;
    rs.hasNext() ;         // Query ended - calling rs.hasNext() is safe.
  }
}

代码示例来源:origin: apache/jena

@Override
  protected void details(IndentedWriter out, SerializationContext sCxt)
  {
    out.println(Lib.className(this)) ;
    out.incIndent() ;
    op.output(out, sCxt) ;
    out.decIndent() ;
  }
}

代码示例来源:origin: apache/jena

@Test
public void timeout_20()
{
  String qs = prefix + "SELECT * { ?s ?p ?o }" ;
  ARQ.getContext().set(ARQ.queryTimeout, "20") ;
  QueryExecution qExec = QueryExecutionFactory.create(qs, ds) ;
  ResultSet rs = qExec.execSelect() ;
  sleep(50) ;
  exceptionExpected(rs) ; 
}

代码示例来源:origin: apache/jena

/** Normally overridden for better information */ 
  @Override
  public void output(IndentedWriter out)
  {
    out.print(Plan.startMarker) ;
    out.print(Lib.className(this)) ;
    out.print(Plan.finishMarker) ;
  }
}

代码示例来源:origin: apache/jena

@Override
  public void output(IndentedWriter out, SerializationContext sCxt)
  { out.println(Lib.className(this)) ; }
}

代码示例来源:origin: apache/jena

@Override
  public NodeValue exec(List<NodeValue> args) {
    if ( args.size() != 2 && args.size() != 3 )
      throw new ExprEvalException("Function '"+Lib.className(this)+"' takes two or three arguments") ;
    NodeValue value = args.get(0) ; 
    NodeValue picture = args.get(1) ;
    NodeValue decimalFormatName = null ;
    if ( args.size() == 3)
      decimalFormatName = args.get(2) ;
    return XSDFuncOp.formatNumber(value, picture, decimalFormatName) ;
  }
}

代码示例来源:origin: apache/jena

@Override
public int hashCode()
{
  return hashCodeObject(tokenType) ^
      hashCodeObject(tokenImage) ^
      hashCodeObject(tokenImage2) ^
      hashCodeObject(cntrlCode) ;
}

代码示例来源:origin: apache/jena

/** 
 * @see CRC32
 */
public static long crc32(byte[] bytes)
{
  return crc(new CRC32(), bytes) ;
}

相关文章