it.tidalwave.semantic.io.impl.Converter Maven / Gradle / Ivy
/***********************************************************************************************************************
* 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