Codota Logo
FieldMapper.applyMappings
Code IndexAdd Codota to your IDE (free)

How to use
applyMappings
method
in
org.apache.stanbol.entityhub.servicesapi.mapping.FieldMapper

Best Java code snippets using org.apache.stanbol.entityhub.servicesapi.mapping.FieldMapper.applyMappings (Showing top 8 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Charset c =
  • Codota IconString charsetName;Charset.forName(charsetName)
  • Codota IconCharset.defaultCharset()
  • Codota IconContentType contentType;contentType.getCharset()
  • Smart code suggestions by Codota
}
origin: apache/stanbol

@Override
public Representation process(Representation source) {
  if(mapper == null){
    throw new IllegalStateException("The mapper is not initialised. One must call setConfiguration to configure the FieldMapper!");
  }
  if(source == null){
    return null;
  } else {
    return mapper.applyMappings(source,
      vf.createRepresentation(source.getId()),
      vf);
  }
}
/**
origin: org.apache.stanbol/org.apache.stanbol.entityhub.indexing.core

@Override
public Representation process(Representation source) {
  if(mapper == null){
    throw new IllegalStateException("The mapper is not initialised. One must call setConfiguration to configure the FieldMapper!");
  }
  if(source == null){
    return null;
  } else {
    return mapper.applyMappings(source,
      vf.createRepresentation(source.getId()),
      vf);
  }
}
/**
origin: apache/stanbol

try {
  RdfRepresentation clerezzaRep = valueFactory.createRdfRepresentation(uri, graph);
  fieldMapper.applyMappings(rep, clerezzaRep, valueFactory);
    if(log.isTraceEnabled()){
    log.trace("dereferenced via Mappings {}", ModelUtils.getRepresentationInfo(clerezzaRep));
origin: org.apache.stanbol/org.apache.stanbol.entityhub.core

/**
 * Applies the mappings defined by the {@link #baseMapper} and the {@link #additionalMapper}
 * to the parsed Representation.
 *
 * @param yard The yard (local reference to avoid syncronization)
 * @param representation The representation to map
 * @return the mapped representation
 */
private Representation applyCacheMappings(Yard yard, Representation representation) {
  long start = System.currentTimeMillis();
  Representation mapped = null;
  ValueFactory valueFactory = getValueFactory();
  if (baseMapper != null) {
    mapped = yard.getValueFactory().createRepresentation(representation.getId());
    baseMapper.applyMappings(representation, mapped,valueFactory);
  }
  if (additionalMapper != null) {
    if (mapped == null) {
      mapped = yard.getValueFactory().createRepresentation(representation.getId());
    }
    additionalMapper.applyMappings(representation, mapped,valueFactory);
  }
  log.info("  -- applied mappings in " + (System.currentTimeMillis() - start) + "ms");
  return mapped != null ? mapped : representation;
}
origin: apache/stanbol

/**
 * Applies the mappings defined by the {@link #baseMapper} and the {@link #additionalMapper}
 * to the parsed Representation.
 *
 * @param yard The yard (local reference to avoid syncronization)
 * @param representation The representation to map
 * @return the mapped representation
 */
private Representation applyCacheMappings(Yard yard, Representation representation) {
  long start = System.currentTimeMillis();
  Representation mapped = null;
  ValueFactory valueFactory = getValueFactory();
  if (baseMapper != null) {
    mapped = yard.getValueFactory().createRepresentation(representation.getId());
    baseMapper.applyMappings(representation, mapped,valueFactory);
  }
  if (additionalMapper != null) {
    if (mapped == null) {
      mapped = yard.getValueFactory().createRepresentation(representation.getId());
    }
    additionalMapper.applyMappings(representation, mapped,valueFactory);
  }
  log.info("  -- applied mappings in " + (System.currentTimeMillis() - start) + "ms");
  return mapped != null ? mapped : representation;
}
origin: apache/stanbol

/**
 * Stores the parsed representation to the Yard and also applies the
 * configured {@link #getFieldMapper() FieldMappings}.
 * @param The representation to store
 */
@Override
public void store(Representation representation) throws ManagedSiteException {
  try {
    Yard yard = getYard();
    fieldMapper.applyMappings(representation, representation, yard.getValueFactory());
    yard.store(representation);
  }  catch (YardException e) {
    throw new ManagedSiteException(e.getMessage(), e);
  }
  
}
/**
origin: org.apache.stanbol/org.apache.stanbol.entityhub.core

mapper.applyMappings(remoteEntity.getRepresentation(), 
  localEntity.getRepresentation(),valueFactory);
origin: apache/stanbol

mapper.applyMappings(remoteEntity.getRepresentation(), 
  localEntity.getRepresentation(),valueFactory);
org.apache.stanbol.entityhub.servicesapi.mappingFieldMapperapplyMappings

Javadoc

Uses the state of the source representation and the configured mappings to update the state of the target Representation. The state of the source Representation is not modified. Existing values in the target are not removed nor modified. If the same instance is parsed as source and target representation, fields created by the mapping process are NOT used as source fields for further mappings.

Popular methods of FieldMapper

  • addMapping
    Adds a FieldMapping.
  • clone
    Creates a clone of this FieldMapper instance with shallow copies of the FieldMapping instances
  • getMappings
    Getter for the unmodifiable collection of all mappings

Popular in Java

  • Creating JSON documents from java classes using gson
  • getSharedPreferences (Context)
  • requestLocationUpdates (LocationManager)
  • getResourceAsStream (ClassLoader)
    Returns a stream for the resource with the specified name. See #getResource(String) for a descriptio
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • Window (java.awt)
    A Window object is a top-level window with no borders and no menubar. The default layout for a windo
  • InputStream (java.io)
    A readable source of bytes.Most clients will use input streams that read data from the file system (
  • Socket (java.net)
    Provides a client-side TCP socket.
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
  • Runner (org.openjdk.jmh.runner)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now