本文整理了Java中org.n52.svalbard.encode.XmlEncoderKey
类的一些代码示例,展示了XmlEncoderKey
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XmlEncoderKey
类的具体详情如下:
包路径:org.n52.svalbard.encode.XmlEncoderKey
类名称:XmlEncoderKey
暂无
代码示例来源:origin: org.n52.svalbard/svalbard-xmlbeans
public EncoderKey getEncoderKey(String namespace, Class<?> o) {
return new XmlEncoderKey(namespace, o);
}
代码示例来源:origin: org.n52.arctic-sea/svalbard
@Override
public int hashCode() {
return Objects.hashCode(3, 79, getNamespace(), getType());
}
代码示例来源:origin: org.n52.svalbard/svalbard
public static EncoderKey getEncoderKey(String namespace, Object o) {
return new XmlEncoderKey(namespace, o.getClass());
}
代码示例来源:origin: org.n52.svalbard/svalbard
@Override
public int hashCode() {
return Objects.hashCode(3, 79, getNamespace(), getType());
}
代码示例来源:origin: org.n52.arctic-sea/svalbard
public static EncoderKey getEncoderKey(String namespace, Object o) {
return new XmlEncoderKey(namespace, o.getClass());
}
代码示例来源:origin: org.n52.arctic-sea/svalbard
@Override
public boolean equals(Object obj) {
if (obj != null && getClass() == obj.getClass()) {
final XmlEncoderKey o = (XmlEncoderKey) obj;
return Objects.equal(getType(), o.getType()) && Objects.equal(getNamespace(), o.getNamespace());
}
return false;
}
代码示例来源:origin: org.n52.svalbard/svalbard-xmlbeans
public AbstractSoapEncoder(String namespace) {
this.encoderKey = ImmutableSet.<EncoderKey>of(new XmlEncoderKey(namespace, SoapResponse.class));
}
代码示例来源:origin: org.n52.svalbard/svalbard
@Override
public boolean equals(Object obj) {
if (obj != null && getClass() == obj.getClass()) {
final XmlEncoderKey o = (XmlEncoderKey) obj;
return Objects.equal(getType(), o.getType()) && Objects.equal(getNamespace(), o.getNamespace());
}
return false;
}
代码示例来源:origin: org.n52.svalbard/svalbard-xmlbeans
public EncoderKey getEncoderKey(String namespace, Object o) {
return new XmlEncoderKey(namespace, o.getClass());
}
代码示例来源:origin: org.n52.svalbard/svalbard
@Override
public String toString() {
return String.format("XmlEncoderKey[namespace=%s, type=%s]", getNamespace(), getType().getSimpleName());
}
代码示例来源:origin: org.n52.arctic-sea/svalbard
public static Set<EncoderKey> encoderKeysForElements(String namespace, Class<?>... elements) {
return Arrays.stream(elements).map(x -> new XmlEncoderKey(namespace, x)).collect(toSet());
}
代码示例来源:origin: org.n52.svalbard/svalbard
@Override
public int getSimilarity(EncoderKey key) {
if (key instanceof XmlEncoderKey) {
XmlEncoderKey xmlKey = (XmlEncoderKey) key;
if (Objects.equal(getNamespace(), xmlKey.getNamespace())) {
return ClassHelper.getSimiliarity(getType() != null ? getType() : Object.class,
xmlKey.getType() != null ? xmlKey.getType() : Object.class);
} else {
return -1;
}
} else {
return -1;
}
}
}
代码示例来源:origin: org.n52.svalbard/svalbard
public static Set<EncoderKey> encoderKeysForElements(String namespace, Class<?>... elements) {
return Arrays.stream(elements).map(x -> new XmlEncoderKey(namespace, x)).collect(toSet());
}
代码示例来源:origin: org.n52.arctic-sea/svalbard
@Override
public int getSimilarity(EncoderKey key) {
if (key instanceof XmlEncoderKey) {
XmlEncoderKey xmlKey = (XmlEncoderKey) key;
if (Objects.equal(getNamespace(), xmlKey.getNamespace())) {
return ClassHelper.getSimiliarity(getType() != null ? getType() : Object.class,
xmlKey.getType() != null ? xmlKey.getType() : Object.class);
} else {
return -1;
}
} else {
return -1;
}
}
}
代码示例来源:origin: org.n52.arctic-sea/svalbard-xmlstream
@SuppressWarnings("hiding")
protected <T, S> Encoder<T, S> getEncoder(String namespace, Object o) throws NoEncoderForKeyException {
return getEncoder(new XmlEncoderKey(namespace, o.getClass()));
}
代码示例来源:origin: org.n52.arctic-sea/svalbard
@Override
public String toString() {
return String.format("XmlEncoderKey[namespace=%s, type=%s]", getNamespace(), getType().getSimpleName());
}
代码示例来源:origin: org.n52.svalbard/svalbard-xmlstream
@SuppressWarnings("hiding")
protected <T, S> Encoder<T, S> getEncoder(String namespace, Object o) throws NoEncoderForKeyException {
return getEncoder(new XmlEncoderKey(namespace, o.getClass()));
}
代码示例来源:origin: org.n52.sensorweb.sos/hibernate-common
private <T> Encoder<XmlObject, T> getEncoder(String namespace, T o)
throws EncodingException {
EncoderKey key = new XmlEncoderKey(namespace, o.getClass());
Encoder<XmlObject, T> encoder = encoderRepository.getEncoder(key);
if (encoder == null) {
throw new NoEncoderForKeyException(key);
}
return encoder;
}
代码示例来源:origin: 52North/SOS
private <T> Encoder<XmlObject, T> getEncoder(String namespace, T o)
throws EncodingException {
EncoderKey key = new XmlEncoderKey(namespace, o.getClass());
Encoder<XmlObject, T> encoder = encoderRepository.getEncoder(key);
if (encoder == null) {
throw new NoEncoderForKeyException(key);
}
return encoder;
}
代码示例来源:origin: org.n52.sensorweb.sos/hibernate-handler
private String getProcedureDescriptionFormat(String responseFormat) {
Encoder<Object, Object> encoder =
encoderRepository.getEncoder(new XmlEncoderKey(responseFormat, OmObservation.class));
if (encoder != null && encoder instanceof ObservationEncoder) {
return ((ObservationEncoder) encoder).getProcedureEncodingNamspace();
}
return null;
}
内容来源于网络,如有侵权,请联系作者删除!