Get OBDA mapping axiom from R2RML TriplesMap
@param tm
@return
@throws Exception
772762
private SQLPPTriplesMap getMapping(TriplesMap tm) throws Exception {
		String sourceQuery = r2rmlParser.getSQLQuery(tm).trim();
		ImmutableList<TargetAtom> body = getMappingTripleAtoms(tm);
		//Function head = getHeadAtom(body);
		//CQIE targetQuery = DATALOG_FACTORY.getCQIE(head, body);
		// TODO: consider a R2RML-specific type of triples map
		SQLPPTriplesMap mapping = new OntopNativeSQLPPTriplesMap("mapping-"+tm.hashCode(),
				MAPPING_FACTORY.getSQLQuery(sourceQuery), body);
        if (body.isEmpty()){
            //we do not have a target query
            System.out.println("WARNING a mapping without target query will not be introduced : "+ mapping.toString());
            return null;
        }
		return mapping;
	}
948880
@Override
	public Map<String, Object> getAttributesMap() {
		@SuppressWarnings("unchecked")
		Map<String, Object> threadAttributesMap = (Map<String, Object>)getAttribute(FLASH_ATTRIBUTES_MAP);
		if(threadAttributesMap == null) {
			threadAttributesMap = new FlashAttributesMap();
			putAttribute(FLASH_ATTRIBUTES_MAP, threadAttributesMap);
		}
		return threadAttributesMap;
	}
1288562
public Map getModelEntryMap(Map requestParamMap,String tableName,String modelName,String dbName) throws Exception{
		return getModelEntryMap( requestParamMap, tableName, modelName, dbName,"");
	}
336506
public java.util.Map<java.lang.String, org.tensorflow.framework.TensorInfo> getOutputsMap() {
    return internalGetOutputs().getMap();
  }
848841
public Map<String, Object> getMap() {
        Map<String, Object> retMap = Collections.synchronizedMap(new TreeMap<String, Object>());
        retMap.putAll(eventMap);
        return retMap;
    }
791628
private MultiValueMap<String> readMultiMap(XMLEventReader reader, String mapName)
            throws JournalException, XMLStreamException {
        MultiValueMap<String> map = new MultiValueMap<String>();

        // must start with a multi-map tag
        XMLEvent event = reader.nextTag();
        if (!isStartTagEvent(event, QNAME_TAG_MULTI_VALUE_MAP)) {
            throw getNotStartTagException(QNAME_TAG_MULTI_VALUE_MAP, event);
        }

        // the map name must match the expected name
        String value =
                getRequiredAttributeValue(event.asStartElement(),
                                          QNAME_ATTR_NAME);
        if (!mapName.equals(value)) {
            throw new JournalException("Expecting a '" + mapName
                    + "' multi-map, but found a '" + value
                    + "' multi-map instead");
        }

        // populate the map
        readMultiMapKeys(reader, map);

        return map;
    }
528184
private Map<String, String> getMapping() {
    if (this.attributesMapping != null && this.lastReload != null && this.lastReload.equals(this.attributeResolverService
      .getLastSuccessfulReloadInstant())) {
      return this.attributesMapping;
    }
    // Reload.
    ServiceableComponent<AttributeResolver> component = null;
    Map<String, String> am = null;
    try {
      // Get date before we get the component. That way we'll not leak changes.
      final DateTime when = this.attributeResolverService.getLastSuccessfulReloadInstant();
      component = this.attributeResolverService.getServiceableComponent();
      if (null == component) {
        if (!captiveServiceReloadFailed) {
          logger.error("Invalid AttributeResolver configuration");
        }
        captiveServiceReloadFailed = true;
      }
      else {
        final AttributeResolver attributeResolver = component.getComponent();
        am = new HashMap<>();

        Map<String, AttributeDefinition> map = attributeResolver.getAttributeDefinitions();
        for (Map.Entry<String, AttributeDefinition> entry : map.entrySet()) {
          String name = null;
          Set<AttributeEncoder<?>> encoders = entry.getValue().getAttributeEncoders();
          for (AttributeEncoder<?> encoder : encoders) {
            if (encoder instanceof SAML2AttributeEncoder) {
              name = ((SAML2AttributeEncoder<?>) encoder).getName();
              if (name != null) {
                break;
              }
            }
          }
          if (name != null) {
            logger.debug("Adding mapping between SAML2 attribute '{}' and id '{}'", name, entry.getKey());
            am.put(name, entry.getKey());
          }
          else {
            logger.debug("No mapping to SAML2 attribute for attribute id '{}'", entry.getKey());
          }
        }

        captiveServiceReloadFailed = false;
        lastReload = when;
      }
    }
    finally {
      if (null != component) {
        component.unpinComponent();
      }
    }

    this.attributesMapping = am;
    return am;
  }
