Get the Quandl code associated with this metadata.

@return the quandl code (DATASOURCE/CODE form), null if not present.
769067
public String getQuandlCode() {
    try {
      String dataSourceField = getString(DATA_SOURCE_FIELD);
      String codeField = getString(CODE_FIELD);
      // if either not present, will throw an exception.
      return dataSourceField + "/" + codeField;
    } catch (RuntimeException ex) {
      return null;
    }
  }
1181202
private static File getCodeSourceArchive() {
        try {
            CodeSource codeSource = DocumentRootHelper.class.getProtectionDomain().getCodeSource();
            URL location = (codeSource == null ? null : codeSource.getLocation());
            if (location == null) {
                return null;
            }
            String path = location.getPath();
            URLConnection connection = location.openConnection();
            if (connection instanceof JarURLConnection) {
                path = ((JarURLConnection) connection).getJarFile().getName();
            }
            if (path.indexOf("!/") != -1) {
                path = path.substring(0, path.indexOf("!/"));
            }
            return new File(path);
        } catch (IOException ex) {
            return null;
        }
    }
349409
public String getCode() {
        String codePath = "SegHead.code";
        return Optional.ofNullable(getElement(getPath() + "." + codePath))
            .map(Object::toString)
            .orElse(null);
    }
880931
public HeaderDefinition getHeaderDefinition() {
    JSONArray jsonArray = null;
    try {
      jsonArray = _jsonObject.getJSONArray(COLUMN_NAMES_FIELD);
      List<String> columnNames = new ArrayList<String>(jsonArray.length());
      for (int i = 0; i < jsonArray.length(); i++) {
        columnNames.add(jsonArray.getString(i));
      }
      return HeaderDefinition.of(columnNames);
    } catch (JSONException ex) {
      s_logger.error("Metadata had unexpected structure - could not extract column_names field. Was:\n{}", _jsonObject.toString());
      throw new QuandlRuntimeException("Metadata had unexpected structure", ex);
    }
  }
25012
public static QuandlCodeRequest allColumns(final String quandlCode) {
    ArgumentChecker.notNull(quandlCode, "quandlCode");
    return new QuandlCodeRequest(quandlCode, null);
  }
1087094
protected byte[] getXID()
    {
        if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled()) {
            trace.entry(this, cclass
                        , "getXID"
                            );
            trace.exit(this, cclass
                       , "getXID"
                       , "returns logicalUnitOfWork.XID=" + logicalUnitOfWork.XID + "(byte[])"
                            );
        } // if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
        return logicalUnitOfWork.XID;
    }
83717
public final String getCorrelationId() {

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "getCorrelationId");

        String value = null;
        int choice = getApi().getChoiceField(JsApiAccess.CORRELATIONID);

        /* If it is stored as a String, just extract it */
        if (choice == JsApiAccess.IS_CORRELATIONID_STRINGVALUE) {
            value = (String) getApi().getField(JsApiAccess.CORRELATIONID_STRINGVALUE);
        }

        /* If it is stored as a binary, we have to convert it */
        else if (choice == JsApiAccess.IS_CORRELATIONID_BINARYVALUE) {
            byte[] binValue = (byte[]) getApi().getField(JsApiAccess.CORRELATIONID_BINARYVALUE);

            if (binValue != null) {
                /* It'll be more economical to get the length right immediately */
                StringBuffer sbuf = new StringBuffer((binValue.length * 2) + 3);

                /* Insert the ID: then add on the binary value as a hex string */
                sbuf.append(ID_STRING);
                HexString.binToHex(binValue, 0, binValue.length, sbuf);

                /* Return the String representation */
                value = sbuf.toString();
            }

        }

        /* If the choice was 'Empty' do nothing as value is already null. */

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(this, tc, "getCorrelationId", value);

        return value;
    }
1324255
public License getLicense(final DbLicense dbLicense) {
        final License license = DataModelFactory.createLicense(dbLicense.getName(), dbLicense.getLongName(),
            dbLicense.getComments(), dbLicense.getRegexp(), dbLicense.getUrl());

        if (dbLicense.isApproved() != null) {
            license.setApproved(dbLicense.isApproved());
        }else{
            license.setPending(true);
        }

        if (license.getLongName().isEmpty() && license.getComments().isEmpty() && license.getUrl().isEmpty()
            && license.getRegexp().isEmpty()) {
            license.setUnknown(true);
        }

        return license;
    }
575971
public Collection<Integer> getNumericCodes() {
        Collection<Integer> result = get(KEY_QUERY_NUMERIC_CODES, Collection.class);
        if (result == null) {
            return Collections.emptySet();
        }
        return result;
    }
223110
public String getNullElement() {
    if (PTBConstituent_Type.featOkTst && ((PTBConstituent_Type)jcasType).casFeat_nullElement == null)
      jcasType.jcas.throwFeatMissing("nullElement", "de.julielab.jules.types.PTBConstituent");
    return jcasType.ll_cas.ll_getStringValue(addr, ((PTBConstituent_Type)jcasType).casFeatCode_nullElement);}
1215568
public String getSQL()
    {
        final StringBuilder cmd = new StringBuilder().append(" ")
            .append(Context.getDbType().getSQLPart(SQLPart.SELECT)).append(" ");
        if (distinct) {
            cmd.append(Context.getDbType().getSQLPart(SQLPart.DISTINCT)).append(" ");
        }
        boolean first = true;
        for (final Column column : columns) {
            if (first) {
                first = false;
            } else {
                cmd.append(Context.getDbType().getSQLPart(SQLPart.COMMA));
            }
            column.appendSQL(cmd);
        }
        cmd.append(" ").append(Context.getDbType().getSQLPart(SQLPart.FROM)).append(" ");
        first = true;
        for (final FromTable fromTable : fromTables) {
            fromTable.appendSQL(first, cmd);
            if (first) {
                first = false;
            }
        }
        cmd.append(" ");
        boolean whereAdded = false;
        for (final SQLSelectPart part : parts) {
            part.appendSQL(cmd);
            cmd.append(" ");
            whereAdded = whereAdded || !whereAdded && SQLPart.WHERE.equals(part.sqlpart);
        }

        if (where != null) {
            where.setStarted(whereAdded);
            where.appendSQL(tablePrefix, cmd);
        }

        if (order != null) {
            order.appendSQL(tablePrefix, cmd);
        }
        return cmd.toString();
    }
393828
public static String getTypeCodeSignature(int typeCode) {
        String signature = Values.PRIMITIVE_TYPE_CODE_SIGS.get((byte) typeCode);
        return signature == null ? Values.SIG_JAVA_LANG_OBJECT : signature;
    }
69752
@Nullable
    public T getValue() {
        Object data = mData;
        if (data != NOT_SET) {
            //noinspection unchecked
            return (T) data;
        }
        return null;
    }
414986
public Double getDataNull() {

		Double dataNull = null;
		if (griddedCoverage != null) {
			dataNull = griddedCoverage.getDataNull();
		}

		return dataNull;
	}
739815
@Override
    public Resource getPhyscalFile() {
	if (physcalSource == null) {
	    if (!mapping.hasPhysical()) {
		return null;
	    }
	    Resource tmp = mapping.getPhysical().getRealResource(relPath);
	    physcalSource = ResourceUtil.toExactResource(tmp);
	    // fix if the case not match
	    if (!tmp.getAbsolutePath().equals(physcalSource.getAbsolutePath())) {
		String relpath = extractRealpath(relPath, physcalSource.getAbsolutePath());
		// just a security!
		if (relPath.equalsIgnoreCase(relpath)) {
		    this.relPath = relpath;
		    createClassAndPackage();
		}
	    }
	}
	return physcalSource;
    }
412583
@Basic
    @Column(name = "CODE", unique = true, nullable = false, length=255)
	public String getCode() 
	{
		return code;
	}
967654
public static DataSource getJndiDsWithLog(String jndiName) {
		try {
			return getJndiDs(jndiName);
		} catch (DbRuntimeException e) {
			log.error(e.getCause(), "Find JNDI datasource error!");
		}
		return null;
	}