Package net.ontopia.topicmaps.utils.rdf
Class RDFImporterExporterService
java.lang.Object
net.ontopia.topicmaps.utils.rdf.RDFImporterExporterService
- All Implemented Interfaces:
ImportExportServiceIF
ImportExportServiceIF service providing RDF import and export functionality.
- Since:
- 5.4.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanPUBLIC: Indicates that the service can supply a TopicMapReaderIF implementation for the specified resource.booleanPUBLIC: Indicates that the service can supply a TopicMapWriterIF implementation for the specified resource.createReference(URL url, String refid, String title, LocatorIF base_address) PUBLIC: Creates an AbstractURLTopicMapReference for the specified url, using the appropriate reader and/or writer provided by this service.PUBLIC: Create and return a TopicMapReaderIF for the specified resource.getWriter(OutputStream stream) PUBLIC: Create and return a TopicMapWriterIF for the specified stream.
-
Constructor Details
-
RDFImporterExporterService
public RDFImporterExporterService()
-
-
Method Details
-
canRead
Description copied from interface:ImportExportServiceIFPUBLIC: Indicates that the service can supply a TopicMapReaderIF implementation for the specified resource.- Specified by:
canReadin interfaceImportExportServiceIF- Parameters:
resource- The resource a reader is needed for- Returns:
- true if this service can provide the needed reader
-
canWrite
Description copied from interface:ImportExportServiceIFPUBLIC: Indicates that the service can supply a TopicMapWriterIF implementation for the specified resource.- Specified by:
canWritein interfaceImportExportServiceIF- Parameters:
resource- The resource a writer is needed for- Returns:
- true if this service can provide the needed writer
-
getWriter
Description copied from interface:ImportExportServiceIFPUBLIC: Create and return a TopicMapWriterIF for the specified stream. This method should be preceded with a call to#canWrite(java.lang.String)to check if this service can write to the resource which the stream is connected to.- Specified by:
getWriterin interfaceImportExportServiceIF- Parameters:
stream- The stream to write to- Returns:
- The TopicMapWriterIF created by this service
- Throws:
IOException- if anything goes wrong during initialization of the writer regarding IO operations
-
getReader
Description copied from interface:ImportExportServiceIFPUBLIC: Create and return a TopicMapReaderIF for the specified resource. This method should be preceded with a call to#canRead(java.lang.String)to check if this service can read the specified resource.- Specified by:
getReaderin interfaceImportExportServiceIF- Parameters:
resource- The resource to create a reader for- Returns:
- The TopicMapReaderIF created by this service
-
createReference
public AbstractURLTopicMapReference createReference(URL url, String refid, String title, LocatorIF base_address) Description copied from interface:ImportExportServiceIFPUBLIC: Creates an AbstractURLTopicMapReference for the specified url, using the appropriate reader and/or writer provided by this service. This method is used by the sources like URLTopicMapSource and ResourceTopicMapSource.- Specified by:
createReferencein interfaceImportExportServiceIF- Parameters:
url- The resource to create the reference forrefid- The id to use for the referencetitle- The title to use for the referencebase_address- The base address to use if supported- Returns:
- the reference for the specified resource
-