799217
private ImmutableMap<Predicate,ImmutableList<TermType>> extractCastTypeMap(
            Multimap<Predicate, CQIE> ruleIndex, List<Predicate> predicatesInBottomUp,
            ImmutableMap<CQIE, ImmutableList<Optional<TermType>>> termTypeMap, DBMetadata metadata) {

        // Append-only
        Map<Predicate,ImmutableList<TermType>> mutableCastMap = Maps.newHashMap();

        for (Predicate predicate : predicatesInBottomUp) {
            ImmutableList<TermType> castTypes = inferCastTypes(predicate, ruleIndex.get(predicate), termTypeMap,
                    mutableCastMap,metadata);

            mutableCastMap.put(predicate, castTypes);
        }

        return ImmutableMap.copyOf(mutableCastMap);
    }
985318
public ImmutableTerm getSubjectAtom(TriplesMap tm, String joinCond) throws Exception {
		ImmutableTerm subjectAtom = null;
		String subj = "";
		classPredicates.clear();

		// SUBJECT
		SubjectMap sMap = tm.getSubjectMap();

		// process template declaration
		IRI termType = sMap.getTermType();

		// WORKAROUND for:
		// SubjectMap.getTemplateString() throws NullPointerException when
		// template == null
		//
		Template template = sMap.getTemplate();
		if (template == null) {
			subj = null;
		} else {
			subj = sMap.getTemplateString();
		}

		if (subj != null) {
			// create uri("...",var)
			subjectAtom = getTermTypeAtom(subj, termType, joinCond);
		}

		// process column declaration
		subj = sMap.getColumn();
		if (subj != null) {
			if(template == null && (termType.equals(R2RMLVocabulary.iri))){

				subjectAtom = termFactory.getImmutableUriTemplate(termFactory.getVariable(subj));

			}
			else {
				// create uri("...",var)
				subjectAtom = getTermTypeAtom(subj, termType, joinCond);
			}
		}

		// process constant declaration
        // TODO(xiao): toString() is suspicious
        RDFTerm subjConstant = sMap.getConstant();
		if (subjConstant != null) {
			// create uri("...",var)
            subj = subjConstant.toString();
			subjectAtom = getURIFunction(subj, joinCond);
		}


		// process class declaration
		List<IRI> classes = sMap.getClasses();
		for (IRI o : classes) {
            classPredicates.add( termFactory.getImmutableUriTemplate(termFactory.getConstantLiteral(o.getIRIString())));
		}

		if (subjectAtom == null)
			throw new Exception("Error in parsing the subjectMap in node "
					+ tm.toString());

		return subjectAtom;

	}
