Package org.openrdf.model

Examples of org.openrdf.model.Value


    return set;
  }

  private void next(Statement st) {
    destination.add(st);
    Value obj = st.getObject();
    if (obj instanceof BNode && !covered.contains(obj)) {
      organize((BNode)obj);
    }
  }
View Full Code Here


   *         its return value is not a Resource.
   */
  public static Resource getUniqueObjectResource(Graph graph, Resource subj, URI pred)
    throws GraphUtilException
  {
    Value obj = getUniqueObject(graph, subj, pred);

    if (obj instanceof Resource) {
      return (Resource)obj;
    }
    else {
View Full Code Here

   *         its return value is not a URI.
   */
  public static URI getUniqueObjectURI(Graph graph, Resource subj, URI pred)
    throws GraphUtilException
  {
    Value obj = getUniqueObject(graph, subj, pred);

    if (obj instanceof URI) {
      return (URI)obj;
    }
    else {
View Full Code Here

   *         its return value is not a Literal.
   */
  public static Literal getUniqueObjectLiteral(Graph graph, Resource subj, URI pred)
    throws GraphUtilException
  {
    Value obj = getUniqueObject(graph, subj, pred);

    if (obj instanceof Literal) {
      return (Literal)obj;
    }
    else {
View Full Code Here

   *         its return value is not a Resource.
   */
  public static Resource getOptionalObjectResource(Graph graph, Resource subj, URI pred)
    throws GraphUtilException
  {
    Value obj = getOptionalObject(graph, subj, pred);

    if (obj == null || obj instanceof Resource) {
      return (Resource)obj;
    }
    else {
View Full Code Here

   *         its return value is not a URI.
   */
  public static URI getOptionalObjectURI(Graph graph, Resource subj, URI pred)
    throws GraphUtilException
  {
    Value obj = getOptionalObject(graph, subj, pred);

    if (obj == null || obj instanceof URI) {
      return (URI)obj;
    }
    else {
View Full Code Here

   *         its return value is not a Literal.
   */
  public static Literal getOptionalObjectLiteral(Graph graph, Resource subj, URI pred)
    throws GraphUtilException
  {
    Value obj = getOptionalObject(graph, subj, pred);

    if (obj == null || obj instanceof Literal) {
      return (Literal)obj;
    }
    else {
View Full Code Here

    }

    try {
      Resource subject = (Resource)parsedValues.get(0);
      URI predicate = (URI)parsedValues.get(1);
      Value object = parsedValues.get(2);
      Resource[] contexts = createContexts(3);

      parsedValues.clear();

      if (subject == null || predicate == null || object == null) {
View Full Code Here

    }

    try {
      Resource subject = (Resource)parsedValues.get(0);
      URI predicate = (URI)parsedValues.get(1);
      Value object = parsedValues.get(2);
      Resource[] contexts = createContexts(3);

      parsedValues.clear();

      return new RemoveStatementsOperation(subject, predicate, object, contexts);
View Full Code Here

    throws SAXException
  {
    List<Resource> contexts = new ArrayList<Resource>();

    for (int i = startIdx; i < parsedValues.size(); i++) {
      Value contextCandidate = parsedValues.get(startIdx);

      if (contextCandidate == null || contextCandidate instanceof Resource) {
        contexts.add((Resource)contextCandidate);
      }
      else {
        throw new SAXException("Invalid context value: " + contextCandidate.getClass());
      }
    }

    return contexts.toArray(new Resource[contexts.size()]);
  }
View Full Code Here

TOP

Related Classes of org.openrdf.model.Value

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.