T
- The type to wrap.@Deprecated public class EmfRepresentation<T extends EObject> extends OutputRepresentation
UNKNOWN_SIZE
Constructor and Description |
---|
EmfRepresentation(MediaType mediaType,
T object)
Deprecated.
Constructor.
|
EmfRepresentation(Representation representation)
Deprecated.
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected Resource |
createEmfResource(MediaType mediaType)
Deprecated.
Creates and configure an EMF resource.
|
protected XMLResource |
createEmfXmlResource(MediaType mediaType)
Deprecated.
Creates and configure an EMF resource.
|
int |
getLineWidth()
Deprecated.
Returns the maximum number of characters per line.
|
protected java.util.Map<?,?> |
getLoadOptions()
Deprecated.
Returns the loading options.
|
T |
getObject()
Deprecated.
Returns the wrapped object either parsed from the representation or to be
formatted.
|
protected java.util.Map<?,?> |
getSaveOptions()
Deprecated.
Returns the saving options.
|
boolean |
isUsingEncodedAttributeStyle()
Deprecated.
Indicates if EMF references should be written as URI anchors.
|
void |
setLineWidth(int lineWidth)
Deprecated.
Sets the maximum number of characters per line.
|
void |
setUsingEncodedAttributeStyle(boolean usingEncodedAttributeStyle)
Deprecated.
Indicates if EMF references should be written as URI anchors.
|
void |
write(EObject object,
java.io.OutputStream outputStream)
Deprecated.
Writes the representation based on a given EMF object.
|
void |
write(java.io.OutputStream outputStream)
Deprecated.
If this representation wraps an
EObject , then it tries to write
it as either XML, XMI or ECore/EMOF depending on the media type set. |
getChannel, getStream
getReader, write, write
append, exhaust, getAvailableSize, getDigest, getDisposition, getExpirationDate, getRange, getRegistration, getSize, getText, hasKnownSize, isAvailable, isEmpty, isSelectable, isTransient, release, setAvailable, setDigest, setDisposition, setExpirationDate, setListener, setRange, setSize, setTransient
getModificationDate, getTag, setModificationDate, setTag
createClientInfo, equals, getCharacterSet, getEncodings, getLanguages, getLocationRef, getMediaType, hashCode, includes, isCompatible, setCharacterSet, setEncodings, setLanguages, setLocationRef, setLocationRef, setMediaType, toString
public EmfRepresentation(MediaType mediaType, T object)
mediaType
- The target media type. Supported values are
MediaType.APPLICATION_XMI
,
MediaType.APPLICATION_ECORE
and XML media types.object
- The object to format.public EmfRepresentation(Representation representation)
representation
- The representation to parse.protected Resource createEmfResource(MediaType mediaType)
createEmfXmlResource(MediaType)
.mediaType
- The associated media type.protected XMLResource createEmfXmlResource(MediaType mediaType)
mediaType
- The associated media type (ECore, XMI or XML).public int getLineWidth()
protected java.util.Map<?,?> getLoadOptions()
public T getObject() throws java.io.IOException
java.io.IOException
protected java.util.Map<?,?> getSaveOptions()
public boolean isUsingEncodedAttributeStyle()
public void setLineWidth(int lineWidth)
lineWidth
- The maximum number of characters per line.public void setUsingEncodedAttributeStyle(boolean usingEncodedAttributeStyle)
usingEncodedAttributeStyle
- True if EMF references should be written as URI anchors.public void write(EObject object, java.io.OutputStream outputStream) throws java.io.IOException
object
- The EMF object to serialize.outputStream
- The target output stream.java.io.IOException
public void write(java.io.OutputStream outputStream) throws java.io.IOException
EObject
, then it tries to write
it as either XML, XMI or ECore/EMOF depending on the media type set.
Note that in order to write this EObject
, an EMF resource is
created, configured for proper serialization and the EObject
is
then added to the content of this resource. This could has a side effect
of removing it from a previous resource/container.write
in class Representation
java.io.IOException
Copyright © 2005-2020 Restlet.