org.openrdf.idGenerator.IDGeneratorAnno4jURN Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of alibaba-repository-object Show documentation
Show all versions of alibaba-repository-object Show documentation
The Object Repository maps Java objects to and from RDF resources and OWL classes to Java classes in a non-intrusive manner that enables developers to work at the object level.
The newest version!
package org.openrdf.idGenerator;
import org.openrdf.model.Resource;
import org.openrdf.model.URI;
import org.openrdf.sail.memory.model.MemValueFactory;
import java.util.Set;
import java.util.UUID;
/**
* A IDGenerators using an urn:anno4j prefix. Not intended for real world applications.
*/
public class IDGeneratorAnno4jURN implements IDGenerator {
/**
* Generates a unique resource with an urn:anno4j prefix.
* @return a Resource containing a unique identifier.
* @param types
*/
@Override
public Resource generateID(Set types) {
return new MemValueFactory().createURI("urn:anno4j:" + UUID.randomUUID());
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy