| java.lang.Object org.fao.geonet.kernel.DataManager
DataManager | public class DataManager (Code) | | Handles all operations on metadata (select,insert,update,delete etc...)
|
Method Summary | |
public synchronized boolean | addAttribute(Dbms dbms, String id, String ref, String name, String currVersion) | public synchronized boolean | addElement(Dbms dbms, String id, String ref, String name, String childName, String currVersion) | public void | addSchema(String id, String xmlSchemaFile, String xmlSuggestFile, String xmlSubstitutesFile) | public String | autodetectSchema(Element md) | public String | createMetadata(Dbms dbms, String templateId, String groupOwner, SerialFactory sf, String source, int owner) | public void | deleteAllMetadataCateg(Dbms dbms, String id) | public synchronized boolean | deleteAttribute(Dbms dbms, String id, String ref, String name, String currVersion) | public synchronized boolean | deleteElement(Dbms dbms, String id, String ref, String currVersion) | public synchronized void | deleteMetadata(Dbms dbms, String id) | public void | deleteMetadataOper(Dbms dbms, String id, boolean skipAllIntranet) | public Element | doSchemaTronForEditor(String schemaPath, Element md) | public String | doSchemaTronReport(String schemaPath, Element md, String id) | public boolean | existsMetadata(Dbms dbms, String id) | public boolean | existsSchema(String name) | public String | extractUUID(String schema, Element md) | public AccessManager | getAccessManager() | public Element | getCategories(Dbms dbms, String mdId) | public Element | getElementByRef(Element md, String ref) | public Element | getKeywords() | public Element | getMetadata(ServiceContext srvContext, String id, boolean forEditing) | public String | getMetadataId(Dbms dbms, String uuid) | public String | getMetadataId(ServiceContext srvContext, String uuid) | public MdInfo | getMetadataInfo(Dbms dbms, String id) | public String | getMetadataUuid(Dbms dbms, String id) | public String | getNewVersion(String id) | public MetadataSchema | getSchema(String name) | public String | getSchemaDir(String name) | public Set<String> | getSchemas() | public String | getSiteURL() | public Element | getThumbnails(Dbms dbms, String id) | public String | getVersion(String id) | public void | increasePopularity(Dbms dbms, String id) | public void | indexMetadata(Dbms dbms, String id) | public static void | indexMetadata(Dbms dbms, String id, SearchManager sm) | public String | insertMetadata(Dbms dbms, String schema, String groupId, Element xml, SerialFactory sf, String source, String uuid, int owner) Adds a metadata in xml form (the xml should be validated). | public String | insertMetadata(Dbms dbms, String schema, String groupOwner, Element xml, SerialFactory sf, String source, String uuid, String isTemplate, String title, int owner) | public String | insertMetadataExt(Dbms dbms, String schema, Element md, SerialFactory sf, String source, String createDate, String changeDate, String uuid, int owner, String groupOwner) Adds a metadata in xml form (the xml should be validated). | public String | insertMetadataExt(Dbms dbms, String schema, Element md, int id, String source, String createDate, String changeDate, String uuid, int owner, String groupOwner) Parameters: source - the source of the metadata. | public boolean | isCategorySet(Dbms dbms, String mdId, String categId) | public int | rateMetadata(Dbms dbms, int id, String ipAddress, int rating) | public Element | schemaTron(String schemaPath, Element md, String id) | public void | setCategory(Dbms dbms, String mdId, String categId) Adds a category to a metadata. | public void | setHarvestManager(HarvestManager hm) | public void | setHarvested(Dbms dbms, int id, String harvestUuid) | public void | setHarvested(Dbms dbms, int id, String harvestUuid, String harvestUri) | public static void | setNamespacePrefix(Element md) | public void | setOperation(Dbms dbms, String mdId, String grpId, String opId) Adds a permission to a group. | public void | setTemplate(Dbms dbms, int id, String isTemplate, String title) | public void | setThumbnail(Dbms dbms, String id, boolean small, String file) | public Element | setUUID(String schema, String uuid, Element md) | public synchronized boolean | swapElement(Dbms dbms, String id, String ref, String currVersion, boolean down) | public void | unsetCategory(Dbms dbms, String mdId, String categId) | public void | unsetOperation(Dbms dbms, int mdId, int groupId, int operId) | public void | unsetThumbnail(Dbms dbms, String id, boolean small) | public Element | updateFixedInfo(String schema, String id, Element md, String uuid) | public synchronized boolean | updateMetadata(UserSession session, Dbms dbms, String id, String currVersion, Hashtable changes, boolean validate) | public synchronized boolean | updateMetadata(UserSession session, Dbms dbms, String id, Element md, boolean validate, String version) | public void | updateMetadataExt(Dbms dbms, String id, Element md, String changeDate) | public void | validate(String schema, Element md) |
autodetectSchema | public String autodetectSchema(Element md)(Code) | | |
createMetadata | public String createMetadata(Dbms dbms, String templateId, String groupOwner, SerialFactory sf, String source, int owner) throws Exception(Code) | | Create a new metadata duplicating an existing template
|
deleteAllMetadataCateg | public void deleteAllMetadataCateg(Dbms dbms, String id) throws Exception(Code) | | Remove all categories stored for a metadata
|
deleteAttribute | public synchronized boolean deleteAttribute(Dbms dbms, String id, String ref, String name, String currVersion) throws Exception(Code) | | For Editing : removes an attribute from a metadata ([del] link)
|
deleteElement | public synchronized boolean deleteElement(Dbms dbms, String id, String ref, String currVersion) throws Exception(Code) | | For Editing : removes an element from a metadata ([del] link)
|
deleteMetadata | public synchronized void deleteMetadata(Dbms dbms, String id) throws Exception(Code) | | Removes a metadata
|
deleteMetadataOper | public void deleteMetadataOper(Dbms dbms, String id, boolean skipAllIntranet) throws Exception(Code) | | Remove all operations stored for a metadata
|
doSchemaTronForEditor | public Element doSchemaTronForEditor(String schemaPath, Element md) throws Exception(Code) | | |
existsMetadata | public boolean existsMetadata(Dbms dbms, String id) throws Exception(Code) | | Returns true if the metadata exists in the database
|
getElementByRef | public Element getElementByRef(Element md, String ref)(Code) | | Retrieves a metadata element given it's ref
|
getKeywords | public Element getKeywords() throws Exception(Code) | | Returns all the keywords in the system
|
getMetadata | public Element getMetadata(ServiceContext srvContext, String id, boolean forEditing) throws Exception(Code) | | Retrieves a metadata (in xml) given its id; adds editing information if needed
|
insertMetadata | public String insertMetadata(Dbms dbms, String schema, String groupId, Element xml, SerialFactory sf, String source, String uuid, int owner) throws Exception(Code) | | Adds a metadata in xml form (the xml should be validated). The group id is
used to setup permissions. Internal metadata fields are updated. Default
operations are set.
|
insertMetadataExt | public String insertMetadataExt(Dbms dbms, String schema, Element md, SerialFactory sf, String source, String createDate, String changeDate, String uuid, int owner, String groupOwner) throws Exception(Code) | | Adds a metadata in xml form (the xml should be validated). This method is
used to add a metadata got from a remote site. Note that neighter permissions
nor lucene indexes are updated.
|
insertMetadataExt | public String insertMetadataExt(Dbms dbms, String schema, Element md, int id, String source, String createDate, String changeDate, String uuid, int owner, String groupOwner) throws Exception(Code) | | Parameters: source - the source of the metadata. If null, the local siteId will be used |
rateMetadata | public int rateMetadata(Dbms dbms, int id, String ipAddress, int rating) throws Exception(Code) | | Allow to rate a metadata
Parameters: ipAddress - IP address of the submitting client Parameters: rating - range should be 1..5 |
setCategory | public void setCategory(Dbms dbms, String mdId, String categId) throws Exception(Code) | | Adds a category to a metadata. Metadata is not reindexed
|
setNamespacePrefix | public static void setNamespacePrefix(Element md)(Code) | | |
setOperation | public void setOperation(Dbms dbms, String mdId, String grpId, String opId) throws Exception(Code) | | Adds a permission to a group. Metadata is not reindexed
|
swapElement | public synchronized boolean swapElement(Dbms dbms, String id, String ref, String currVersion, boolean down) throws Exception(Code) | | For Editing : swap a tag with one of its sibling ([up] and [down] links)
|
unsetOperation | public void unsetOperation(Dbms dbms, int mdId, int groupId, int operId) throws Exception(Code) | | |
updateMetadata | public synchronized boolean updateMetadata(UserSession session, Dbms dbms, String id, String currVersion, Hashtable changes, boolean validate) throws Exception(Code) | | For Editing : updates all leaves with new values
|
updateMetadata | public synchronized boolean updateMetadata(UserSession session, Dbms dbms, String id, Element md, boolean validate, String version) throws Exception(Code) | | |
|
|