Codota Logo
NodeFactory
Code IndexAdd Codota to your IDE (free)

How to use
NodeFactory
in
com.hp.hpl.jena.graph

Best Java code snippets using com.hp.hpl.jena.graph.NodeFactory (Showing top 20 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Connection c =
  • Codota IconDataSource dataSource;dataSource.getConnection()
  • Codota IconString url;DriverManager.getConnection(url)
  • Codota IconIdentityDatabaseUtil.getDBConnection()
  • Smart code suggestions by Codota
}
origin: fr.inria.eventcloud/eventcloud-core

/**
 * Creates a sub subscription id URI from the specified
 * {@code subscriptionId} which is assumed to be a {@link SubscriptionId}.
 * 
 * @param subSubscriptionId
 *            the subscription identifier to use.
 * 
 * @return the sub subscription id URI as a Jena {@link Node_URI}.
 */
public static final Node createSubSubscriptionIdUri(String subSubscriptionId) {
  return NodeFactory.createURI(SUBSUBSCRIPTION_NS + subSubscriptionId);
}
origin: org.apache.clerezza.ext/org.apache.jena.jena-arq

  @Override
  public Node handle(Node node, String lexicalForm, RDFDatatype datatype)
  {
    return NodeFactory.createLiteral(lexicalForm) ;
  }
} ;
origin: org.apache.clerezza.ext/org.apache.jena.jena-core

static private Node makeURI(String uri) 
{ return uri == null ? NodeFactory.createAnon() : NodeFactory.createURI( uri ); }
origin: anno4j/anno4j

  @Override
  public Expr evaluate(NodeTest nodeTest, ElementGroup elementGroup, Var var, LDPathEvaluatorConfiguration evaluatorConfiguration) {
    PathEqualityTest pathEqualityTest = (PathEqualityTest) nodeTest;
    Var tmpVar =  LDPathEvaluator.evaluate(pathEqualityTest.getPath(), elementGroup, var, evaluatorConfiguration);
    if(pathEqualityTest.getNode() instanceof org.openrdf.model.impl.LiteralImpl) {
      return new E_Equals(new ExprVar(tmpVar.asNode()), new NodeValueNode(NodeFactory.createLiteral(((LiteralImpl) pathEqualityTest.getNode()).getLabel().toString())));
    } else {
      return new E_Equals(new ExprVar(tmpVar.asNode()), new NodeValueNode(NodeFactory.createURI(pathEqualityTest.getNode().toString())));
    }
  }
}
origin: org.apache.clerezza.ext/org.apache.jena.jena-arq

  @Override
  public Node create()
  {
    return NodeFactory.createAnon() ;
  }
}
origin: org.apache.clerezza.ext/org.apache.jena.jena-arq

public static NodeValue strDatatype(NodeValue v1, NodeValue v2) {
  if ( !v1.isString() )
    throw new ExprEvalException("Not a string (arg 1): " + v1) ;
  if ( !v2.isIRI() )
    throw new ExprEvalException("Not an IRI (arg 2): " + v2) ;
  String lex = v1.asString() ;
  Node dt = v2.asNode() ;
  // Check?
  Node n = NodeFactory.createLiteral(lex, null, NodeFactory.getType(dt.getURI())) ;
  return NodeValue.makeNode(n) ;
}
origin: org.apache.clerezza.ext/org.apache.jena.jena-core

/**
 * @deprecated Use {@link NodeFactory#getType(String)} instead
 */
@Deprecated
public static RDFDatatype getType( String s )
  {
    return NodeFactory.getType(s) ;
  }

origin: fr.inria.eventcloud/eventcloud-core

/**
 * {@inheritDoc}
 */
@Override
public Object parse(String lexicalForm) throws DatatypeFormatException {
  return NodeFactory.createVariable(lexicalForm);
}
origin: org.apache.clerezza.ext/org.apache.jena.jena-core

public Node allocNode()
{
  return NodeFactory.createAnon() ;
}

origin: org.apache.clerezza.ext/org.apache.jena.jena-arq

/** Cast a NodeValue to a date/time type (xsd dateTime, date, time, g*) according to F&O
 *  <a href="http://www.w3.org/TR/xpath-functions/#casting-to-datetimes">17.1.5 Casting to date and time types</a>
 *  Throws an exception on incorrect case.
 *   
 *  @throws ExprEvalTypeException  
 */

public static NodeValue dateTimeCast(NodeValue nv, String typeURI)
{
  RDFDatatype t = NodeFactory.getType(typeURI) ;
  return dateTimeCast(nv, t) ;
}
origin: org.apache.clerezza.ext/org.apache.jena.jena-core

/** make a variable node with a given name 
 * @deprecated Use {@link NodeFactory#createVariable(String)} instead*/
@Deprecated
public static Node createVariable( String name )
  {
    return NodeFactory.createVariable(name) ;
  }
  
origin: org.apache.clerezza.ext/org.apache.jena.jena-arq

public GraphSPARQL(DatasetGraph dataset, String uri)
{
  this(dataset, NodeFactory.createURI(uri)) ;
}
origin: org.apache.clerezza.ext/org.apache.jena.jena-arq

  @Override
  public Node handle(Node node, String lexicalForm, RDFDatatype datatype)
  {
    return NodeFactory.createLiteral(lexicalForm, "", datatype) ;
  }
} ;
origin: org.apache.clerezza.ext/org.apache.jena.jena-core

private static Node fresh( String uri )
  { return uri == null ? NodeFactory.createAnon() : NodeFactory.createURI( uri ); }
origin: org.apache.clerezza.ext/org.apache.jena.jena-core

public ResourceImpl(AnonId id, ModelCom m) {
  this( NodeFactory.createAnon( id ), m );
}
origin: org.apache.clerezza.ext/org.apache.jena.jena-core

protected Node createVariable(String s, int line, int column)
{
  s = s.substring(1) ; // Drop the marker
  return NodeFactory.createVariable(s) ;
}

origin: org.apache.clerezza.ext/org.apache.jena.jena-arq

public OpProcedure(String iri, ExprList args, Op op)
{
  this(NodeFactory.createURI(iri), args, op) ;
}

origin: org.apache.clerezza.ext/org.apache.jena.jena-arq

@Override
public Node createStringLiteral(String lexical, long line, long col)
{
  return NodeFactory.createLiteral(lexical) ;
}
origin: org.apache.clerezza.ext/org.apache.jena.jena-core

protected Node createNode(String iri)
{
  // Is it a bNode label? i.e. <_:xyz>
  if ( isBNodeIRI(iri) )
  {
    String s = iri.substring(bNodeLabelStart.length()) ;
    Node n = NodeFactory.createAnon(new AnonId(s)) ;
    return n ;
  }
  return NodeFactory.createURI(iri) ;
}

origin: org.apache.clerezza.ext/org.apache.jena.jena-core

/** make a blank node with the specified label 
 * @deprecated Use {@link NodeFactory#createAnon(AnonId)} instead*/
@Deprecated
public static Node createAnon( AnonId id )
  {
    return NodeFactory.createAnon(id) ;
  }
  
com.hp.hpl.jena.graphNodeFactory

Most used methods

  • createURI
    make a URI node with the specified URIref string
  • createLiteral
    make a literal with specified language and XMLishness. _lit_ must *not* be null.
  • createAnon
    make a blank node with the specified label
  • getType
  • createVariable
    make a variable node with a given name
  • createUncachedLiteral

Popular in Java

  • Start an intent from android
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • getSupportFragmentManager (FragmentActivity)
    Return the FragmentManager for interacting with fragments associated with this activity.
  • scheduleAtFixedRate (Timer)
    Schedules the specified task for repeated fixed-rate execution, beginning after the specified delay.
  • Socket (java.net)
    Provides a client-side TCP socket.
  • SocketTimeoutException (java.net)
    This exception is thrown when a timeout expired on a socket read or accept operation.
  • MessageFormat (java.text)
    MessageFormat provides a means to produce concatenated messages in language-neutral way. Use this to
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • JList (javax.swing)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now