[kepler-dev] Kepler ontology
Chad Berkley
berkley at nceas.ucsb.edu
Mon Nov 5 09:42:46 PST 2007
Hi,
You should not have to alter the owl files unless you want to change the
structure of the tree. The placement of actors in kepler is determined
by the "semanticType" property which tells kepler where to place the
actor in the actor library ontology.
The best way to add an actor in kepler is to do the following:
1) make a new directory in src/actors for your new actor
2) add an actor metadata file. you can just copy one from one of the
other directories and then edit it.
3) add or edit the name, class and documentation. Note that in the root
<entity> node, the class should be "ptolemy.kernel.ComponentEntity" for
atomics and "org.kepler.moml.CompositeClassEntity" for composits. Add
your custom actor class name to the <property name="class"> entity.
Don't worry about the lsid for the class. It's not used (yet).
4) add or edit the lsid to be unique. You can either use the
kepler-project.org namespace, in which case the newest object number
should be in the README file in src/actors, or you can make your own
namespace. For instance urn:lsid:mynewnamespace.com:actor:1:1.
5) add or edit the semanticTypes properties. The value should be the
lsid of the ontology with an anchor into the ontology for the leaf node
where you want your actor to show up in the tree. For instance,
urn:lsid:localhost:onto:2:1#GeneralPurpose links puts tha actor in the
GeneralPurpose category of the
configs/ptolemy/configs/kepler/ontologies/kepler-component.owl file.
You can find the lsid of the ontology in the xml:base attribute of the
ontology. All of the ontologies are located in
configs/ptolemy/configs/kepler/ontologies.
6) run 'ant buildkarlib' and your kar file with your new actor will be
built. The next time you run kepler, you should see your actor in the tree.
We know it's kind of complicated, but the ontology system allows us to
be very flexible in how we categorize components. It will also allow us
to use advanced semantic querying in the future.
Here's an example (very simple) actor metadata file with comments:
<?xml version="1.0"?>
<entity name="My New Actor" class="ptolemy.kernel.ComponentEntity">
<!--here's where you change the lsid-->
<property name="entityId" value="urn:lsid:mynewnamespace:actor:1:1"
class="org.kepler.moml.NamedObjId"/>
<!-- documentation removed. the keplerDocumentation element is
required though.-->
<!--add your actors class here-->
<property name="class" value="my.class.Name"
class="ptolemy.kernel.util.StringAttribute">
<!-- don't worry about this property.-->
<property name="id" value="urn:lsid:kepler-project.org:class:943:1"
class="ptolemy.kernel.util.StringAttribute"/>
</property>
<!--define your ports here-->
<property name="input" class="org.kepler.moml.PortAttribute">
<property name="direction" value="input"
class="ptolemy.kernel.util.StringAttribute"/>
<property name="dataType" value="unknown"
class="ptolemy.kernel.util.StringAttribute"/>
<property name="isMultiport" value="false"
class="ptolemy.kernel.util.StringAttribute"/>
</property>
<property name="output" class="org.kepler.moml.PortAttribute">
<property name="direction" value="output"
class="ptolemy.kernel.util.StringAttribute"/>
<property name="dataType" value="unknown"
class="ptolemy.kernel.util.StringAttribute"/>
<property name="isMultiport" value="false"
class="ptolemy.kernel.util.StringAttribute"/>
</property>
<!-- put semantic types here. your actor can have multiple types, but
the names must be unique -->
<property name="semanticType00"
value="urn:lsid:localhost:onto:1:1#ArithmeticMathOperationActor"
class="org.kepler.sms.SemanticType"/>
<property name="semanticType11"
value="urn:lsid:localhost:onto:2:1#ArithmeticOperation"
class="org.kepler.sms.SemanticType"/>
</entity>
Hope that helps a bit. let me know if you have more questions. Also,
feel free to jump on IRC (irc.ecoinformatics.org) and we can chat about
this.
chad
Izabell Caraconcea wrote:
> Hello All,
> I would like to see my own actors in the actor tree, in a new category,
> for example Project / <project name>
> I don't think that editing the owl file would be enough.
> At this point, I'm adding them under "General Purpose" branch.
> I created a special icon for my project, I can see it on the canvas but
> not in the tree. Why?
>
> Thank you,
> Izabell
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Kepler-dev mailing list
> Kepler-dev at ecoinformatics.org
> http://mercury.nceas.ucsb.edu/ecoinformatics/mailman/listinfo/kepler-dev
More information about the Kepler-dev
mailing list