private void recordMarshall(Marshall<?> marshall) { recordMarshall(marshall.getJavaClassName(), marshall); }
public ClassResolver(RoleMapper mapper, ClassLoader cl) throws ObjectStoreConfigException { this(mapper, new PropertyMapper(cl, mapper.isNamedTypePresent()), cl); }
/** * @return <code>true</code> If the given type can be used as a concept * parameter. */ public boolean isNamedConcept(Class<?> type) { return mapper.findType(type) != null; }
/** * Constructs a new compiler instance using the * existing Java classes referenced in the classpath. * */ public OWLCompiler(ClassLoader cl) throws ObjectStoreConfigException { assert cl != null; this.cl = cl; this.mapper = new RoleMapper(); new RoleClassLoader(mapper).loadRoles(cl); this.literals = new LiteralManager(cl); }
public Object createObject(Literal literal) { URI datatype = literal.getDatatype(); if (datatype == null) { if (literal.getLanguage() == null) { datatype = STRING; } else { datatype = LANG_STRING; } } Marshall<?> marshall = findMarshall(datatype); return marshall.deserialize(literal); }
public void addBehaviour(Class<?> role, URI type) throws ObjectStoreConfigException { assertBehaviour(role); recordRole(role, null, type, true, false, false); }
private void recordType(Class<?> javaClass, URI datatype) { if (!javaClasses.containsKey(datatype)) { javaClasses.putIfAbsent(datatype, javaClass); } if (rdfTypes.putIfAbsent(javaClass, datatype) == null) { Marshall<?> marshall = findMarshall(javaClass); marshall.setDatatype(datatype); } }
protected TypeManager createTypeManager() { return new TypeManager(mapper.isNamedTypePresent()); }
@SuppressWarnings("unchecked") public Literal createLiteral(Object object) { Marshall marshall = findMarshall(object.getClass()); return marshall.serialize(object); }
protected RoleMapper createRoleMapper(ValueFactory vf) throws ObjectStoreConfigException { return new RoleMapper(vf); }
private boolean intersects(Collection<Class<?>> roles, Collection<Class<?>> ofs) { for (Class<?> of : ofs) { if (!contains(roles, of)) return false; } return true; }
/** * Converts a literal into an object. */ public Object createObject(Literal literal) { return lm.createObject(literal); }
/** * Converts an object back into a literal. */ public Literal createLiteral(Object object) { return lm.createLiteral(object); }
protected PropertyMapper createPropertyMapper(ClassLoader cl) { return new PropertyMapper(cl, mapper.isNamedTypePresent()); }
private void recordMarshall(Marshall<?> marshall) { recordMarshall(marshall.getJavaClassName(), marshall); }
public Object createObject(Literal literal) { URI datatype = literal.getDatatype(); if (datatype == null) { if (literal.getLanguage() == null) { datatype = STRING; } else { datatype = LANG_STRING; } } Marshall<?> marshall = findMarshall(datatype); return marshall.deserialize(literal); }
public void addBehaviour(Class<?> role, URI type) throws ObjectStoreConfigException { assertBehaviour(role); recordRole(role, null, type, true, false, false); }
private void recordType(Class<?> javaClass, URI datatype) { if (!javaClasses.containsKey(datatype)) { javaClasses.putIfAbsent(datatype, javaClass); } if (rdfTypes.putIfAbsent(javaClass, datatype) == null) { Marshall<?> marshall = findMarshall(javaClass); marshall.setDatatype(datatype); } }
private boolean intersects(Collection<Class<?>> roles, Collection<Class<?>> ofs) { for (Class<?> of : ofs) { if (!contains(roles, of)) return false; } return true; }
/** * Converts a literal into an object. */ public Object createObject(Literal literal) { return lm.createObject(literal); }