Tabnine Logo
XLink.getType
Code IndexAdd Tabnine to your IDE (free)

How to use
getType
method
in
org.apache.sis.xml.XLink

Best Java code snippets using org.apache.sis.xml.XLink.getType (Showing top 4 results out of 315)

origin: apache/sis

/**
 * Returns a string representation of this object. The default implementation returns the
 * simple class name followed by non-null attributes, as in the example below:
 *
 * {@preformat text
 *     XLink[type="locator", href="urn:ogc:def:method:EPSG::4326"]
 * }
 */
@Override
public String toString() {
  final StringBuilder buffer = new StringBuilder(64);
  buffer.append(Classes.getShortClassName(this)).append('[');
  append(buffer, "type",    getType());
  append(buffer, "href",    getHRef());
  append(buffer, "role",    getRole());
  append(buffer, "arcrole", getArcRole());
  append(buffer, "title",   getTitle());
  append(buffer, "show",    getShow());
  append(buffer, "actuate", getActuate());
  append(buffer, "label",   getLabel());
  append(buffer, "from",    getFrom());
  append(buffer, "to",      getTo());
  return buffer.append(']').toString();
}
origin: org.apache.sis.core/sis-utility

/**
 * Returns a string representation of this object. The default implementation returns the
 * simple class name followed by non-null attributes, as in the example below:
 *
 * {@preformat text
 *     XLink[type="locator", href="urn:ogc:def:method:EPSG::4326"]
 * }
 */
@Override
public String toString() {
  final StringBuilder buffer = new StringBuilder(64);
  buffer.append(Classes.getShortClassName(this)).append('[');
  append(buffer, "type",    getType());
  append(buffer, "href",    getHRef());
  append(buffer, "role",    getRole());
  append(buffer, "arcrole", getArcRole());
  append(buffer, "title",   getTitle());
  append(buffer, "show",    getShow());
  append(buffer, "actuate", getActuate());
  append(buffer, "label",   getLabel());
  append(buffer, "from",    getFrom());
  append(buffer, "to",      getTo());
  return buffer.append(']').toString();
}
origin: apache/sis

int hashCode = link.hashCode();
assertFalse(hashCode == 0);
assertNull(link.getType());
assertEquals(XLink.Type.TITLE, link.getType());
assertEquals("XLink[type=\"title\"]", link.toString());
assertFalse("Hash code should have changed.", hashCode == (hashCode = link.hashCode()));
assertEquals(XLink.Type.EXTENDED, link.getType());
assertEquals("XLink[type=\"extended\", role=\"org:apache:sis:role\"]", link.toString());
assertFalse("Hash code should have changed.", hashCode == (hashCode = link.hashCode()));
assertEquals(XLink.Type.EXTENDED, link.getType());
assertEquals("XLink[type=\"extended\", role=\"org:apache:sis:role\", title=\"Some title\"]", link.toString());
assertFalse("Hash code should have changed.", hashCode == (hashCode = link.hashCode()));
assertEquals(XLink.Type.RESOURCE, link.getType());
assertEquals("XLink[type=\"resource\", role=\"org:apache:sis:role\", title=\"Some title\", label=\"SomeLabel\"]", link.toString());
assertFalse("Hash code should have changed.", hashCode == (hashCode = link.hashCode()));
assertEquals(XLink.Type.LOCATOR, link.getType());
assertEquals("XLink[type=\"locator\", href=\"org:apache:sis:href\", role=\"org:apache:sis:role\", title=\"Some title\", label=\"SomeLabel\"]", link.toString());
assertFalse("Hash code should have changed.", hashCode == (hashCode = link.hashCode()));
assertNull("Can't be Type.SIMPLE if a label is defined.", link.getType());
assertEquals("XLink[href=\"org:apache:sis:href\", role=\"org:apache:sis:role\", title=\"Some title\", show=\"new\", label=\"SomeLabel\"]", link.toString());
assertFalse("Hash code should have changed.", hashCode == (hashCode = link.hashCode()));
assertEquals(XLink.Type.SIMPLE, link.getType());
origin: apache/sis

assertEquals("France", anchor.toString());
assertEquals("SDN:C320:2:FR", anchor.getHRef().toString());
assertNull(anchor.getType());
assertEquals(XLink.Type.LOCATOR, anchor.getType());
org.apache.sis.xmlXLinkgetType

Javadoc

Returns the type of link. May have one of the following values:
  • simple: a simple link
  • extended: an extended, possibly multi-resource, link
  • locator: a pointer to an external resource
  • resource: an internal resource
  • arc: a traversal rule between resources
  • title: a descriptive title for another linking element
The default value is null. If the #setType(XLink.Type) method has been invoked with the org.apache.sis.xml.XLink.Type#AUTO enum, then this method will infer a type from the attributes having a non-null value.

Popular methods of XLink

  • <init>
    Creates a new link as a copy of the given link.
  • setHRef
    Sets the URN to a resources.
  • equals
    Compares this XLink with the given object for equality.
  • getHRef
    Returns a URN to an external resources, or to an other part of a XML document, or an identifier.
  • hashCode
    Returns a hash code value for this XLink.
  • setActuate
    Sets the desired timing of traversal from the starting resource to the ending resource.
  • setRole
    Sets the URI reference for some description of the arc role.
  • setShow
    Sets the desired presentation of the ending resource on traversal from the starting resource.
  • setTitle
    Sets a human-readable string with a short description for the arc.
  • setType
    Sets the type of link. Any value different than org.apache.sis.xml.XLink.Type#AUTO (including null)
  • append
    Appends the given attribute in the given buffer if the attribute value is not null. If the given val
  • canWrite
    Checks if the given attribute can be set.
  • append,
  • canWrite,
  • fieldMask,
  • getActuate,
  • getArcRole,
  • getFrom,
  • getLabel,
  • getRole,
  • getShow

Popular in Java

  • Parsing JSON documents to java classes using gson
  • getContentResolver (Context)
  • getSystemService (Context)
  • setRequestProperty (URLConnection)
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • Handler (java.util.logging)
    A Handler object accepts a logging request and exports the desired messages to a target, for example
  • Collectors (java.util.stream)
  • JPanel (javax.swing)
  • Table (org.hibernate.mapping)
    A relational table
  • 14 Best Plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now