public void statement(AResource sub, AResource pred, ALiteral lit) { String preduri = pred.getURI(); if (preduri.startsWith(RDFToTopicMapConverter.RTM_PREFIX)) return; if (recommend && !mappings.containsKey(preduri)) { String low = preduri.toLowerCase(); String mapsto = RDFToTopicMapConverter.RTM_OCCURRENCE; if (low.endsWith("name") || low.endsWith("title") || low.endsWith("label")) mapsto = RDFToTopicMapConverter.RTM_BASENAME; getMapping(preduri).setMapsTo(mapsto); } }
public void statement(AResource sub, AResource pred, AResource obj) { String preduri = pred.getURI(); if (preduri.equals(RDFToTopicMapConverter.RTM_MAPSTO)) { getMapping(sub.getURI()).setMapsTo(obj.getURI()); return; } if (preduri.startsWith(RDFToTopicMapConverter.RTM_PREFIX)) { RDFPropertyMapping mapping = getMapping(sub.getURI()); if (preduri.equals(RDFToTopicMapConverter.RTM_IN_SCOPE)) mapping.setInScope(obj.getURI()); else if (preduri.equals(RDFToTopicMapConverter.RTM_TYPE)) mapping.setType(obj.getURI()); else if (preduri.equals(RDFToTopicMapConverter.RTM_SUBJECT_ROLE)) mapping.setSubjectRole(obj.getURI()); else if (preduri.equals(RDFToTopicMapConverter.RTM_OBJECT_ROLE)) mapping.setObjectRole(obj.getURI()); } else if (recommend && !mappings.containsKey(preduri)) { String mapsto = (String) defaults.get(preduri); if (mapsto == null) mapsto = RDFToTopicMapConverter.RTM_ASSOCIATION; getMapping(preduri).setMapsTo(mapsto); } }