All Downloads are FREE. Search and download functionalities are using the official Maven repository.

it.tidalwave.semantic.io.impl.Converter Maven / Gradle / Ivy

There is a newer version: 1.0.16
Show newest version
/***********************************************************************************************************************
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 **********************************************************************************************************************/
package it.tidalwave.semantic.io.impl;

import it.tidalwave.util.Id;
import javax.annotation.Nonnull;
import org.openrdf.model.URI;
import org.openrdf.model.Value;
import org.openrdf.model.impl.URIImpl;

/***********************************************************************************************************************
 *
 * @author  Fabrizio Giudici
 * @version $Id: $
 *
 **********************************************************************************************************************/
public final class Converter
  {
    private Converter()
      {
      }

    @Nonnull
    public static URI idToUri (final @Nonnull Id id) // FIXME: idToValue()? 
      {
        return new URIImpl(id.stringValue()); // FIXME: use the Sesame factory
      }

    @Nonnull
    public static Id valueToId (final @Nonnull Value value)
      {
        return new Id(value.stringValue());
      }
  }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy