
org.ontoware.rdf2go.model.impl.URIGenerator Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of rdf2go.api Show documentation
Show all versions of rdf2go.api Show documentation
RDF2go is an implementation-independent Java API with the design
goals: portability (hence the name), performance and ease of
implementation.
This project was started at FZI Forschungszentrum Informatik Karlsruhe, Germany - www.fzi.de
The newest version!
/**
* LICENSE INFORMATION
*
* Copyright 2005-2008 by FZI (http://www.fzi.de).
* Licensed under a BSD license (http://www.opensource.org/licenses/bsd-license.php)
* = Max Völkel
* = FZI Forschungszentrum Informatik Karlsruhe, Karlsruhe, Germany
* = 2010
*
* Further project information at http://semanticweb.org/wiki/RDF2Go
*/
package org.ontoware.rdf2go.model.impl;
import java.rmi.server.UID;
import org.ontoware.rdf2go.model.node.URI;
import org.ontoware.rdf2go.model.node.impl.URIImpl;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* Uses UUIDs.
*
* @author voelkel
*
*/
public class URIGenerator {
@SuppressWarnings("unused")
private static final Logger log = LoggerFactory.getLogger(URIGenerator.class);
public static URI createNewRandomUniqueURI() {
return new URIImpl("urn:rnd:" + new UID().toString());
}
/**
* @param uriPrefix - must include schema information
* @return a new, random unique URI starting with uriPrefix
*/
public static URI createNewRandomUniqueURI(String uriPrefix) {
return new URIImpl(uriPrefix + new UID().toString());
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy