Codota Logo
OWLLiteralImplString
Code IndexAdd Codota to your IDE (free)

How to use
OWLLiteralImplString
in
uk.ac.manchester.cs.owl.owlapi

Best Java code snippets using uk.ac.manchester.cs.owl.owlapi.OWLLiteralImplString (Showing top 20 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
DateTime d =
  • Codota Iconnew DateTime()
  • Codota IconDateTimeFormatter formatter;String text;formatter.parseDateTime(text)
  • Codota IconObject instant;new DateTime(instant)
  • Smart code suggestions by Codota
}
origin: net.sourceforge.owlapi/owlapi-impl

@Override
public int initHashCode() {
  int hash = hashIndex();
  hash = OWLObject.hashIteration(hash, getDatatype().hashCode());
  hash = OWLObject.hashIteration(hash, getLiteral().hashCode() * 65536);
  return OWLObject.hashIteration(hash, getLang().hashCode());
}
origin: net.sourceforge.owlapi/owlapi-gwt-client-side-emul

@Override
public OWLLiteral getOWLLiteral(@Nonnull String value) {
  return new OWLLiteralImplString(value);
}
origin: net.sourceforge.owlapi/owlapi-gwt-client-side-emul

private final int getHashCode(String lit) {
  int code = 277;
  code = code * 37 + getDatatype().hashCode();
  code = code * 37 + lit.hashCode() * 65536;
  if (hasLang()) {
    code = code * 37 + getLang().hashCode();
  }
  return code;
}
origin: net.sourceforge.owlapi/owlapi-gwt-client-side-emul

@Override
public boolean equals(Object obj) {
  if (obj == null) {
    return false;
  }
  if (this == obj) {
    return true;
  }
  if (!(obj instanceof OWLLiteral)) {
    return false;
  }
  OWLLiteral other = (OWLLiteral) obj;
  return getLiteral().equals(other.getLiteral()) && getDatatype().equals(other.getDatatype())
    && getLang().equals(other.getLang());
}
origin: net.sourceforge.owlapi/owlapi-gwt-client-side-emul

@Override
public int parseInteger() throws NumberFormatException {
  return Integer.parseInt(getLiteral());
}
origin: net.sourceforge.owlapi/owlapi-gwt-client-side-emul

@Override
public int compareTo(OWLObject o) {
  int thisTypeIndex = index();
  int otherTypeIndex = 0;
  if (o instanceof OWLObjectImplWithEntityAndAnonCaching) {
    otherTypeIndex = ((OWLObjectImplWithEntityAndAnonCaching) o).index();
  } else {
    otherTypeIndex =
      OWLObjectImplWithEntityAndAnonCaching.OWLOBJECT_TYPEINDEX_PROVIDER.getTypeIndex(o);
  }
  int diff = thisTypeIndex - otherTypeIndex;
  if (diff == 0) {
    // Objects are the same type
    return compareObjectOfSameType(o);
  } else {
    return diff;
  }
}
origin: net.sourceforge.owlapi/owlapi-gwt-client-side-emul

protected int compareObjectOfSameType(OWLObject object) {
  OWLLiteral other = (OWLLiteral) object;
  int diff = getLiteral().compareTo(other.getLiteral());
  if (diff != 0) {
    return diff;
  }
  diff = getDatatype().compareTo(other.getDatatype());
  if (diff != 0) {
    return diff;
  }
  return getLang().compareTo(other.getLang());
}
origin: net.sourceforge.owlapi/owlapi-gwt-serialization

public static void serialize(SerializationStreamWriter streamWriter, OWLLiteralImplString instance) throws SerializationException {
  streamWriter.writeString(instance.getLiteral());
}
origin: owlcs/owlapi

@Override
public int initHashCode() {
  int hash = hashIndex();
  hash = OWLObject.hashIteration(hash, getDatatype().hashCode());
  hash = OWLObject.hashIteration(hash, getLiteral().hashCode() * 65536);
  return OWLObject.hashIteration(hash, getLang().hashCode());
}
origin: owlcs/owlapi

@Override
public OWLLiteral getOWLLiteral(String value) {
  if (useCompression) {
    return new OWLLiteralImpl(value, "", XSDSTRING);
  }
  return new OWLLiteralImplString(value);
}
origin: ontodev/robot

