org.eclipse.rdf4j.model.impl

## Class ValidatingValueFactory

- java.lang.Object
- - org.eclipse.rdf4j.model.impl.ValidatingValueFactory

- All Implemented Interfaces:
    ValueFactory

      public class ValidatingValueFactory
      extends Object
      implements ValueFactory

  Validating wrapper to `ValueFactory`. Use this class in situations where a caller may be prone to errors.
  Author:
    James Leigh

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ValidatingValueFactory()`
    `ValidatingValueFactory(ValueFactory delegate)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `BNode` | `createBNode()` Creates a new bNode.
    `BNode` | `createBNode(String nodeID)` Creates a new blank node with the given node identifier.
    `IRI` | `createIRI(String iri)` Creates a new IRI from the supplied string-representation.
    `IRI` | `createIRI(String namespace, String localName)` Creates a new IRI from the supplied namespace and local name.
    `Literal` | `createLiteral(BigDecimal bigDecimal)` Creates a new literal representing the specified bigDecimal that is typed as an `xsd:Decimal`.
    `Literal` | `createLiteral(BigInteger bigInteger)` Creates a new literal representing the specified bigInteger that is typed as an `xsd:Integer`.
    `Literal` | `createLiteral(boolean value)` Creates a new `xsd:boolean`-typed literal representing the specified value.
    `Literal` | `createLiteral(byte value)` Creates a new `xsd:byte`-typed literal representing the specified value.
    `Literal` | `createLiteral(Date date)` Creates a new literal representing the specified date that is typed using the appropriate XML Schema date/time datatype.
    `Literal` | `createLiteral(double value)` Creates a new `xsd:double`-typed literal representing the specified value.
    `Literal` | `createLiteral(float value)` Creates a new `xsd:float`-typed literal representing the specified value.
    `Literal` | `createLiteral(int value)` Creates a new `xsd:int`-typed literal representing the specified value.
    `Literal` | `createLiteral(long value)` Creates a new `xsd:long`-typed literal representing the specified value.
    `Literal` | `createLiteral(short value)` Creates a new `xsd:short`-typed literal representing the specified value.
    `Literal` | `createLiteral(String label)` Creates a new literal with the supplied label.
    `Literal` | `createLiteral(String label, IRI datatype)` Creates a new literal with the supplied label and datatype.
    `Literal` | `createLiteral(String label, String language)` Creates a new literal with the supplied label and language attribute.
    `Literal` | `createLiteral(String label, URI datatype)` Creates a new literal with the supplied label and datatype.
    `Literal` | `createLiteral(java.time.temporal.TemporalAccessor value)` Creates a new literal representing a temporal accessor value.
    `Literal` | `createLiteral(java.time.temporal.TemporalAmount value)` Creates a new literal representing a temporal amount value.
    `Literal` | `createLiteral(XMLGregorianCalendar calendar)` Creates a new literal representing the specified calendar that is typed using the appropriate XML Schema date/time datatype.
    `Statement` | `createStatement(Resource subject, IRI predicate, Value object)` Creates a new statement with the supplied subject, predicate and object.
    `Statement` | `createStatement(Resource subject, IRI predicate, Value object, Resource context)` Creates a new statement with the supplied subject, predicate and object and associated context.
    `Statement` | `createStatement(Resource subject, URI predicate, Value object)` Creates a new statement with the supplied subject, predicate and object.
    `Statement` | `createStatement(Resource subject, URI predicate, Value object, Resource context)` Creates a new statement with the supplied subject, predicate and object and associated context.
    `Triple` | `createTriple(Resource subject, IRI predicate, Value object)` Creates a new RDF* triple with the supplied subject, predicate and object.
    `URI` | `createURI(String uri)` Creates a new URI from the supplied string-representation.
    `URI` | `createURI(String namespace, String localName)` Creates a new URI from the supplied namespace and local name.

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

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

