1 18 19 package com.hp.hpl.jena.ontology.daml.impl; 22 23 24 27 import com.hp.hpl.jena.enhanced.*; 28 import com.hp.hpl.jena.graph.*; 29 import com.hp.hpl.jena.ontology.*; 30 import com.hp.hpl.jena.ontology.daml.*; 31 import com.hp.hpl.jena.vocabulary.*; 32 33 34 40 public class DAMLRestrictionImpl 41 extends DAMLClassImpl 42 implements DAMLRestriction 43 { 44 47 48 51 56 public static Implementation factory = new Implementation() { 57 public EnhNode wrap( Node n, EnhGraph eg ) { 58 if (canWrap( n, eg )) { 59 return new DAMLRestrictionImpl( n, eg ); 60 } 61 else { 62 throw new ConversionException( "Cannot convert node " + n.toString() + " to DAMLRestriction" ); 63 } 64 } 65 66 public boolean canWrap( Node n, EnhGraph g ) { 67 return hasType( n, g, DAML_OIL.Restriction ); 68 } 69 }; 70 71 74 75 private PropertyAccessor m_propOnProperty = new PropertyAccessorImpl( getVocabulary().onProperty(), this ); 76 77 78 private PropertyAccessor m_propHasClass = new PropertyAccessorImpl( getVocabulary().hasClass(), this ); 79 80 81 private PropertyAccessor m_propToClass = new PropertyAccessorImpl( getVocabulary().toClass(), this ); 82 83 84 private PropertyAccessor m_propHasValue = new PropertyAccessorImpl( getVocabulary().hasValue(), this ); 85 86 87 private PropertyAccessor m_propHasClassQ = new PropertyAccessorImpl( getVocabulary().hasClassQ(), this ); 88 89 90 private IntLiteralAccessor m_propCardinality = new IntLiteralAccessorImpl( getVocabulary().cardinality(), this ); 91 92 93 private IntLiteralAccessor m_propMinCardinality = new IntLiteralAccessorImpl( getVocabulary().minCardinality(), this ); 94 95 96 private IntLiteralAccessor m_propMaxCardinality = new IntLiteralAccessorImpl( getVocabulary().maxCardinality(), this ); 97 98 99 private IntLiteralAccessor m_propCardinalityQ = new IntLiteralAccessorImpl( getVocabulary().cardinalityQ(), this ); 100 101 102 private IntLiteralAccessor m_propMinCardinalityQ = new IntLiteralAccessorImpl( getVocabulary().minCardinalityQ(), this ); 103 104 105 private IntLiteralAccessor m_propMaxCardinalityQ = new IntLiteralAccessorImpl( getVocabulary().maxCardinalityQ(), this ); 106 107 108 109 112 120 public DAMLRestrictionImpl( Node n, EnhGraph g ) { 121 super( n, g ); 122 } 123 124 125 126 129 130 139 public boolean isRestriction() { 140 return true; 141 } 142 143 144 public PropertyAccessor prop_onProperty() { return m_propOnProperty; } 145 public PropertyAccessor prop_toClass() { return m_propToClass; } 146 public PropertyAccessor prop_hasValue() { return m_propHasValue; } 147 public PropertyAccessor prop_hasClass() { return m_propHasClass; } 148 public IntLiteralAccessor prop_cardinality() { return m_propCardinality; } 149 public IntLiteralAccessor prop_minCardinality() { return m_propMinCardinality; } 150 public IntLiteralAccessor prop_maxCardinality() { return m_propMaxCardinality; } 151 public PropertyAccessor prop_hasClassQ() { return m_propHasClassQ; } 152 public IntLiteralAccessor prop_cardinalityQ() { return m_propCardinalityQ; } 153 public IntLiteralAccessor prop_minCardinalityQ() { return m_propMinCardinalityQ; } 154 public IntLiteralAccessor prop_maxCardinalityQ() { return m_propMaxCardinalityQ; } 155 156 157 160 161 162 166 } 167 168 169 198 199 | Popular Tags |