public class TypingService extends Object implements ITypingService
| Modifier and Type | Field and Description |
|---|---|
protected IIdentifierSystem |
identifierSystem |
protected ITypeRegistry |
typeRegistry |
| Constructor and Description |
|---|
TypingService(IIdentifierSystem identifierSystem,
ITypeRegistry typeRegistry) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
conformsToType(String pid,
String typeIdentifier) |
boolean |
deletePID(String pid)
Remove the given PID.
|
PropertyDefinition |
describeProperty(String propertyIdentifier)
Retrieves a property definition
|
TypeDefinition |
describeType(String typeIdentifier)
Retrieves a type definition
|
EntityClass |
determineEntityClass(String identifier)
Determines whether the given identifier references a simple object, a
property, a type etc.
|
Object |
genericResolve(String pid)
Resolves the given PID without previous knowledge about the kind of
entity it identifies (e.g. a common PID record, a property or type
definition etc.).
|
IIdentifierSystem |
getIdentifierSystem() |
ITypeRegistry |
getTypeRegistry() |
boolean |
isIdentifierRegistered(String pid)
Checks whether the given PID is already registered.
|
PIDInformation |
queryAllProperties(String pid)
Queries all properties from the given PID, independent of types.
|
PIDInformation |
queryAllProperties(String pid,
boolean includePropertyNames) |
PIDInformation |
queryByType(String pid,
String typeIdentifier,
boolean includePropertyNames)
Queries all properties of a type available from the given PID.
|
PIDInformation |
queryByType(String pid,
TypeDefinition typeDefinition)
Queries all properties of a given type available from the given PID.
|
PIDInformation |
queryByTypeWithConformance(String pid,
List<String> typeIdentifiers,
boolean includePropertyNames) |
PIDInformation |
queryByTypeWithConformance(String pid,
String typeIdentifier,
boolean includePropertyNames)
Same as
ITypingService.queryByType(java.lang.String, java.lang.String, boolean), but also performs a type conformance check. |
String |
queryProperty(String pid,
PropertyDefinition propertyDefinition)
Queries a single property from the given PID.
|
PIDInformation |
queryProperty(String pid,
String propertyIdentifier)
Queries a single property from the PID.
|
String |
registerPID(Map<String,String> properties)
Registers a new PID with given property values.
|
protected final IIdentifierSystem identifierSystem
protected final ITypeRegistry typeRegistry
public TypingService(IIdentifierSystem identifierSystem, ITypeRegistry typeRegistry) throws IOException
IOExceptionpublic boolean isIdentifierRegistered(String pid) throws IOException
IIdentifierSystemisIdentifierRegistered in interface IIdentifierSystemIOExceptionpublic String queryProperty(String pid, PropertyDefinition propertyDefinition) throws IOException
IIdentifierSystemqueryProperty in interface IIdentifierSystemIOExceptionpublic String registerPID(Map<String,String> properties) throws IOException
IIdentifierSystemregisterPID in interface IIdentifierSystemproperties - A simple dictionary with string keys and string values that
contains the initial PID record.IOExceptionpublic PIDInformation queryByType(String pid, TypeDefinition typeDefinition) throws IOException
IIdentifierSystemqueryByType in interface IIdentifierSystemIOExceptionpublic boolean deletePID(String pid)
IIdentifierSystemdeletePID in interface IIdentifierSystempublic PropertyDefinition describeProperty(String propertyIdentifier) throws IOException
ITypingServicedescribeProperty in interface ITypingServiceIOExceptionpublic TypeDefinition describeType(String typeIdentifier) throws IOException
ITypingServicedescribeType in interface ITypingServiceIOExceptionpublic boolean conformsToType(String pid, String typeIdentifier) throws IOException
conformsToType in interface ITypingServiceIOExceptionpublic Object genericResolve(String pid) throws IOException
ITypingServicegenericResolve in interface ITypingServiceIOExceptionpublic PIDInformation queryAllProperties(String pid) throws IOException
IIdentifierSystemqueryAllProperties in interface IIdentifierSystemIOExceptionpublic PIDInformation queryAllProperties(String pid, boolean includePropertyNames) throws IOException, InconsistentRecordsException
public PIDInformation queryProperty(String pid, String propertyIdentifier) throws IOException
ITypingServicequeryProperty in interface ITypingServicepropertyIdentifier - must be registered in the type registryIOExceptionpublic PIDInformation queryByType(String pid, String typeIdentifier, boolean includePropertyNames) throws IOException, InconsistentRecordsException
ITypingServicequeryByType in interface ITypingServicetypeIdentifier - a type identifier, not a nameincludePropertyNames - if true, the method will also return property names at
additional call costs.IOExceptionInconsistentRecordsExceptionpublic PIDInformation queryByTypeWithConformance(String pid, String typeIdentifier, boolean includePropertyNames) throws IOException, InconsistentRecordsException
ITypingServiceITypingService.queryByType(java.lang.String, java.lang.String, boolean), but also performs a type conformance check.
The result of the check will be available from the PID information record
returned.queryByTypeWithConformance in interface ITypingServiceIOExceptionInconsistentRecordsExceptionpublic PIDInformation queryByTypeWithConformance(String pid, List<String> typeIdentifiers, boolean includePropertyNames) throws IOException, InconsistentRecordsException
queryByTypeWithConformance in interface ITypingServiceIOExceptionInconsistentRecordsExceptionpublic EntityClass determineEntityClass(String identifier) throws IOException
ITypingServicedetermineEntityClass in interface ITypingServiceEntityClassIOExceptionpublic ITypeRegistry getTypeRegistry()
public IIdentifierSystem getIdentifierSystem()
Copyright © 2014. All rights reserved.