public class GeoNetwork extends Object implements GeoNetworkAdministration
| Modifier and Type | Method and Description |
|---|---|
void |
createGroup(String name,
String description,
String mail) |
void |
createUsers(String username,
String password,
User.Profile profile,
Collection<Integer> groups) |
void |
deleteMetadata(long id) |
static GeoNetworkAdministration |
get() |
static GeoNetworkAdministration |
get(Configuration config) |
org.opengis.metadata.Metadata |
getById(long id) |
org.opengis.metadata.Metadata |
getById(String UUID) |
String |
getByIdAsRawString(String UUID) |
Configuration |
getConfiguration() |
it.geosolutions.geonetwork.util.GNInsertConfiguration |
getCurrentUserConfiguration(String category,
String styleSheet) |
Set<Group> |
getGroups() |
Set<User> |
getUsers() |
long |
insertMetadata(File requestFile) |
long |
insertMetadata(it.geosolutions.geonetwork.util.GNInsertConfiguration configuration,
File metadataFile) |
long |
insertMetadata(it.geosolutions.geonetwork.util.GNInsertConfiguration configuration,
org.opengis.metadata.Metadata meta) |
long |
insertMetadata(org.opengis.metadata.Metadata meta) |
void |
login(LoginLevel lvl) |
void |
logout() |
it.geosolutions.geonetwork.util.GNSearchResponse |
query(File fileRequest) |
it.geosolutions.geonetwork.util.GNSearchResponse |
query(it.geosolutions.geonetwork.util.GNSearchRequest request) |
void |
registerXMLAdapter(XMLAdapter adapter) |
void |
setPrivileges(long metadataId,
it.geosolutions.geonetwork.util.GNPrivConfiguration cfg) |
void |
updateMetadata(long id,
File metadataFile) |
void |
updateMetadata(long id,
org.opengis.metadata.Metadata meta) |
public static GeoNetworkAdministration get() throws Exception
Exceptionpublic static GeoNetworkAdministration get(Configuration config) throws MissingServiceEndpointException, it.geosolutions.geonetwork.exception.GNLibException, it.geosolutions.geonetwork.exception.GNServerException, AuthorizationException, MissingConfigurationException
MissingServiceEndpointExceptionit.geosolutions.geonetwork.exception.GNLibExceptionit.geosolutions.geonetwork.exception.GNServerExceptionAuthorizationExceptionMissingConfigurationExceptionpublic Configuration getConfiguration()
getConfiguration in interface GeoNetworkReaderpublic void login(LoginLevel lvl) throws AuthorizationException, MissingServiceEndpointException, MissingConfigurationException
login in interface GeoNetworkReaderAuthorizationExceptionMissingServiceEndpointExceptionMissingConfigurationExceptionpublic void logout()
logout in interface GeoNetworkReaderpublic it.geosolutions.geonetwork.util.GNSearchResponse query(it.geosolutions.geonetwork.util.GNSearchRequest request)
throws it.geosolutions.geonetwork.exception.GNLibException,
it.geosolutions.geonetwork.exception.GNServerException,
MissingServiceEndpointException
query in interface GeoNetworkReaderit.geosolutions.geonetwork.exception.GNLibExceptionit.geosolutions.geonetwork.exception.GNServerExceptionMissingServiceEndpointExceptionpublic it.geosolutions.geonetwork.util.GNSearchResponse query(File fileRequest) throws it.geosolutions.geonetwork.exception.GNLibException, it.geosolutions.geonetwork.exception.GNServerException, MissingServiceEndpointException
query in interface GeoNetworkReaderit.geosolutions.geonetwork.exception.GNLibExceptionit.geosolutions.geonetwork.exception.GNServerExceptionMissingServiceEndpointExceptionpublic org.opengis.metadata.Metadata getById(long id)
throws it.geosolutions.geonetwork.exception.GNLibException,
it.geosolutions.geonetwork.exception.GNServerException,
JAXBException,
MissingServiceEndpointException
getById in interface GeoNetworkReaderit.geosolutions.geonetwork.exception.GNLibExceptionit.geosolutions.geonetwork.exception.GNServerExceptionJAXBExceptionMissingServiceEndpointExceptionpublic org.opengis.metadata.Metadata getById(String UUID) throws it.geosolutions.geonetwork.exception.GNLibException, it.geosolutions.geonetwork.exception.GNServerException, JAXBException, MissingServiceEndpointException
getById in interface GeoNetworkReaderit.geosolutions.geonetwork.exception.GNLibExceptionit.geosolutions.geonetwork.exception.GNServerExceptionJAXBExceptionMissingServiceEndpointExceptionpublic String getByIdAsRawString(String UUID) throws it.geosolutions.geonetwork.exception.GNLibException, it.geosolutions.geonetwork.exception.GNServerException, JAXBException, MissingServiceEndpointException
getByIdAsRawString in interface GeoNetworkReaderit.geosolutions.geonetwork.exception.GNLibExceptionit.geosolutions.geonetwork.exception.GNServerExceptionJAXBExceptionMissingServiceEndpointExceptionpublic void setPrivileges(long metadataId,
it.geosolutions.geonetwork.util.GNPrivConfiguration cfg)
throws it.geosolutions.geonetwork.exception.GNLibException,
it.geosolutions.geonetwork.exception.GNServerException,
MissingServiceEndpointException
setPrivileges in interface GeoNetworkPublisherit.geosolutions.geonetwork.exception.GNLibExceptionit.geosolutions.geonetwork.exception.GNServerExceptionMissingServiceEndpointExceptionpublic long insertMetadata(it.geosolutions.geonetwork.util.GNInsertConfiguration configuration,
File metadataFile)
throws it.geosolutions.geonetwork.exception.GNLibException,
it.geosolutions.geonetwork.exception.GNServerException,
MissingServiceEndpointException,
MissingConfigurationException,
InvalidInsertConfigurationException,
AuthorizationException
insertMetadata in interface GeoNetworkPublisherit.geosolutions.geonetwork.exception.GNLibExceptionit.geosolutions.geonetwork.exception.GNServerExceptionMissingServiceEndpointExceptionMissingConfigurationExceptionInvalidInsertConfigurationExceptionAuthorizationExceptionpublic long insertMetadata(it.geosolutions.geonetwork.util.GNInsertConfiguration configuration,
org.opengis.metadata.Metadata meta)
throws it.geosolutions.geonetwork.exception.GNLibException,
it.geosolutions.geonetwork.exception.GNServerException,
IOException,
JAXBException,
MissingServiceEndpointException,
MissingConfigurationException,
InvalidInsertConfigurationException,
AuthorizationException
insertMetadata in interface GeoNetworkPublisherit.geosolutions.geonetwork.exception.GNLibExceptionit.geosolutions.geonetwork.exception.GNServerExceptionIOExceptionJAXBExceptionMissingServiceEndpointExceptionMissingConfigurationExceptionInvalidInsertConfigurationExceptionAuthorizationExceptionpublic long insertMetadata(File requestFile) throws it.geosolutions.geonetwork.exception.GNLibException, it.geosolutions.geonetwork.exception.GNServerException, MissingServiceEndpointException
insertMetadata in interface GeoNetworkPublisherit.geosolutions.geonetwork.exception.GNLibExceptionit.geosolutions.geonetwork.exception.GNServerExceptionMissingServiceEndpointExceptionpublic long insertMetadata(org.opengis.metadata.Metadata meta)
throws it.geosolutions.geonetwork.exception.GNLibException,
it.geosolutions.geonetwork.exception.GNServerException,
IOException,
JAXBException,
MissingServiceEndpointException
insertMetadata in interface GeoNetworkPublisherit.geosolutions.geonetwork.exception.GNLibExceptionit.geosolutions.geonetwork.exception.GNServerExceptionIOExceptionJAXBExceptionMissingServiceEndpointExceptionpublic void updateMetadata(long id,
File metadataFile)
throws it.geosolutions.geonetwork.exception.GNLibException,
it.geosolutions.geonetwork.exception.GNServerException,
MissingServiceEndpointException
updateMetadata in interface GeoNetworkPublisherit.geosolutions.geonetwork.exception.GNLibExceptionit.geosolutions.geonetwork.exception.GNServerExceptionMissingServiceEndpointExceptionpublic void updateMetadata(long id,
org.opengis.metadata.Metadata meta)
throws it.geosolutions.geonetwork.exception.GNLibException,
it.geosolutions.geonetwork.exception.GNServerException,
IOException,
JAXBException,
MissingServiceEndpointException
updateMetadata in interface GeoNetworkPublisherit.geosolutions.geonetwork.exception.GNLibExceptionit.geosolutions.geonetwork.exception.GNServerExceptionIOExceptionJAXBExceptionMissingServiceEndpointExceptionpublic void deleteMetadata(long id)
throws it.geosolutions.geonetwork.exception.GNLibException,
it.geosolutions.geonetwork.exception.GNServerException,
MissingServiceEndpointException
deleteMetadata in interface GeoNetworkPublisherit.geosolutions.geonetwork.exception.GNLibExceptionit.geosolutions.geonetwork.exception.GNServerExceptionMissingServiceEndpointExceptionpublic it.geosolutions.geonetwork.util.GNInsertConfiguration getCurrentUserConfiguration(String category, String styleSheet) throws AuthorizationException, GeoNetworkException
getCurrentUserConfiguration in interface GeoNetworkPublisherAuthorizationExceptionGeoNetworkExceptionpublic void createGroup(String name, String description, String mail) throws it.geosolutions.geonetwork.exception.GNLibException, it.geosolutions.geonetwork.exception.GNServerException, MissingServiceEndpointException
createGroup in interface GeoNetworkAdministrationit.geosolutions.geonetwork.exception.GNLibExceptionit.geosolutions.geonetwork.exception.GNServerExceptionMissingServiceEndpointExceptionpublic Set<Group> getGroups() throws it.geosolutions.geonetwork.exception.GNLibException, it.geosolutions.geonetwork.exception.GNServerException, MissingServiceEndpointException
getGroups in interface GeoNetworkAdministrationit.geosolutions.geonetwork.exception.GNLibExceptionit.geosolutions.geonetwork.exception.GNServerExceptionMissingServiceEndpointExceptionpublic Set<User> getUsers() throws it.geosolutions.geonetwork.exception.GNLibException, it.geosolutions.geonetwork.exception.GNServerException, MissingServiceEndpointException
getUsers in interface GeoNetworkAdministrationit.geosolutions.geonetwork.exception.GNLibExceptionit.geosolutions.geonetwork.exception.GNServerExceptionMissingServiceEndpointExceptionpublic void createUsers(String username, String password, User.Profile profile, Collection<Integer> groups) throws it.geosolutions.geonetwork.exception.GNLibException, it.geosolutions.geonetwork.exception.GNServerException, MissingServiceEndpointException
createUsers in interface GeoNetworkAdministrationit.geosolutions.geonetwork.exception.GNLibExceptionit.geosolutions.geonetwork.exception.GNServerExceptionMissingServiceEndpointExceptionpublic void registerXMLAdapter(XMLAdapter adapter)
registerXMLAdapter in interface GeoNetworkPublisherCopyright © 2016. All Rights Reserved.