Codota Logo
IncorporealResourceLocation
Code IndexAdd Codota to your IDE (free)

How to use
IncorporealResourceLocation
in
org.deegree.workspace.standard

Best Java code snippets using org.deegree.workspace.standard.IncorporealResourceLocation (Showing top 4 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
SimpleDateFormat s =
  • Codota IconString pattern;new SimpleDateFormat(pattern)
  • Codota IconString template;Locale locale;new SimpleDateFormat(template, locale)
  • Codota Iconnew SimpleDateFormat()
  • Smart code suggestions by Codota
}
origin: deegree/deegree3

private void addStandardConfig( Workspace workspace, String name, String wkssId,
                List<ResourceMetadata<TileMatrixSet>> list ) {
  URL url = DefaultTileMatrixSetProvider.class.getResource( name + ".xml" );
  ResourceIdentifier<TileMatrixSet> id = new DefaultResourceIdentifier<TileMatrixSet>(
                                             TileMatrixSetProvider.class,
                                             name );
  byte[] bs;
  try {
    bs = IOUtils.toByteArray( url );
    ResourceLocation<TileMatrixSet> loc = new IncorporealResourceLocation<TileMatrixSet>( bs, id );
    DefaultTileMatrixSetMetadata md = new DefaultTileMatrixSetMetadata( workspace, loc, this );
    list.add( md );
    if ( wkssId != null ) {
      id = new DefaultResourceIdentifier<TileMatrixSet>( TileMatrixSetProvider.class, wkssId );
      loc = new IncorporealResourceLocation<TileMatrixSet>( bs, id );
      md = new DefaultTileMatrixSetMetadata( workspace, loc, this );
      list.add( md );
    }
  } catch ( IOException e ) {
    LOG.error( "Unable to load standard tile matrix set config {}.", id );
  }
}
origin: deegree/deegree3

  ResourceIdentifier<ConnectionProvider> rid;
  rid = new DefaultResourceIdentifier<ConnectionProvider>( ConnectionProviderProvider.class, id );
  return new IncorporealResourceLocation<ConnectionProvider>( bos.toByteArray(), rid );
} catch ( Exception e ) {
  throw new ResourceInitException( "Unable to create synthetic connection provider: "
origin: deegree/deegree3

/**
 * Adds and completely initializes a synthetic resource from string.
 * 
 * @param workspace
 *            may not be <code>null</code>
 * @param providerClass
 *            may not be <code>null</code>
 * @param id
 *            may not be <code>null</code>
 * @param content
 *            configuration content, may not be <code>null</code>
 * @return the initialized resource
 */
public static <T extends Resource> T activateSynthetic( Workspace workspace,
                            Class<? extends ResourceProvider<T>> providerClass,
                            String id, String content ) {
  IncorporealResourceLocation<? extends Resource> loc;
  ResourceIdentifier<T> identifier = new DefaultResourceIdentifier<T>( providerClass, id );
  Charset cs = Charset.forName( "UTF-8" );
  loc = new IncorporealResourceLocation<T>( content.getBytes( cs ), identifier );
  workspace.add( loc );
  workspace.prepare( identifier );
  return workspace.init( identifier, null );
}
origin: deegree/deegree3

/**
 * Adds and completely initializes a synthetic resource from an URL.
 * 
 * @param workspace
 *            may not be <code>null</code>
 * @param providerClass
 *            may not be <code>null</code>
 * @param id
 *            may not be <code>null</code>
 * @param content
 *            configuration content, may not be <code>null</code>
 * @return the initialized resource
 */
public static <T extends Resource> T activateFromUrl( Workspace workspace,
                           Class<? extends ResourceProvider<T>> providerClass,
                           String id, URL content ) {
  IncorporealResourceLocation<? extends Resource> loc;
  ResourceIdentifier<T> identifier = new DefaultResourceIdentifier<T>( providerClass, id );
  try {
    loc = new IncorporealResourceLocation<T>( IOUtils.toByteArray( content ), identifier );
    workspace.add( loc );
    workspace.prepare( identifier );
    return workspace.init( identifier, null );
  } catch ( Exception e ) {
    throw new ResourceInitException( "Unable to load URL " + content + ": " + e.getLocalizedMessage(), e );
  }
}
org.deegree.workspace.standardIncorporealResourceLocation

Javadoc

Memory based resource location.

Most used methods

  • <init>

Popular in Java

  • Reading from database using SQL prepared statement
  • runOnUiThread (Activity)
  • getSharedPreferences (Context)
  • startActivity (Activity)
  • InputStreamReader (java.io)
    An InputStreamReader is a bridge from byte streams to character streams: It reads bytes and decodes
  • KeyStore (java.security)
    This class represents an in-memory collection of keys and certificates. It manages two types of entr
  • ResultSet (java.sql)
    An interface for an object which represents a database table entry, returned as the result of the qu
  • StringTokenizer (java.util)
    The string tokenizer class allows an application to break a string into tokens. The tokenization met
  • ReentrantLock (java.util.concurrent.locks)
    A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor
  • ServletException (javax.servlet)
    Defines a general exception a servlet can throw when it encounters difficulty.
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