org.openrdf.repository.object.ObjectServiceImpl 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.repository.object;
import java.io.File;
import java.util.ArrayList;
import java.util.Collection;
import org.openrdf.repository.object.composition.ClassResolver;
import org.openrdf.repository.object.exceptions.ObjectStoreConfigException;
import org.openrdf.repository.object.managers.LiteralManager;
import org.openrdf.repository.object.managers.RoleMapper;
public class ObjectServiceImpl implements ObjectService {
static final Collection temporary = new ArrayList();
private final LiteralManager literals;
private final ClassResolver resolver;
public ObjectServiceImpl() throws ObjectStoreConfigException {
this(Thread.currentThread().getContextClassLoader());
}
public ObjectServiceImpl(ClassLoader cl) throws ObjectStoreConfigException {
if (cl == null) {
cl = getClass().getClassLoader();
}
this.literals = new LiteralManager(cl);
resolver = new ClassResolver(cl);
}
public ObjectServiceImpl(RoleMapper mapper, LiteralManager literalManager,
ClassLoader cl) throws ObjectStoreConfigException {
this.literals = literalManager;
resolver = new ClassResolver(mapper, cl);
}
public ObjectFactory createObjectFactory() {
return new ObjectFactory(resolver, literals);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy