/** * Returns the on line function that matches the given string, or returns a new one if none * match it. * * @param code The name of the code to fetch or to create. * @return A code matching the given name. */ public static OnLineFunction valueOf(String code) { return valueOf(OnLineFunction.class, code); } }
/** Returns the list of enumerations of the same kind than this enum. */ public OnLineFunction[] family() { return values(); }
/** * Returns the OnLineFunction that matches the given string, or returns a * new one if none match it. */ public static OnLineFunction valueOf(String code) { if (code == null) { return null; } synchronized (VALUES) { Iterator iter = VALUES.iterator(); while (iter.hasNext()) { OnLineFunction type = (OnLineFunction) iter.next(); if (code.equalsIgnoreCase(type.name())) { return type; } } return new OnLineFunction(code); } } }
metadata.add("TransferOptionsOnlineDescription ",or.getDescription().toString()); if(or.getFunction()!=null) metadata.add("TransferOptionsOnlineFunction ",or.getFunction().name());
/** * Creates a code list of an other kind. The returned set contains a code list having * the same ordinal value than {@link AxisDirection#NORTH}, so we can detect if the * {@code SortedSet} confuses the code list types. */ private CodeListSet<OnLineFunction> createOtherKind() { // For the validity of the tests, ordinal value must be the same. assertEquals(NORTH.ordinal(), OnLineFunction.INFORMATION.ordinal()); final CodeListSet<OnLineFunction> c = new CodeListSet<>(OnLineFunction.class); assertTrue(c.add(OnLineFunction.INFORMATION)); return c; }
metadata.add("TransferOptionsOnlineDescription ",or.getDescription().toString()); if(or.getFunction()!=null) metadata.add("TransferOptionsOnlineFunction ",or.getFunction().name());
/** * Returns the on line function that matches the given string, or returns a * new one if none match it. More specifically, this methods returns the first instance for * which <code>{@linkplain #name() name()}.{@linkplain String#equals equals}(code)</code> * returns {@code true}. If no existing instance is found, then a new one is created for * the given name. * * @param code the name of the code to fetch or to create. * @return a code matching the given name. */ public static OnLineFunction valueOf(String code) { return valueOf(OnLineFunction.class, code); } }
/** * Returns the list of codes of the same kind than this code list element. * Invoking this method is equivalent to invoking {@link #values()}, except that * this method can be invoked on an instance of the parent {@code CodeList} class. * * @return all code {@linkplain #values() values} for this code list. */ @Override public OnLineFunction[] family() { return values(); }
metadata.add("TransferOptionsOnlineDescription ",or.getDescription().toString()); if(or.getFunction()!=null) metadata.add("TransferOptionsOnlineFunction ",or.getFunction().name());
/** * Returns the on line function that matches the given string, or returns a * new one if none match it. More specifically, this methods returns the first instance for * which <code>{@linkplain #name() name()}.{@linkplain String#equals equals}(code)</code> * returns {@code true}. If no existing instance is found, then a new one is created for * the given name. * * @param code the name of the code to fetch or to create. * @return a code matching the given name. */ public static OnLineFunction valueOf(String code) { return valueOf(OnLineFunction.class, code); } }
/** * Returns the list of codes of the same kind than this code list element. * Invoking this method is equivalent to invoking {@link #values()}, except that * this method can be invoked on an instance of the parent {@code CodeList} class. * * @return all code {@linkplain #values() values} for this code list. */ @Override public OnLineFunction[] family() { return values(); }
/** * Adds a URL to a more complete description of the metadata. * * <ul> * <li>{@code metadata/metadataLinkage/linkage} * with {@code function} set to {@code OnLineFunction.COMPLETE_METADATA}</li> * </ul> * * @param link */ public final void addCompleteMetadata(final URI link) { if (link != null) { final DefaultOnlineResource ln = new DefaultOnlineResource(link); ln.setFunction(OnLineFunction.valueOf("COMPLETE_METADATA")); ln.setProtocol(link.getScheme()); addIfNotPresent(metadata().getMetadataLinkages(), ln); } }
/** * Returns the list of enumerations of the same kind than this enum. */ public /*{OnLineFunction}*/ CodeList[] family() { return values(); }
/** * Adds a URL to a more complete description of the metadata. * Storage location is: * * <ul> * <li>{@code metadata/metadataLinkage/linkage} * with {@code function} set to {@code OnLineFunction.COMPLETE_METADATA}</li> * </ul> * * @param link URL to a more complete description of the metadata, or {@code null}. */ public final void addCompleteMetadata(final URI link) { if (link != null) { final DefaultOnlineResource ln = new DefaultOnlineResource(link); ln.setFunction(OnLineFunction.valueOf("COMPLETE_METADATA")); ln.setProtocol(link.getScheme()); addIfNotPresent(metadata().getMetadataLinkages(), ln); } }
case 2: { url = SQLUtilities.getSimplifiedURL(metadata); function = OnLineFunction.valueOf(CONNECTION); description = Resources.formatInternational(Resources.Keys.GeodeticDataBase_4, Constants.EPSG, version, metadata.getDatabaseProductName(),
case 2: { url = SQLUtilities.getSimplifiedURL(metadata); function = OnLineFunction.valueOf(CONNECTION); description = Resources.formatInternational(Resources.Keys.GeodeticDataBase_4, Constants.EPSG, version, metadata.getDatabaseProductName(),