org.ow2.easywsdl.schema.api.absItf.AbsItfAttribute Maven / Gradle / Ivy
/**
* Copyright (c) 2008-2012 EBM WebSourcing, 2012-2018 Linagora
*
* This program/library is free software: you can redistribute it and/or modify
* it under the terms of the New BSD License (3-clause license).
*
* This program/library is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the New BSD License (3-clause license)
* for more details.
*
* You should have received a copy of the New BSD License (3-clause license)
* along with this program/library; If not, see http://directory.fsf.org/wiki/License:BSD_3Clause/
* for the New BSD License (3-clause license).
*/
package org.ow2.easywsdl.schema.api.absItf;
import org.ow2.easywsdl.schema.api.SchemaElement;
import org.ow2.easywsdl.schema.api.SchemaReader.FeatureConstants;
/**
* @author Nicolas Salatge - EBM WebSourcing
*/
public interface AbsItfAttribute extends SchemaElement {
public enum Use {
OPTIONAL("optional"), REQUIRED(
"required"), PROHIBITED("prohibited");
private final String value;
/**
* Creates a new instance of {@link FeatureConstants}
*
* @param value
*/
private Use(final String value) {
this.value = value;
}
/**
*
* @return
*/
public String value() {
return this.value;
}
public boolean equals(final String val) {
return this.toString().equals(val);
}
/*
* (non-Javadoc)
*
* @see java.lang.Enum#toString()
*/
@Override
public String toString() {
return this.value;
}
public static Use value(String val) {
Use res = null;
if(OPTIONAL.value().equals(val)) {
res = OPTIONAL;
} else if(REQUIRED.value().equals(val)) {
res = REQUIRED;
} else if(PROHIBITED.value().equals(val)) {
res = PROHIBITED;
}
return res;
}
}
String getName();
String getValue();
Use getUse();
String getNamespaceUri();
T getType();
void setType(T type);
}