public class HandleSystemRESTAdapter extends Object implements IIdentifierSystem
Modifier and Type | Field and Description |
---|---|
protected String |
authInfo |
protected URI |
baseURI |
protected javax.ws.rs.client.Client |
client |
protected String |
generatorPrefix |
protected javax.ws.rs.client.WebTarget |
handlesTarget |
protected javax.ws.rs.client.WebTarget |
individualHandleTarget |
protected javax.ws.rs.client.WebTarget |
rootTarget |
static boolean |
UNSAFE_SSL |
Constructor and Description |
---|
HandleSystemRESTAdapter(String baseURI,
String userName,
String userPassword,
String generatorPrefix) |
HandleSystemRESTAdapter(String baseURI,
String userName,
String userPassword,
String generatorPrefix,
boolean unsafe_ssl) |
Modifier and Type | Method and Description |
---|---|
static HandleSystemRESTAdapter |
configFromProperties(Properties properties)
Factory method.
|
boolean |
deletePID(String pid)
Remove the given PID.
|
protected String |
generatePIDName() |
String |
getGeneratorPrefix() |
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 |
queryByType(String pid,
TypeDefinition typeDefinition)
Queries all properties of a given type available from the given PID.
|
String |
queryProperty(String pid,
PropertyDefinition propertyDefinition)
Queries a single property from the given PID.
|
String |
registerPID(Map<String,String> properties)
Registers a new PID with given property values.
|
public static final boolean UNSAFE_SSL
protected URI baseURI
protected String authInfo
protected javax.ws.rs.client.Client client
protected String generatorPrefix
protected javax.ws.rs.client.WebTarget rootTarget
protected javax.ws.rs.client.WebTarget handlesTarget
protected javax.ws.rs.client.WebTarget individualHandleTarget
public HandleSystemRESTAdapter(String baseURI, String userName, String userPassword, String generatorPrefix, boolean unsafe_ssl)
public static HandleSystemRESTAdapter configFromProperties(Properties properties) throws InvalidConfigException
properties
- InvalidConfigException
public boolean isIdentifierRegistered(String pid)
IIdentifierSystem
isIdentifierRegistered
in interface IIdentifierSystem
public String queryProperty(String pid, PropertyDefinition propertyDefinition) throws IOException
IIdentifierSystem
queryProperty
in interface IIdentifierSystem
IOException
protected String generatePIDName()
public String registerPID(Map<String,String> properties) throws IOException
IIdentifierSystem
registerPID
in interface IIdentifierSystem
properties
- A simple dictionary with string keys and string values that
contains the initial PID record.IOException
public PIDInformation queryByType(String pid, TypeDefinition typeDefinition) throws IOException
IIdentifierSystem
queryByType
in interface IIdentifierSystem
IOException
public boolean deletePID(String pid)
IIdentifierSystem
deletePID
in interface IIdentifierSystem
public PIDInformation queryAllProperties(String pid) throws IOException
IIdentifierSystem
queryAllProperties
in interface IIdentifierSystem
IOException
public String getGeneratorPrefix()
Copyright © 2014. All rights reserved.