138 lines
3.3 KiB
Java
138 lines
3.3 KiB
Java
package org.atriasoft.aknot.model;
|
|
|
|
import java.util.List;
|
|
import java.util.Map;
|
|
|
|
import org.atriasoft.aknot.exception.AknotException;
|
|
import org.atriasoft.aknot.pojo.IntrospectionProperty;
|
|
|
|
public abstract class IntrospectionModel {
|
|
protected static final Boolean DEFAULT_ATTRIBUTE = false;
|
|
protected static final Boolean DEFAULT_IGNORE_UNBKNOWN = false;
|
|
protected static final Boolean DEFAULT_DEFAULT_NULL_VALUE = false;
|
|
protected static final Boolean DEFAULT_CASE_SENSITIVE = true;
|
|
protected static final Boolean DEFAULT_MANAGED = true;
|
|
protected static final Boolean DEFAULT_OPTIONAL = false;
|
|
|
|
protected boolean defaultNullValue = false;
|
|
protected boolean ignoreUnknown = false;
|
|
|
|
protected final Class<?> classType;
|
|
|
|
public IntrospectionModel(final Class<?> classType) {
|
|
this.classType = classType;
|
|
}
|
|
|
|
public Object createObject(final Map<String, Object> properties, final Map<String, List<Object>> nodes) throws AknotException {
|
|
return null;
|
|
}
|
|
|
|
public List<IntrospectionProperty> getAttributes() {
|
|
return null;
|
|
}
|
|
|
|
public String getBeanName(final String nodeName) {
|
|
return nodeName;
|
|
}
|
|
|
|
public String getBeanNameModel(final String nodeName) {
|
|
return getBeanName(nodeName);
|
|
}
|
|
|
|
public Class<?> getClassType() {
|
|
return this.classType;
|
|
}
|
|
|
|
public List<String> getNodeAvaillable() {
|
|
return null;
|
|
}
|
|
|
|
public List<IntrospectionProperty> getNodes() {
|
|
return null;
|
|
}
|
|
|
|
public List<IntrospectionProperty> getSignals() {
|
|
return null;
|
|
}
|
|
|
|
public String getTextBeanName() {
|
|
// TODO Auto-generated method stub
|
|
return null;
|
|
}
|
|
|
|
public String getTreeNameOfSubNode(final String nodeName) throws AknotException {
|
|
return null;
|
|
}
|
|
|
|
public Class<?> getTypeOfProperty(final String nodeName) throws AknotException {
|
|
return null;
|
|
}
|
|
|
|
public Class<?> getTypeOfSubNode(final String nodeName) throws AknotException {
|
|
return null;
|
|
}
|
|
|
|
public Class<?> getTypeOfSubNodeList(final String nodeName) throws AknotException {
|
|
return null;
|
|
}
|
|
|
|
public Class<?> getTypeOfSubProperty(final String nodeName) throws AknotException {
|
|
return null;
|
|
}
|
|
|
|
public Class<?> getTypeOfText() {
|
|
return null;
|
|
}
|
|
|
|
public Object getValue(final String propertyName, final String propertyValue) throws AknotException {
|
|
return null;
|
|
}
|
|
|
|
public Object getValueFromText(final String text) throws AknotException {
|
|
return null;
|
|
}
|
|
|
|
/**
|
|
* This permit to know if an element in the property is able to manage the Whole text under (this remove all parsing of xml inside the model...) Annotation @XmlText
|
|
* @return true if a parameter manage the text (otherwise the text is sended to the fromString() function.
|
|
*/
|
|
public boolean hasTextModel() {
|
|
return false;
|
|
}
|
|
|
|
public boolean isArray() {
|
|
return false;
|
|
}
|
|
|
|
protected boolean isDefaultNullValue() {
|
|
return this.defaultNullValue;
|
|
}
|
|
|
|
public boolean isEnum() {
|
|
return this.classType.isEnum();
|
|
}
|
|
|
|
public boolean isIgnoreUnknown() {
|
|
return this.ignoreUnknown;
|
|
}
|
|
|
|
public boolean isList() {
|
|
return false;
|
|
}
|
|
|
|
public boolean isNative() {
|
|
return false;
|
|
}
|
|
|
|
public boolean isObject(final String propertyName) {
|
|
return Object.class.isAssignableFrom(this.classType);
|
|
}
|
|
|
|
public boolean isRecord(final String propertyName) {
|
|
return Record.class.isAssignableFrom(this.classType);
|
|
}
|
|
|
|
public abstract String toString(final Object data) throws AknotException;
|
|
|
|
}
|