public abstract class MapperBase extends java.lang.Object implements HasFacts
| Constructor and Description |
|---|
MapperBase() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
addContext(MapperContext newContext)
Adds the context.
|
void |
addFact(Fact newFact)
Adds a new Fact to the end of the Facts container.
|
void |
addFactAt(Fact newFact,
int pos)
Adds a new Fact at the position indicated by pos.
|
void |
addSection(Section section)
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.util.Vector<java.util.Vector<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 |
delFact(Fact fact)
Removes a fact from the container.
|
void |
delSection(Section section)
Del section.
|
java.util.Vector<Fact> |
getAllFactsForElement(XMLElementDefinition definition)
Return all facts associated with this element definition.
|
java.util.Vector<java.lang.String> |
getAllMapIdentifiersForElement(XMLElementDefinition definition)
Return all map identifiers associated with this element definition.
|
java.util.Iterator<Fact> |
getChildrenFacts()
Access to an iterator over the children facts of this object.
|
abstract 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.
|
Fact |
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(XMLElementDefinition definition)
Return the first map identifier associated to this element definition.
|
java.lang.String |
getNewMapIdentifier(XMLElementDefinition element)
Generates a new identifier for the element used as a parameter.
|
HasFacts |
getParent()
Access to the parent element of a Fact.
|
abstract java.lang.String |
getScheme()
Gets the scheme.
|
Section |
getSectionForKey(java.lang.String key)
Gets the section for key.
|
java.util.Set<java.lang.String> |
getSectionKeys()
Gets the section keys.
|
java.util.Collection<Section> |
getSections()
Gets 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 |
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 |
registerFact(Fact fact)
Registers a new fact has been added to the container.
|
void |
unregisterFact(Fact fact)
Same as
HasFacts.registerFact(Fact) but in this case for removing the information stored. |
public java.util.Iterator<Fact> getChildrenFacts()
HasFactsgetChildrenFacts in interface HasFactspublic HasFacts getParent()
HasFactspublic void addFact(Fact newFact)
HasFactsThis method does not updates the taxonomy URLs.
public void addFactAt(Fact newFact, int pos)
HasFactspublic void delFact(Fact fact)
HasFactspublic abstract MapVersion getVersion()
public abstract java.lang.String getScheme()
public abstract java.lang.String getCompany()
public java.lang.String getKeyForSource(XBRLDataSource source)
This method returns null if the source is not found.
source - XBRLDataSourcepublic void registerFact(Fact fact)
HasFactsregisterFact in interface HasFactsfact - the factpublic java.lang.String addSource(XBRLDataSource ds)
ds - the dspublic void addSection(Section section)
It is also possible calling this method for adding sections in advance
Note: if the section already exists, the old section is replaced by the new section
section - Section to be addedpublic void delSection(Section section)
section - 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 java.util.Collection<Section> getSections()
public java.util.Set<java.lang.String> getSectionKeys()
public Section getSectionForKey(java.lang.String key)
key - the keypublic void unregisterFact(Fact fact)
HasFactsHasFacts.registerFact(Fact) but in this case for removing the information stored.unregisterFact in interface HasFactsfact - the factpublic java.lang.String addUnit(XBRLUnit newUnit)
newUnit - the new unitpublic java.lang.String addContext(MapperContext newContext)
newContext - the new contextpublic java.lang.String getNewMapIdentifier(XMLElementDefinition element)
element - the elementpublic java.util.Set<java.lang.String> getSourceKeys()
public XBRLDataSource getSourceForKey(java.lang.String key)
key - stringpublic java.util.Set<java.lang.String> getUnitKeys()
public XBRLUnit getUnitForKey(java.lang.String key)
key - stringpublic java.lang.String getMapIdentifierForElement(XMLElementDefinition definition)
definition - XMLElementDefinitionpublic java.util.Vector<java.lang.String> getAllMapIdentifiersForElement(XMLElementDefinition definition)
definition - XMLElementDefinitionpublic java.util.Vector<Fact> getAllFactsForElement(XMLElementDefinition definition)
definition - XMLElementDefinitionpublic Fact getFactFromMapIdentifier(java.lang.String mapIdentifier)
mapIdentifier - string, key unique for each mapIdentifierpublic java.util.Vector<java.util.Vector<java.lang.String>> checkDuplicates()
If two (or more) facts are mapped to income data one of the following may occurs: