Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.media.mn8
Class mn8Loader  view mn8Loader download mn8Loader.java

java.lang.Object
  extended byorg.media.mn8.mn8Loader

public class mn8Loader
extends java.lang.Object

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

Field Summary
private static NamingManager _namingManager
           
private static ConceptRegister _register
           
private static java.lang.String _scriptName
           
 
Constructor Summary
mn8Loader()
           
 
Method Summary
 java.lang.String findConcept(java.lang.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(java.lang.String concept)
           
private  JavaConcept getConceptInstance(java.lang.String name)
           
static java.lang.String getContent(java.lang.String resourceURL)
          Returns the content of resource specified by the URL given as parameter.
static java.lang.String getScriptName()
           
static JavaConcept instantiateConcept(java.lang.String name)
           
static Concept instantiateConceptFromURL(java.lang.String conceptURL)
           
static boolean isConceptAvailable(java.lang.String conceptName)
          Tries to find if the Concepted specified by the concept name is available to mn8.
static void loadConcept(java.lang.String name)
           
 java.lang.String loadConceptFromReader(java.io.Reader reader, java.lang.String name)
           
static java.lang.String loadConceptFromURL(java.lang.String conceptURL, java.lang.String name)
          Loads a concept into the ConceptRegister.
private  boolean loadJavaConcept(java.lang.String name)
           
private  boolean lookInDS(java.lang.String path, java.lang.String name)
           
static void main(java.lang.String[] args)
           
private  java.lang.String makeSepURL(java.lang.String name)
           
static java.lang.String resolveClassName(java.lang.String className)
           
static void setScriptName(java.lang.String name)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_register

private static ConceptRegister _register

_namingManager

private static NamingManager _namingManager

_scriptName

private static java.lang.String _scriptName
Constructor Detail

mn8Loader

public mn8Loader()
Method Detail

setScriptName

public static void setScriptName(java.lang.String name)

getScriptName

public static java.lang.String getScriptName()

instantiateConceptFromURL

public static Concept instantiateConceptFromURL(java.lang.String conceptURL)
                                         throws org.media.mn8.event.ConceptNotFoundException

instantiateConcept

public static JavaConcept instantiateConcept(java.lang.String name)
                                      throws org.media.mn8.event.ConceptNotFoundException

loadConcept

public static void loadConcept(java.lang.String name)
                        throws org.media.mn8.event.ConceptNotFoundException

getConceptDefinition

public static ConceptDefinition getConceptDefinition(java.lang.String concept)

isConceptAvailable

public static boolean isConceptAvailable(java.lang.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.


getContent

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


resolveClassName

public static java.lang.String resolveClassName(java.lang.String className)

getConceptInstance

private JavaConcept getConceptInstance(java.lang.String name)
                                throws org.media.mn8.event.ConceptNotFoundException

loadJavaConcept

private boolean loadJavaConcept(java.lang.String name)

loadConceptFromURL

public static java.lang.String loadConceptFromURL(java.lang.String conceptURL,
                                                  java.lang.String name)
                                           throws org.media.mn8.event.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.


loadConceptFromReader

public java.lang.String loadConceptFromReader(java.io.Reader reader,
                                              java.lang.String name)

findConcept

public java.lang.String findConcept(java.lang.String name)
                             throws org.media.mn8.event.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.


lookInDS

private boolean lookInDS(java.lang.String path,
                         java.lang.String name)
                  throws java.lang.Exception

makeSepURL

private java.lang.String makeSepURL(java.lang.String name)
                             throws java.lang.Exception

main

public static void main(java.lang.String[] args)