try {
 OWLLiteralImplString str = (OWLLiteralImplString) av;
 annotationValue = str.getLiteral();
} catch (ClassCastException ex2) {
 continue;
origin: net.sourceforge.owlapi/owlapi-distribution

@Override
public int initHashCode() {
  int hash = hashIndex();
  hash = OWLObject.hashIteration(hash, getDatatype().hashCode());
  hash = OWLObject.hashIteration(hash, getLiteral().hashCode() * 65536);
  return OWLObject.hashIteration(hash, getLang().hashCode());
}
origin: net.sourceforge.owlapi/owlapi-impl

@Override
public OWLLiteral getOWLLiteral(String value) {
  if (useCompression) {
    return new OWLLiteralImpl(value, "", XSDSTRING);
  }
  return new OWLLiteralImplString(value);
}
origin: net.sourceforge.owlapi/owlapi-osgidistribution

@Override
public int initHashCode() {
  int hash = hashIndex();
  hash = OWLObject.hashIteration(hash, getDatatype().hashCode());
  hash = OWLObject.hashIteration(hash, getLiteral().hashCode() * 65536);
  return OWLObject.hashIteration(hash, getLang().hashCode());
}
origin: net.sourceforge.owlapi/owlapi-distribution

@Override
public OWLLiteral getOWLLiteral(String value) {
  if (useCompression) {
    return new OWLLiteralImpl(value, "", XSDSTRING);
  }
  return new OWLLiteralImplString(value);
}
origin: net.sourceforge.owlapi/owlapi-osgidistribution

@Override
public OWLLiteral getOWLLiteral(String value) {
  if (useCompression) {
    return new OWLLiteralImpl(value, "", XSDSTRING);
  }
  return new OWLLiteralImplString(value);
}
origin: net.sourceforge.owlapi/owlapi-gwt-serialization

public static OWLLiteralImplString instantiate(SerializationStreamReader streamReader) throws SerializationException {
  return new OWLLiteralImplString(streamReader.readString());
}
origin: owlcs/owlapi

@Override
public OWLLiteral getOWLLiteral(String literal, @Nullable String lang) {
  String normalisedLang;
  if (lang == null) {
    normalisedLang = "";
  } else {
    normalisedLang = lang.trim().toLowerCase(Locale.ENGLISH);
  }
  if (normalisedLang.isEmpty()) {
    if (useCompression) {
      return new OWLLiteralImpl(literal, null, XSDSTRING);
    }
    return new OWLLiteralImplString(literal);
  } else {
    if (useCompression) {
      return new OWLLiteralImpl(literal, normalisedLang, null);
    }
    return new OWLLiteralImplPlain(literal, normalisedLang);
  }
}
origin: net.sourceforge.owlapi/owlapi-osgidistribution

@Override
public OWLLiteral getOWLLiteral(String literal, @Nullable String lang) {
  String normalisedLang;
  if (lang == null) {
    normalisedLang = "";
  } else {
    normalisedLang = lang.trim().toLowerCase(Locale.ENGLISH);
  }
  if (normalisedLang.isEmpty()) {
    if (useCompression) {
      return new OWLLiteralImpl(literal, null, XSDSTRING);
    }
    return new OWLLiteralImplString(literal);
  } else {
    if (useCompression) {
      return new OWLLiteralImpl(literal, normalisedLang, null);
    }
    return new OWLLiteralImplPlain(literal, normalisedLang);
  }
}
origin: net.sourceforge.owlapi/owlapi-distribution

@Override
public OWLLiteral getOWLLiteral(String literal, @Nullable String lang) {
  String normalisedLang;
  if (lang == null) {
    normalisedLang = "";
  } else {
    normalisedLang = lang.trim().toLowerCase(Locale.ENGLISH);
  }
  if (normalisedLang.isEmpty()) {
    if (useCompression) {
      return new OWLLiteralImpl(literal, null, XSDSTRING);
    }
    return new OWLLiteralImplString(literal);
  } else {
    if (useCompression) {
      return new OWLLiteralImpl(literal, normalisedLang, null);
    }
    return new OWLLiteralImplPlain(literal, normalisedLang);
  }
}
uk.ac.manchester.cs.owl.owlapiOWLLiteralImplString

Javadoc

An OWLLiteral with xsd:string datatype and no language tag.

Most used methods

  • getLiteral
  • <init>
  • getDatatype
  • getLang
  • hashIndex
  • compareObjectOfSameType
  • getHashCode
  • hasLang
  • index

Popular in Java

  • Reactive rest calls using spring rest template
  • notifyDataSetChanged (ArrayAdapter)
  • onCreateOptionsMenu (Activity)
  • putExtra (Intent)
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • Properties (java.util)
    The Properties class represents a persistent set of properties. The Properties can be saved to a st
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • ConcurrentHashMap (java.util.concurrent)
    A hash table supporting full concurrency of retrievals and adjustable expected concurrency for updat
  • JPanel (javax.swing)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now