Package org.mycore.mods.identifier
Class MCRAbstractMODSMetadataService
java.lang.Object
org.mycore.pi.MCRPIMetadataService<MCRPersistentIdentifier>
org.mycore.mods.identifier.MCRAbstractMODSMetadataService
- Direct Known Subclasses:
MCRMODSDOIMetadataService
,MCRMODSPURLMetadataService
,MCRMODSURNMetadataService
Base class for all ModsMetadataServices. Basically in mods just the type is different, which will be resolved from
getIdentifierType()
.
This MetadataService has two parameters:
- Prefix
- Will be passed to starts-with() as seconds parameter when the PI is read from the mods document. So it ensures that only the right pi is read. E.g. if only DOI which start with the prefix 10.5072
- Type
- The type will be used in the mods:identifier@type attribute and it will be used to resolve the parser.
See:
MCRPIManager.getParserForType(java.lang.String)
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected MCRObject
checkObject
(MCRBase base) getIdentifier
(MCRBase base, String additional) protected String
protected String
getXPath()
void
insertIdentifier
(MCRPersistentIdentifier identifier, MCRBase base, String additional) void
removeIdentifier
(MCRPersistentIdentifier identifier, MCRBase obj, String additional) Methods inherited from class org.mycore.pi.MCRPIMetadataService
getProperties, setProperties
-
Field Details
-
PREFIX_PROPERTY_KEY
- See Also:
-
-
Constructor Details
-
MCRAbstractMODSMetadataService
public MCRAbstractMODSMetadataService()
-
-
Method Details
-
insertIdentifier
public void insertIdentifier(MCRPersistentIdentifier identifier, MCRBase base, String additional) throws MCRPersistentIdentifierException - Specified by:
insertIdentifier
in classMCRPIMetadataService<MCRPersistentIdentifier>
- Throws:
MCRPersistentIdentifierException
-
checkObject
- Throws:
MCRPersistentIdentifierException
-
removeIdentifier
- Specified by:
removeIdentifier
in classMCRPIMetadataService<MCRPersistentIdentifier>
-
getIdentifier
public Optional<MCRPersistentIdentifier> getIdentifier(MCRBase base, String additional) throws MCRPersistentIdentifierException - Specified by:
getIdentifier
in classMCRPIMetadataService<MCRPersistentIdentifier>
- Throws:
MCRPersistentIdentifierException
-
getIdentifierType
-
getXPath
-