1317667
public final TreeModelFilter<SQLPPTriplesMap> type() throws RecognitionException {
        TreeModelFilter<SQLPPTriplesMap> value = null;


        try {
            // C:\\Project\\Obdalib\\obdalib-parent\\obdalib-core\\src\\main\\java\\it\\unibz\\inf\\obda\\gui\\swing\\utils\\MappingFilter.g:69:3: ( ID | TEXT | TARGET | SOURCE | FUNCT | PRED )
            int alt4=6;
            switch ( input.LA(1) ) {
            case ID:
                {
                alt4=1;
                }
                break;
            case TEXT:
                {
                alt4=2;
                }
                break;
            case TARGET:
                {
                alt4=3;
                }
                break;
            case SOURCE:
                {
                alt4=4;
                }
                break;
            case FUNCT:
                {
                alt4=5;
                }
                break;
            case PRED:
                {
                alt4=6;
                }
                break;
            default:
                NoViableAltException nvae =
                    new NoViableAltException("", 4, 0, input);

                throw nvae;

            }

            switch (alt4) {
                case 1 :
                    // C:\\Project\\Obdalib\\obdalib-parent\\obdalib-core\\src\\main\\java\\it\\unibz\\inf\\obda\\gui\\swing\\utils\\MappingFilter.g:69:5: ID
                    {
                    match(input,ID,FOLLOW_ID_in_type120); 

                     value = new MappingIDTreeModelFilter();

                    }
                    break;
                case 2 :
                    // C:\\Project\\Obdalib\\obdalib-parent\\obdalib-core\\src\\main\\java\\it\\unibz\\inf\\obda\\gui\\swing\\utils\\MappingFilter.g:70:5: TEXT
                    {
                    match(input,TEXT,FOLLOW_TEXT_in_type133); 

                     value = new MappingStringTreeModelFilter(); 

                    }
                    break;
                case 3 :
                    // C:\\Project\\Obdalib\\obdalib-parent\\obdalib-core\\src\\main\\java\\it\\unibz\\inf\\obda\\gui\\swing\\utils\\MappingFilter.g:71:5: TARGET
                    {
                    match(input,TARGET,FOLLOW_TARGET_in_type144); 

                     value = new MappingHeadVariableTreeModelFilter();

                    }
                    break;
                case 4 :
                    // C:\\Project\\Obdalib\\obdalib-parent\\obdalib-core\\src\\main\\java\\it\\unibz\\inf\\obda\\gui\\swing\\utils\\MappingFilter.g:72:5: SOURCE
                    {
                    match(input,SOURCE,FOLLOW_SOURCE_in_type153); 

                     value = new MappingSQLStringTreeModelFilter();

                    }
                    break;
                case 5 :
                    // C:\\Project\\Obdalib\\obdalib-parent\\obdalib-core\\src\\main\\java\\it\\unibz\\inf\\obda\\gui\\swing\\utils\\MappingFilter.g:73:5: FUNCT
                    {
                    match(input,FUNCT,FOLLOW_FUNCT_in_type162); 

                     value = new MappingFunctorTreeModelFilter();

                    }
                    break;
                case 6 :
                    // C:\\Project\\Obdalib\\obdalib-parent\\obdalib-core\\src\\main\\java\\it\\unibz\\inf\\obda\\gui\\swing\\utils\\MappingFilter.g:74:5: PRED
                    {
                    match(input,PRED,FOLLOW_PRED_in_type172); 

                     value = new MappingPredicateTreeModelFilter();

                    }
                    break;

            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }

        finally {
        	// do for sure before leaving
        }
        return value;
    }
413696
public <T, E extends Exception> T map(Try.Function<? super String, T, E> mapper) throws E {
        return mapper.apply(toString());
    }
239690
@Override
    public MapAttribute<? super X, ?, ?> getMap(String paramName)
    {
        PluralAttribute<? super X, ?, ?> declaredAttrib = getDeclaredPluralAttribute(paramName);

        if (isMapAttribute(declaredAttrib))
        {
            return (MapAttribute<X, ?, ?>) declaredAttrib;
        }

        declaredAttrib = getPluralAttriute(paramName);

        if (isMapAttribute(declaredAttrib))
        {
            return (MapAttribute<X, ?, ?>) declaredAttrib;
        }

        throw new IllegalArgumentException(
                "attribute of the given name and type is not present in the managed type, for name:" + paramName);
    }
1228911
private int attributeMap(String name) {
        Integer num = map.get(name);
        if (num == null) {
            return 0;
        }
        return num.intValue();
    }
1216552
public static Map<String, Object> getInputMap(Message message, KnowledgeOperation operation, KnowledgeRuntimeEngine runtime) {
        Map<String, Object> map = new HashMap<String, Object>();
        List<ExpressionMapping> inputs = operation.getInputExpressionMappings();
        if (inputs.size() > 0) {
            map.putAll(getMap(message, inputs, null));
        } else {
            Object content = filterRemoteDefaultInputContent(message.getContent(), runtime);
            if (content != null) {
                map.put(PARAMETER, content);
            }
        }
        return map;
    }
285419
private static void speedUpDTMManager() throws Exception {
        // https://github.com/aws/aws-sdk-java/issues/238
        // http://stackoverflow.com/questions/6340802/java-xpath-apache-jaxp-implementation-performance
        if (System.getProperty(DTM_MANAGER_DEFAULT_PROP_NAME) == null) {
            Class<?> XPathContextClass = Class.forName(XPATH_CONTEXT_CLASS_NAME);
            Method getDTMManager = XPathContextClass.getMethod("getDTMManager");
            Object XPathContext = XPathContextClass.newInstance();
            Object dtmManager = getDTMManager.invoke(XPathContext);

            if (DTM_MANAGER_IMPL_CLASS_NAME.equals(dtmManager.getClass().getName())) {
                // This would avoid the file system to be accessed every time
                // the internal XPathContext is instantiated.
                System.setProperty(DTM_MANAGER_DEFAULT_PROP_NAME,
                        DTM_MANAGER_IMPL_CLASS_NAME);
            }
        }
    }
1011224
public Map<String, Boolean> getApprovalMap() throws ProposalException {

        Lifecycle.QueryApprovalStatusResults rs = getApprovalStatusResults();
        if (rs == null) {
            return Collections.emptyMap();
        }
        return rs.getApprovedMap();
    }
1233297
public java.util.Map<java.lang.String, org.tensorflow.framework.AttrValue> getAttrMap() {
    return internalGetAttr().getMap();
  }