Package com.stardog.stark.util

# Class ResourceBuilder

java.lang.Object
com.stardog.stark.util.ResourceBuilder

public final class ResourceBuilder extends Object

Utility class for creating a `Graph` where all the `statements` are about a particular `resource`

Since:
  1.0
Version:
  1.0
Author:
  Michael Grove

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ResourceBuilder(Resource theRes)`
  `ResourceBuilder(Set<Statement> theGraph, Resource theRes)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `ResourceBuilder`
  `addLabel(String theLabel)`
  `ResourceBuilder`
  `addProperty(IRI theProperty, ResourceBuilder theBuilder)`
  `ResourceBuilder`
  `addProperty(IRI theProperty, Value theValue)`
  `ResourceBuilder`
  `addProperty(IRI theProperty, Boolean theValue)`
  `ResourceBuilder`
  `addProperty(IRI theProperty, Double theValue)`
  `ResourceBuilder`
  `addProperty(IRI theProperty, Float theValue)`
  `ResourceBuilder`
  `addProperty(IRI theProperty, Integer theValue)`
  `ResourceBuilder`
  `addProperty(IRI theProperty, Long theValue)`
  `ResourceBuilder`
  `addProperty(IRI theProperty, Object theObject)`
  `ResourceBuilder`
  `addProperty(IRI theProperty, Short theValue)`
  `ResourceBuilder`
  `addProperty(IRI theProperty, String theValue)`
  `ResourceBuilder`
  `addProperty(IRI theProperty, URI theURI)`
  `ResourceBuilder`
  `addProperty(IRI theProperty, Date theValue)`
  Add a xsd:dateTime property to the resource
  `ResourceBuilder`
  `addProperty(IRI theProperty, List<? extends Value> theList)`
  `ResourceBuilder`
  `addProperty(IRI theProperty, Set<? extends Value> theSet)`
  `ResourceBuilder`
  `addType(IRI theType)`
  `Set<Statement>`
  `graph()`
  `Resource`
  `subject()`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### ResourceBuilder

    public ResourceBuilder(@Nonnull Resource theRes)

  - ### ResourceBuilder

    public ResourceBuilder(@Nonnull Set<Statement> theGraph, @Nonnull Resource theRes)

- ## Method Details

  - ### addProperty

    @Nonnull public ResourceBuilder addProperty(@Nonnull IRI theProperty, @Nonnull URI theURI)

  - ### addProperty

    @Nonnull public ResourceBuilder addProperty(@Nonnull IRI theProperty, @Nonnull List<? extends Value> theList)

  - ### addProperty

    @Nonnull public ResourceBuilder addProperty(@Nonnull IRI theProperty, @Nullable Value theValue)

  - ### addProperty

    @Nonnull public ResourceBuilder addProperty(@Nonnull IRI theProperty, @Nullable Set<? extends Value> theSet)

  - ### subject

    @Nonnull public Resource subject()

  - ### graph

    @Nonnull public Set<Statement> graph()

  - ### addProperty

    @Nonnull public ResourceBuilder addProperty(@Nonnull IRI theProperty, @Nullable ResourceBuilder theBuilder)

  - ### addProperty

    @Nonnull public ResourceBuilder addProperty(@Nonnull IRI theProperty, @Nullable String theValue)

  - ### addProperty

    @Nonnull public ResourceBuilder addProperty(@Nonnull IRI theProperty, @Nullable Integer theValue)

  - ### addProperty

    @Nonnull public ResourceBuilder addProperty(@Nonnull IRI theProperty, @Nullable Long theValue)

  - ### addProperty

    @Nonnull public ResourceBuilder addProperty(@Nonnull IRI theProperty, @Nullable Short theValue)

  - ### addProperty

    @Nonnull public ResourceBuilder addProperty(@Nonnull IRI theProperty, @Nullable Double theValue)

  - ### addProperty

    @Nonnull public ResourceBuilder addProperty(@Nonnull IRI theProperty, @Nullable Date theValue)
    Add a xsd:dateTime property to the resource
    Parameters:
      `theProperty` - the property
      `theValue` - the date-time object
    Returns:
      this builder

  - ### addProperty

    @Nonnull public ResourceBuilder addProperty(@Nonnull IRI theProperty, @Nullable Float theValue)

  - ### addProperty

    @Nonnull public ResourceBuilder addProperty(@Nonnull IRI theProperty, @Nullable Boolean theValue)

  - ### addProperty

    @Nonnull public ResourceBuilder addProperty(@Nonnull IRI theProperty, @Nullable Object theObject)

  - ### addLabel

    @Nonnull public ResourceBuilder addLabel(@Nullable String theLabel)

  - ### addType

    @Nonnull public ResourceBuilder addType(@Nullable IRI theType)