public class SerializableMetadata extends Metadata implements Serializable
Metadata
that's Serializable
.
Metadata.Group
Constructor and Description |
---|
SerializableMetadata() |
SerializableMetadata(InputStream inputStream) |
SerializableMetadata(InputStream inputStream,
String xmlEncoding,
boolean useCDATA) |
SerializableMetadata(Metadata metadata) |
SerializableMetadata(Metadata metadata,
String xmlEncoding,
boolean useCDATA)
Builds a SerializableMetadata object from a Metadata object
|
SerializableMetadata(String xmlEncoding,
boolean useCDATA)
Accepts any encoding which is supported by java.net.URLEncoder If
useCDATA is set true then element text will be wrapped in a CDATA tag.
|
Modifier and Type | Method and Description |
---|---|
String |
getEncoding() |
Metadata |
getMetadata()
Converts SerializableMetadata into a plain metadata object
|
boolean |
isUsingCDATA() |
void |
loadMetadataFromXmlStream(InputStream in)
Reloads this SerializableMetadata from an InputStream in the format
created by writeMetadataToXmlStream(OutputStream).
|
Document |
toXML() |
void |
writeMetadataToXmlStream(OutputStream os)
Writes out this SerializableMetadata object in XML format to the
OutputStream provided
|
addMetadata, addMetadata, addMetadata, addMetadata, addMetadata, addMetadata, addMetadata, containsGroup, containsKey, createNewRoot, equals, getAllKeys, getAllKeys, getAllKeys, getAllKeysWithName, getAllMetadata, getAllValues, getAllValues, getGroup, getGroup, getGroups, getGroups, getGroups, getHashTable, getKeys, getKeys, getKeys, getMap, getMetadata, getSubMetadata, getValues, getValues, hashCode, isMultiValued, removeMetadata, removeMetadataGroup, replaceMetadata, replaceMetadata, replaceMetadata, replaceMetadata, replaceMetadata
public SerializableMetadata()
public SerializableMetadata(String xmlEncoding, boolean useCDATA) throws InstantiationException
xmlEncoding
- The encoding to use when generating XML version of a
SerializableMetadatauseCDATA
- whether or not to use CDATA tags around an element's text.InstantiationException
- if xmlEncoding equals nullpublic SerializableMetadata(Metadata metadata)
public SerializableMetadata(InputStream inputStream) throws IOException
IOException
public SerializableMetadata(InputStream inputStream, String xmlEncoding, boolean useCDATA) throws IOException
IOException
public String getEncoding()
public boolean isUsingCDATA()
public void writeMetadataToXmlStream(OutputStream os) throws IOException
os
- The OutputStream this method writes toIOException
- for any Exceptionpublic Document toXML() throws IOException
IOException
public void loadMetadataFromXmlStream(InputStream in) throws IOException
in
- The InputStream which this object is loaded fromIOException
- for any exceptionpublic Metadata getMetadata()
Copyright © 1999–2017 Apache OODT. All rights reserved.