org.media.mn8
Class mn8Loader

java.lang.Object
  |
  +--org.media.mn8.mn8Loader

public class mn8Loader
extends Object

Version:
$Revision: 1.30 $ $Date: 2002/09/18 00:00:55 $
Author:
Remus Pereni

Constructor Summary
mn8Loader()
           
 
Method Summary
 String findConcept(String name)
          Tries to find the concept by looking first in the mem://registry/concepts/, then in env://registry/concepts/, then in the directories or URL specified in, the mem://registry/conceptspath/ and at the end env://registry/conceptspath.
static ConceptDefinition getConceptDefinition(String concept)
           
static String getContent(String resourceURL)
          Returns the content of resource specified by the URL given as parameter.
static String getScriptName()
           
static JavaConcept instantiateConcept(String name)
           
static Concept instantiateConceptFromURL(String conceptURL)
           
static boolean isConceptAvailable(String conceptName)
          Tries to find if the Concepted specified by the concept name is available to mn8.
static void loadConcept(String name)
           
 String loadConceptFromReader(Reader reader, String name)
           
static String loadConceptFromURL(String conceptURL, String name)
          Loads a concept into the ConceptRegister.
static void main(String[] args)
           
static String resolveClassName(String className)
           
static void setScriptName(String name)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

mn8Loader

public mn8Loader()
Method Detail

setScriptName

public static void setScriptName(String name)

getScriptName

public static String getScriptName()

instantiateConceptFromURL

public static Concept instantiateConceptFromURL(String conceptURL)
                                         throws ConceptNotFoundException
ConceptNotFoundException

instantiateConcept

public static JavaConcept instantiateConcept(String name)
                                      throws ConceptNotFoundException
ConceptNotFoundException

loadConcept

public static void loadConcept(String name)
                        throws ConceptNotFoundException
ConceptNotFoundException

getConceptDefinition

public static ConceptDefinition getConceptDefinition(String concept)

isConceptAvailable

public static boolean isConceptAvailable(String conceptName)
Tries to find if the Concepted specified by the concept name is available to mn8. This is done, by looking first in the concept register, if it is not there it tries to use find in order to see if it is there somewhere and not loaded yet.

Just not to forget. All the JavaConcepts will be specified in a configuration file, so, searching for them should not be too dificult, if the concept is not there and it's not in the register either, that means that it might be an mn8 script and is probably located in the script path somewere.

Parameters:
conceptName - The name of the concept;
Returns:
it's obvious ;)

getContent

public static String getContent(String resourceURL)
Returns the content of resource specified by the URL given as parameter.

Parameters:
resourceURL - The URL of the resource
Returns:
The content of the resource

resolveClassName

public static String resolveClassName(String className)

loadConceptFromURL

public static String loadConceptFromURL(String conceptURL,
                                        String name)
                                 throws ConceptNotFoundException
Loads a concept into the ConceptRegister. Because the Java concepts are accessed through the registry where it has a name asociated, through this method only the mn8 concepts will be loaded.

Returns:
The name of type of the concept desctribed by conceptURL.
Throws:
ConceptNotFoundException - If the concept is not found at the specified location.

loadConceptFromReader

public String loadConceptFromReader(Reader reader,
                                    String name)

findConcept

public String findConcept(String name)
                   throws ConceptNotFoundException
Tries to find the concept by looking first in the mem://registry/concepts/, then in env://registry/concepts/, then in the directories or URL specified in, the mem://registry/conceptspath/ and at the end env://registry/conceptspath.

Parameters:
name - The name of the concept (Concept Type)
Returns:
the exact URL of the location of the concept
Throws:
ConceptNotFoundException - if the concept was not found

main

public static void main(String[] args)


"Copyright © 2000-2002 Internet Multicasting Services, media.org & noLimits Technologies. All Rights Reserved."