org.deri.wsmo4j.locator
Class LocatorImpl

java.lang.Object
  extended by org.deri.wsmo4j.locator.LocatorImpl
All Implemented Interfaces:
org.wsmo.locator.Locator

public class LocatorImpl
extends Object
implements org.wsmo.locator.Locator

This locator is meant to be used for importing wsml files. He looks for a file given its IRI, and parses it into an WSMO object model. By default, the locator only imports ontologies from logical URIs. Given a mapping from logical URIs to physical locations, he can also locate ontologies from physical locations. This feature is enabled by submitting a HashMap containing such a mapping in the preferences map. HashMap preferences = new HashMap(); HashMap mapping = new HashMap(); mapping.put(...,...); preferences.put(Factory.PROVIDER_CLASS, "org.deri.wsmo4j.locator.LocatorImpl"); preferences.put(Locator.URI_MAPPING, mapping);

  Created on Aug 22, 2006
  Committed by $Author: morcen $
  $Source$,
 

Version:
$Revision: 1946 $ $Date: 2007-04-02 15:13:28 +0300 (Mon, 02 Apr 2007) $
Author:
nathalie.steinmetz@deri.org

Field Summary
 
Fields inherited from interface org.wsmo.locator.Locator
URI_MAPPING
 
Constructor Summary
LocatorImpl(Map prefs)
           
 
Method Summary
 Set<org.wsmo.common.Entity> lookup(org.wsmo.common.Identifier id)
           
 org.wsmo.common.Entity lookup(org.wsmo.common.Identifier id, Class clazz)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LocatorImpl

public LocatorImpl(Map prefs)
Method Detail

lookup

public Set<org.wsmo.common.Entity> lookup(org.wsmo.common.Identifier id)
                                   throws org.wsmo.common.exception.SynchronisationException
Specified by:
lookup in interface org.wsmo.locator.Locator
Throws:
org.wsmo.common.exception.SynchronisationException

lookup

public org.wsmo.common.Entity lookup(org.wsmo.common.Identifier id,
                                     Class clazz)
Specified by:
lookup in interface org.wsmo.locator.Locator


Copyright © 2004-2008 Ontotext Lab.. All Rights Reserved.