public abstract class MapperBase
extends java.lang.Object
Constructor and Description |
---|
MapperBase() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
addContext(MapperContext newMapperContext)
Adds the context.
|
java.lang.String |
addContext(MapperContext newMapperContext,
java.lang.String oldContextId)
Adds the context.
|
void |
addFact(MapperFact newMapperFact)
Adds the fact.
|
void |
addFactAt(MapperFact newMapperFact,
int pos)
Adds the fact at.
|
void |
addMapperId(java.lang.String id)
Adds the mapper id.
|
void |
addSection(MapperSection mapperSection)
This is called internally when a new Fact is added and the fact contains a section that is not
on this file.
|
java.lang.String |
addSource(XBRLDataSource ds)
Adds the source.
|
java.lang.String |
addUnit(XBRLUnit newUnit)
Adds the unit.
|
java.lang.String |
addUnit(XBRLUnit newUnit,
java.lang.String oldUnitId)
Adds the unit.
|
void |
addWarning(MapperWarningMessage mm)
Adds the warning.
|
java.util.List<java.util.List<java.lang.String>> |
checkDuplicates()
Verifies the content of the mapper file and explore possible duplicate
mappings (same concept for the same context and unit mapped more
than once) If this happens the mapper has to make an election during
the instance document generation time.
|
void |
clear() |
void |
createEmptyMapperDoc(java.lang.String scheme,
java.lang.String company)
Creates an empty MapperDoc.
|
void |
delContext(MapperContext mapperContext)
Del context.
|
void |
delFact(MapperFact mapperFact)
Del fact.
|
void |
delSection(MapperSection mapperSection)
Del section.
|
void |
delUnit(XBRLUnit unit)
Del unit.
|
java.util.List<MapperFact> |
getAllFactsForElement(javax.xml.namespace.QName definition)
Return all facts associated with this element definition.
|
java.util.List<java.lang.String> |
getAllMapIdentifiersForElement(javax.xml.namespace.QName definition)
Return all map identifiers associated with this element definition.
|
java.lang.String |
getCompany()
Gets the company.
|
MapperContext |
getContextById(java.lang.String key)
Gets the context by id.
|
java.util.Collection<MapperContext> |
getContexts()
Gets the contexts.
|
java.util.Iterator<java.lang.String> |
getContextsKeys()
Gets the contexts keys.
|
MapperFact |
getFactFromMapIdentifier(java.lang.String mapIdentifier)
Returns the Fact associated with the mapIdentifier or null if the mapIdentifier is not associated
with any Fact.
|
java.lang.String |
getKeyForSource(XBRLDataSource source)
Returns the key used for this XBRLDataSource.
|
java.lang.String |
getMapIdentifierForElement(javax.xml.namespace.QName definition)
Return the first map identifier associated to this element definition.
|
MapperDoc |
getMapperDoc()
Gets the mapper doc.
|
java.lang.String |
getNewMapIdentifier(XMLElementDefinition element)
Generates a new identifier for the element used as a parameter.
|
java.lang.String |
getScheme()
Gets the scheme.
|
MapperSection |
getSectionForKey(java.lang.String key)
Gets the MapperSection for key or null if not found.
|
java.util.Collection<MapperSection> |
getSections()
Gets all the sections.
|
XBRLDataSource |
getSourceForKey(java.lang.String key)
Returns the XBRLDataSource object associated with the specified key.
|
java.util.Set<java.lang.String> |
getSourceKeys()
Returns the set of keys for data sources for this mapper.
|
XBRLUnit |
getUnitById(java.lang.String key)
Gets the unit by id.
|
XBRLUnit |
getUnitForKey(java.lang.String key)
Returns the XBRLUnit object associated with the specified key.
|
java.util.Set<java.lang.String> |
getUnitKeys()
Returns the set of keys for units for this mapper.
|
abstract MapVersion |
getVersion()
Gets the version.
|
void |
setCompany(java.lang.String company)
Sets the company.
|
void |
setMapperDoc(MapperDoc mapperDoc)
Sets the mapper doc.
|
void |
setScheme(java.lang.String scheme)
Sets the scheme.
|
public void addFact(MapperFact newMapperFact) throws MapConfigurationFileException
newMapperFact
- the new mapper factMapConfigurationFileException
- the map configuration file exceptionpublic void addFactAt(MapperFact newMapperFact, int pos) throws MapConfigurationFileException
newMapperFact
- the new mapper factpos
- the posMapConfigurationFileException
- the map configuration file exceptionpublic void delFact(MapperFact mapperFact)
mapperFact
- the mapper factpublic abstract MapVersion getVersion()
public java.lang.String getScheme()
public void setScheme(java.lang.String scheme)
scheme
- the new schemepublic java.lang.String getCompany()
public void setCompany(java.lang.String company)
company
- the new companypublic void createEmptyMapperDoc(java.lang.String scheme, java.lang.String company)
scheme
- the schemecompany
- the companypublic MapperDoc getMapperDoc()
public void setMapperDoc(MapperDoc mapperDoc)
mapperDoc
- the new mapper docpublic java.lang.String getKeyForSource(XBRLDataSource source) throws MapConfigurationFileException
This method returns null if the source is not found.
source
- XBRLDataSourceMapConfigurationFileException
- the map configuration file exceptionpublic void addMapperId(java.lang.String id)
id
- the idpublic java.lang.String addSource(XBRLDataSource ds)
ds
- the dspublic void addSection(MapperSection mapperSection)
It is also possible calling this method for adding sections in advance
mapperSection
- Section to be addedpublic void delSection(MapperSection mapperSection)
mapperSection
- the sectionpublic java.util.Collection<MapperContext> getContexts()
public java.util.Iterator<java.lang.String> getContextsKeys()
public MapperContext getContextById(java.lang.String key)
key
- the keypublic XBRLUnit getUnitById(java.lang.String key)
key
- the keypublic java.util.Collection<MapperSection> getSections()
public MapperSection getSectionForKey(java.lang.String key)
key
- the keypublic java.lang.String addUnit(XBRLUnit newUnit)
newUnit
- the new unitpublic java.lang.String addUnit(XBRLUnit newUnit, java.lang.String oldUnitId)
newUnit
- the new unitoldUnitId
- the old unit idpublic java.lang.String addContext(MapperContext newMapperContext, java.lang.String oldContextId)
newMapperContext
- the new contextoldContextId
- maybe nullpublic java.lang.String addContext(MapperContext newMapperContext)
newMapperContext
- the new contextpublic void delContext(MapperContext mapperContext)
mapperContext
- the contextpublic void delUnit(XBRLUnit unit)
unit
- the unitpublic java.lang.String getNewMapIdentifier(XMLElementDefinition element)
element
- the elementpublic java.util.Set<java.lang.String> getSourceKeys()
public XBRLDataSource getSourceForKey(java.lang.String key) throws MapConfigurationFileException
key
- stringMapConfigurationFileException
- the map configuration file exceptionpublic java.util.Set<java.lang.String> getUnitKeys()
public XBRLUnit getUnitForKey(java.lang.String key)
key
- stringpublic java.lang.String getMapIdentifierForElement(javax.xml.namespace.QName definition)
definition
- XMLElementDefinitionpublic java.util.List<java.lang.String> getAllMapIdentifiersForElement(javax.xml.namespace.QName definition)
definition
- XMLElementDefinitionpublic java.util.List<MapperFact> getAllFactsForElement(javax.xml.namespace.QName definition)
definition
- XMLElementDefinitionpublic MapperFact getFactFromMapIdentifier(java.lang.String mapIdentifier)
mapIdentifier
- string, key unique for each mapIdentifierpublic void clear() throws java.lang.Throwable
java.lang.Throwable
public java.util.List<java.util.List<java.lang.String>> checkDuplicates() throws MapConfigurationFileException
If two (or more) facts are mapped to income data one of the following may occurs:
MapConfigurationFileException
- the map configuration file exceptionpublic void addWarning(MapperWarningMessage mm)
mm
- the mmCopyright 2006-2015 Reporting Standard S.L., C/ Torrecilla del Puerto 1, 28043, Madrid, Espaņa