-
Notifications
You must be signed in to change notification settings - Fork 3
HowToImplementService
Is your repository metadata in a format which the MST doesn't currently support? Or would you like to do some extra processing on your metadata before drupal harvests it for front end searching? Not a problem. As advertised, XC's MST is quite extensible. This document will guide you through the process of creating a development environment which makes it easy for you to write, test, and deploy your very own MST service.
There's 2 ways you can create an MST service:
- simply implement the MetadataService interface
- build on our generic implementations of the MetadataService
The second option is what we strongly recommend you start with. We left the first option available for the small chance that someone might want to optimize processing in a different way than we've already done it. However, we've already spent considerable time designing and implementing an optimized, high-throughput system, so most likely you'll simply want to harness that.
- download and install the jdk (we're using 1.6)
- download and install apache ant
- download and install mysql (version 5.0 or higher) * (optionally install MySQL Workbench)
- download and unzip the example service from here
- (optional) change the top directory name from example to the name of your service
- update the properties file to your liking
custom.properties - NOTE: We currently require all services to fit within our classpath structure, xc.mst.services
service.name=MyTotallyAwesomeService
service.version=1.0
service.classname=xc.mst.services.MyTotallyAwesomeService
DatabaseUrl=jdbc:mysql://localhost:3306
Database=MetadataServicesToolkit
DatabaseUsername=root
DatabasePassword=root
- create your MetadataService in src/java (get more details here)
public class MyTotallyAwesomeService extends GenericMetadataService {
public List<OutputRecord> process(InputRecord r) {
List<OutputRecord> records = new ArrayList<OutputRecord>();
OutputRecord out = null;
if (r.getSuccessors() != null && r.getSuccessors().size() > 0) {
// This will overwrite the previous successor record
out = r.getSuccessors().get(0);
} else {
// This creates a new output record
out = getRecordService().createRecord();
}
// see here for more details on mode
// http://www.extensiblecatalog.org/doc/MST/api/xc/mst/bo/record/RecordIfc.html#setMode%28java.lang.String%29
r.setMode(Record.JDOM_MODE);
Element metadataEl = r.getOaiXmlEl();
Element foo = metadataEl.getChild("foo");
out.setOaiXml("<bar>you've been barred: "+foo.getText()+"</bar>");
records.add(out);
return records;
}
}
- to test your service see this page. <a href='Hidden comment:
Unknown end tag for </a>
ant zip
'>
- Downloads
- Installing the Toolkit
- Hardware Requirements
- Installing 3rd Party Tools
- Installing the Metadata Services Toolkit
- Configuring
- Starting the MST
- Uninstalling and Reinstalling the MST
- Upgrading the MST
- Useful Info
- Using the Toolkit
- Services
- What is a service?
- What are Configuration 1 and Configuration 2?
- XC MARCXML Normalization
- MARCXML to XC Transformation
- DC to XC Transformation
- MARC Aggregation
- Multiple Instances of the Same Service
- Harvesting from an MST Service
- How To Implement a Service
- About the XC Schema
- MST Frequently Asked Questions
-
Performance Results
- RecordBreakdown
- MySQLCustomizations
- Release Notes
- Next Coding Period Summary
- Glossary
- Developer ScratchPad
- ServerChart
- Transformation 1.0
- TransformationDocumentationNotes
- new
- TransformationDocumentation
- old
- AdditionalWorksAndExpressions
- Transformation Service Documentation
- TransformationServiceSteps
- XcRoleTranslationTable
- AggregationServices
- MarcAggregation
- TransformationTwoPointOh
- old
- FirstIteration
- PriorDesign
- PackagingMST
- 1.0 Decisions
- ReleaseWork
- QuickInstallNotes
- MST Implementation Details
- OaiIdIndexAlgorithm
- CacheDetails
- MessageHandling
- ServiceTests
- ProcessingStepsExplained
- ResumptionToken->completeListSize
- UpdateDelete
- OaiPmhImpl
- record counts
- RecordCountsOnePtTwoPtOne
- in production
- how to log and display
- RecordCountsOnePtZero
- RecordCountTestRestarted
- UrRecordCounts
- RecordCountTesting
- TransformationWackiness
- OaiImplementation
- Testing
- randys-30
- RegressionTests
- QuickRef
- UnicodeNormalization
- LoggingHelp
- CodeFormatPolicy
- SvnBranchingStrategy
- MultipleEclipseWorkspaces
- DeleteReaddServiceForRetest
- FileHarvests
- CharsetEncodingWithEric
- DrupalSolrOptimization
- WorkPlan
- MetricsForAssessment
- IdeasForImprovement
- RandomNotes
-
Wiki en español
- Servicios
- Qué es un Servicio de Metadatos?
- Servicio de Normalización XC MARCXML
- Servicio de Transformación MARCXML a Esquema XC
- Servicio de Agregación MARC
- Servicios