org.media.mn8
Class mn8Loader
java.lang.Object
|
+--org.media.mn8.mn8Loader
- public class mn8Loader
- extends java.lang.Object
- Version:
- $Revision: 1.26 $ $Date: 2002/06/05 14:56:14 $
- Author:
- Remus Pereni
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)
|
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 . |
static void |
main(java.lang.String[] args)
|
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 |
mn8Loader
public mn8Loader()
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 ConceptNotFoundException
instantiateConcept
public static JavaConcept instantiateConcept(java.lang.String name)
throws ConceptNotFoundException
loadConcept
public static void loadConcept(java.lang.String name)
throws 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.
- Parameters:
conceptName
- The name of the concept;- Returns:
- it's obvious ;)
getContent
public static java.lang.String getContent(java.lang.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 java.lang.String resolveClassName(java.lang.String className)
loadConceptFromURL
public static java.lang.String loadConceptFromURL(java.lang.String conceptURL,
java.lang.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.
- Parameters:
location
- The location of the conept to 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 java.lang.String loadConceptFromReader(java.io.Reader reader,
java.lang.String name)
findConcept
public java.lang.String findConcept(java.lang.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(java.lang.String[] args)
"Copyright © 2001 Internet Multicasting Services & media.org. All Rights Reserved."