Package com.tnsai.roles.export
Interface RoleExporter
- All Known Implementing Classes:
JADEExporter,JasonExporter,JsonRoleExporter,SCOPExporter,YamlRoleExporter
public interface RoleExporter
Interface for exporting Role definitions to various formats.
Implementations can export to JSON, YAML, AgentSpeak, JADE, SCOP, etc.
Usage
RoleExporter exporter = new JsonRoleExporter();
String json = exporter.export(myRole);
// Or from class
String json = exporter.exportFromClass(MyRole.class);
- Author:
- TnsAI Team
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionexport(ExportedRole metadata) Exports role metadata to the target format.Exports a Role instance to the target format.exportFromClass(Class<? extends Role> roleClass) Exports a Role class (using annotations) to the target format.Returns the file extension for this export format.Returns the format name.Returns the MIME type for this export format.
-
Method Details
-
export
Exports a Role instance to the target format.- Parameters:
role- the role to export- Returns:
- exported string representation
-
exportFromClass
Exports a Role class (using annotations) to the target format.- Parameters:
roleClass- the role class with annotations- Returns:
- exported string representation
-
export
Exports role metadata to the target format.- Parameters:
metadata- the extracted role metadata- Returns:
- exported string representation
-
getFileExtension
String getFileExtension()Returns the file extension for this export format.- Returns:
- file extension (e.g., "json", "yaml", "asl")
-
getMimeType
String getMimeType()Returns the MIME type for this export format.- Returns:
- MIME type
-
getFormatName
String getFormatName()Returns the format name.- Returns:
- format name (e.g., "JSON", "YAML", "AgentSpeak")
-