How does jMonekyEngine3 know what the available animations are for a given model?

I am trying to learn jMonkeyEngine3 and am about half-way through the tutorials. In the Animation Tutorial it says:

The [Animation] controller object gives you access to the available animation sequences.

The provided code example is:

private AnimChannel channel;
private AnimControl control;

public void simpleInitApp() {
    ...
    /* Load the animation controls, listen to animation events,
     * create an animation channel, and bring the model in its default position.  */
    control = player.getControl(AnimControl.class); 
    control.addListener(this);
    channel = control.createChannel();
    channel.setAnim("stand");
    ...
}

So it appears that you register specific 3D models with a respective AnimationControl instance, and then that AnimationControl acts as an API for driving animations of those models.

Where I’m struggling with is this line here:

channel.setAnim("stand");

Where is the "stand" animation defined? Is this something that you define in, say, Blender (or whatever modeling tool you’re using)? Meaning, would the 3D artist define an animation in the modeling tool for a specific model, and then assign it a string label “stand”? And then, subsequently, that “stand” label is embedded somewhere in the 3D model file, and jME3’s internal guts negotiate the file format to read the list of available animations for that particular model?

Is this basically what’s happening, or is it something else entirely? In other words, in order for setAnim("stand") to do something meaningful, “stand” has to be a defined animation somewhere. Where/how?

I use blender to export animations in the Ogre format - I get a mesh.xml and a skeleton.xml.

In blender, I name the animations in the Action Editor, and add them to a strip in the NLA editor. These same names are then present in the exported skeleton.xml.

The important detail though is that inside the mesh.xml (the one you load in the tutorial, Otto.mesh.xml) there is a line that has the name of the skeleton file. It’s something like Skeleton = “Oto.skeleton”

So when you load the mesh.xml, it automatically loads the skeleton.xml too using the name in the mesh.xml, and then can get the named animations from Oto.skeleton.xml.

(At least I think :P)

Yes. It is as you said.
In blender you can name your animations in Dope sheet menu :

And in JME you can get the name of animations for a model from AnimControl like this :

control.getAnimationNames();

Thanks for the clarification there guys, I figured it had to be something along those lines!