/** * Loads the additional field mappings used by this cache from the yard. * This method sets the {@link #baseMapper} field during initialisation. * @param yard The yard * @param nsPrefixService if present '{prefix}:{localname}' configurations are * @return The parsed mappings or <code>null</code> if no found * @throws YardException on any Error while reading the {@link Representation} * holding the configuration from the {@link Yard}. * @throws IllegalArgumentException if <code>null</code> is parsed as {@link Yard}. */ protected static FieldMapper loadAdditionalMappings(Yard yard, NamespacePrefixService nsPrefixService) throws YardException { if(yard == null){ throw new IllegalArgumentException("The parsed Yard MUST NOT be NULL!"); } Representation addConfig = yard.getRepresentation(Cache.ADDITIONAL_CONFIGURATION_URI); if(addConfig != null){ FieldMapper mapper = readFieldConfig(yard,addConfig, nsPrefixService); if(mapper == null){ log.warn("Invalid Additinal Configuration: Unable to parse FieldMappings from Field "+Cache.FIELD_MAPPING_CONFIG_FIELD+"-> return NULL (no additional Configuration)"); if(log.isWarnEnabled()){ log.warn(ModelUtils.getRepresentationInfo(addConfig)); } } return mapper; } else { return null; } } /**
/** * Loads the additional field mappings used by this cache from the yard. * This method sets the {@link #baseMapper} field during initialisation. * @param yard The yard * @param nsPrefixService if present '{prefix}:{localname}' configurations are * @return The parsed mappings or <code>null</code> if no found * @throws YardException on any Error while reading the {@link Representation} * holding the configuration from the {@link Yard}. * @throws IllegalArgumentException if <code>null</code> is parsed as {@link Yard}. */ protected static FieldMapper loadAdditionalMappings(Yard yard, NamespacePrefixService nsPrefixService) throws YardException { if(yard == null){ throw new IllegalArgumentException("The parsed Yard MUST NOT be NULL!"); } Representation addConfig = yard.getRepresentation(Cache.ADDITIONAL_CONFIGURATION_URI); if(addConfig != null){ FieldMapper mapper = readFieldConfig(yard,addConfig, nsPrefixService); if(mapper == null){ log.warn("Invalid Additinal Configuration: Unable to parse FieldMappings from Field "+Cache.FIELD_MAPPING_CONFIG_FIELD+"-> return NULL (no additional Configuration)"); if(log.isWarnEnabled()){ log.warn(ModelUtils.getRepresentationInfo(addConfig)); } } return mapper; } else { return null; } } /**
fieldMapper.applyMappings(rep, clerezzaRep, valueFactory); if(log.isTraceEnabled()){ log.trace("dereferenced via Mappings {}", ModelUtils.getRepresentationInfo(clerezzaRep));
log.error(msg); if(log.isErrorEnabled()){ log.error(ModelUtils.getRepresentationInfo(baseConfig));
log.error(msg); if(log.isErrorEnabled()){ log.error(ModelUtils.getRepresentationInfo(baseConfig));
try { if(log.isTraceEnabled()){ log.trace("dereferenced all of {}", ModelUtils.getRepresentationInfo(rep));
log.info("RDFTerm: \n{}", ModelUtils.getRepresentationInfo(source));
log.info("RDFTerm: \n{}", ModelUtils.getRepresentationInfo(source));
log.trace("dereferenced via LDPath {}", ModelUtils.getRepresentationInfo(result));
if(log.isDebugEnabled()){ for(Representation tmp : representations.values()){ log.info(ModelUtils.getRepresentationInfo(tmp));