public class TLcdCSWDecoder extends Object implements ILcdInputStreamFactoryCapable
TLcdCSWDataTypes
,
TLcdCSWRecord
Constructor and Description |
---|
TLcdCSWDecoder() |
Modifier and Type | Method and Description |
---|---|
ILcdDataObject |
decodeObject(Source aSource)
Decodes an OGC catalog domain object from the given XML source.
|
ILcdDataObject |
decodeObject(String aSourcePath)
Decodes an OGC catalog domain object from the given XML file.
|
TLcdCSWRecord |
decodeRecord(Source aSource)
Decodes an OGC catalog record from the given XML source.
|
TLcdCSWRecord |
decodeRecord(String aSourcePath)
Decodes an OGC catalog record from the given XML file.
|
ILcdInputStreamFactory |
getInputStreamFactory()
Returns the
ILcdInputStreamFactory that is used for creating input streams. |
void |
setEntityResolver(EntityResolver2 aEntityResolver)
Sets the
org.xml.sax.ext.EntityResolver2 to be used for creating input sources for
XSD schemas. |
void |
setInputStreamFactory(ILcdInputStreamFactory aInputStreamFactory)
Sets the
ILcdInputStreamFactory to be used for creating input streams. |
public ILcdInputStreamFactory getInputStreamFactory()
ILcdInputStreamFactory
that is used for creating input streams.getInputStreamFactory
in interface ILcdInputStreamFactoryCapable
ILcdInputStreamFactory
that is used for creating input streams.public void setInputStreamFactory(ILcdInputStreamFactory aInputStreamFactory)
ILcdInputStreamFactory
to be used for creating input streams.setInputStreamFactory
in interface ILcdInputStreamFactoryCapable
aInputStreamFactory
- the input stream factory to be used by this model decoder.public void setEntityResolver(EntityResolver2 aEntityResolver)
Sets the org.xml.sax.ext.EntityResolver2
to be used for creating input sources for
XSD schemas.
When the entity resolver is unable to find a schema (i.e. the resolveEntity
method
returns null
), the getInputStreamFactory()
is used to
create an appropriate input stream for the given system id of the schema.
aEntityResolver
- the entity resolver to be used for creating input sources for XSD schemas.public TLcdCSWRecord decodeRecord(String aSourcePath) throws IOException
Record
. For all other data sources, use
decodeObject(String)
.aSourcePath
- the data source to be decoded; typically a file name or a URL.TLcdCSWRecord
object representing the decoded metadata.IOException
- for any exceptions caused by IO problems or invalid data.decodeObject(String)
public TLcdCSWRecord decodeRecord(Source aSource) throws IOException
Record
. For all other data sources, use
decodeObject(String)
.
You can decode an input stream by wrapping it into a StreamSource
.
aSource
- the data source to be decoded; typically a StreamSource
TLcdCSWRecord
object representing the decoded metadata.IOException
- for any exceptions caused by IO problems or invalid data.decodeObject(String)
public ILcdDataObject decodeObject(String aSourcePath) throws IOException
ILcdDataObject
whose instance class corresponds
to the XML root element in the data source. This instance class may be any class in the
com.luciad.ogc.csw.model
package or its subpackages.aSourcePath
- the data source to be decoded; typically a file name or a URL.ILcdDataObject
representing the decoded metadata.IOException
- for any exceptions caused by IO problems or invalid data.public ILcdDataObject decodeObject(Source aSource) throws IOException
ILcdDataObject
whose instance class corresponds
to the XML root element in the data source. This instance class may be any class in the
com.luciad.ogc.csw.model
package or its subpackages.
You can decode an input stream by wrapping it into a StreamSource
.
aSource
- the data source to be decoded; typically a StreamSource
ILcdDataObject
representing the decoded metadata.IOException
- for any exceptions caused by IO problems or invalid data.