public WordNode(WordSystem simpleGraph, Word97 word97, String[] keys) { super(simpleGraph,"word",keys); this.word97=word97; super.setVertexFromMap(); }
/** * create a cache with the given file for the given purpose * * @param file * @param purpose */ public Cache(SimpleSystem system, File file, String purpose) { this.setSystem(system); this.file = file; this.purpose = purpose; }
public void increment() { if (this.isPresent()) { Object o=this.getFirstValue(); if (o instanceof Integer) { int i=(Integer)o; Integer i1 = i+1; this.setValue(convertInstanceOfObject(i1,clazz)); } } } }
@Override public Vertex setVertexFromMap() { return setVertexFromMap(initMap()); }
public TripleStoreSystem() { super.setName("SiDIF TripleStore"); super.setVersion("0.0.8"); }
/** * get the GitHub JsonSystem * @return the JsonSystem * @throws Exception */ public JsonSystem getGitHubJsonSystem() throws Exception { PropertiesImpl properties = new PropertiesImpl("github"); String token = (String) properties.getProperty("oauth"); JsonSystem js = new JsonSystem(); js.setDebug(debug); js.connect("Authorization: bearer " + token); return js; }
/** * initialize me for the given graph * * @param simpleGraph * @param kind */ public SimpleNodeImpl(SimpleGraph simpleGraph, String kind, String... keys) { super(simpleGraph); this.keys = new KeysImpl(keys); this.simpleGraph = simpleGraph; this.kind = kind; }
@Override public SimpleSystem close(String ... closeParams) throws Exception { /** * flush all caches */ for (String purpose:this.cacheMap.keySet()) { this.flushCache(purpose); } return this; }
/** * get the first held value or null if it is not present * @return the first value */ public T getFirstValue() { if (isPresent()) return values.get(0); else return null; }
@Override public SimpleSystem close(String ...closeParams) throws Exception { dbConnection.close(); super.close(closeParams); return this; }
public void setValue(T value) { values.clear(); add(value); }
@Override public SimpleSystem connect(String... connectionParams) throws Exception { TinkerGraph tg=(TinkerGraph) super.graph(); tg.createIndex("hashCode", Vertex.class); return this; }
/** * get the triple node * * @param system * @param triple */ public TripleNode(TripleStoreSystem system, Triple triple, String ...keys) { super(system,"triple",keys); this.system = system; this.triple = triple; super.setVertexFromMap(); }
/** * construct me * @param simpleGraph * @param sheet */ public SheetNode(SimpleGraph simpleGraph, XSSFSheet sheet) { this(simpleGraph,"sheet",Keys.EMPTY_KEYS); this.sheet=sheet; super.setVertexFromMap(); }
public void initRootNode(TagNode rootNode) { this.rootNode=rootNode; super.setVertexFromMap(); }
/** * create a PdfNode for the given pdfAnalysis * * @param pdfSystem * @param pdf * @param pageNo */ public PdfNode(PdfSystem pdfSystem, String kind, PDF pdf, int pageNo) { super(pdfSystem, kind, Keys.EMPTY_KEYS); this.pdf = pdf; this.pageNo = pageNo; super.setVertexFromMap(); }
/** * initialize me from the given pageTitle * * @param mediaWikiSystem * @param pageTitle */ public MediaWikiPageNode(MediaWikiSystem mediaWikiSystem, String pageTitle, String... keys) { super(mediaWikiSystem, "wikiPage", keys); this.ms = mediaWikiSystem; this.pageTitle = pageTitle; super.setVertexFromMap(); }
/** * create new Word node * @param simpleGraph * @param word * @param keys */ public WordNode(WordSystem simpleGraph, Word word, String[] keys) { super(simpleGraph,"word",keys); this.word=word; if (word.error==null) super.setVertexFromMap(); else throw new RuntimeException(word.error); }
/** * construct me from the given jsonElement with the given kind * * @param jsonSystem * @param kind * @param jElement */ public JsonNode(SimpleSystem jsonSystem, String kind, JsonElement jElement) { this(jsonSystem, kind, Keys.EMPTY_KEYS); this.jElement = jElement; super.setVertexFromMap(); addSubNodes(jElement); }