ptolemy.kernel.util
Interface MoMLExportable
- All Superinterfaces:
- Nameable
- All Known Implementing Classes:
- Absent, AbsoluteValue, AbsoluteValue, AbstractActionsAttribute, AbstractCalInterpreter, AbstractPlaceableActor, AbstractSettableAttribute, AbstractTextAttribute, Accumulator, Accumulator, Accumulator, Action, ActorGraphTableau, ActorGraphTableau.Factory, ActorNameIcon, ActorRecursion, ActorScopeExtender, AdaptiveMedian, AddSubtract, AddSubtract, AnnotationEditorFactory, AnythingToDouble, ApplianceController, ApplyFilterOverArray, ApplyFunction, ApplyFunctionOverSequence, Argument, ArrayAppend, ArrayAppend, ArrayAverage, ArrayAverage, ArrayContains, ArrayElement, ArrayElement, ArrayElementAsMatrix, ArrayElementAsMatrix, ArrayExtract, ArrayExtract, ArrayLength, ArrayLength, ArrayLevelCrossing, ArrayLevelCrossing, ArrayMaximum, ArrayMaximum, ArrayMinimum, ArrayMinimum, ArrayPeakSearch, ArrayPeakSearch, ArrayPeakSearch, ArrayPlotter, ArrayPlotterXY, ArrayRemoveElement, ArraySort, ArraySum, ArrayToElements, ArrayToElements, ArrayToSequence, ArrayToSequence, ArrowKeySensor, AtomicActor, AtomicActorMatcher, AtomicWirelessChannel, Attribute, AttributeExpressionAttribute, AttributeValueAttribute, AttributeValueIcon, AudioCapture, AudioPlayer, AudioPlayer, AudioPlayer, AudioReadBuffer, AudioReader, AudioReader, AudioSDLActor, AudioWriteBuffer, AudioWriter, AudioWriter, Autocorrelation, Autocorrelation, Average, Average, Average, BackDropQueue, Backtrack, BackwardEulerSolver, BarGraph, Barrier, Barrier, BaseSDFScheduler, BaseUnit, Bernoulli, Bernoulli, BinarySwitch, BitsToInt, BitsToInt, BooleanMultiplexor, BooleanMultiplexor, BooleanSelect, BooleanSelect, BooleanSelect, BooleanSwitch, BooleanSwitch, BooleanSwitch, BooleanToAnything, BooleanToAnything, Box2D, Box3D, BoxedValueIcon, BoxedValuesIcon, BrowserEffigy, BrowserEffigy.Factory, BrowserTableau, BrowserTableau.Factory, Buffer, Buffer, BusAssembler, BusDisassembler, ButtonTime, CachedSDFScheduler, CalInterpreter, CartesianToComplex, CartesianToComplex, CartesianToPolar, CartesianToPolar, Case, Case, Case, CaseDirector, CaseGraphTableau, CaseGraphTableau.Factory, CCodeGenerator, CCodeGeneratorHelper, ChannelPort, CheckBoxStyle, ChoiceStyle, Chop, Chop, Chop, CIActor, CIDirector, CipherActor, CircularSweep3D, ClassWrapper, ClipPlayer, Clock, CodegenActor, CodegenActor, CodeGenerator, CodeGeneratorGUIFactory, CodeGeneratorHelper, CollisionDetector, ColorAttribute, ColorFinder, ColtBeta, ColtBinomial, ColtBinomialSelector, ColtBreitWigner, ColtChiSquare, ColtExponential, ColtExponentialPower, ColtGamma, ColtHyperGeometric, ColtLogarithmic, ColtNegativeBinomial, ColtNormal, ColtPoisson, ColtPoissonSlow, ColtRandomSource, ColtStudentT, ColtVonMises, ColtZeta, CommandListener, CommitActionsAttribute, Commutator, Commutator, Commutator, Comparator, Comparator, CompiledCompositeActor, CompiledCompositeActor, ComplexAddSubtract, ComplexToCartesian, ComplexToCartesian, ComplexToPolar, ComponentEntity, ComponentPort, ComponentRelation, CompositeActor, CompositeActorMatcher, CompositeEntity, CompositeProcessDirector, ComputeHistogram, ComputeHistogram, Cone3D, ConfigurableAttribute, Configuration, ConfigurationEffigy, Const, Const, Constraint, ContextMenuFactoryCreator, ContinuousClock, ContinuousDirector, ContinuousIntegrator, ContinuousScheduler, ContinuousTransferFunction, Converter, ConvolutionalCoder, CopyCatIcon, Counter, Counter, Counter, CountTrues, CountTrues, Course, CryptographyActor, CSPActor, CSPBuffer, CSPDirector, CSPMultiSink, CSPMultiSource, CSPSieve, CSPSink, CSPSource, CTBaseIntegrator, CTCase, CTCaseDirector, CTCompositeActor, CTCompositeActor, CTDirector, CTEmbeddedDirector, CTMixedSignalDirector, CTMultiSolverDirector, CTPeriodicSampler, CTRateLimiter, CTRefinement, CTScheduler, CTTriggeredSampler, Current, CurrentTime, CurrentTime, Cylinder3D, DatagramReader, DatagramWriter, DB, DB, DDEActor, DDEDirector, DDEIOPort, DDESink, DDFBooleanSelect, DDFDirector, DDFOrderedMerge, DDFSelect, DDFSingleTokenCommutator, DEActor, DebugController, DebugListenerTableau, DEDirector, Default, DefaultDirectoryAttribute, DefaultModelAttribute, DelayChannel, DelayLine, DelayLine, DelayStart, DependencyDeclaration, DependencyHighlighter, DependencyHighlighter, DerivativeResolver, DeScrambler, DEThreadActor, DETransformer, DialogTableau, Differential, Differential, Differential, DifferentialSystem, DifferentialSystem, Director, DirectoryListing, Discard, Discard, DiscreteClock, DiscreteClock, DiscreteRandomSource, DiscreteRandomSource, Display, Display, DistributedDirector, DistributedLineWriter, DistributedSDFDirector, DistributedSDFScheduler, DistributedTypedCompositeActor, DistributedTypedIORelation, Distributor, Distributor, Distributor, DocAttribute, DocBuilder, DocBuilderEffigy, DocBuilderEffigy.Factory, DocBuilderTableau, DocBuilderTableau.Factory, DocEffigy, DocEffigy.Factory, DocTableau, DocTableau.Factory, Documentation, DocumentationAttribute, DocViewerFactory, DotProduct, DotProduct, DoubleFork, DoubleMatrixToJAI, DoubleRangeParameter, DoubleReader, DoubleReader, DoubleToFix, DoubleToMatrix, DownSample, DownSample, DTDirector, DynamicEditorIcon, EditableChoiceStyle, EditIconTableau, EditIconTableau.Factory, EditorFactory, EditorIcon, EditorPaneFactory, Effigy, EffigyFactory, ElementsToArray, ElementsToArray, Ellipse2D, EllipseAttribute, EmbeddedCActor, EmbeddedCActor, EmbeddedCActor.EmbeddedActor, EmbeddedCActor.EmbeddedActor, EnabledComposite, Entity, EntityLibrary, Equals, Equals, ErasureChannel, EventButton, EventFilter, EventSource, EventSource, Exec, Exit, Exit, ExpertParameter, ExplicitRK23Solver, ExplicitRK45Solver, Expression, Expression, Expression, ExpressionReader, ExpressionShellEffigy, ExpressionShellEffigy.ShellFactory, ExpressionShellTableau, ExpressionShellTableau.Factory, ExpressionToToken, ExpressionWriter, ExpressionWriter, ExternalTextEffigy, ExternalTextTableau, FeedBackDelay, FFT, FFT, FileAttribute, FileChooserStyle, FileEditorTableauFactory, FileOrURLEditorFactory, FileParameter, FilePortParameter, FileReader, FileReader, FileWriter, FilledShapeAttribute, FIR, FIR, FirstOrderHold, FixedPointDirector, FixedPointScheduler, FixedStepSolver, FixToDouble, FixToFix, ForwardEulerSolver, FrontDropQueue, FSMActor, FSMActor, FSMDirector, FSMGraphTableau, FSMGraphTableau.Factory, FSMMatcher, FunctionDependency, FunctionDependencyOfAtomicActor, FunctionDependencyOfCompositeActor, FunctionDependencyOfEnabledCompositeActor, FunctionDependencyOfFSMActor, FunctionDependencyOfModalModel, Gaussian, Gaussian, Gaussian, GeneratorAttribute, GeneratorTableau, GeneratorTableau.Factory, GeneratorTableauAttribute, GenericJNIActor, GetProperties, GiottoCodeGenerator, GiottoCodeGenerator.GiottoEditorFactory, GiottoDirector, GiottoScheduler, GRActor, GRActor2D, GRActor3D, GradientAdaptiveLattice, GradientAdaptiveLattice, GradientAdaptiveLattice, GraphicalLocator, GRDirector, GRScheduler, GRShadedShape, GRShape2D, GRTransform, GRTransform2D, GTIngredientsAttribute, GTIngredientsEditor.Factory, GTParameter, GTTableau, GTTableau.Factory, HadamardCode, HammingCoder, HammingCoder, HammingDecoder, HammingDecoder, HDFDirector, HDFFSMDirector, HierarchicalStateControllerFactory, HierarchyFlatteningAttribute, HighlightEntities, HighlightEntities.HighlightIcons, HistogramPlotter, HSFSMDirector, HSIFEffigyFactory, HTMLEffigy, HTMLEffigyFactory, HTMLViewerTableau, HTMLViewerTableau.Factory, HTVQEncode, HuffmanBasic, HuffmanCoder, HuffmanDecoder, HybridModalDirector, IDAttribute, IFFT, IFFT, IIR, IIR, Image2D, ImageAttribute, ImageContrast, ImageDisplay, ImageDisplay, ImageIcon, ImagePartition, ImageReader, ImageRotate, ImageSequence, ImageTableau, ImageTableau.Factory, ImageToJAI, ImageToJMF, ImageToString, ImageUnpartition, ImportAttribute, Inhibit, InsideEntityEditorPaneFactory, InstantaneousDialogGenerator, InstantiableNamedObj, IntArrayToString, Integrator, Integrator, InteractiveShell, InteractiveShell.ShellTableau, InterfaceAutomaton, InterfaceAutomatonGraphTableau, InterfaceAutomatonGraphTableau.Factory, InterfaceAutomatonTransition, Interpolator, Interpolator, IntRangeParameter, IntToBits, IntToBits, InUnitsOf, IOPort, IORelation, IsPresent, IsPresent, IterateOverArray, IterateOverArray.IterateComposite, IterateOverArray.IteratePort, JAIAffineTransform, JAIBandCombine, JAIBandSelect, JAIBMPWriter, JAIBorder, JAIBoxFilter, JAIConstant, JAIConvolve, JAICrop, JAIDataConvert, JAIDCT, JAIDFT, JAIEdgeDetection, JAIIDCT, JAIIDFT, JAIImageReader, JAIInvert, JAIJPEGWriter, JAILog, JAIMagnitude, JAIMedianFilter, JAIPeriodicShift, JAIPhase, JAIPNGWriter, JAIPNMWriter, JAIPolarToComplex, JAIRotate, JAIScale, JAITIFFWriter, JAIToDoubleMatrix, JAITranslate, JAITranspose, JAIWriter, JNIActorEditorFactory, JNICodeGenerator, JNICodeGeneratorGUIFactory, Joystick, JVMTableau, JVMTableau.Factory, KeplerDocumentationAttribute, KeyInput3D, KeyReader, KeyStoreActor, KeyWriter, LampController, Lattice, Lattice, LEDMatrix, LEDMatrix, LempelZivCoder, LempelZivDecoder, LevelCrossingDetector, LevelCrossingDetector, LevelListener, LevelSkippingTableauFactory, LevinsonDurbin, LibraryAttribute, LifeCycleManager, LimitedFiringSource, LimitedRangeChannel, Limiter, Limiter, Line2D, LinearDifferenceEquationSystem, LinearDifferenceEquationSystem, LinearStateSpace, LineAttribute, LineCoder, LineReader, LineReader, LineStyle, LineWriter, LineWriter, LinkVisualizer, Listener, LiveSoundActor, LMSAdaptive, LMSAdaptive, Location, LocationAttribute, LocationParameter, Locator, LogicalNot, LogicalNot, LogicFunction, LogicFunction, LongToDouble, LookupTable, LookupTable, Manager, MapFileStorage, MapWorker, MatchResultTableau, MatchResultTableau.Factory, MathFunction, MatrixJoin, MatrixSplit, MatrixToDouble, MatrixTokenTableau, MatrixTokenTableau.Factory, MatrixToSequence, MatrixViewer, Maximum, Maximum, MaxIndex, Merge, Merge, MicaCompositeActor, MicaLeds, Minimum, Minimum, MirrorComposite, MirrorComposite.MirrorCompositeContents, MirrorPort, MobileFunction, MobileModel, ModalController, ModalController, ModalDirector, ModalModel, ModalModel, ModalPort, ModalTableauFactory, ModelDirectory, ModelDisplay, ModelGenerator, ModelReference, ModelView, MoMLAttribute, MonitorImage, MonitorValue, MonitorValue, MouseInput3D, MovableViewScreen3D, MovieReader, MovieViewScreen2D, MovieViewScreen3D, MovieWriter, MovingAverage, MovingAverage, MultiCompositeActor, MultiCompositeActor, MultiCompositePort, MultiInstanceComposite, MultiInstanceComposite, Multiplexor, Multiplexor, MultiplyDivide, MultiplyDivide, MultirateFSMDirector, NamedObj, NamedObjVariable, NameIcon, NameParameter, NavigableActorGraphTableau, NavigableActorGraphTableau.Factory, NavigableEffigy, NavigableEffigy.Factory, NavigableEffigy.FactoryWithoutNew, NCComponentBase, NCCompositeActor, NCCompositeActorTableauFactory, NodeControllerFactory, NodeRandomizer, NondeterministicMerge, NonInterruptibleTimer, NonStrictDelay, NonStrictDisplay, NonStrictFSMDirector, NonStrictLogicFunction, NonStrictTest, NonStrictThreeBitAdder, NotEditableLineStyle, ODESolver, Or, OrderedMerge, OrderedMerge, OutputActionsAttribute, Parameter, ParameterAttribute, ParameterEditorStyle, ParameterPort, ParameterSet, ParserAttribute, PasswordAttribute, Pattern, PatternObjectAttribute, PetriNetActor, PetriNetDirector, PhaseUnwrap, PhaseUnwrap, Place, PlaySound, PlotEffigy, PlotEffigy.Factory, PlotTableau, PlotTableau.Factory, Plotter, PlotterBase, PlotterBase, PlotterBase.PlotWindowTableau, PNDirector, PoissonClock, PoissonClock, PolarToCartesian, PolarToCartesian, PolarToComplex, PolyCylinder3D, Port, PortMatcher, PortParameter, PowerLossChannel, Pre, Previous, PrivateKeyReader, ProcessDirector, PSDFDirector, PSDFScheduler, PSNR, PtalonActor, PtalonExpressionParameter, PtalonParameter, PtinyOSCompositeActor, PtinyOSDirector, PtinyOSNodeParameter, PtolemyEffigy, PtolemyEffigy.Factory, PtolemyEffigy.FactoryWithoutNew, PtolemyPreferences, PtolemyTableauFactory, PublicKeyReader, Publisher, Publisher, PublisherNonStrictTest, PublisherTest, PublisherTest, Pulse, Pulse, Pulse, PythonScript, Quantizer, Quantizer, Queue, Queue, RaisedCosine, RaisedCosine, Ramp, Ramp, Ramp, RandomSource, RandomSource, RandomSource, Reader, RealTimeComposite, RealTimePlotter, Receiver, RecordAssembler, RecordDisassembler, Recorder, Recorder, RecordUpdater, Rectangle2D, RectangleAttribute, RectangularFigure2D, RecursiveLattice, RecursiveLattice, RecursiveLattice, ReduceWorker, Refinement, Refinement, Refinement, Refinement, RefinementPort, RefinementPort, Register, Relation, RelationCollapsingAttribute, RelationHidingAttribute, Remainder, Remainder, RemoveNilTokens, RendezvousDirector, Repeat, Repeat, Replacement, ReplacementObjectAttribute, RequireVersion, ResizableAttributeControllerFactory, ResizablePolygonAttribute, ResourcePool, ResourcePool, Rician, Rician, Rotate2D, Rotate3D, Round, Round, RunCompositeActor, RunTableau, RunTableau.Factory, RunTableau.TopFactory, SaltAndPepper, SampleDelay, SampleDelay, Sampler, Scale, Scale, Scale2D, Scale3D, SchedulePlotter, SchedulePlotter.SchedulePlotterEditorFactory, Scheduler, ScopeExtendingAttribute, Scrambler, SDFConverter, SDFDirector, SDFIOPort, SDFScheduler, SDFTransformer, SecretKey, SecretKeyReader, Select, Select, Sender, Sequence, Sequence, Sequence, SequencePlotter, SequencePlotter, Sequencer, Sequencer, SequenceScope, SequenceScope, SequenceSource, SequenceToArray, SequenceToArray, SequenceToMatrix, SequentialClock, SequentialClock, SerialComm, Server, SetProperties, SetVariable, SetVariable, ShapeAttribute, ShapeIcon, SharedParameter, SignatureActor, SignatureSigner, SignatureVerifier, SingleEvent, SingleTokenCommutator, SingleTokenDistributor, SingletonAttribute, SingletonConfigurableAttribute, SingletonParameter, SingleWindowConfiguration, SingleWindowHTMLViewerTableau, SingleWindowHTMLViewerTableau.Factory, Sink, Sink, SizeAttribute, SketchedSource, Sleep, Sleep, Slicer, SliderSource, SliderSource, SoundActor, SoundPlayer, Source, Sphere3D, SplitReader, SRDirector, SROptimizedScheduler, SRRandomizedScheduler, Starver, State, StateIcon, StateMatcher, StateMatcherIcon, StaticSchedulingCodeGenerator, StaticSchedulingDirector, Stop, Stop, StreamLoader, StringAttribute, StringCompare, StringCompare, StringConst, StringConst, StringFunction, StringFunction, StringIndexOf, StringIndexOf, StringLength, StringLength, StringMatches, StringMatches, StringParameter, StringReplace, StringSubstring, StringSubstring, StringToIntArray, StringToIntArray, StringToKeyValue, StringToUnsignedByteArray, StringToXML, SubMatrix, Subscriber, Subscriber, SubscriptionAggregator, SubscriptionAggregator, SurgeVisualizer, SVGIcon, Switch, Switch, SymmetricDecryption, SymmetricEncryption, Synchronizer, Synchronizer, Tableau, TableauFactory, TemporaryVariable, TerrainProperty, Test, Test, TestExceptionHandler, TextAttribute, TextEditorConfigureFactory, TextEditorTableau, TextEditorTableau.Factory, TextEditorTableauFactory, TextEffigy, TextEffigy.Factory, TextIcon, TextString3D, TextStyle, ThresholdMonitor, ThrowException, ThrowException, ThrowModelError, ThrowModelError, TimedDelay, TimedPlotter, TimedPNDirector, TimedScope, TimedSource, TimeGap, Timer, TMCompositeFacade, TMDirector, TokenEffigy, TokenEffigy.Factory, TokenTableau, TokenTableau.Factory, TokenToExpression, TokenToExpression, Torus3D, TransformationAttribute, TransformationRule, TransformationRule.TransformationDirector, Transformer, TransientSingletonConfigurableAttribute, Transition, TransitionRefinement, TransitionRefinement, TransitionRefinementPort, Translate2D, Translate3D, TransmitPropertyTransformer, TrapezoidalRuleSolver, TreeTableau, TreeTableau.Factory, TrellisDecoder, Triangular, Triangulator, TrigFunction, TrigFunction, TriggeredClock, TriggeredContinuousClock, TypeAttribute, TypedAtomicActor, TypedCompositeActor, TypedCompositeActor, TypedIOPort, TypedIORelation, TypeOpaqueCompositeActor, TypeOpaqueCompositeActorTableauFactory, TypeTest, UnaryMathFunction, UnaryMathFunction, Undefined, UndoStackAttribute, Uniform, Uniform, UnionDisassembler, UnionMerge, UnitAttribute, UnitCategory, UnitSystem, UnsignedByteArrayToString, UpdatedValueIcon, UpSample, UpSample, URIAttribute, URLDirectoryReader, URLReader, URLToImage, ValueIcon, Variable, VariableClock, VariableDelay, VariableFIR, VariableFIR, VariableLattice, VariableLattice, VariableRecursiveLattice, VariableRecursiveLattice, VariableSleep, VectorAssembler, VectorAssembler, VectorDisassembler, VectorDisassembler, VersionAttribute, Vertex, VideoCamera, VideoPlayer, ViewScreen2D, ViewScreen3D, VisibleAttribute, VisibleParameterEditorFactory, VisualModelReference, VisualModelReference.LookInside, ViterbiDecoder, VQDecode, WaitingTime, WallClockTime, WallClockTime, WelcomeWindowTableau, When, WindowPropertiesAttribute, Wire, Wire, WiredToWireless, WirelessComposite, WirelessDirector, WirelessIOPort, WirelessToWired, Writer, X10Interface, XMLIcon, XMLInclusion, XSLTransformer, XYPlotter, XYPlotter, XYScope, XYScope, ZeroCrossingDetector, ZeroCrossingDetector, ZeroOrderHold, ZeroOrderHold
public interface MoMLExportable
- extends Nameable
This is an interface for objects that have persistent MoML representations.
MoML is an XML schema used to represent Ptolemy II models. The form of
the MoML generated by an implementor of this interface should be:
<elementName name="name" class="className" source="source">
body, determined by the implementor
</elementName>
or
<class name="name" extends="className" source="source">
body, determined by the implementor
</class>
The elementName is the string returned by getElementName().
The name is the string returned by getName().
The className is the string returned by getClassName().
The source is the string returned by getSource().
If either of the last two methods returns null, then that
XML attribute is omitted from the description.
If this object has no container (and for the exportMoML() methods
that take a depth argument, if that argument is zero),
then the exportMoML() methods prepend XML file header information,
which is:
<?xml version="1.0" standalone="no"?>
<!DOCTYPE entity PUBLIC "-//UC Berkeley//DTD MoML 1//EN"
"http://ptolemy.eecs.berkeley.edu/xml/dtd/MoML_1.dtd">
In the above, "entity" may be replaced by "class", "property",
or "port".
- Since:
- Ptolemy II 4.0
- Version:
- $Id: MoMLExportable.java,v 1.11 2006/03/29 00:02:45 cxh Exp $
- Author:
- Edward A. Lee
- See Also:
NamedObj
- Accepted Rating:
- Proposed Rating:
|
Method Summary |
java.lang.String |
exportMoML()
Return a MoML description of this object. |
java.lang.String |
exportMoML(java.lang.String name)
Return a MoML description of this object with its name replaced by
the specified name. |
void |
exportMoML(java.io.Writer output)
Write a MoML description of this object using the specified
Writer. |
void |
exportMoML(java.io.Writer output,
int depth)
Write a MoML description of this entity with the specified
depth in a hierarchy. |
void |
exportMoML(java.io.Writer output,
int depth,
java.lang.String name)
Write a MoML description of this entity with the specified
depth in a hierarchy and with the specified name substituting
for the name of this object. |
java.lang.String |
getClassName()
Return the class name. |
java.lang.String |
getElementName()
Get the XML element name. |
java.lang.String |
getSource()
Get the source, which gives an external URL
associated with an entity (presumably from which the entity
was defined). |
boolean |
isPersistent()
Return true if this object is persistent. |
void |
setPersistent(boolean isPersistent)
Set the persistence of this object. |
void |
setSource(java.lang.String source)
Set the source, which gives an external URL
associated with an entity (presumably from which the entity
was defined). |
exportMoML
java.lang.String exportMoML()
- Return a MoML description of this object. This might be an empty string
if there is no MoML description of this object or if this object is
not persistent or if an implementor has some other reason that the
object has no persistent description.
- Returns:
- A MoML description, or an empty string if there is none.
- See Also:
isPersistent()
exportMoML
java.lang.String exportMoML(java.lang.String name)
- Return a MoML description of this object with its name replaced by
the specified name. The description might be an empty string
if there is no MoML description of this object or if this object
is not persistent, or if an implementor has some other reason that the
object has no persistent description.
- Parameters:
name - The name that is used as a replacement.
- Returns:
- A MoML description, or the empty string if there is none.
- See Also:
isPersistent()
exportMoML
void exportMoML(java.io.Writer output)
throws java.io.IOException
- Write a MoML description of this object using the specified
Writer. If there is no MoML description, or if the object
is not persistent, or if an implementor has some other
reason that the object has no persistent description,
then nothing is written. To write to standard out, do
exportMoML(new OutputStreamWriter(System.out))
- Parameters:
output - The writer to write to.
- Throws:
java.io.IOException - If an I/O error occurs.- See Also:
isPersistent()
exportMoML
void exportMoML(java.io.Writer output,
int depth)
throws java.io.IOException
- Write a MoML description of this entity with the specified
depth in a hierarchy. The depth in the hierarchy determines
indenting of the output, but may also be used to indicate
to an implementor whether this object is being exported
as part of the export of its container (in which case
depth > 0), or this object is being exported independently
of its container (depth == 0). If there is no MoML description,
or if the object is not persistent, or if an implementor
has some other reason that the object has no persistent
description, then nothing is written.
- Parameters:
output - The output writer to write to.depth - The depth in the hierarchy.
- Throws:
java.io.IOException - If an I/O error occurs.- See Also:
isPersistent()
exportMoML
void exportMoML(java.io.Writer output,
int depth,
java.lang.String name)
throws java.io.IOException
- Write a MoML description of this entity with the specified
depth in a hierarchy and with the specified name substituting
for the name of this object. The depth in the hierarchy determines
indenting of the output, but may also be used to indicate
to an implementor whether this object is being exported
as part of the export of its container (in which case
depth > 0), or this object is being exported independently
of its container (depth == 0). If there is no MoML description,
or if the object is not persistent, or if an implementor
has some other reason that the object has no persistent
description, then nothing is written.
- Parameters:
output - The output writer to write to.depth - The depth in the hierarchy, to determine indenting.name - The name to use in the exported MoML.
- Throws:
java.io.IOException - If an I/O error occurs.- See Also:
isPersistent()
getClassName
java.lang.String getClassName()
- Return the class name. This is either the name of the
class of which this object is an instance, or if this
object is itself a class, then the class that it extends.
The class name could be a fully qualified Java class name
or the name of the parent of this object if it has a parent.
- Returns:
- The MoML class name.
- See Also:
Instantiable.getParent()
getElementName
java.lang.String getElementName()
- Get the XML element name. Implementors should provide the
appropriate XML element name to use when exporting MoML.
- Returns:
- The XML element name for this object.
getSource
java.lang.String getSource()
- Get the source, which gives an external URL
associated with an entity (presumably from which the entity
was defined). This becomes the value in the "source"
attribute of exported MoML.
- Returns:
- The source, or null if there is none.
- See Also:
setSource(String)
isPersistent
boolean isPersistent()
- Return true if this object is persistent.
A persistent object has a MoML description that can be stored
in a file and used to re-create the object. A non-persistent
object has an empty MoML description.
- Returns:
- True if the object is persistent.
- See Also:
setPersistent(boolean)
setPersistent
void setPersistent(boolean isPersistent)
- Set the persistence of this object. If the persistence is not
specified with this method, then by default the object will be
persistent unless it is derivable by derivation from a class.
A persistent object has a non-empty MoML description that can be used
to re-create the object. To make an instance non-persistent,
call this method with the argument false. To force
it to always be persistent, irrespective of its relationship
to a class, then call this with argument true. Note
that this will have the additional effect that it no longer
inherits properties from the class, so in effect, calling
this with true overrides values given by the class.
- Parameters:
isPersistent - False to make this object non-persistent.- See Also:
isPersistent()
setSource
void setSource(java.lang.String source)
- Set the source, which gives an external URL
associated with an entity (presumably from which the entity
was defined). This becomes the value in the "source"
attribute of exported MoML. Call this with null to prevent
any source attribute from being generated.
- Parameters:
source - The source, or null if there is none.- See Also:
getSource()