| java.lang.Object org.fao.geonet.kernel.EditLib
EditLib | public class EditLib (Code) | | |
Method Summary | |
public String | addEditingInfo(String schema, String id, Element md) Expands a metadata adding all information needed for editing. | public Element | addElement(String schema, Element el, String qname) | public void | addSchema(String name, String xmlSchemaFile, String xmlSuggestFile, String xmlSubstitutionsFile) | public String | checkNamespaces(String qname, Element md) | public void | contractElements(Element md) | public void | enumerateTree(Element md) | public boolean | existsSchema(String name) | public void | expandElements(String schema, Element md) | public void | expandTree(MetadataSchema schema, Element md) | public void | fillElement(String schema, Element parent, Element md) Given an element, creates all mandatory sub-elements. | public Element | findElement(Element md, String ref) Returns the element at a given reference. | public String | getNamespace(String qname, Element md, MetadataSchema schema) | public String | getNewVersion(String id) | public String | getPrefix(String qname) | public MetadataSchema | getSchema(String name) | public String | getSchemaDir(String name) | public Set<String> | getSchemas() | public String | getUnqualifiedName(String qname) | public String | getVersion(String id) | public void | removeEditingInfo(Element md) | public List | searchChildren(String chName, Element md, String schema) |
addEditingInfo | public String addEditingInfo(String schema, String id, Element md) throws Exception(Code) | | Expands a metadata adding all information needed for editing.
|
addSchema | public void addSchema(String name, String xmlSchemaFile, String xmlSuggestFile, String xmlSubstitutionsFile) throws Exception(Code) | | Loads the metadata schema from disk and adds it to the pool
|
contractElements | public void contractElements(Element md)(Code) | | Contract container elements
|
enumerateTree | public void enumerateTree(Element md)(Code) | | |
expandElements | public void expandElements(String schema, Element md) throws Exception(Code) | | Given an unexpanded tree, creates container elements and their children
|
expandTree | public void expandTree(MetadataSchema schema, Element md) throws Exception(Code) | | Given a metadata, does a recursive scan adding information for editing
|
fillElement | public void fillElement(String schema, Element parent, Element md) throws Exception(Code) | | Given an element, creates all mandatory sub-elements. The given element
should be empty.
|
findElement | public Element findElement(Element md, String ref)(Code) | | Returns the element at a given reference.
Parameters: md - the metadata element expanded with editing info Parameters: ref - the element position in a pre-order visit |
removeEditingInfo | public void removeEditingInfo(Element md)(Code) | | Given an expanded tree, removes all info added for editing and replaces
choice_elements with their children
|
searchChildren | public List searchChildren(String chName, Element md, String schema) throws Exception(Code) | | searches children of container elements for containers
|
|
|