- - ### Constructor Detail

    - #### ValidatingValueFactory

          public ValidatingValueFactory()

    - #### ValidatingValueFactory

          public ValidatingValueFactory(ValueFactory delegate)

  - ### Method Detail

    - #### createIRI

          public IRI createIRI(String iri)

      Description copied from interface: `ValueFactory`
      Creates a new IRI from the supplied string-representation.
      Specified by:
        `createIRI` in interface `ValueFactory`
      Parameters:
        `iri` - A string-representation of a IRI.
      Returns:
        An object representing the IRI.

    - #### createIRI

          public IRI createIRI(String namespace,
                               String localName)

      Description copied from interface: `ValueFactory`
      Creates a new IRI from the supplied namespace and local name. Calling this method is funtionally equivalent to calling `createIRI(namespace+localName)`, but allows the ValueFactory to reuse supplied namespace and local name strings whenever possible. Note that the values returned by `IRI.getNamespace()` and `IRI.getLocalName()` are not necessarily the same as the values that are supplied to this method.
      Specified by:
        `createIRI` in interface `ValueFactory`
      Parameters:
        `namespace` - The IRI's namespace.
        `localName` - The IRI's local name.

    - #### createBNode

          public BNode createBNode(String nodeID)

      Description copied from interface: `ValueFactory`
      Creates a new blank node with the given node identifier.
      Specified by:
        `createBNode` in interface `ValueFactory`
      Parameters:
        `nodeID` - The blank node identifier.
      Returns:
        An object representing the blank node.

    - #### createLiteral

          public Literal createLiteral(String label,
                                       IRI datatype)

      Description copied from interface: `ValueFactory`
      Creates a new literal with the supplied label and datatype.
      Specified by:
        `createLiteral` in interface `ValueFactory`
      Parameters:
        `label` - The literal's label, must not be `null`.
        `datatype` - The literal's datatype. If it is null, the datatype `xsd:string` will be assigned to this literal.

    - #### createLiteral

          public Literal createLiteral(String label,
                                       String language)

      Description copied from interface: `ValueFactory`
      Creates a new literal with the supplied label and language attribute. The return value of `Literal.getDatatype()` for the returned object must be `rdf:langString`.
      Specified by:
        `createLiteral` in interface `ValueFactory`
      Parameters:
        `label` - The literal's label, must not be `null`.
        `language` - The literal's language attribute, must not be `null`.

    - #### createURI

          public URI createURI(String uri)

      Description copied from interface: `ValueFactory`
      Creates a new URI from the supplied string-representation.
      Specified by:
        `createURI` in interface `ValueFactory`
      Parameters:
        `uri` - A string-representation of a URI.
      Returns:
        An object representing the URI.

    - #### createURI

          public URI createURI(String namespace,
                               String localName)

      Description copied from interface: `ValueFactory`
      Creates a new URI from the supplied namespace and local name.
      Specified by:
        `createURI` in interface `ValueFactory`
      Parameters:
        `namespace` - The IRI's namespace.
        `localName` - The IRI's local name.
      Returns:
        An object representing the URI.

    - #### createLiteral

          public Literal createLiteral(String label,
                                       URI datatype)

      Description copied from interface: `ValueFactory`
      Creates a new literal with the supplied label and datatype.
      Specified by:
        `createLiteral` in interface `ValueFactory`
      Parameters:
        `label` - The literal's label.
        `datatype` - The literal's datatype. If it is null, the datatype `xsd:string` will be assigned to this literal.

    - #### createBNode

          public BNode createBNode()

      Description copied from interface: `ValueFactory`
      Creates a new bNode.
      Specified by:
        `createBNode` in interface `ValueFactory`
      Returns:
        An object representing the bNode.

    - #### createLiteral

          public Literal createLiteral(String label)

      Description copied from interface: `ValueFactory`
      Creates a new literal with the supplied label. The return value of `Literal.getDatatype()` for the returned object must be `xsd:string`.
      Specified by:
        `createLiteral` in interface `ValueFactory`
      Parameters:
        `label` - The literal's label, must not be `null`.

    - #### createLiteral

          public Literal createLiteral(boolean value)

      Description copied from interface: `ValueFactory`
      Creates a new `xsd:boolean`-typed literal representing the specified value.
      Specified by:
        `createLiteral` in interface `ValueFactory`
      Parameters:
        `value` - The value for the literal.
      Returns:
        An `xsd:boolean`-typed literal for the specified value.

    - #### createLiteral

          public Literal createLiteral(byte value)

      Description copied from interface: `ValueFactory`
      Creates a new `xsd:byte`-typed literal representing the specified value.
      Specified by:
        `createLiteral` in interface `ValueFactory`
      Parameters:
        `value` - The value for the literal.
      Returns:
        An `xsd:byte`-typed literal for the specified value.

    - #### createLiteral

          public Literal createLiteral(short value)

      Description copied from interface: `ValueFactory`
      Creates a new `xsd:short`-typed literal representing the specified value.
      Specified by:
        `createLiteral` in interface `ValueFactory`
      Parameters:
        `value` - The value for the literal.
      Returns:
        An `xsd:short`-typed literal for the specified value.

    - #### createLiteral

          public Literal createLiteral(int value)

      Description copied from interface: `ValueFactory`
      Creates a new `xsd:int`-typed literal representing the specified value.
      Specified by:
        `createLiteral` in interface `ValueFactory`
      Parameters:
        `value` - The value for the literal.
      Returns:
        An `xsd:int`-typed literal for the specified value.

    - #### createLiteral

          public Literal createLiteral(long value)

      Description copied from interface: `ValueFactory`
      Creates a new `xsd:long`-typed literal representing the specified value.
      Specified by:
        `createLiteral` in interface `ValueFactory`
      Parameters:
        `value` - The value for the literal.
      Returns:
        An `xsd:long`-typed literal for the specified value.

    - #### createLiteral

          public Literal createLiteral(float value)

      Description copied from interface: `ValueFactory`
      Creates a new `xsd:float`-typed literal representing the specified value.
      Specified by:
        `createLiteral` in interface `ValueFactory`
      Parameters:
        `value` - The value for the literal.
      Returns:
        An `xsd:float`-typed literal for the specified value.

    - #### createLiteral

          public Literal createLiteral(double value)

      Description copied from interface: `ValueFactory`
      Creates a new `xsd:double`-typed literal representing the specified value.
      Specified by:
        `createLiteral` in interface `ValueFactory`
      Parameters:
        `value` - The value for the literal.
      Returns:
        An `xsd:double`-typed literal for the specified value.

    - #### createLiteral

          public Literal createLiteral(BigDecimal bigDecimal)

      Description copied from interface: `ValueFactory`
      Creates a new literal representing the specified bigDecimal that is typed as an `xsd:Decimal`.
      Specified by:
        `createLiteral` in interface `ValueFactory`

    - #### createLiteral

          public Literal createLiteral(BigInteger bigInteger)

      Description copied from interface: `ValueFactory`
      Creates a new literal representing the specified bigInteger that is typed as an `xsd:Integer`.
      Specified by:
        `createLiteral` in interface `ValueFactory`

    - #### createLiteral

          public Literal createLiteral(java.time.temporal.TemporalAccessor value)

      Description copied from interface: `ValueFactory`
      Creates a new literal representing a temporal accessor value.
      Specified by:
        `createLiteral` in interface `ValueFactory`
      Parameters:
        `value` - the temporal accessor value for the literal
      Returns:
        a literal representing the specified temporal accessor `value` with the appropriate XML Schema date/time datatype

    - #### createLiteral

          public Literal createLiteral(java.time.temporal.TemporalAmount value)

      Description copied from interface: `ValueFactory`
      Creates a new literal representing a temporal amount value.
      Specified by:
        `createLiteral` in interface `ValueFactory`
      Parameters:
        `value` - the temporal amount value for the literal
      Returns:
        a literal representing the specified temporal amount `value` with the appropriate XML Schema duration datatype

    - #### createLiteral

          public Literal createLiteral(XMLGregorianCalendar calendar)

      Description copied from interface: `ValueFactory`
      Creates a new literal representing the specified calendar that is typed using the appropriate XML Schema date/time datatype.
      Specified by:
        `createLiteral` in interface `ValueFactory`
      Parameters:
        `calendar` - The value for the literal.
      Returns:
        A typed literal for the specified calendar.

    - #### createLiteral

          public Literal createLiteral(Date date)

      Description copied from interface: `ValueFactory`
      Creates a new literal representing the specified date that is typed using the appropriate XML Schema date/time datatype.
      Specified by:
        `createLiteral` in interface `ValueFactory`

    - #### createStatement

          public Statement createStatement(Resource subject,
                                           IRI predicate,
                                           Value object)

      Description copied from interface: `ValueFactory`
      Creates a new statement with the supplied subject, predicate and object.
      Specified by:
        `createStatement` in interface `ValueFactory`
      Parameters:
        `subject` - The statement's subject.
        `predicate` - The statement's predicate.
        `object` - The statement's object.
      Returns:
        The created statement.

    - #### createStatement

          public Statement createStatement(Resource subject,
                                           IRI predicate,
                                           Value object,
                                           Resource context)

      Description copied from interface: `ValueFactory`
      Creates a new statement with the supplied subject, predicate and object and associated context.
      Specified by:
        `createStatement` in interface `ValueFactory`
      Parameters:
        `subject` - The statement's subject.
        `predicate` - The statement's predicate.
        `object` - The statement's object.
        `context` - The statement's context.
      Returns:
        The created statement.

    - #### createStatement

          public Statement createStatement(Resource subject,
                                           URI predicate,
                                           Value object)

      Description copied from interface: `ValueFactory`
      Creates a new statement with the supplied subject, predicate and object.
      Specified by:
        `createStatement` in interface `ValueFactory`
      Parameters:
        `subject` - The statement's subject.
        `predicate` - The statement's predicate.
        `object` - The statement's object.
      Returns:
        The created statement.

    - #### createStatement

          public Statement createStatement(Resource subject,
                                           URI predicate,
                                           Value object,
                                           Resource context)

      Description copied from interface: `ValueFactory`
      Creates a new statement with the supplied subject, predicate and object and associated context.
      Specified by:
        `createStatement` in interface `ValueFactory`
      Parameters:
        `subject` - The statement's subject.
        `predicate` - The statement's predicate.
        `object` - The statement's object.
      Returns:
        The created statement.

    - #### createTriple

          public Triple createTriple(Resource subject,
                                     IRI predicate,
                                     Value object)

      Description copied from interface: `ValueFactory`
      Creates a new RDF* triple with the supplied subject, predicate and object.
      Specified by:
        `createTriple` in interface `ValueFactory`
      Parameters:
        `subject` - The statement's subject.
        `predicate` - The statement's predicate.
        `object` - The statement's object.
      Returns:
        The created triple.

Copyright © 2015-2020 Eclipse Foundation. All Rights Reserved.