directToType.put(mappedPath.get(0).getUID(), type);
@Test public void VverrideWithinClass() { Configuration configuration = new DefaultConfiguration(TEST.NS, WithinClass.class); MappedClass mappedClass = configuration.getMappedClass(WithinClass.class); MappedPath path = mappedClass.getMappedPath("reference"); assertEquals(new UID(TEST.NS, "reference"), path.get(0).getUID()); MappedProperty<?> property = path.getMappedProperty(); assertTrue(property.isInjection()); }
MappedProperty<?> property = path.getMappedProperty(); if (path.isSimpleProperty()) { MappedPredicate mappedPredicate = path.get(0); UID predicate = mappedPredicate.getUID(); if (mappedPredicate.getContext() != null) {
private Set<NODE> findPathValues(ID resource, MappedPath path, int index, PropertiesMap properties, UID context) { MappedPredicate predicate = path.get(index); if (predicate.getContext() != null) { context = predicate.getContext(); } Set<NODE> values; if (!predicate.inv() && properties.getDirect() != null) { values = findValues(predicate.getUID(), properties.getDirect(), context, predicate.inv()); } else if (predicate.inv() && properties.getInverse() != null) { values = findValues(predicate.getUID(), properties.getInverse(), null, predicate.inv()); } else { values = findValues(resource, predicate.getUID(), predicate.inv(), predicate.includeInferred(), context); } if (path.size() > index + 1) { Set<NODE> nestedValues = new LinkedHashSet<NODE>(); for (NODE value : values) { if (value.isResource()) { nestedValues.addAll(findPathValues((ID) value, path, index + 1, new PropertiesMap(null, null), context)); } } return nestedValues; } return values; }
@SuppressWarnings("unchecked") private void processProperty(Session session, Map<UID, RDFSResource> resources, OWLClass owlClass, UID cuid, MappedPath mappedPath) { MappedProperty<?> mappedProperty = mappedPath.getMappedProperty(); MappedPredicate mappedPredicate = mappedPath.get(0); UID puid = mappedPredicate.getUID(); String predicateNs = puid.ns();